diff options
author | George Kadianakis <desnacked@riseup.net> | 2018-06-14 15:23:09 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-17 15:57:46 -0400 |
commit | 34a5eb5904896cfbfb8c2729fe3b029fab6deb39 (patch) | |
tree | 9fe8fdb590fda65db4091a26166254f35479cf6d /src/lib | |
parent | 3a45f6ffe95d4c51e4ad4e14f468feb3f4bd6b1e (diff) | |
download | tor-34a5eb5904896cfbfb8c2729fe3b029fab6deb39.tar.gz tor-34a5eb5904896cfbfb8c2729fe3b029fab6deb39.zip |
Increase OPE_INPUT_MAX.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/crypt_ops/crypto_ope.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/crypt_ops/crypto_ope.h b/src/lib/crypt_ops/crypto_ope.h index 885ce84b2a..823524f84e 100644 --- a/src/lib/crypt_ops/crypto_ope.h +++ b/src/lib/crypt_ops/crypto_ope.h @@ -13,8 +13,18 @@ /** Length of OPE key, in bytes. */ #define OPE_KEY_LEN 32 -/** Largest value that can be passed to crypto_ope_encrypt() */ -#define OPE_INPUT_MAX 131072 +/** Largest value that can be passed to crypto_ope_encrypt(). + * + * Expressed as 2^18 because the OPE system prefers powers of two. + * + * The current max value stands for about 70 hours. The rationale here is as + * follows: The rev counter is the time of seconds since the start of an SRV + * period. SRVs are useful for about 48 hours (that's how long they stick + * around on the consensus). Let's also add 12 hours of drift for clock skewed + * services that might be using an old consensus and we arrive to 60 + * hours. The max value should be beyond that. + */ +#define OPE_INPUT_MAX (1<<18) typedef struct crypto_ope_c crypto_ope_t; |