gssapi: Add support for ECDH GSSAPI KEX

In particular, gss-nistp256-sha256-* and
gss-curve25519-sha256-*.

Signed-off-by: Pavol Žáčik <pzacik@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Pavol Žáčik
2025-11-25 11:52:48 +01:00
committed by Jakub Jelen
parent 5fed1bc8be
commit 88c2ea6752
16 changed files with 467 additions and 323 deletions

View File

@@ -49,12 +49,12 @@
#include "libssh/dh-gex.h"
#endif /* WITH_GEX */
#include "libssh/curve25519.h"
#include "libssh/kex-gss.h"
#include "libssh/ecdh.h"
#include "libssh/sntrup761.h"
#ifdef HAVE_MLKEM
#include "libssh/hybrid_mlkem.h"
#endif
#include "libssh/dh-gss.h"
static struct ssh_hmac_struct ssh_hmac_tab[] = {
{ "hmac-sha1", SSH_HMAC_SHA1, false },
@@ -591,7 +591,9 @@ int crypt_set_algorithms_server(ssh_session session){
#ifdef WITH_GSSAPI
case SSH_GSS_KEX_DH_GROUP14_SHA256:
case SSH_GSS_KEX_DH_GROUP16_SHA512:
ssh_server_gss_dh_init(session);
case SSH_GSS_KEX_ECDH_NISTP256_SHA256:
case SSH_GSS_KEX_CURVE25519_SHA256:
ssh_server_gss_kex_init(session);
break;
#endif /* WITH_GSSAPI */
#ifdef WITH_GEX