Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sntrup761x25519-sha512 post-quantum key exchange #335

Merged
merged 5 commits into from
Dec 14, 2024
Merged

Add sntrup761x25519-sha512 post-quantum key exchange #335

merged 5 commits into from
Dec 14, 2024

Conversation

mkj
Copy link
Owner

@mkj mkj commented Dec 13, 2024

No description provided.

Common algorithm specific code is moved from common-kex.c to kex-*.c

send_msg_kexdh_init() is simplified - parameters are no longer reused
between first-follows and a subsequent kexdh_init. The default
gen_kexcurve25519_param() is relatively fast, so recomputing is OK.
@mkj mkj force-pushed the sntrup branch 4 times, most recently from dfd2958 to cc4d37b Compare December 14, 2024 14:07
mkj added 4 commits December 14, 2024 22:21
This implements draft-kampanakis-curdle-ssh-pq-ke-04, a
mechanism combining a post-quantum KEM with x25519.

Adding a post-quantum KEM can avoid harvest-now-decrypt-later style
attacks (captured traffic decrypted in future by a quantum computer, if
they are created). Combining it with existing x25519 ensures that
security is not weakened compared to the present status, if a weakness
in the PQ KEM is discovered.

A future commit will add concrete PQ methods, currently this code
is unused.
x25519 could be generalised later if needed.
This follows draft-ietf-sshm-ntruprime-ssh-01, using the sntrup761
implementation from supercop. It is available under both
sntrup761x25519-sha512 and [email protected] names.

Interoperability has been tested against OpenSSH 9.8 (client/server) and
PuTTY 0.82 client.

sntrup761.sh is taken from OpenSSH, to extract the code from the
supercop distribution.

KEX hash buffer size calculation has been updated to current algorithm
limits, since sntrup761 was larger than the previous limit.

Code size increases by approx 9kB (209 to 218kB) for a 32-bit armv7 build.
Change to q_s and q_c since pqhybrid isn't only EC.
Use separate fuzzers for client vs server since KEMs have
an asymmetric API.
@mkj mkj merged commit f576a54 into master Dec 14, 2024
18 checks passed
@mkj mkj deleted the sntrup branch December 14, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant