Click here to Skip to main content
15,867,308 members
Articles / Programming Languages / C#

ASN.1 Editor

Rate me:
Please Sign up or sign in to vote.
4.96/5 (105 votes)
30 Jun 2008CPOL2 min read 466.5K   30.5K   102   78
An editor to view, analyse and modify ASN.1 DER encoded data
ASN.1 Editor Main Screen

Introduction

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
1.2.36.68980861.1.1.10, Signet pilot
1.2.36.68980861.1.1.11, Signet intraNet
1.2.36.68980861.1.1.2, Signet personal
1.2.36.68980861.1.1.20, 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

History

  • 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.

License

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


Written By
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.

Comments and Discussions

 
GeneralASN1 Visualizer Pin
KinslayerUY17-Sep-09 6:01
KinslayerUY17-Sep-09 6:01 
GeneralConverting signed data (with PKCS7) to ASN1Node Pin
Asaf Levy22-Apr-08 19:12
Asaf Levy22-Apr-08 19:12 
GeneralRe: Converting signed data (with PKCS7) to ASN1Node Pin
KinslayerUY17-Sep-09 5:53
KinslayerUY17-Sep-09 5:53 
QuestionWriting ASN.1 specification for an audio file (.WAV) Pin
ASN1keith24-Feb-08 11:45
ASN1keith24-Feb-08 11:45 
GeneralI want to convert Base 64 certificate to DER format Pin
yetty200028-Jun-07 21:08
yetty200028-Jun-07 21:08 
GeneralFile DER Pin
Sara9781-Jun-05 5:44
Sara9781-Jun-05 5:44 
GeneralRe: File DER Pin
Liping Dai1-Jun-05 19:52
Liping Dai1-Jun-05 19:52 
GeneralFile in title bar/file name on command line Pin
Member 120189312-May-05 18:20
Member 120189312-May-05 18:20 
In a thread on April 03, I spoke about two new functions for ASN.1 Editor.
Initially, I spoke about passing a filename as an argument (so that I can right-click Open With) to the editor and have it opened. I vaguely recall downloading a version of ASN.1 Editor with this functionality. I then suggested perhaps to display the open file in the title bar of the window so that I know which file I have open. I download the latest version and the functionality for opening a file as a command line argument has disappeared - perhaps you have updated the wrong version?
Apologies if I have made a mistake somewhere.
GeneralRe: File in title bar/file name on command line Pin
Liping Dai16-May-05 3:24
Liping Dai16-May-05 3:24 
GeneralRe: File in title bar/file name on command line Pin
Member 120189316-May-05 12:26
Member 120189316-May-05 12:26 
GeneralINTEGER value 0 encoding error Pin
Joe Hartford6-Apr-05 12:27
Joe Hartford6-Apr-05 12:27 
GeneralRe: INTEGER value 0 encoding error Pin
Liping Dai25-Apr-05 20:44
Liping Dai25-Apr-05 20:44 
QuestionIs this project still moving? Pin
Member 12018933-Apr-05 14:10
Member 12018933-Apr-05 14:10 
AnswerRe: Is this project still moving? Pin
Liping Dai3-Apr-05 16:43
Liping Dai3-Apr-05 16:43 
GeneralRe: Is this project still moving? Pin
[Tony Morris]3-Apr-05 18:41
suss[Tony Morris]3-Apr-05 18:41 
GeneralRe: Is this project still moving? Pin
Liping Dai3-Apr-05 19:21
Liping Dai3-Apr-05 19:21 
GeneralRe: Is this project still moving? Pin
Member 12018934-Apr-05 18:09
Member 12018934-Apr-05 18:09 
GeneralRe: Is this project still moving? Pin
Liping Dai4-Apr-05 20:10
Liping Dai4-Apr-05 20:10 
GeneralOID Encoding Error Pin
jfrazier00426-Mar-05 9:08
jfrazier00426-Mar-05 9:08 
GeneralRe: OID Encoding Error Pin
Liping Dai27-Mar-05 12:46
Liping Dai27-Mar-05 12:46 
General.ber and . der Pin
BigAzam23-Feb-05 15:02
BigAzam23-Feb-05 15:02 
GeneralRe: .ber and . der Pin
Anonymous23-Feb-05 19:15
Anonymous23-Feb-05 19:15 
GeneralRe: .ber and . der Pin
BigAzam7-Apr-05 6:20
BigAzam7-Apr-05 6:20 
QuestionHow to detect if the node has one or multiple tags? Pin
greatx16-Feb-05 16:17
sussgreatx16-Feb-05 16:17 
AnswerRe: How to detect if the node has one or multiple tags? Pin
Liping Dai16-Feb-05 19:28
Liping Dai16-Feb-05 19:28 

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.