Description
Basic Encoding Rules (BER) is a method for encoding data objects described in Abstract Syntax Notation One (ASN.1) into a string of octets (bytes). ASN.1 is a standard interface description language used to define the structure of protocol data units (PDUs) in a platform-independent way. BER provides the concrete translation from this abstract definition to a concrete bit-level representation that can be transmitted over a network or stored. It is a tag-length-value (TLV) encoding scheme, which makes the encoded data self-describing.
Architecturally, BER operates on individual ASN.1 types. The encoding process for any data element produces three consecutive fields: the Identifier (Tag) octets, the Length octets, and the Contents (Value) octets. The Tag identifies the type of the data (e.g., INTEGER, SEQUENCE, OCTET STRING) and whether it is primitive or constructed. The Length field specifies the number of octets in the Contents field. The Contents field contains the actual encoded value of the data. For simple types like INTEGER, the value is directly encoded. For constructed types like SEQUENCE or SET, the Contents field contains the concatenated BER encodings of each component element.
How it works involves a recursive process. An encoder traverses the ASN.1 data structure, applying the TLV rule to each node. A key feature is its flexibility; BER offers multiple encoding forms for some data types (e.g., definite vs. indefinite length forms). In 3GPP, BER is specified as the transfer syntax for numerous Layer 3 signaling protocols, especially in the core network. For instance, protocols like Radio Resource Control (RRC), Non-Access Stratum (NAS), and many application-layer protocols in the core (often using the ASN.1 PER variant) have their roots in BER encoding principles. Its role is to guarantee that a message generated by one vendor's equipment can be correctly parsed and understood by another vendor's equipment, providing the essential interoperability for multi-vendor telecommunications networks.
Purpose & Motivation
BER exists to solve the fundamental problem of heterogeneous data representation in distributed systems and telecommunications networks. Different computer architectures represent data in different ways (e.g., byte order, integer size). Without a common, unambiguous encoding rule, two systems could agree on the abstract structure of a message (via ASN.1) but still fail to exchange data correctly because of low-level representation differences. BER provides a canonical, external representation that is independent of any machine-specific details.
Its creation was motivated by the need for robust, interoperable protocol specifications in the early days of digital telecommunications and data networking (OSI model). Before such standards, protocol specifications were often ambiguous, leading to costly and time-consuming integration problems. BER, in conjunction with ASN.1, allows protocol designers to define complex, nested data structures precisely and provides a standardized way to serialize them. This dramatically reduces implementation errors and ensures that network elements from different manufacturers can communicate seamlessly, which is a cornerstone principle of public standards like those from 3GPP. It addresses the limitation of ad-hoc or proprietary encoding schemes that locked networks into single-vendor solutions.
Key Features
- Defines a Tag-Length-Value (TLV) structure for encoding ASN.1 data types
- Provides self-describing data, as the tag identifies the type of the encoded value
- Supports both primitive (simple) and constructed (compound) encoding forms
- Allows for definite-length and indefinite-length encoding methods
- Ensures platform-independent data exchange between network entities
- Forms the basis for other ASN.1 encoding rules like CER, DER, and PER
Evolution Across Releases
Basic Encoding Rules (BER) were adopted from ITU-T standards as the foundational encoding scheme for ASN.1-defined protocols in 3GPP Release 99. Its initial use provided a standardized, unambiguous binary representation for critical signaling messages in the new UMTS system, ensuring interoperability between network elements from different vendors from the outset.
Defining Specifications
| Specification | Title |
|---|---|
| TS 21.905 | 3GPP TS 21.905 |
| TS 22.101 | 3GPP TS 22.101 |
| TS 22.105 | 3GPP TS 22.105 |
| TS 22.925 | 3GPP TS 22.925 |
| TS 23.050 | 3GPP TS 23.050 |
| TS 23.107 | 3GPP TS 23.107 |
| TS 23.171 | 3GPP TS 23.171 |
| TS 23.207 | 3GPP TS 23.207 |
| TS 23.271 | 3GPP TS 23.271 |
| TS 23.979 | 3GPP TS 23.979 |
| TS 25.101 | 3GPP TS 25.101 |
| TS 25.102 | 3GPP TS 25.102 |
| TS 25.104 | 3GPP TS 25.104 |
| TS 25.105 | 3GPP TS 25.105 |
| TS 25.111 | 3GPP TS 25.111 |
| TS 25.123 | 3GPP TS 25.123 |
| TS 25.133 | 3GPP TS 25.133 |
| TS 25.141 | 3GPP TS 25.141 |
| TS 25.142 | 3GPP TS 25.142 |
| TS 25.201 | 3GPP TS 25.201 |
| TS 25.212 | 3GPP TS 25.212 |
| TS 25.215 | 3GPP TS 25.215 |
| TS 25.222 | 3GPP TS 25.222 |
| TS 25.225 | 3GPP TS 25.225 |
| TS 25.331 | 3GPP TS 25.331 |
| TS 25.411 | 3GPP TS 25.411 |
| TS 25.415 | 3GPP TS 25.415 |
| TS 25.423 | 3GPP TS 25.423 |
| TS 25.427 | 3GPP TS 25.427 |
| TS 25.914 | 3GPP TS 25.914 |
| TS 25.931 | 3GPP TS 25.931 |
| TS 26.077 | 3GPP TS 26.077 |
| TS 31.114 | 3GPP TR 31.114 |
| TS 32.298 | 3GPP TR 32.298 |
| TS 32.300 | 3GPP TR 32.300 |
| TS 32.401 | 3GPP TR 32.401 |
| TS 32.404 | 3GPP TR 32.404 |
| TS 32.405 | 3GPP TR 32.405 |
| TS 32.406 | 3GPP TR 32.406 |
| TS 32.436 | 3GPP TR 32.436 |
| TS 33.108 | 3GPP TR 33.108 |
| TS 34.114 | 3GPP TR 34.114 |
| TS 37.104 | 3GPP TR 37.104 |
| TS 37.105 | 3GPP TR 37.105 |
| TS 37.113 | 3GPP TR 37.113 |
| TS 37.141 | 3GPP TR 37.141 |
| TS 37.145 | 3GPP TR 37.145 |
| TS 37.544 | 3GPP TR 37.544 |
| TS 37.802 | 3GPP TR 37.802 |
| TS 37.812 | 3GPP TR 37.812 |
| TS 37.900 | 3GPP TR 37.900 |
| TS 45.903 | 3GPP TR 45.903 |
| TS 45.913 | 3GPP TR 45.913 |
| TS 45.914 | 3GPP TR 45.914 |