diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-27 08:42:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-27 08:42:39 +0000 |
commit | 74f0fc5311d2d8dfa2c559215e2b099a34923469 (patch) | |
tree | dc9858b8784b61022d2bdae82116ab44087666c5 /kexgen.c | |
parent | Adding upstream version 1:9.8p1. (diff) | |
download | openssh-74f0fc5311d2d8dfa2c559215e2b099a34923469.tar.xz openssh-74f0fc5311d2d8dfa2c559215e2b099a34923469.zip |
Adding upstream version 1:9.9p1.upstream/1%9.9p1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'kexgen.c')
-rw-r--r-- | kexgen.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: kexgen.c,v 1.8 2021/12/19 22:08:06 djm Exp $ */ +/* $OpenBSD: kexgen.c,v 1.10 2024/09/09 02:39:57 djm Exp $ */ /* * Copyright (c) 2019 Markus Friedl. All rights reserved. * @@ -120,6 +120,9 @@ kex_gen_client(struct ssh *ssh) case KEX_KEM_SNTRUP761X25519_SHA512: r = kex_kem_sntrup761x25519_keypair(kex); break; + case KEX_KEM_MLKEM768X25519_SHA256: + r = kex_kem_mlkem768x25519_keypair(kex); + break; default: r = SSH_ERR_INVALID_ARGUMENT; break; @@ -192,6 +195,10 @@ input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh) r = kex_kem_sntrup761x25519_dec(kex, server_blob, &shared_secret); break; + case KEX_KEM_MLKEM768X25519_SHA256: + r = kex_kem_mlkem768x25519_dec(kex, server_blob, + &shared_secret); + break; default: r = SSH_ERR_INVALID_ARGUMENT; break; @@ -243,6 +250,8 @@ out: explicit_bzero(kex->c25519_client_key, sizeof(kex->c25519_client_key)); explicit_bzero(kex->sntrup761_client_key, sizeof(kex->sntrup761_client_key)); + explicit_bzero(kex->mlkem768_client_key, + sizeof(kex->mlkem768_client_key)); sshbuf_free(server_host_key_blob); free(signature); sshbuf_free(tmp); @@ -310,6 +319,10 @@ input_kex_gen_init(int type, u_int32_t seq, struct ssh *ssh) r = kex_kem_sntrup761x25519_enc(kex, client_pubkey, &server_pubkey, &shared_secret); break; + case KEX_KEM_MLKEM768X25519_SHA256: + r = kex_kem_mlkem768x25519_enc(kex, client_pubkey, + &server_pubkey, &shared_secret); + break; default: r = SSH_ERR_INVALID_ARGUMENT; break; |