Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Basic Encoding Rules (BER) are rules for encoding and decoding values defined with Abstract Syntax Notation One (ASN.1). They turn ASN.1 values into a transfer syntax so the values can be sent and then recovered by a receiver. BER is not a character encoding or a general-purpose compression format.

What BER means in ASN.1

ASN.1 describes data types; BER specifies how values of those types are represented for transfer and how a decoder interprets that representation. As Recommendation ITU-T X.690 | ISO/IEC 8825-1 puts it, “Application of these encoding rules produces a transfer syntax for such values.”

In practice, an ASN.1 definition tells systems what a value means and what type it has, while BER supplies rules for representing that value as encoded data. The applicable protocol or application profile determines whether BER is the required encoding rule set; the existence of an ASN.1 definition alone does not mean every protocol uses BER.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a BER-encoded value contains

At an introductory level, X.690 describes a data-value encoding as components in this order:

#1 Best Overall
  1. Identifier octets: identify the ASN.1 tag, which indicates the value’s type or tag.
  2. Length octets: indicate the length form and, where applicable, the length of the contents.
  3. Contents octets: carry the encoded value’s contents.
  4. End-of-contents octets: appear when required by the length form; they are not present in every encoding.

This outer structure helps a decoder identify what follows and how to find the end of a value. The precise encoding details depend on the ASN.1 type and the applicable BER rules; the component overview is not a complete implementation guide. See clause 8.1.1 of the official ITU-T X.690 standard for the specification.

How BER differs from CER and DER

ITU-T X.690 specifies BER alongside the more constrained Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER). The important distinction is that BER permits alternatives in some encodings, while CER and DER restrict encodings to a single alternative for each value. A conforming receiver must support the encoding alternatives allowed by the applicable rules.

Rule set Permitted encoding alternatives Length form in the ITU-T summary
BER Basic rules permit alternative encodings where specified. Can use the length forms permitted by BER.
CER Restricts each value to a single encoding alternative. Indefinite length.
DER Restricts each value to a single encoding alternative. Definite length.

The ITU-T summary describes DER as more suitable for small encoded values and CER for large ones. That is a general suitability statement in the recommendation’s summary, not a quantified performance guarantee. CER and DER are not automatically interchangeable with BER in every application: follow the conformance requirements of the relevant standard or protocol profile.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which X.690 edition is current?

ITU-T lists Recommendation X.690 (02/2021), identical to ISO/IEC 8825-1:2021, as in force. The recommendation was approved on 13 February 2021, and its official page provides the English-language standard. Consult the ITU-T X.690 publication page when exact conformance behavior matters; a protocol may impose additional requirements beyond the general encoding rules.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.