On Sun, Mar 22, 2015 at 2:05 PM, Phillip Hallam-Baker
Even ASN.1 BER encoding isn't that difficult. The really horrible part
is having to do DER.
BER has many strange encoding corner cases that no one actually gets
right. I went through a while ago checking BER implementations and I
was not able to find a _single_ correct open source implementation of
The code in OpenSSL, bouncy castle, etc. are all incorrect.
DER is fairly straight forward itself, but what people do is implement
DER with their (incomplete) BER parser and fail to narrow the behavior
sufficiently and end up with something that is a weird superset of DER
but still a subset of BER.
Most applications are not harmed by these problems is deseralization
but from time to time they result in actual meaningful
openpgp mailing list