ext/sodium: Add crypto_kem (X-Wing) and crypto_kem_mlkem768 bindings - #23420
ext/sodium: Add crypto_kem (X-Wing) and crypto_kem_mlkem768 bindings#23420ZacharyDuBois wants to merge 3 commits into
Conversation
|
Tried sending an email to internals but seems like y'all don't support DMARC with |
While the subscribe step? If yes, you maybe want to ping @ derickr. |
Yep, sent an intro (I think on Thursday) and that went though but shortly after I got the forensic report and it showed both SPF and DKIM failed. Looking at the headers, looks like it hit a relay causing the failure. Running an outbound test reports my email is all good. |
Fwiw, it went through anyway: https://news-web.php.net/php.internals/132308 |
|
The changes look good to me. Thanks a lot for adding these functions! |
|
@jedisct1 no problem! I have a project I am working on that needed some post-quantum stuff added in (more so for playing around). Saw these were missing and didn't feel like hassling someone to add them when I am perfectly capable of it. This is my first PR for PHP so let me know if I am missing anything! More than happy to make any edits. From what I heard on the mailing list, 8.6 is on a feature freeze so sadly it sounds like this won't make it out for 8.6 :( |
Expose the libsodium 1.0.22 generic KEM API (X-Wing, hybrid ML-KEM768+X25519). Guarded so older libsodium builds are unaffected.
Expose libsodium 1.0.22's ML-KEM768 (FIPS 203) KEM with the same shape as the generic crypto_kem API.
d095f86 to
a38e6ed
Compare
|
Fixed the merge conflict with |
|
Probably best for @paragonie-scott / @paragonie-security to review this. :) |
He does maintain https://github.com/jedisct1/libsodium-php so his input would probably be useful too :) |
libsodium 1.0.22 introduced a KEM API: X-Wing (hybrid ML-KEM768+X25519, upstream's recommended KEM) and ML-KEM768 (FIPS 203). This exposes both:
sodium_crypto_kem_{keypair,seed_keypair,secretkey,publickey,enc,dec}sodium_crypto_kem_mlkem768_{keypair,seed_keypair,secretkey,publickey,enc,dec}+SODIUM_CRYPTO_KEM[_MLKEM768]_*BYTESconstants