diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2015-07-06 09:57:23 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2015-07-06 09:57:23 +0000 |
commit | f079c27761a676f7c4200f7275112edd0b5e1270 (patch) | |
tree | 1bc4675ea4d302882507d21ce8b958bf569b7e4b /src/common/crypto_curve25519.h | |
parent | be113f0bce4516df1ad5b7a7a50707c466bdf9a4 (diff) | |
download | tor-f079c27761a676f7c4200f7275112edd0b5e1270.tar.gz tor-f079c27761a676f7c4200f7275112edd0b5e1270.zip |
Integrate the accelerated Curve25519 scalar basemult.
Integration work scavanged from nickm's `ticket8897_9663_v2` branch,
with minor modifications. Tor will still sanity check the output but
now also attempts to catch extreme breakage by spot checking the
optimized implementation vs known values from the NaCl documentation.
Implements feature 9663.
Diffstat (limited to 'src/common/crypto_curve25519.h')
-rw-r--r-- | src/common/crypto_curve25519.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/crypto_curve25519.h b/src/common/crypto_curve25519.h index 48e8a6d962..d53743986c 100644 --- a/src/common/crypto_curve25519.h +++ b/src/common/crypto_curve25519.h @@ -61,6 +61,8 @@ int curve25519_rand_seckey_bytes(uint8_t *out, int extra_strong); #ifdef CRYPTO_CURVE25519_PRIVATE STATIC int curve25519_impl(uint8_t *output, const uint8_t *secret, const uint8_t *basepoint); + +STATIC int curve25519_basepoint_impl(uint8_t *output, const uint8_t *secret); #endif #define CURVE25519_BASE64_PADDED_LEN 44 @@ -82,5 +84,8 @@ ssize_t crypto_read_tagged_contents_from_file(const char *fname, uint8_t *data_out, ssize_t data_out_len); +void curve25519_set_impl_params(int use_ed); +void curve25519_init(void); + #endif |