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

adding NTRU hrss1373 and hps40961229 #113

Merged
merged 1 commit into from
Nov 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The following quantum-safe algorithms from liboqs are supported (assuming they h
- **FrodoKEM**: `frodokem-640-aes-sha256`, `frodokem-976-aes-sha384`, `frodokem-1344-aes-sha512`, `frodokem-640-shake-sha256`, `frodokem-976-shake-sha384`, `frodokem-1344-shake-sha512`
- **HQC**: `hqc-128-sha256`, `hqc-192-sha384`, `hqc-256-sha512`†
- **Kyber**: `kyber-512-sha256`, `kyber-768-sha384`, `kyber-1024-sha512`, `kyber-512-90s-sha256`, `kyber-768-90s-sha384`, `kyber-1024-90s-sha512`
- **NTRU**: `ntru-hps2048509-sha512`, `ntru-hps2048677-sha512`, `ntru-hrss701-sha512`, `ntru-hps4096821-sha512`
- **NTRU**: `ntru-hps2048509-sha512`, `ntru-hps2048677-sha512`, `ntru-hps4096821-sha512`, `ntru-hps40961229-sha512`, `ntru-hrss701-sha512`, `ntru-hrss1373-sha512`
- **NTRU-PRIME**: `ntruprime-ntrulpr653-sha256`, `ntruprime-sntrup653-sha256`, `ntruprime-ntrulpr761-sha384`, `ntruprime-sntrup761-sha384`, `ntruprime-ntrulpr857-sha384`, `ntruprime-sntrup857-sha384`, `ntruprime-ntrulpr1277-sha512`, `ntruprime-sntrup1277-sha512`
- **SIDH**: `sidh-p434-sha256`, `sidh-p434-compressed-sha256`, `sidh-p610-sha256`, `sidh-p610-compressed-sha256`, `sidh-p751-sha256`, `sidh-p751-compressed-sha256`
- **SIKE**: `sike-p434-sha256`, `sike-p434-compressed-sha256`, `sike-p610-sha256`, `sike-p610-compressed-sha256`, `sike-p751-sha256`, `sike-p751-compressed-sha256`
Expand Down
8 changes: 6 additions & 2 deletions kex.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ static const struct kexalg kexalgs[] = {
{ KEX_BIKE_L3_SHA512, KEX_KEM_BIKE_L3_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS2048509_SHA512, KEX_KEM_NTRU_HPS2048509_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS2048677_SHA512, KEX_KEM_NTRU_HPS2048677_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HRSS701_SHA512, KEX_KEM_NTRU_HRSS701_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS4096821_SHA512, KEX_KEM_NTRU_HPS4096821_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS40961229_SHA512, KEX_KEM_NTRU_HPS40961229_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HRSS701_SHA512, KEX_KEM_NTRU_HRSS701_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HRSS1373_SHA512, KEX_KEM_NTRU_HRSS1373_SHA512, 0, SSH_DIGEST_SHA512 },
{ KEX_CLASSIC_MCELIECE_348864_SHA256, KEX_KEM_CLASSIC_MCELIECE_348864_SHA256, 0, SSH_DIGEST_SHA256 },
{ KEX_CLASSIC_MCELIECE_348864F_SHA256, KEX_KEM_CLASSIC_MCELIECE_348864F_SHA256, 0, SSH_DIGEST_SHA256 },
{ KEX_CLASSIC_MCELIECE_460896_SHA512, KEX_KEM_CLASSIC_MCELIECE_460896_SHA512, 0, SSH_DIGEST_SHA512 },
Expand Down Expand Up @@ -204,8 +206,10 @@ static const struct kexalg kexalgs[] = {
{ KEX_BIKE_L3_ECDH_NISTP384_SHA512, KEX_KEM_BIKE_L3_ECDH_NISTP384_SHA512, NID_secp384r1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS2048509_ECDH_NISTP256_SHA512, KEX_KEM_NTRU_HPS2048509_ECDH_NISTP256_SHA512, NID_X9_62_prime256v1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS2048677_ECDH_NISTP384_SHA512, KEX_KEM_NTRU_HPS2048677_ECDH_NISTP384_SHA512, NID_secp384r1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HRSS701_ECDH_NISTP384_SHA512, KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512, NID_secp384r1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS4096821_ECDH_NISTP521_SHA512, KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512, NID_secp521r1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HPS40961229_ECDH_NISTP521_SHA512, KEX_KEM_NTRU_HPS40961229_ECDH_NISTP521_SHA512, NID_secp521r1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HRSS701_ECDH_NISTP384_SHA512, KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512, NID_secp384r1, SSH_DIGEST_SHA512 },
{ KEX_NTRU_HRSS1373_ECDH_NISTP521_SHA512, KEX_KEM_NTRU_HRSS1373_ECDH_NISTP521_SHA512, NID_secp521r1, SSH_DIGEST_SHA512 },
{ KEX_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256, KEX_KEM_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256, NID_X9_62_prime256v1, SSH_DIGEST_SHA256 },
{ KEX_CLASSIC_MCELIECE_348864F_ECDH_NISTP256_SHA256, KEX_KEM_CLASSIC_MCELIECE_348864F_ECDH_NISTP256_SHA256, NID_X9_62_prime256v1, SSH_DIGEST_SHA256 },
{ KEX_CLASSIC_MCELIECE_460896_ECDH_NISTP384_SHA512, KEX_KEM_CLASSIC_MCELIECE_460896_ECDH_NISTP384_SHA512, NID_secp384r1, SSH_DIGEST_SHA512 },
Expand Down
48 changes: 36 additions & 12 deletions kex.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@
#define KEX_BIKE_L3_SHA512 "bike-l3-sha512"
#define KEX_NTRU_HPS2048509_SHA512 "ntru-hps2048509-sha512"
#define KEX_NTRU_HPS2048677_SHA512 "ntru-hps2048677-sha512"
#define KEX_NTRU_HRSS701_SHA512 "ntru-hrss701-sha512"
#define KEX_NTRU_HPS4096821_SHA512 "ntru-hps4096821-sha512"
#define KEX_NTRU_HPS40961229_SHA512 "ntru-hps40961229-sha512"
#define KEX_NTRU_HRSS701_SHA512 "ntru-hrss701-sha512"
#define KEX_NTRU_HRSS1373_SHA512 "ntru-hrss1373-sha512"
#define KEX_CLASSIC_MCELIECE_348864_SHA256 "classic-mceliece-348864-sha256"
#define KEX_CLASSIC_MCELIECE_348864F_SHA256 "classic-mceliece-348864f-sha256"
#define KEX_CLASSIC_MCELIECE_460896_SHA512 "classic-mceliece-460896-sha512"
Expand Down Expand Up @@ -151,8 +153,10 @@
#define KEX_BIKE_L3_ECDH_NISTP384_SHA512 "ecdh-nistp384-bike-l3-sha512"
#define KEX_NTRU_HPS2048509_ECDH_NISTP256_SHA512 "ecdh-nistp256-ntru-hps2048509-sha512"
#define KEX_NTRU_HPS2048677_ECDH_NISTP384_SHA512 "ecdh-nistp384-ntru-hps2048677-sha512"
#define KEX_NTRU_HRSS701_ECDH_NISTP384_SHA512 "ecdh-nistp384-ntru-hrss701-sha512"
#define KEX_NTRU_HPS4096821_ECDH_NISTP521_SHA512 "ecdh-nistp521-ntru-hps4096821-sha512"
#define KEX_NTRU_HPS40961229_ECDH_NISTP521_SHA512 "ecdh-nistp521-ntru-hps40961229-sha512"
#define KEX_NTRU_HRSS701_ECDH_NISTP384_SHA512 "ecdh-nistp384-ntru-hrss701-sha512"
#define KEX_NTRU_HRSS1373_ECDH_NISTP521_SHA512 "ecdh-nistp521-ntru-hrss1373-sha512"
#define KEX_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256 "ecdh-nistp256-classic-mceliece-348864-sha256"
#define KEX_CLASSIC_MCELIECE_348864F_ECDH_NISTP256_SHA256 "ecdh-nistp256-classic-mceliece-348864f-sha256"
#define KEX_CLASSIC_MCELIECE_460896_ECDH_NISTP384_SHA512 "ecdh-nistp384-classic-mceliece-460896-sha512"
Expand Down Expand Up @@ -249,8 +253,10 @@ enum kex_exchange {
KEX_KEM_BIKE_L3_SHA512,
KEX_KEM_NTRU_HPS2048509_SHA512,
KEX_KEM_NTRU_HPS2048677_SHA512,
KEX_KEM_NTRU_HRSS701_SHA512,
KEX_KEM_NTRU_HPS4096821_SHA512,
KEX_KEM_NTRU_HPS40961229_SHA512,
KEX_KEM_NTRU_HRSS701_SHA512,
KEX_KEM_NTRU_HRSS1373_SHA512,
KEX_KEM_CLASSIC_MCELIECE_348864_SHA256,
KEX_KEM_CLASSIC_MCELIECE_348864F_SHA256,
KEX_KEM_CLASSIC_MCELIECE_460896_SHA512,
Expand Down Expand Up @@ -305,8 +311,10 @@ enum kex_exchange {
KEX_KEM_BIKE_L3_ECDH_NISTP384_SHA512,
KEX_KEM_NTRU_HPS2048509_ECDH_NISTP256_SHA512,
KEX_KEM_NTRU_HPS2048677_ECDH_NISTP384_SHA512,
KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512,
KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512,
KEX_KEM_NTRU_HPS40961229_ECDH_NISTP521_SHA512,
KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512,
KEX_KEM_NTRU_HRSS1373_ECDH_NISTP521_SHA512,
KEX_KEM_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256,
KEX_KEM_CLASSIC_MCELIECE_348864F_ECDH_NISTP256_SHA256,
KEX_KEM_CLASSIC_MCELIECE_460896_ECDH_NISTP384_SHA512,
Expand Down Expand Up @@ -580,14 +588,22 @@ int kex_kem_ntru_hps2048509_dec(struct kex *, const struct sshbuf *, struct ssh
int kex_kem_ntru_hps2048677_keypair(struct kex *);
int kex_kem_ntru_hps2048677_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hps2048677_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hrss701 prototypes */
int kex_kem_ntru_hrss701_keypair(struct kex *);
int kex_kem_ntru_hrss701_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hrss701_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hps4096821 prototypes */
int kex_kem_ntru_hps4096821_keypair(struct kex *);
int kex_kem_ntru_hps4096821_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hps4096821_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hps40961229 prototypes */
int kex_kem_ntru_hps40961229_keypair(struct kex *);
int kex_kem_ntru_hps40961229_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hps40961229_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hrss701 prototypes */
int kex_kem_ntru_hrss701_keypair(struct kex *);
int kex_kem_ntru_hrss701_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hrss701_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hrss1373 prototypes */
int kex_kem_ntru_hrss1373_keypair(struct kex *);
int kex_kem_ntru_hrss1373_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hrss1373_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* classic_mceliece_348864 prototypes */
int kex_kem_classic_mceliece_348864_keypair(struct kex *);
int kex_kem_classic_mceliece_348864_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
Expand Down Expand Up @@ -798,14 +814,22 @@ int kex_kem_ntru_hps2048509_ecdh_nistp256_dec(struct kex *, const struct sshbuf
int kex_kem_ntru_hps2048677_ecdh_nistp384_keypair(struct kex *);
int kex_kem_ntru_hps2048677_ecdh_nistp384_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hps2048677_ecdh_nistp384_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hrss701_nistp384 prototypes */
int kex_kem_ntru_hrss701_ecdh_nistp384_keypair(struct kex *);
int kex_kem_ntru_hrss701_ecdh_nistp384_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hrss701_ecdh_nistp384_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hps4096821_nistp521 prototypes */
int kex_kem_ntru_hps4096821_ecdh_nistp521_keypair(struct kex *);
int kex_kem_ntru_hps4096821_ecdh_nistp521_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hps4096821_ecdh_nistp521_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hps40961229_nistp521 prototypes */
int kex_kem_ntru_hps40961229_ecdh_nistp521_keypair(struct kex *);
int kex_kem_ntru_hps40961229_ecdh_nistp521_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hps40961229_ecdh_nistp521_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hrss701_nistp384 prototypes */
int kex_kem_ntru_hrss701_ecdh_nistp384_keypair(struct kex *);
int kex_kem_ntru_hrss701_ecdh_nistp384_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hrss701_ecdh_nistp384_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* ntru_hrss1373_nistp521 prototypes */
int kex_kem_ntru_hrss1373_ecdh_nistp521_keypair(struct kex *);
int kex_kem_ntru_hrss1373_ecdh_nistp521_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
int kex_kem_ntru_hrss1373_ecdh_nistp521_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
/* classic_mceliece_348864_nistp256 prototypes */
int kex_kem_classic_mceliece_348864_ecdh_nistp256_keypair(struct kex *);
int kex_kem_classic_mceliece_348864_ecdh_nistp256_enc(struct kex *, const struct sshbuf *, struct sshbuf **, struct sshbuf **);
Expand Down
64 changes: 52 additions & 12 deletions kexgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,17 @@ kex_gen_client(struct ssh *ssh)
case KEX_KEM_NTRU_HPS2048677_SHA512:
r = kex_kem_ntru_hps2048677_keypair(kex);
break;
case KEX_KEM_NTRU_HPS4096821_SHA512:
r = kex_kem_ntru_hps4096821_keypair(kex);
break;
case KEX_KEM_NTRU_HPS40961229_SHA512:
r = kex_kem_ntru_hps40961229_keypair(kex);
break;
case KEX_KEM_NTRU_HRSS701_SHA512:
r = kex_kem_ntru_hrss701_keypair(kex);
break;
case KEX_KEM_NTRU_HPS4096821_SHA512:
r = kex_kem_ntru_hps4096821_keypair(kex);
case KEX_KEM_NTRU_HRSS1373_SHA512:
r = kex_kem_ntru_hrss1373_keypair(kex);
break;
case KEX_KEM_CLASSIC_MCELIECE_348864_SHA256:
r = kex_kem_classic_mceliece_348864_keypair(kex);
Expand Down Expand Up @@ -379,11 +385,17 @@ kex_gen_client(struct ssh *ssh)
case KEX_KEM_NTRU_HPS2048677_ECDH_NISTP384_SHA512:
r = kex_kem_ntru_hps2048677_ecdh_nistp384_keypair(kex);
break;
case KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps4096821_ecdh_nistp521_keypair(kex);
break;
case KEX_KEM_NTRU_HPS40961229_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps40961229_ecdh_nistp521_keypair(kex);
break;
case KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512:
r = kex_kem_ntru_hrss701_ecdh_nistp384_keypair(kex);
break;
case KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps4096821_ecdh_nistp521_keypair(kex);
case KEX_KEM_NTRU_HRSS1373_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hrss1373_ecdh_nistp521_keypair(kex);
break;
case KEX_KEM_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256:
r = kex_kem_classic_mceliece_348864_ecdh_nistp256_keypair(kex);
Expand Down Expand Up @@ -617,11 +629,17 @@ input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh)
case KEX_KEM_NTRU_HPS2048677_SHA512:
r = kex_kem_ntru_hps2048677_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_SHA512:
r = kex_kem_ntru_hps4096821_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HPS40961229_SHA512:
r = kex_kem_ntru_hps40961229_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HRSS701_SHA512:
r = kex_kem_ntru_hrss701_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_SHA512:
r = kex_kem_ntru_hps4096821_dec(kex, server_blob, &shared_secret);
case KEX_KEM_NTRU_HRSS1373_SHA512:
r = kex_kem_ntru_hrss1373_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_CLASSIC_MCELIECE_348864_SHA256:
r = kex_kem_classic_mceliece_348864_dec(kex, server_blob, &shared_secret);
Expand Down Expand Up @@ -781,11 +799,17 @@ input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh)
case KEX_KEM_NTRU_HPS2048677_ECDH_NISTP384_SHA512:
r = kex_kem_ntru_hps2048677_ecdh_nistp384_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps4096821_ecdh_nistp521_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HPS40961229_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps40961229_ecdh_nistp521_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512:
r = kex_kem_ntru_hrss701_ecdh_nistp384_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps4096821_ecdh_nistp521_dec(kex, server_blob, &shared_secret);
case KEX_KEM_NTRU_HRSS1373_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hrss1373_ecdh_nistp521_dec(kex, server_blob, &shared_secret);
break;
case KEX_KEM_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256:
r = kex_kem_classic_mceliece_348864_ecdh_nistp256_dec(kex, server_blob, &shared_secret);
Expand Down Expand Up @@ -1083,12 +1107,20 @@ input_kex_gen_init(int type, u_int32_t seq, struct ssh *ssh)
r = kex_kem_ntru_hps2048677_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_SHA512:
r = kex_kem_ntru_hps4096821_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HPS40961229_SHA512:
r = kex_kem_ntru_hps40961229_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HRSS701_SHA512:
r = kex_kem_ntru_hrss701_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_SHA512:
r = kex_kem_ntru_hps4096821_enc(kex, client_pubkey,
case KEX_KEM_NTRU_HRSS1373_SHA512:
r = kex_kem_ntru_hrss1373_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_CLASSIC_MCELIECE_348864_SHA256:
Expand Down Expand Up @@ -1301,12 +1333,20 @@ input_kex_gen_init(int type, u_int32_t seq, struct ssh *ssh)
r = kex_kem_ntru_hps2048677_ecdh_nistp384_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps4096821_ecdh_nistp521_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HPS40961229_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps40961229_ecdh_nistp521_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HRSS701_ECDH_NISTP384_SHA512:
r = kex_kem_ntru_hrss701_ecdh_nistp384_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_NTRU_HPS4096821_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hps4096821_ecdh_nistp521_enc(kex, client_pubkey,
case KEX_KEM_NTRU_HRSS1373_ECDH_NISTP521_SHA512:
r = kex_kem_ntru_hrss1373_ecdh_nistp521_enc(kex, client_pubkey,
&server_pubkey, &shared_secret);
break;
case KEX_KEM_CLASSIC_MCELIECE_348864_ECDH_NISTP256_SHA256:
Expand Down
Loading