|
|
Log in / Subscribe / Register

Using certificates for SSH authentication

Using certificates for SSH authentication

Posted Nov 8, 2022 23:47 UTC (Tue) by mss (subscriber, #138799)
In reply to: Using certificates for SSH authentication by mjg59
Parent article: Using certificates for SSH authentication

asn.1 parsing is extremely hard to get right
I guess you mean BER here, since that's how X.509 certificates are usually encoded.

One is supposed to use a well-established library for doing such parsing (no new hand-crafted parsers in C please), so the main issue here is whether the project could take an additional external dependency.


to post comments

Using certificates for SSH authentication

Posted Nov 9, 2022 5:43 UTC (Wed) by buck (subscriber, #55985) [Link]

> I guess you mean BER here, since that's how X.509 certificates are usually encoded.

Wouldn't it be DER, so there's no choice of whether to use indefinite-length encoding and other such things that lead to a multitude of possibilities for finding hash collisions? Or maybe it's just whatever the PKCS or IETF specs say, more to the point.

At any rate, trusting the X.509 public CA ecosystem, while convenient, has its downsides. This recent article (paywalled, after free monthly article limit exceeded, i believe) offers a particularly compelling case study:

Mysterious company with government ties plays key internet role

https://www.washingtonpost.com/technology/2022/11/08/trus...

Using certificates for SSH authentication

Posted Nov 9, 2022 8:33 UTC (Wed) by mjg59 (subscriber, #23239) [Link]

DER is just the serialisation of the asn.1 data, and even well-established parsers have had bugs. That's why my approach (which, again, I do not recommend people use) has that done out of process in a language that's rather less vulnerable to the standard parsing fuckups.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds