ryru / strongswan

strongSwan - IPsec-based VPN
https://www.strongswan.org
Other
0 stars 1 forks source link

Enhance diffie hellman group to tls group mapping with finit field groups #20

Open ryru opened 4 years ago

ryru commented 4 years ago

Since other TLS 1.3 implementations such as Firefox offers also finit field groups, it would make sense to also provide these groups in our implementation.

Note: Finit field groups would also be natively supported by strongSwan in comparison with other tls groups which usually need external 3rd party plugins.

Further it would make sense to rename tls_named_group_t curve to tls_named_group_t tls_group since curve is not really accurate anymore.

Code snipped from tls_crypto.c:

static struct {
    diffie_hellman_group_t group;
    // TODO allenfalls später nach "tls_group" umbenennen
    tls_named_group_t curve;
} curves[] = {
    { ECP_256_BIT, TLS_SECP256R1},
    { ECP_384_BIT, TLS_SECP384R1},
    { ECP_521_BIT, TLS_SECP521R1},
    { ECP_224_BIT, TLS_SECP224R1},
    { ECP_192_BIT, TLS_SECP192R1},
    { CURVE_25519, TLS_CURVE25519},
    { CURVE_448,   TLS_CURVE448},
    // TODO : ergaenzen
    /*
     *
    TLS_FFDHE2048  =    256,
    TLS_FFDHE3072  =    257,
    TLS_FFDHE4096  =    258,
    TLS_FFDHE6144  =    259,
    TLS_FFDHE8192  =    260,
     */
};
ryru commented 3 years ago

The current implementation of FFDHE in strongSwan in diffie_hellman.[ch] uses the NIST prime numbers specified in RFC 3526 for ECDH. RFC 8446 though refers to the prime numbers specified in RFC 7919. Therefore this issue would require additional work and is not achievable easily.

Since it is not a very important feature (most would probably prefer EC based DH key exchange anyway) it is postponed for later or maybe it could be closed if no one is requires such a feature.