ASN.1 Tools for C++

ASN.1/C++ Compiler

The OSS ASN.1/C++ Compiler is a stand-alone program that takes as input one or more files, with each input file containing one or more ASN.1 modules. The compiler verifies that the specification is valid, and generates:

  • diagnostic messages and optionally an output ASN.1 listing
  • C++ classes to be included into your application program
  • a control table for use by the encoder/decoder.

Cross compiling is supported by the ASN.1 Tools for C++. Cross compiling enables a developer to produce files that can be used on a different operating system than the one the compiler runs on. Maximize your investment with the ability to cross-compile. Find out more about cross-compilation.



The encoder/decoder provides the application programmer with the encode() and decode() methods.

The encode() method takes data placed by your application program into the object of the compiler-generated C++ class, and converts it to a string of bytes encoded according to BER, PER, OER, DER, CER, XER, CXER or E-XER. The other method, decode(), takes a string of bytes that have been encoded according to BER, PER, OER, DER, CER, XER, CXER or E-XER and performs the inverse operation, resulting in an object instance of a C++ class that you can easily manipulate. Encoder/decoder tracing control and encoding/decoding exception handling are also provided.

TLV Print Utility

Included with the ASN.1 Tools for C++. Takes a BER or DER encoding in ASCII or binary format from an input file and writes it to an output file in one of three different type-length-value (TLV) formats.

Standards Conformance

This powerful software conforms fully to the ASN.1 standards listed below:

  • ITU-T X.696 (ISO/IEC 8825-7) - Octet Encoding Rules (OER) Base Protocol

  • ITU-T X.680 (ISO/IEC 8824-1) - Abstract Syntax Notation One (ASN.1): Specification of Basic Notation

  • ITU-T X.681 (ISO/IEC 8824-2) - Abstract Syntax Notation One (ASN.1): Information Object Specification

  • ITU-T X.682 (ISO/IEC 8824-3) - Abstract Syntax Notation One (ASN.1): Constraint Specification

  • ITU-T X.683 (ISO/IEC 8824-4) - Abstract Syntax Notation One (ASN.1): Parameterization of ASN.1 Specifications

  • ITU-T X.690 (ISO/IEC 8825-1) - ASN.1 Encoding Rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)

  • ITU-T X.691 (ISO/IEC 8825-2) - ASN.1 Encoding Rules: Specification of Packed Encoding Rules (PER)

  • ITU-T X.692 (ISO/IEC 8825-3) - ASN.1 Encoding Rules: Specification of Encoding Control Notation (ECN)

  • ITU-T X.693 (ISO/IEC 8825-4) - ASN.1 Encoding Rules: Specification of XML Encoding Rules (XER). This includes the Canonical XML Encoding Rules (CXER) specification, and Extended XML Encoding Rules (E-XER).



Feature ASN.1/

Support for OER


Speed. Don't settle for snail-paced ASN.1 tools.
Both our compiler and runtime are fast. We invite you to evaluate our tools and see for yourself.

Fastest Faster Fast Fast

Support for encoder/decoder with debug and tracing capabilities (SOED).


Support for interpretive encoder/decoder designed for a small memory footprint (LED).
OSS' tools can meet your code size requirements no matter which protocol specified with ASN.1 that you use.


Support for compiler-generated encoder/decoder designed for speed (TOED).


Encoding to file or socket in a few lines of code
OSS offers socket support for all encoding rules for any value of any type. Improve the performance of your application. No need to store values in temporary memory. You only need to write one or two lines of code.

Quality Tracing and Precise Error Messages
OSS ASN.1 tools provide a wealth of diagnostics, giving you the information you need, in the format you need, on the platform you want. Don't settle for ASN.1 tools that are miserly with debugging information, thus slowing you down.

No need to worry about backward compatibility between versions of your ASN.1 - your own or the programs with which you communicate.

Relay Safe Mode 
Allows decoding a message with extensions using a different version of the ASN.1 spec and then preserve those extensions when re-encoding.


Get full support including options to determine which types are generated.


Compare and Copy Value
Avoid having to write code to copy or compare and save on implementation time. You can compare any 2 values, or make a copy of any value, regardless of the value's complexity, all with one simple function call.

Constraint Checking
Check all, some, or no constraints. That includes pattern constraints and contents constraints. Invalid values are caught at compile time and runtime, not silently ignored.

Large Values for All Encoding Rules
If you have values that are too large to fit in memory, you'll need this feature. OSS supports large values for all encoding rules, no matter what nesting depth the value has within the PDU.


Change runtime options dynamically with ease
Flexibility at runtime allows you to change options on the fly. For example, encoding rules can be changed so that you can decode with XER and then re-encode with PER.

Access to ASN.1 without foreknowledge of the data
Via the IAAPI you can generically access ASN.1 types, subtypes, and values without having the name or the structure of the data.


Value Notation Format I/O
Print values in value notation format, and read values with the OSS runtime function that parses value notation.

Nesting limits
For recursively defined constructed types and strings, these limits keep your program secure from undesirable invalid encodings. For ASN.1/C, you can even override the default limits.


Support of J2ME CLDC 1.1 (Connected Limited Device Configuration)
The CLDC is a specification of a framework for Java ME applications targeted at devices with very limited resources, such as pagers and mobile phones. The OSS ASN.1 Compiler for Java can now generate Java classes compatible with the J2ME CLDC 1.1 platform. New CLDC 1.1 compatible runtime jar files have been introduced to encode/decode ASN.1 binary and XML messages.

Quick Navigation;

© Copyright 2000-2017  COGITO SOFTWARE CO.,LTD. All rights reserved.