diff options
author | David Goulet <dgoulet@torproject.org> | 2016-05-26 12:25:01 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-07-01 14:01:42 -0400 |
commit | e62f3133bb0404b3c70dd59f37b2706bf75eb800 (patch) | |
tree | 27343f8702516877c6f3c6b5a166cbf937ba5dcb /src/or/shared_random.h | |
parent | 899d2b890b35b9772f33054b9ff627dd8186deac (diff) | |
download | tor-e62f3133bb0404b3c70dd59f37b2706bf75eb800.tar.gz tor-e62f3133bb0404b3c70dd59f37b2706bf75eb800.zip |
prop250: Change reveal_num to uint64_t and version to uint32_t
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/shared_random.h')
-rw-r--r-- | src/or/shared_random.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/shared_random.h b/src/or/shared_random.h index 4b16d26702..6d68ad79bc 100644 --- a/src/or/shared_random.h +++ b/src/or/shared_random.h @@ -30,9 +30,9 @@ * timestamp and the hashed random number. This adds up to 40 bytes. */ #define SR_REVEAL_LEN (sizeof(uint64_t) + DIGEST256_LEN) /* Size of SRV message length. The construction is has follow: - * "shared-random" | INT_8(reveal_num) | INT_8(version) | PREV_SRV */ + * "shared-random" | INT_8(reveal_num) | INT_4(version) | PREV_SRV */ #define SR_SRV_MSG_LEN \ - (SR_SRV_TOKEN_LEN + 1 + 1 + DIGEST256_LEN) + (SR_SRV_TOKEN_LEN + sizeof(uint64_t) + sizeof(uint32_t) + DIGEST256_LEN) /* Length of base64 encoded commit NOT including the NULL terminated byte. * Formula is taken from base64_encode_size. */ @@ -62,7 +62,7 @@ typedef enum { /* A shared random value (SRV). */ typedef struct sr_srv_t { /* The number of reveal values used to derive this SRV. */ - int num_reveals; + uint64_t num_reveals; /* The actual value. This is the stored result of SHA3-256. */ uint8_t value[DIGEST256_LEN]; } sr_srv_t; |