open-quantum-safe / oqs-demos

PARTIALLY SUPPORTED Instructions for enabling the use of quantum-safe cryptography in assorted software using the OQS suite. CONTRIBUTORS WANTED.
https://openquantumsafe.org/
119 stars 65 forks source link

Add OQS to libnss (enabling loading quantum safe certificate into Chromium) #92

Open tylerleblond opened 3 years ago

tylerleblond commented 3 years ago

Hello,

I am currently trying to use the quantum-safe Chromium (0.5.0) build as a client to connect to the OQS haproxy container using its default certificate generation settings (the default signature algorithm used is dilithium3 according to this page: https://github.com/open-quantum-safe/oqs-demos/tree/main/haproxy). I tried to load the CA certificate from the haproxy container into Chromium but got the following error:

Screen Shot 2021-07-09 at 12 51 02 PM

I have verified that I am able to use Curl with this certificate for authentication to access the haproxy, so it is not an issue with the certificate.

It appears that I obtain this error when I try to install certificates that use quantum-safe digital signature algorithms. For example, making use of the OQS fork of OpenSSL contained within the Curl container, I run the following command with = dilithium2, dilithium3, RSA, and falcon512:

docker run -v pwd:/opt/tmp -it openquantumsafe/curl openssl req -x509 -new -newkey -keyout /opt/tmp/CA.key -out /opt/tmp/CA.crt -nodes -subj "/CN=oqstest CA" -days 365

The certificates that used dilithium2, dilithium3, and falcon512 failed to load, but the certificate that used RSA loaded just fine.

Any help is appreciated!

Here is the certificate that I grabbed from within the haproxy container:

-----BEGIN CERTIFICATE----- MIIVejCCCIWgAwIBAgIUAepY4WbwHzFTZHk5LX1YZEhPzzcwDQYLKwYBBAECggsH BgUwFTETMBEGA1UEAwwKb3FzdGVzdCBDQTAeFw0yMTA2MjIxNjAxMDdaFw0yMjA2 MjIxNjAxMDdaMBUxEzARBgNVBAMMCm9xc3Rlc3QgQ0Ewgge0MA0GCysGAQQBAoIL BwYFA4IHoQBVwCWhM80rjUCbrPOId2aPoiV3mfNDQoNXvieqvCCCRAz8HQUNLfY5 jlLC74xCSXOTY802dlLx/B3d7yeddNTTCnyk8PDVBRRrcobru7xQ3DiEX1rlD6fU u8XD+YiHRcAVGkJ+O9TA4Tcshgj2J8DIUWNVFoiiAnkv0On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ZwyEaK7aD36 N21SW1hMjeBwErZZVC9v61tXeRDVVDrjA9OvgopwIkhkl13n7GC5HTNZzw+sM3Rr RthrYTCoST3XfQ/J/Wuagga5Gm+4g9VQS3IaCQen+3ETJn5HtiKYcWcwlc/Mf9rg u27Zg1SZ3F4Nq/3FN0LN8FMGbqODDQck4Z0rCeay3kj4pjW5J92AwfJU3/5Rlolm SyOwX3hQhV0jTVohC2lchILpb/ol6VlUeI1hhyQzCrshlKSJy7r2ntTLqtxKlB43 RuQ5l8lbNyH/XAfMC6xmV44VsWcZ52mP1ugIO7ifTU1UZyPtfhG9K380tG73Ymqi FqucW6G7j7VF5Mr7mq3bSPcYHAX2yQjEZbI31wH/31Lp9S/kRMgZqgrLr7vJg5Pd aK2T8E3ujsh/uO8MEuIs4tcf7EVhwZ7kIgrBMMMRGqx9fXKELyyHv5vwFGNSRjT1 n8jSJAfJ3ItBo1HX1N40yRIkMnGaorO33fMqhJTC2Py2wlJajJOY4LE0Pj/j7wAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQ8RFxgd -----END CERTIFICATE-----

taylormadehdz commented 3 years ago

@baentsch do you have any guidance on this?

baentsch commented 3 years ago

When running oqs-Chrome from a terminal, this error message is emitted when loading the cert above:

[1949:1949:0710/102038.438671:ERROR:nsNSSCertificateDB.cpp(89)] PK11_ImportCert failed with error -8168

This in turn to me means that Chromium uses (NSS') PKCS#11 API (store?) for maintaining certificates -- and I'm not aware of anyone who has begun to OQS-enable NSS, so a rejection of an OQS-cert seems logical. @xvzcf, @dstebila, @jschanck : Does either of you know more about NSS (an OQS-enablement thereof)? Do we know anyone at Mozilla who might be interested in this? And if NSS P11 is not the problem (to be determined), does anyone know what's implementing that API for Chromium?

@tylerleblond @taylormadehdz : Can you share what's your use case for this? We always only intended Chromium to be a demonstration, not a full-feature OQS browser integration -- but if there is serious interest, someone might look into it.

baentsch commented 3 years ago

And if NSS P11 is not the problem (to be determined), does anyone know what's implementing that API for Chromium?

Answering my own question: Looks like it's really libnss(3) (failing to) provide that functionality.

So, indeed, it seems OQS-cert import won't work in Chromium until (lib)NSS is OQS-enabled. Nothing oqs-demos/chromium can do about (short of creating a new project: Volunteers welcome :)

taylormadehdz commented 3 years ago

Would there be a way to use a different lib for maintaining certificates?

Our use case is to migrate a chat app on one system to make it quantum safe for prototyping activities. @baentsch ... any other ideas for workarounds?

baentsch commented 3 years ago

Would there be a way to use a different lib for maintaining certificates?

(OQS-)OpenSSL handles QSC certs just fine -- but then again, chromium doesn't use OSSL by default for all I know -- although there seem to be historical traces of chromium being able to utilize OpenSSL...

Our use case is to migrate a chat app on one system to make it quantum safe for prototyping activities. @baentsch ... any other ideas for workarounds?

Loads -- but I'm constrained by not knowing whether you're free to chose the chat app to QSC-enable. If that were possible, why not look for one using openssl as transport? Next idea: Why not completely do away with application-integrated (QSC-)confidentiality and use (oqs-)SSH instead (obviously only works with a-priori known chat partners)? Third, if for some reason you are bound to chromium, changing the cert-storage to one based on OSSL may be an option -- but that may be convoluted: I never checked all chromium cert-interaction points in that regard. But then again, I don't understand why chromium uses PKCS#11 for server cert storage to begin with: Normally, one would only use that for client certs... Simple file-storage (with a validation layer) might have been sufficient....

taylormadehdz commented 3 years ago

Okay we're pretty set on using Chromium... Here is the sitch:

Quantum safe Chromium can connect to OQS test server using the quantum safe cert Quantum safe HA proxy can connect to OQS test server with curl want to connect HA proxy & chromium, chromium not accept

Would we be able to use the private server cert that Chromium does recognize when connecting to OQS test server on HA Proxy? I.e., is there a way for us to download that from y'all directly to upload to our HA proxy?

About cert-interaction points:

Alternatively when you said changing cert-interaction points, that would require us to build Chromium from scratch (following directions on repo), Correct? We have been using the binary

baentsch commented 3 years ago

Would we be able to use the private server cert that Chromium does recognize when connecting to OQS test server on HA Proxy? I.e., is there a way for us to download that from y'all directly to upload to our HA proxy?

I'm not sure I understand: The CA cert at the OQS test server is plain, boring classic crypto: You can create such cert (incl. private key) yourself (and subsequently import to HAproxy, Chromium, whatever). Also, you can create CA-signed private server certs (of any kind, incl. QSC) also yourself (e.g., using the oqs-curl docker image): Why would you thus need "our" server certs?

that would require us to build Chromium from scratch (following directions on repo), Correct?

Yes (after mod'ing the source suitably). Just takes a day -- or a good many-core machine :-)

taylormadehdz commented 3 years ago

On it :)

baentsch commented 2 years ago

@taylormadehdz : Any news on the above? I'd further suggest changing the title to "Add OQS to libnss" (tagged as future-work, help-wanted)

baentsch commented 2 years ago

Like https://github.com/open-quantum-safe/oqs-demos/issues/52 this issue is due to Chromium not using openssl but libnss for certificate management. Until there is wider or libnssupstream interest in this feature (any inside insight about this, @jschanck ?) close this issue pointing to oqs-epiphany if someone wants to use QSC certificates with a browser.

takao8 commented 1 year ago

Hello, I just wanted to reopen this issue since @taylormadehdz and I have plans to try and adjust NSS to accommodate for PQC certificates on Chromium. @baentsch, since last year have you heard of any developments to updates libnss for this feature? We've done some basic exploration of the libnss codebase, but I wanted to check with you to see if anybody has gotten anywhere so we don't replicate other efforts.

baentsch commented 1 year ago

No, I'm not aware of activities to add OQS code to libnss (but would be glad to see that happen --if only for selfish reasons of not having to add another column to the IETF PQ cert hackathon interop test matrix :). And obviously I much less know whether anyone is adding any (other) PQ cert code to libnss. In sum, by all means, let's reopen this. Thanks, @takao8 @taylormadehdz to suggest this.

xvzcf commented 1 year ago

For OQS in NSS, I'm aware of this.

baentsch commented 1 year ago

For OQS in NSS, I'm aware of this.

Thanks for the information, @xvzcf ! I'm not entirely sure how to read this: Is this an integration of the OQS APIs (that would enable PQ certs, too) or rather a Cloudflare-specific code integration supporting their x25519_kyber768 KEM (only)?

If the latter, it doesn't help this issue. If the former, would it be helpful/possible for @takao8 @taylormadehdz to contribute there to move things forward more quickly?

xvzcf commented 1 year ago

The PR indeed does not involve liboqs, but Robert Relyea in that comment stated that he's currently working on liboqs integration, which will give us all the NIST kyber variants [...] as well as the PQ signing algorithms, so it might be worthwhile contacting him.

baentsch commented 1 year ago

so it might be worthwhile contacting him

Absolutely. Do you know him/could touch base with him? Or do you know his github handle we could post here to get his input to this discussion?

xvzcf commented 1 year ago

Absolutely. Do you know him/could touch base with him? Or do you know his github handle we could post here to get his input to this discussion?

I emailed him.

Raytonne commented 1 year ago

Since Chromium is using its own root store, you may try to hard code your root CA into the Chromium source code

baentsch commented 1 year ago

Since Chromium is using its own root store, you may try to hard code your root CA into the Chromium source code

Thanks for the pointer. How would this solve the issue of quantum safe server certificates/chains not being verifiable in Chromium, though? Isn't libnss still providing the code for this logic? If this code is not PQ-enabled, shouldn't verification fail right away -- before even hitting the root cert?

Raytonne commented 1 year ago

Thanks for the pointer. How would this solve the issue of quantum safe server certificates/chains not being verifiable in Chromium, though? Isn't libnss still providing the code for this logic? If this code is not PQ-enabled, shouldn't verification fail right away -- before even hitting the root cert?

The webpage I linked above explicitly mentions

Historically, Chrome integrated certificate verification processes with
the platform on which it was running. This resulted in inconsistent user
experiences across platforms, while also making it difficult for
developers to understand Chrome's expected behavior. ... Once complete,
the launch of the Chrome Certificate Verifier will ensure users have a
consistent experience across platforms, that developers have a
consistent understanding of Chrome‘s behavior, and that Chrome better
protects the security and privacy of users’ connections to websites.

So I think if the root certificate is in Chrome Root Store, then libnss is not providing the code for this logic; instead, the Chrome Certificate Verifier will build and verify the certificate chain.

In PR #210 , we provided a way to make Chrome Certificate Verifier able to verify quantum safe server certificates/chains.

Raytonne commented 9 months ago

@xvzcf @baentsch Should we close this issue since Chrome is using Chrome Certificate Verifier and Chrome Root Store now? Especially Chrome dropped libnss https://github.com/chromium/chromium/commit/9942b74d18acb6c9a1d1cf85d0ad4db15357d2f6

nickforsythbarr commented 2 months ago

is there a new issue recently with acceptance of CA certs in Chrome 124.0.6367.91 Im getting the error: [29771:29771:0429/142921.004838:ERROR:nsNSSCertificateDB.cpp(95)] PK11_ImportCert failed with error -8168

Raytonne commented 2 months ago

is there a new issue recently with acceptance of CA certs in Chrome 124.0.6367.91 Im getting the error: [29771:29771:0429/142921.004838:ERROR:nsNSSCertificateDB.cpp(95)] PK11_ImportCert failed with error -8168

Are you importing a CA that uses quantum-safe algorithms? If yes, then this is expected.

nickforsythbarr commented 1 month ago

For those seeking a fix who find their way here. This appears to work allowing Chrome, and VsCode etc to respect the CA: (Ubuntu 24.04, Chrome 125.0.6422.76, Code 1.89.1)

# sudo chmod -R 766 /home/username/.pki/ # certutil -d sql:$HOME/.pki/nssdb -A -t "CT,c,c" -n "CertName" -i /usr/share/ca-certificates/your_ca.crt

Raytonne commented 1 month ago

# sudo chmod -R 766 /home/username/.pki/ # certutil -d sql:$HOME/.pki/nssdb -A -t "CT,c,c" -n "CertName" -i /usr/share/ca-certificates/your_ca.crt

Thank you for the update! Could you update oqs-demos/blob/main/chromium/USAGE.md and create a PR?