summaryrefslogtreecommitdiff
path: root/src/common/crypto_ed25519.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2016-08-23 14:53:01 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2016-08-23 14:53:01 +0300
commitb8bfdf638e9448ecda9dda1a2c02d7bbf4778341 (patch)
tree7f169f62b8a272a68fb3b326010f81193cef90b9 /src/common/crypto_ed25519.h
parent261f4c3f6f028cf4becff1077c08735e308d7d43 (diff)
downloadtor-b8bfdf638e9448ecda9dda1a2c02d7bbf4778341.tar.gz
tor-b8bfdf638e9448ecda9dda1a2c02d7bbf4778341.zip
Introduce ed25519_{sign,checksig}_prefixed functions().
Diffstat (limited to 'src/common/crypto_ed25519.h')
-rw-r--r--src/common/crypto_ed25519.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h
index 44c2ad9775..31afc49ccc 100644
--- a/src/common/crypto_ed25519.h
+++ b/src/common/crypto_ed25519.h
@@ -55,6 +55,17 @@ int ed25519_checksig(const ed25519_signature_t *signature,
const uint8_t *msg, size_t len,
const ed25519_public_key_t *pubkey);
+int
+ed25519_sign_prefixed(ed25519_signature_t *signature_out,
+ const uint8_t *msg, size_t len,
+ const char *prefix_str,
+ const ed25519_keypair_t *keypair);
+int
+ed25519_checksig_prefixed(const ed25519_signature_t *signature,
+ const uint8_t *msg, size_t len,
+ const char *prefix_str,
+ const ed25519_public_key_t *pubkey);
+
/**
* A collection of information necessary to check an Ed25519 signature. Used
* for batch verification.