News for hackers. Stuff that matters.
Re:I spent a year of my life making an ASN.1 compiler in D by hamburglar on Thursday October 23, 2025 @11:50AM (#45683273)
As a former PKI enthusiast (tongue firmly in cheek with that description) I can say if you can limit your exposure to simply issuing certs so you control the data and thus avoid all edge cases, quirks, non-canonical encodings, etc, dealing with ASN.1 is “not too terrible.” But it is bad. The thing that used to regularly amaze me was the insane depths of complexity the designers went to … back in the 70’s! It is astounding to me that they managed to make a system that encapsulated so much complexity and is still in everyday use today.

You are truly a masochist and I salute you.

Re:I spent a year of my life making an ASN.1 compiler in D by cyberax on Thursday October 23, 2025 @01:02PM (#45684209)
It's also amazing that we're basically using only a couple of free-form text fields in the WebPKI for the most crucial parts of validation.

Completely ignoring the ASN.1 support for complicated structures, with more than one CVE linked to incorrect parsing of these text fields m

Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Thursday October 23, 2025 @04:08PM (#45686400)
No we're not. We're using dNSName subjectAlternativeName values. We used to use the CN attribute of the subject DN, and... there is still code for that, but it's obsolete.

We _are_ using subject DNs for linking certs to their issuers, but though that's "free-form", we don't parse them, we only check for equality.

Re:I spent a year of my life making an ASN.1 compiler in D by cyberax on Thursday October 23, 2025 @08:33PM (#45689319)
CN is absolutely used everywhere. And it can contain wildcards. SANs are also free-form.
Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Thursday October 23, 2025 @11:15PM (#45690375)
SANs are not free-form. A dNSName SAN is supposed to have an FQDN. An rfc822Name SAN is supposed to carry an email address. And, ok, sure, email addresses' mailbox part is basically free-form, but so what, you don't interpret that part unless you've accepted that certificate for that email address' domain part, and then you interpret the mailbox part the way a mail server would because you're probably the mail server. Yes, you can have directoryName SANs, but the whole point of SANs is that DNs suck because x.400/x.500 naming sucks so we want to use something that isn't that.
Re:I spent a year of my life making an ASN.1 compiler in D by cyberax on Thursday October 23, 2025 @11:39PM (#45690512)
> to have an FQDN

With wildcards.

Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Friday October 24, 2025 @06:52PM (#45699908)
Ah yes, you're right. That is a horrible bodge.
Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Thursday October 23, 2025 @03:13PM (#45685656)
ASN.1 is from the mid-80s, and PKI is from the late 80s.

The problems with PKI/PKIX all go back to terrible, awful, no good, very bad ideas about naming that people in the OSI/European world had in the 80s -- the whole x.400/x.500 naming style where they expected people to use something like street addresses as digital names. DNS already existed, but it seems almost like those folks didn't get the memo, or didn't like it.

Re:I spent a year of my life making an ASN.1 compiler in D by noAnswer on Thursday October 23, 2025 @07:50PM (#45688988)
They got grant money to work on anything but TCP/IP. :-) A lot of European oral history about how "the Internet" got to a Uni talks about how they were supposed to only use ISO/OSI but eventually unofficially installed IP anyway.
Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Thursday October 23, 2025 @11:15PM (#45690377)
But of course.
Re:I spent a year of my life making an ASN.1 compiler in D by p_l on Friday October 24, 2025 @08:13AM (#45693842)
There's the other story of corporate vendors saying "yes, we will implement OSI, give us X time but buy our product now and we will deliver OSI" then actually going "we mangled BSD Sockets enough to work if you squint enough, let's try to wait the client off while racking the profit"
Re:I spent a year of my life making an ASN.1 compiler in D by yujzgzc on Friday October 24, 2025 @04:31AM (#45692281)
Organizational unit, location, etc all these concepts were pretty dumb to tie with digital identity in retrospect.
Re:I spent a year of my life making an ASN.1 compiler in D by p_l on Friday October 24, 2025 @08:15AM (#45693854)
Unless you need things like ability to address groups in flexible ways, which is why X.400 survives in various places (in addition to actually supporting inline cryptography and binary attachments).

What people forget is that you do not have to use the whole set of schema attributes.

Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Friday October 24, 2025 @06:51PM (#45699898)
Does Internet email not support binary attachments? Of course it does.

And encrypted and/or signed email? That too, though very poorly, but the issue there is key management, and DAP/LDAP don't help because in the age of spam public directories are not a thing. Right now the best option for cryptographic security for email is hop-bby-hop encryption using DANE for authentication in SMTP, with headers for requesting this, and headers for indicating whether received email transited with cryptographic protection all the way from sender to recipient.

As for the "ability to address groups in flexible ways", I'm not sure what that means, but I've never see group distribution lists not be sufficient.

Re:I spent a year of my life making an ASN.1 compiler in D by p_l on Saturday October 25, 2025 @07:43AM (#45703081)
And how long did it take for binary attachments to be reliable, encodings unfucked, etc?

As for group addressing, distribution lists are pitiful in comparison especially on discovery side.

Anyway, ultimately the big issue is that the DAP schema is always presented as "oh you need all the details", when... you don't. And we never got to point of really implementing things well outside the more expected use case where people do not, actually, use them directly but pick by name/function from directory.

Re:I spent a year of my life making an ASN.1 compiler in D by cryptonector on Saturday October 25, 2025 @02:17PM (#45705901)
> And how long did it take for binary attachments to be reliable, encodings unfucked, etc?

Oh I can't remember. Binary attachments have worked since I started using them long long ago. It worked at least in the mind-90s. Back then I was using both, Internet email and x.400 (HP OpenMail!), and x.400 was a massive pain (for me especially since I was one of the people who maintained a gateway between the two). I know what you're referring to: it took a long time for email to get "8-bit clean" / MIME because of the way SMTP works, but MIME was very much a thing by the mid-90s.

So it took a while if you count the days of UUCP email -- round it to two decades. But "by the md-90s" was plenty good enough because that's when the Internet revolution hit big companies. Lack of binary attachments wasn't something that held back Internet adoption. As far as the public and corps are concerned the Internet only became a thing circa 1994 anyways.

> As for group addressing, distribution lists are pitiful in comparison especially on discovery side.

Discovery, meaning directories. Those are nice inside corporate networks, which is where you need this functionality, so I agree, and yes people use Exchange / Exchange 365 / Outlook for this sort of thing, though even mutt can do LDAP-based discovery (poorly, but yes). Outside corporate networks directories are only useful within academia and governments / government labs. Outside all of that no one wants directories because they would only encourage the spammers.

Re:I spent a year of my life making an ASN.1 compiler in D by p_l on Sunday October 26, 2025 @08:51AM (#45711389)
Binary attachments mostly started to work with less surprises by second half of 1990s, but 8bit unclean issues persisted in my experience... I wanted to say 2001, but I recalled getting hit by them until 2010 at least.

And in some ways desire of people to send non-7bit-ascii text as email is also a continued brokenness in SMTP email.

As for directories - my point was more that directories hid the addressing details from surface UI. Otherwise AFAIK X.400 works perfectly fine without using everything in the possible schema.

Fun fact - Exchange is actually X.400 system, despite no longer having non-SMTP connection options. But its internals are even wonkier, like Exchange and Outlook not supporting HTML Email (no, really, MAPI.DLL crashes on HTML email. If you send/receive HTML email it's stored as HTML wrapped in RTF, and unwrapped when sent elsewhere)