wstrange / asn1lib

Dart ASN1 Encoder / Decoder
BSD 2-Clause "Simplified" License
30 stars 31 forks source link

Any plans to add DER encoding? #3

Closed stevenroose closed 10 years ago

wstrange commented 10 years ago

Not for the time being. Pull requests are welcome :-)

On Tue, Mar 25, 2014 at 7:06 AM, Steven Roose notifications@github.comwrote:

Reply to this email directly or view it on GitHubhttps://github.com/wstrange/asn1lib/issues/3 .

stevenroose commented 10 years ago

I have no idea how DER encoding works or how it differs from BER.

Is it hard to implement? Does it take a lot of time to do when you have no idea what it's about?

I just really need DER encoding for one of my projects...

wstrange commented 10 years ago

Looking at http://luca.ntop.org/Teaching/Appunti/asn1.html it appears as if DER is a strict subset of BER encoding. The current implementation might do the right thing (hard to say...). Best bet is to try it.

izaera commented 10 years ago

The differences are explained here too:

https://en.wikipedia.org/wiki/X.690

The main idea is that DER allows only one way to encode things, whereas BER is more lax because you can encode the same object in different ways.

So I guess, the difficult part is doing BER, and then DER can be done on top of BER by restricting it.

stevenroose commented 10 years ago

It seems that most implementation is DER-compliant, so that's good news :)