The ASN.1 Toolkit logo

The ASN.1 Toolkit is a collection of software components for Linux, MS Windows, and possibly MacOS (future - if I get this stuff compiled for Intel/ARM64 Macs)...

It is pure 64bit software written in pure C (Java Native Interface wrappers are on the roadmap).

One of the main goals of the ASN.1 toolkit was to provide a symbolic ASN.1 database to provide an awesome ASN.1 dump tool with symbolic support.

But it has become far more. Please read the main section below to get into it. My claim is "flat ASN.1 processing was y′day!"

(2024/01/09) This website is currently WORK IN PROGRESS. I am still performing tests and preparing the full source code to be published on github, soon.

ASN.1 path

ASN.1 BER or DER encoded content is nothing else than a tree-like structure with ′next′ and ′child′ nodes. Each node is an ASN.1 element of type BOOLEAN, INTEGER, OBJECT IDENTIFIER (OID), UTF8String, BIT STRING, OCTET STRING, SEQUENCE, SET, etc.

To select a specifc node (e.g. for manipulation or just dumping), I defined the first version of ASN.1 path (the most simpliest one) as follows:

Examples:

Notes:

ASN.1 path and ′a1sh′

The ASN.1 shell ′a1sh′ is a good example for the implementation of ASN.1 path: After having parsed e.g. DER-encoded input data, you can select a specific node in the ASN.1 element tree using ASN.1 path. After that, you could insert new elements there, delete the currently selected node, etc.

After that, you could save the modified ASN.1 element tree as a new DER-encoded, binary file. Or you could just modify the content of a selected ASN.1 node.

A really big example is:

Of course, this example is simplified because you would have to do more (e.g. modify the SubjectKeyIdentifier X.509v3 certificate extension - if applicable) but in general, this is the ′easy′ version of a full certification authority!

Copyright © 2020-2024 Ingo A. Kubbilun
All rights reserved.

Roboto fonts provided by Google (embedded in this site) and licensed under the Apache License 2.0.