diff options
author | Niels Möller <nisse@lysator.liu.se> | 2014-10-04 21:21:48 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2014-10-04 21:21:48 +0200 |
commit | f199cec38c007545f8c034da3399e9a77f51faaa (patch) | |
tree | 8cd560695efec52cb7c96c630913b657fb0acf30 /eddsa.h | |
parent | 470b5df2a25a96505cc2201f69bd40a1c70272e6 (diff) | |
download | nettle-f199cec38c007545f8c034da3399e9a77f51faaa.tar.gz |
Implemented eddsa signature internals.
Diffstat (limited to 'eddsa.h')
-rw-r--r-- | eddsa.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -45,10 +45,14 @@ extern "C" { #define _eddsa_compress_itch _nettle_eddsa_compress_itch #define _eddsa_decompress _nettle_eddsa_decompress #define _eddsa_decompress_itch _nettle_eddsa_decompress_itch +#define _eddsa_hash _nettle_eddsa_hash +#define _eddsa_sign _nettle_eddsa_sign +#define _eddsa_sign_itch _nettle_eddsa_sign_itch #define ED25519_KEY_SIZE 32 struct ecc_curve; +struct ecc_modulo; mp_size_t _eddsa_compress_itch (const struct ecc_curve *ecc); @@ -63,6 +67,24 @@ _eddsa_decompress (const struct ecc_curve *ecc, mp_limb_t *p, const uint8_t *cp, mp_limb_t *scratch); +void +_eddsa_hash (const struct ecc_modulo *m, + mp_limb_t *rp, const uint8_t *digest); + +mp_size_t +_eddsa_sign_itch (const struct ecc_curve *ecc); + +void +_eddsa_sign (const struct ecc_curve *ecc, + const struct nettle_hash *H, + const uint8_t *pub, + void *ctx, + const mp_limb_t *k2, + size_t length, + const uint8_t *msg, + uint8_t *signature, + mp_limb_t *scratch); + #ifdef __cplusplus } #endif |