asn1.codecs.ber

Basic Encoding Rules (BER) is a standard for encoding ASN.1 data. It is by far the most common standard for doing so, being used in LDAP, TLS, SNMP, RDP, and other protocols. Like Distinguished Encoding Rules (DER), Canonical Encoding Rules (CER), and Packed Encoding Rules (PER), Basic Encoding Rules is a specification created by the https://www.itu.int/en/pages/default.aspx, International Telecommunications Union, and specified in http://www.itu.int/rec/T-REC-X.690/en, X.690 - ASN.1 encoding rules

BER is generally regarded as the most flexible of the encoding schemes, because all values can be encoded in a multitude of ways. This flexibility might be convenient for developers who use a BER Library, but creating a BER library in the first place is a nightmare, because of its flexibility. I personally suspect that the complexity of BER may make its implementation inclined to security vulnerabilities, so I would not use it if you have a choice in the matter. Also, the ability to represent values in several different ways is actually a security problem when data has to be guarded against tampering with a cryptographic signature. (Basically, it makes it a lot easier to find a tampered payload that has the identical signature as the genuine payload.)

Public Imports

asn1.codec
public import asn1.codec;
asn1.interfaces
public import asn1.interfaces : Byteable;
asn1.types.identification
public import asn1.types.identification;

Members

Aliases

BERElement
alias BERElement = BasicEncodingRulesElement
berOID
alias berOID = basicEncodingRulesObjectIdentifier
berObjectID
alias berObjectID = basicEncodingRulesObjectIdentifier
berObjectIdentifier
alias berObjectIdentifier = basicEncodingRulesObjectIdentifier

Classes

BasicEncodingRulesElement
class BasicEncodingRulesElement

The unit of encoding and decoding for Basic Encoding Rules (BER).

Variables

basicEncodingRulesObjectIdentifier
OID basicEncodingRulesObjectIdentifier;

The object identifier assigned to the Basic Encoding Rules (BER), per the https://www.itu.int/en/pages/default.aspx, International Telecommunications Union's, http://www.itu.int/rec/T-REC-X.690/en, X.690 - ASN.1 encoding rules

See Also

Meta

Authors

  • $(PERSON Jonathan M. Wilbur, jonathan@wilbur.space, http://jonathan.wilbur.space)