aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-26 21:35:25 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-25 15:08:31 -0400
commit006e6d3b6f52e193b14dc17db4502e14f9ffeb82 (patch)
tree0f7dc82793ca9191eb2d455f776d9957c77cb549 /src/test/test_crypto.c
parent9e43ee5b4ca3650ecd9c4ee8a1b77843b273d480 (diff)
downloadtor-006e6d3b6f52e193b14dc17db4502e14f9ffeb82.tar.gz
tor-006e6d3b6f52e193b14dc17db4502e14f9ffeb82.zip
Another ed25519 tweak: store secret keys in expanded format
This will be needed/helpful for the key blinding of prop224, I believe.
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r--src/test/test_crypto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 8b04bc8e50..a4ca609247 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -1318,10 +1318,12 @@ test_crypto_ed25519_test_vectors(void *arg)
for (i = 0; items[i].pk; ++i) {
ed25519_keypair_t kp;
ed25519_signature_t sig;
+ uint8_t sk_seed[32];
uint8_t *msg;
size_t msg_len;
- base16_decode((char*)kp.seckey.seckey, sizeof(kp.seckey.seckey),
+ base16_decode((char*)sk_seed, sizeof(sk_seed),
items[i].sk, 64);
+ ed25519_secret_key_from_seed(&kp.seckey, sk_seed);
tt_int_op(0, ==, ed25519_public_key_generate(&kp.pubkey, &kp.seckey));
test_memeq_hex(kp.pubkey.pubkey, items[i].pk);