-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mlkem768x25519 Kex as perdraft-kampanakis-curdle-ssh-pq-ke
The original libcrux code was taken from OpenSSH with suitable modifications done by us. Interop testing done with OpenSSH client. Signed-off-by: Loganaden Velvindron <[email protected]> Signed-off-by: Jaykishan Mutkawoa <[email protected]> Signed-off-by: Kavish Nadan <[email protected]>
- Loading branch information
Showing
7 changed files
with
12,468 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
#include "chachapoly.h" | ||
#include "ssh.h" | ||
#include "sntrup761.h" | ||
#include "mlkem768.h" | ||
|
||
/* This file (algo.c) organises the ciphers which can be used, and is used to | ||
* decide which ciphers/hashes/compression/signing to use during key exchange*/ | ||
|
@@ -270,6 +271,18 @@ static const struct dropbear_kex kex_ecdh_nistp521 = {DROPBEAR_KEX_ECDH, NULL, 0 | |
static const struct dropbear_kex kex_curve25519 = {DROPBEAR_KEX_CURVE25519, NULL, 0, NULL, &sha256_desc }; | ||
#endif | ||
|
||
#if DROPBEAR_MLKEM768 | ||
static const struct dropbear_kem_desc mlkem768_desc = { | ||
.public_len = crypto_kem_mlkem768_PUBLICKEYBYTES, | ||
.secret_len = crypto_kem_mlkem768_SECRETKEYBYTES, | ||
.ciphertext_len = crypto_kem_mlkem768_CIPHERTEXTBYTES, | ||
.output_len = crypto_kem_mlkem768_BYTES, | ||
.kem_gen = crypto_kem_mlkem768_keypair, | ||
.kem_enc = crypto_kem_mlkem768_enc, | ||
.kem_dec = crypto_kem_mlkem768_dec, | ||
}; | ||
static const struct dropbear_kex kex_mlkem768 = {DROPBEAR_KEX_PQHYBRID, NULL, 0, &mlkem768_desc, &sha256_desc }; | ||
#endif | ||
|
||
#if DROPBEAR_SNTRUP761 | ||
static const struct dropbear_kem_desc sntrup761_desc = { | ||
|
@@ -292,6 +305,9 @@ volatile int64_t crypto_int64_optblocker = 0; | |
|
||
/* data == NULL for non-kex algorithm identifiers */ | ||
algo_type sshkex[] = { | ||
#if DROPBEAR_MLKEM768 | ||
{"mlkem768x25519-sha256", 0, &kex_mlkem768, 1, NULL}, | ||
#endif | ||
#if DROPBEAR_SNTRUP761 | ||
{"sntrup761x25519-sha512", 0, &kex_sntrup761, 1, NULL}, | ||
{"[email protected]", 0, &kex_sntrup761, 1, NULL}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.