mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
hybrid_mlkem: Convert ECDH shared secret to a fixed-size string
The shared secret is derived as bignum, and draft-ietf-sshm-mlkem-hybrid-kex mandates that it is converted to a fixed-size byte array. Not doing this would lead to incompatibilities with other implementations when the derived shared secret happens to start with zero bytes. Signed-off-by: Pavol Žáčik <pzacik@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NISTP256_SHARED_SECRET_SIZE 32
|
||||
#define NISTP384_SHARED_SECRET_SIZE 48
|
||||
|
||||
int ssh_client_hybrid_mlkem_init(ssh_session session);
|
||||
void ssh_client_hybrid_mlkem_remove_callbacks(ssh_session session);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user