diff options
author | David Goulet <dgoulet@torproject.org> | 2016-11-07 13:15:46 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-11 12:52:34 -0500 |
commit | 870b5e2227c4382aef1d98b1b5fc9d5f4d275c1c (patch) | |
tree | 53a93f934c8c80553e334c5de62a3e54a81a120d /src/or/hs_descriptor.h | |
parent | 963e70673a01f0cdea1e5533b02128a84dfaa0d8 (diff) | |
download | tor-870b5e2227c4382aef1d98b1b5fc9d5f4d275c1c.tar.gz tor-870b5e2227c4382aef1d98b1b5fc9d5f4d275c1c.zip |
hs: Use AES-256 for v3 descriptor
That key size is taken from proposal 224 thus specified in the protocol.
Closes #20569
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_descriptor.h')
-rw-r--r-- | src/or/hs_descriptor.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h index 083d353860..dd4e946e52 100644 --- a/src/or/hs_descriptor.h +++ b/src/or/hs_descriptor.h @@ -40,7 +40,7 @@ /* Length of the KDF output value which is the length of the secret key, * the secret IV and MAC key length which is the length of H() output. */ #define HS_DESC_ENCRYPTED_KDF_OUTPUT_LEN \ - CIPHER_KEY_LEN + CIPHER_IV_LEN + DIGEST256_LEN + CIPHER256_KEY_LEN + CIPHER_IV_LEN + DIGEST256_LEN /* We need to pad the plaintext version of the encrypted data section before * encryption and it has to be a multiple of this value. */ #define HS_DESC_PLAINTEXT_PADDING_MULTIPLE 128 @@ -60,6 +60,12 @@ * view of a descriptor, is 1 that is the version field. */ #define HS_DESC_PLAINTEXT_MIN_FIELDS 1 +/* Key length for the descriptor symmetric encryption. As specified in the + * protocol, we use AES-256 for the encrypted section of the descriptor. The + * following is the length in bytes and the bit size. */ +#define HS_DESC_ENCRYPTED_KEY_LEN CIPHER256_KEY_LEN +#define HS_DESC_ENCRYPTED_BIT_SIZE (HS_DESC_ENCRYPTED_KEY_LEN * 8) + /* Type of authentication in the descriptor. */ typedef enum { HS_DESC_AUTH_PASSWORD = 1, |