File indexing completed on 2025-01-18 10:02:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef NETTLE_EDDSA_H
0033 #define NETTLE_EDDSA_H
0034
0035 #include "nettle-types.h"
0036
0037 #include "bignum.h"
0038
0039 #ifdef __cplusplus
0040 extern "C" {
0041 #endif
0042
0043
0044 #define ed25519_sha512_set_private_key nettle_ed25519_sha512_set_private_key
0045 #define ed25519_sha512_public_key nettle_ed25519_sha512_public_key
0046 #define ed25519_sha512_sign nettle_ed25519_sha512_sign
0047 #define ed25519_sha512_verify nettle_ed25519_sha512_verify
0048 #define ed448_shake256_public_key nettle_ed448_shake256_public_key
0049 #define ed448_shake256_sign nettle_ed448_shake256_sign
0050 #define ed448_shake256_verify nettle_ed448_shake256_verify
0051
0052 #define ED25519_KEY_SIZE 32
0053 #define ED25519_SIGNATURE_SIZE 64
0054
0055 void
0056 ed25519_sha512_public_key (uint8_t *pub, const uint8_t *priv);
0057
0058 void
0059 ed25519_sha512_sign (const uint8_t *pub,
0060 const uint8_t *priv,
0061 size_t length, const uint8_t *msg,
0062 uint8_t *signature);
0063
0064 int
0065 ed25519_sha512_verify (const uint8_t *pub,
0066 size_t length, const uint8_t *msg,
0067 const uint8_t *signature);
0068
0069 #define ED448_KEY_SIZE 57
0070 #define ED448_SIGNATURE_SIZE 114
0071
0072 void
0073 ed448_shake256_public_key (uint8_t *pub, const uint8_t *priv);
0074
0075 void
0076 ed448_shake256_sign (const uint8_t *pub,
0077 const uint8_t *priv,
0078 size_t length, const uint8_t *msg,
0079 uint8_t *signature);
0080
0081 int
0082 ed448_shake256_verify (const uint8_t *pub,
0083 size_t length, const uint8_t *msg,
0084 const uint8_t *signature);
0085
0086 #ifdef __cplusplus
0087 }
0088 #endif
0089
0090 #endif