diff options
author | Martin Willi <martin@revosec.ch> | 2010-04-08 15:08:35 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-04-08 15:08:35 +0200 |
commit | b34b93dbf7e799d24bb381b3e15ef0d98f4adebb (patch) | |
tree | c7beafa14ae750f4865784969c76afa4a8acd19a /src/libstrongswan/crypto/diffie_hellman.h | |
parent | 6c1dc87551e10fe9f497a32314d3dd663eb2105e (diff) | |
download | strongswan-b34b93dbf7e799d24bb381b3e15ef0d98f4adebb.tar.bz2 strongswan-b34b93dbf7e799d24bb381b3e15ef0d98f4adebb.tar.xz |
Store DH generator in a chunk, hide non-public data in a private struct
Diffstat (limited to 'src/libstrongswan/crypto/diffie_hellman.h')
-rw-r--r-- | src/libstrongswan/crypto/diffie_hellman.h | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/libstrongswan/crypto/diffie_hellman.h b/src/libstrongswan/crypto/diffie_hellman.h index 9d3b604cc..7a0c9b204 100644 --- a/src/libstrongswan/crypto/diffie_hellman.h +++ b/src/libstrongswan/crypto/diffie_hellman.h @@ -112,36 +112,21 @@ struct diffie_hellman_t { * Parameters for a specific diffie hellman group. */ struct diffie_hellman_params_t { - /** - * DH group. - */ - diffie_hellman_group_t group; - - /** - * The prime as byte array. - */ - const u_int8_t *prime; /** - * Length of the prime (in bytes). + * The prime of the group */ - size_t prime_len; + const chunk_t prime; /** - * Optimal length of the exponent (in bytes), as specified in RFC 3526. + * Generator of the group */ - size_t opt_exp_len; + const chunk_t generator; /** - * Length of the exponent (in bytes) that should be used, depending on - * the dh_exponent_ansi_x9_42 setting in strongswan.conf. + * Exponent length to use */ size_t exp_len; - - /** - * Generator. - */ - u_int16_t generator; }; /** |