October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

BER in ASN.1: How Values Are Encoded for Transfer and Storage

Basic Encoding Rules (BER) encode and decode ASN.1 values into a transfer syntax. See how BER’s value structure works and how it differs from CER and DER.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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 they can be transmitted or stored and later recovered. BER is not a character encoding or a general-purpose compression format.

What BER does

ASN.1 describes data types; BER specifies how values of those types are represented. As Recommendation ITU-T X.690 | ISO/IEC 8825-1 puts it, “Application of these encoding rules produces a transfer syntax for such values.” The standard defines BER alongside two more constrained rule sets: Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER).

As an Amazon Associate I earn from qualifying purchases.

BER applies when an ASN.1-based protocol or application calls for it. It is not safe to assume that every ASN.1 protocol uses BER or that BER is interchangeable with CER or DER in every context; the relevant protocol profile or standard determines what is permitted.

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

What a BER-encoded value looks like

At an introductory level, X.690 describes a data-value encoding as an ordered sequence of components:

#1 Best Overall
Sale
Pearson Computer Networking, 8E
  • brand: Pearson
  • Computer Networking, 8e
  1. Identifier octets: identify the ASN.1 tag, indicating the kind of value.
  2. Length octets: indicate the length form and, where applicable, the size of the contents.
  3. Contents octets: carry the encoded value.
  4. End-of-contents octets: appear when the length form requires them; they are omitted otherwise.

This outline explains the outer structure, not all the rules needed to implement a decoder. Primitive and constructed forms and detailed length rules add important distinctions, so exact behavior should be checked in the standard and the applicable protocol profile.

How BER differs from CER and DER

BER allows alternative encodings in cases permitted by the basic rules. A conforming receiver must support those alternatives. CER and DER remove such alternatives, requiring a single permitted encoding for a value. The X.690 summary distinguishes them by permitted length form and offers a general suitability note:

Rule set Permitted alternatives Length form X.690 summary
BER Alternatives may be available where the basic rules permit them. Not limited to a single length form by the summary. Basic encoding rules; conforming receivers support permitted alternatives.
CER One permitted alternative for each value. Indefinite length. Described as more suitable for large encoded values.
DER One permitted alternative for each value. Definite length. Described as more suitable for small encoded values.

The suitability descriptions are the recommendation’s summary, not a universal performance result or a quantified comparison. Choose the rule set required by the application or protocol rather than treating the three as freely interchangeable.

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 standard defines BER?

The current edition identified by ITU-T is Recommendation X.690 (02/2021), approved on 13 February 2021 and listed as in force. ITU-T identifies ISO/IEC 8825-1:2021 as the identical international standard. The recommendation is international rather than specific to one country or region.

For exact conformance requirements, consult the official ITU-T X.690 edition page and the official English PDF.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.