summaryrefslogtreecommitdiff
path: root/src/common/crypto_ed25519.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-25 15:03:55 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-25 15:08:32 -0400
commit46cda485bce60894d3128dcd42831a8c6cc7bcb4 (patch)
treed275ffaf6c369520474a34a10d287840d823b5aa /src/common/crypto_ed25519.c
parent6dbd451b9f7542b16f64415a57a1af26723f8645 (diff)
downloadtor-46cda485bce60894d3128dcd42831a8c6cc7bcb4.tar.gz
tor-46cda485bce60894d3128dcd42831a8c6cc7bcb4.zip
Comments and tweaks based on review by asn
Add some documentation Rename "derive" -> "blind" Check for failure on randombytes().
Diffstat (limited to 'src/common/crypto_ed25519.c')
-rw-r--r--src/common/crypto_ed25519.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c
index a545cad9f5..408c12b4fd 100644
--- a/src/common/crypto_ed25519.c
+++ b/src/common/crypto_ed25519.c
@@ -138,6 +138,8 @@ ed25519_checksig_batch(int *okay_out,
}
#if 0
+ /* This is how we'd do it if we were using ed25519_donna. I'll keep this
+ * code around here in case we ever do that. */
const uint8_t **ms;
size_t *lens;
const uint8_t **pks;
@@ -249,7 +251,7 @@ ed25519_keypair_blind(ed25519_keypair_t *out,
{
ed25519_public_key_t pubkey_check;
- ed25519_ref10_derive_secret_key(out->seckey.seckey,
+ ed25519_ref10_blind_secret_key(out->seckey.seckey,
inp->seckey.seckey, param);
ed25519_public_blind(&pubkey_check, &inp->pubkey, param);
@@ -272,7 +274,7 @@ ed25519_public_blind(ed25519_public_key_t *out,
const ed25519_public_key_t *inp,
const uint8_t *param)
{
- ed25519_ref10_derive_public_key(out->pubkey, inp->pubkey, param);
+ ed25519_ref10_blind_public_key(out->pubkey, inp->pubkey, param);
return 0;
}