6

Right now I'm using BinaryNotes to parse ASN.1 files for use in a Java project. It takes an ASN.1 definition and produces Java class(s) that let me manipulate ASN.1 files.

I've hit a wall with extension markers (...) because it doesn't support them. The source forge project page says they're coming in the next release, but the last release was nearly 2 years ago so I fear the project is dead.

Can anyone recommend an easy (and $free) replacement that does a similar thing and does support extension markers?

Andrew
  • 11,894
  • 12
  • 69
  • 85
  • Wow. There's a real mismatch of old and new technologies for you. Last time I worked on ASN.1 was in the '80's – T.E.D. Jun 11 '09 at 21:58
  • 1
    Yeah, ASN.1 is horrid, but it's required by a particularly important and inflexible 3rd party. :-( – Andrew Jun 12 '09 at 09:40
  • Also, ASN.1 DER is very important (and still very actual) for cryptography, as it's (maybe) the only data format with an unique valid representation. All the X.509 PKI standard and PKCS#7/CMS envelopes and much more are all defined as ASN.1 structures. – lapo Feb 03 '11 at 17:14
  • hello Andrew, can you please check this question of mine on asn.1 http://stackoverflow.com/questions/8166482/asn1c-runtime-library-not-getting-generated and give me any help if possible? thanks.. – Siva Kumar Nov 17 '11 at 12:08
  • @andreyne - Where I work we generally just use XML encoding. I suspect we aren't alone in that. – T.E.D. Oct 16 '14 at 13:25
  • It's also used heavily in mobile telecoms (3G, 4G), LDAP, SNMP, all very much current technology. XML backed by an XSD schema is ok. – bazza Apr 01 '17 at 09:08

2 Answers2

5

Have you tried Bouncy Castle.

From the site:

Bouncy Castle Crypto APIs for Java consist of the following:

  • A lightweight cryptography API.
  • A provider for the Java Cryptography Extension and the Java Cryptography Architecture.
  • A clean room implementation of the JCE 1.2.1.
  • A library for reading and writing encoded ASN.1 objects.
  • ...
HMM
  • 2,987
  • 1
  • 20
  • 30
  • I'll check that out, Marcelo. – Andrew Jun 12 '09 at 09:41
  • 1
    Confirmed, bouncycastle should be your first stop for ASN.1 parsing. It does not map to Java classes in the way that JAXB does for XML but rather it generates a tree structure you can traverse. – Boris Terzic Jun 16 '09 at 18:08
  • I agree with Marcelo. I've pulled the BouncyCastle ASN.1 classes out into a separate library that I use whenever I need to parse ASN.1 structures, and it's very simple to use. – Shadowman Dec 08 '10 at 21:15
0

Binary Notes is unsupported, but you can try jASN1 from OpenMuc. It appears to be based in part on Binary Notes and is currently active. The jASN1 libraries are available for download on their home page, and on JCenter and Maven Central under the group org.openmuc

user1585916
  • 793
  • 7
  • 15