diff options
Diffstat (limited to 'src/libstrongswan/crypto/diffie_hellman.c')
-rw-r--r-- | src/libstrongswan/crypto/diffie_hellman.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libstrongswan/crypto/diffie_hellman.c b/src/libstrongswan/crypto/diffie_hellman.c index 6dcb6cb33..820b8d1d8 100644 --- a/src/libstrongswan/crypto/diffie_hellman.c +++ b/src/libstrongswan/crypto/diffie_hellman.c @@ -32,7 +32,7 @@ ENUM_NEXT(diffie_hellman_group_names, MODP_2048_BIT, ECP_521_BIT, MODP_1536_BIT, "ECP_256", "ECP_384", "ECP_521"); -ENUM_NEXT(diffie_hellman_group_names, MODP_1024_160, ECP_512_BP, ECP_521_BIT, +ENUM_NEXT(diffie_hellman_group_names, MODP_1024_160, CURVE_448, ECP_521_BIT, "MODP_1024_160", "MODP_2048_224", "MODP_2048_256", @@ -41,8 +41,10 @@ ENUM_NEXT(diffie_hellman_group_names, MODP_1024_160, ECP_512_BP, ECP_521_BIT, "ECP_224_BP", "ECP_256_BP", "ECP_384_BP", - "ECP_512_BP"); -ENUM_NEXT(diffie_hellman_group_names, MODP_NULL, MODP_NULL, ECP_512_BP, + "ECP_512_BP", + "CURVE_25519", + "CURVE_448"); +ENUM_NEXT(diffie_hellman_group_names, MODP_NULL, MODP_NULL, CURVE_448, "MODP_NULL"); ENUM_NEXT(diffie_hellman_group_names, NTRU_112_BIT, NTRU_256_BIT, MODP_NULL, "NTRU_112", @@ -552,6 +554,12 @@ bool diffie_hellman_verify_value(diffie_hellman_group_t group, chunk_t value) case ECP_521_BIT: valid = value.len == 132; break; + case CURVE_25519: + valid = value.len == 32; + break; + case CURVE_448: + valid = value.len == 56; + break; case NTRU_112_BIT: case NTRU_128_BIT: case NTRU_192_BIT: |