Click here to Skip to main content
12,894,930 members (60,539 online)
Click here to Skip to main content
Add your own
alternative version


96 bookmarked
Posted 2 Sep 2003

ASN.1 Editor

, 30 Jun 2008 CPOL
Rate this:
Please Sign up or sign in to vote.
An editor to view, analyse and modify ASN.1 DER encoded data
ASN.1 Editor Main Screen


Abstract Syntax Notation One (ASN.1) Distinguished Encoding Rule (DER) encoded data is widely used in digital security protocols (i.e. X509 digital certificate). The encoded data is not readable by regular text editors. The Asn1Processor Library is designed to parse and modify ASN.1 DER encoded data. The ASN.1 Editor is a sample project that uses the Asn1Processor library to view and to edit DER encoded data. The Asn1Processor Library source code and reference documentation (Asn1EditorLib.chm) are also included in the downloadable source code zip file.

The ASN.1 Editor doesn't do any schema checking. The user needs to make sure the edited data conforms to certain constrains (i.e. OCSP request or Key Info structure).

Main Features

1. Dump Text Format Data

You can view the selected node branch text dump by right-clicking the designated node and selecting "View Node Text". View Node Text

2. Atomically Parse “Encapsulates” Data

OCTET and BITSTRING may encapsulate ASN.1 DER encoded data, for example:

Encapsulate Parse Sample

The ASN.1 Editor can automatically parse the data structure.

3. Hex Data Viewer

Click "View->Hex Viewer" and you can view the binary data structure.

Hex Viewer

4. Extensible OID Table

OID.txt file is installed in the same directory as Asn1Editor.EXE.

Here are the sample records:

0.9.2342.19200300.100.1.25, domainComponent, Signet pilot, Signet intraNet, Signet personal, Signet securityPolicy

The OID and the description are comma separated. It can be extended in order to add in additional OIDs.

5. Change Node Content

Double click the selected node and you can see the "Node Content Editor".

Node Content Editor

6. Save Selected Node Data into Another File

You can save the designated node data into a file by right-clicking the node and selecting "Save selected node as...".

7. Copy Selected Node Data into Clipboard

Right-click the node and select "Copy".

8. Paste Node Data from Clipboard

Right-click the insertion point node and select "Paste as last child node", "Paste before current node", or "Paste after current node" to perform the insert operation.

9. Binary/Hex/Base64 Data Converter

Convert the data format between Hex, Base64, and PEM using the "Data Converter".

Data Converter


  • 3rd September, 2003: Initial post
  • 29th June, 2008: Updated source code and installer
    The changes are mainly for bug fixing, Visual Studio 2005, and Vista support.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Liping Dai
Software Developer (Senior)
United States United States
Liping Dai has worked in IT industry more than 17 years. He moved to Canada in 1996. After worked in Toronto for 4 years, he relocated to Silicon Valley. He has strong passion in the area of Multi-core/Multi thread programming, Parallel Computing, Image Reorganization, Secure Communication, and Mobile Device development.

You may also be interested in...

Comments and Discussions

NewsNew life to ASN.1 Editor Pin
vpodans2-Aug-15 5:53
membervpodans2-Aug-15 5:53 
GeneralRe: New life to ASN.1 Editor Pin
Member 116385073-Jan-16 21:11
memberMember 116385073-Jan-16 21:11 
AnswerRe: New life to ASN.1 Editor Pin
vpodans3-Jan-16 21:16
membervpodans3-Jan-16 21:16 
GeneralRe: New life to ASN.1 Editor Pin
z1616624-Jan-17 1:54
memberz1616624-Jan-17 1:54 
GeneralStill an excellent work Pin
Member 1179544723-Jul-15 9:35
memberMember 1179544723-Jul-15 9:35 
QuestionIn message file p7m. asn1 Editor bad for each file Pin
Member 361124631-Mar-15 2:16
memberMember 361124631-Mar-15 2:16 
GeneralMy vote of 5 Pin
Member 1119121529-Oct-14 15:12
memberMember 1119121529-Oct-14 15:12 
QuestionMy vote is 5 Pin
Safak Tarazan25-Oct-14 8:57
memberSafak Tarazan25-Oct-14 8:57 
GeneralMy vote of 1 Pin
MYS7717-Sep-14 6:11
memberMYS7717-Sep-14 6:11 
GeneralMy vote of 5 Pin
Member 1089613019-Jun-14 21:40
memberMember 1089613019-Jun-14 21:40 
Questioncan you decouple the asn1 node class from System.Windows.Forms.TreeNode class? Pin
foundationsoft3-Oct-13 16:18
memberfoundationsoft3-Oct-13 16:18 
AnswerRe: can you decouple the asn1 node class from System.Windows.Forms.TreeNode class? Pin
Liping Dai3-Oct-13 17:11
memberLiping Dai3-Oct-13 17:11 
GeneralNice tool, but can't handle 'indefinite' length Pin
Qistoph17-Mar-11 11:39
memberQistoph17-Mar-11 11:39 
I've been using the ASN.1 Editor for a few weeks now and like it quite well.

It is however not possible to read nodes with an indefinite length.
Defined by 0x80 in the first length byte.
X.690-0207 states: For the indefinite form, the length octets indicate that the contents octets are terminated by end-of-contents
octets (see 8.1.5), and shall consist of a single octet. The single octet shall have bit 8 set to one, and bits 7 to 1 set to zero. If this form of length is used, then end-of-contents octets (see 8.1.5) shall be present in the encoding following
the contents octets.

8.1.5 End-of-contents octets
The end-of-contents octets shall be present if the length is encoded as specified in, otherwise they shall not be
The end-of-contents octets shall consist of two zero octets.

I have downloaded the source and looked in to this for a moment, but haven't come up with a solution yet.
If anyone knows if this has already been solved in some available copy, please let me know.
GeneralRe: Nice tool, but can't handle 'indefinite' length Pin
dheijl17-Nov-11 3:40
memberdheijl17-Nov-11 3:40 
GeneralRe: Nice tool, but can't handle 'indefinite' length Pin
Qistoph17-Nov-11 21:28
memberQistoph17-Nov-11 21:28 
GeneralRe: Nice tool, but can't handle 'indefinite' length Pin
dheijl17-Nov-11 21:39
memberdheijl17-Nov-11 21:39 
GeneralRe: Nice tool, but can't handle 'indefinite' length Pin
Qistoph17-Nov-11 21:46
memberQistoph17-Nov-11 21:46 
GeneralExcellent tool, + problem Pin
CodyBatt14-Dec-10 11:39
memberCodyBatt14-Dec-10 11:39 
GeneralMy vote of 5 Pin
Alastair Taylor7-Oct-10 2:50
memberAlastair Taylor7-Oct-10 2:50 
GeneralAssigning ASN.1 BER file for decoding Pin
kkonline55522-Mar-10 5:55
memberkkonline55522-Mar-10 5:55 
GeneralASN1 Visualizer Pin
KinslayerUY17-Sep-09 6:01
memberKinslayerUY17-Sep-09 6:01 
GeneralMessage Removed Pin
Katekortez25-Oct-08 9:30
memberKatekortez25-Oct-08 9:30 
GeneralConverting signed data (with PKCS7) to ASN1Node Pin
Asaf Levy22-Apr-08 19:12
memberAsaf Levy22-Apr-08 19:12 
GeneralRe: Converting signed data (with PKCS7) to ASN1Node Pin
KinslayerUY17-Sep-09 5:53
memberKinslayerUY17-Sep-09 5:53 
QuestionWriting ASN.1 specification for an audio file (.WAV) Pin
ASN1keith24-Feb-08 11:45
memberASN1keith24-Feb-08 11:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 30 Jun 2008
Article Copyright 2003 by Liping Dai
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid