Merge pull request #686 from ejohnstown/key-agree-update

Key Agree Update
pull/690/head
JacobBarthelmeh 2024-05-13 15:14:05 -06:00 committed by GitHub
commit d11ec5f646
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 830 additions and 588 deletions

File diff suppressed because it is too large Load Diff

View File

@ -157,7 +157,8 @@ extern "C" {
#undef WOLFSSH_NO_ECDH_SHA2_ED25519 #undef WOLFSSH_NO_ECDH_SHA2_ED25519
#define WOLFSSH_NO_ECDH_SHA2_ED25519 #define WOLFSSH_NO_ECDH_SHA2_ED25519
#endif #endif
#if !defined(WOLFSSH_HAVE_LIBOQS) || defined(NO_SHA256) #if !defined(WOLFSSH_HAVE_LIBOQS) || defined(NO_SHA256) \
|| defined(WOLFSSH_NO_ECDH_SHA2_NISTP256)
#undef WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256 #undef WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256
#define WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256 #define WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256
#endif #endif
@ -583,19 +584,16 @@ typedef struct HandshakeInfo {
word32 generatorSz; word32 generatorSz;
#endif #endif
byte useEcc; byte useDh:1;
#ifndef WOLFSSH_NO_ECDH_NISTP256_KYBER_LEVEL1_SHA256 byte useEcc:1;
byte useEccKyber; byte useEccKyber:1;
#endif byte useCurve25519:1;
#ifndef WOLFSSH_NO_CURVE25519_SHA256
byte useCurve25519;
#endif
union { union {
#ifndef WOLFSSH_NO_DH #ifndef WOLFSSH_NO_DH
DhKey dh; DhKey dh;
#endif #endif
#if !defined(WOLFSSH_NO_ECDSA) && !defined(WOLFSSH_NO_ECDH) #ifndef WOLFSSH_NO_ECDH
ecc_key ecc; ecc_key ecc;
#endif #endif
#ifndef WOLFSSH_NO_CURVE25519_SHA256 #ifndef WOLFSSH_NO_CURVE25519_SHA256
@ -1123,7 +1121,8 @@ enum WS_MessageIds {
}; };
#define MSGID_KEXDH_LIMIT 30 /* Allows the server to receive up to KEXDH GEX Request during KEX. */
#define MSGID_KEXDH_LIMIT MSGID_KEXDH_GEX_REQUEST
/* The endpoints should not allow message IDs greater than or /* The endpoints should not allow message IDs greater than or
* equal to msgid 80 before user authentication is complete. * equal to msgid 80 before user authentication is complete.