summaryrefslogtreecommitdiff
path: root/src/lib/crypt_ops
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-12-13 11:26:09 -0500
committerNick Mathewson <nickm@torproject.org>2018-12-13 11:26:09 -0500
commit041e9235c1710936a43f73d2f6e87bfc6e1c2242 (patch)
treeb7d61b884932cbc74739681852f842979dd8debc /src/lib/crypt_ops
parenta3fe08164758e755fb2b51c7fb96e42d96179640 (diff)
downloadtor-041e9235c1710936a43f73d2f6e87bfc6e1c2242.tar.gz
tor-041e9235c1710936a43f73d2f6e87bfc6e1c2242.zip
Lower the loop_max constant in curve25519_basepoint_spot_check()
The point of this function is to make sure that the ed25519-based implementation of curve25519_basepoint() actually works when we start tor, and use the regular fallback implementation if it doesn't. But it accounts for 9% of our startup time in the case when we have directory information, and I think it's safe to make the test shorter. After all, it has yet to find any actual bugs in curved25519_scalarmult_basepoint_donna() on any platforms. Closes ticket 28838.
Diffstat (limited to 'src/lib/crypt_ops')
-rw-r--r--src/lib/crypt_ops/crypto_curve25519.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/crypt_ops/crypto_curve25519.c b/src/lib/crypt_ops/crypto_curve25519.c
index e6a39a8c08..f3a9de9fc5 100644
--- a/src/lib/crypt_ops/crypto_curve25519.c
+++ b/src/lib/crypt_ops/crypto_curve25519.c
@@ -289,7 +289,7 @@ curve25519_basepoint_spot_check(void)
0x0d,0xbf,0x3a,0x0d,0x26,0x38,0x1a,0xf4,
0xeb,0xa4,0xa9,0x8e,0xaa,0x9b,0x4e,0x6a
};
- const int loop_max=200;
+ const int loop_max=8;
int save_use_ed = curve25519_use_ed;
unsigned char e1[32], e2[32];
unsigned char x[32],y[32];