diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-08-27 00:18:26 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-25 15:08:31 -0400 |
commit | 4caa6fad4c71391ab41e92a32aa58b10b6febe7f (patch) | |
tree | 5a4a92ea93940837470b28c52cbecb780687fd27 /src/common/crypto_ed25519.h | |
parent | ed48b0fe56df2f719cd7cd274c664f7037f98b75 (diff) | |
download | tor-4caa6fad4c71391ab41e92a32aa58b10b6febe7f.tar.gz tor-4caa6fad4c71391ab41e92a32aa58b10b6febe7f.zip |
Add curve25519->ed25519 key conversion per proposal 228
For proposal 228, we need to cross-certify our identity with our
curve25519 key, so that we can prove at descriptor-generation time
that we own that key. But how can we sign something with a key that
is only for doing Diffie-Hellman? By converting it to the
corresponding ed25519 point.
See the ALL-CAPS warning in the documentation. According to djb
(IIUC), it is safe to use these keys in the ways that ntor and prop228
are using them, but it might not be safe if we start providing crazy
oracle access.
(Unit tests included. What kind of a monster do you take me for?)
Diffstat (limited to 'src/common/crypto_ed25519.h')
-rw-r--r-- | src/common/crypto_ed25519.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h index f37dd5b770..82c5e6c6e3 100644 --- a/src/common/crypto_ed25519.h +++ b/src/common/crypto_ed25519.h @@ -67,6 +67,15 @@ typedef struct { int ed25519_checksig_batch(int *okay_out, const ed25519_checkable_t *checkable, int n_checkable); + +int ed25519_keypair_from_curve25519_keypair(ed25519_keypair_t *out, + int *signbit_out, + const curve25519_keypair_t *inp); + +int ed25519_public_key_from_curve25519_public_key(ed25519_public_key_t *pubkey, + const curve25519_public_key_t *pubkey_in, + int signbit); + #endif #define ED25519_BASE64_LEN 43 |