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
0033
0034 #ifndef NETTLE_ECDSA_H_INCLUDED
0035 #define NETTLE_ECDSA_H_INCLUDED
0036
0037 #include "ecc.h"
0038 #include "dsa.h"
0039
0040 #ifdef __cplusplus
0041 extern "C" {
0042 #endif
0043
0044
0045 #define ecdsa_sign nettle_ecdsa_sign
0046 #define ecdsa_verify nettle_ecdsa_verify
0047 #define ecdsa_generate_keypair nettle_ecdsa_generate_keypair
0048 #define ecc_ecdsa_sign nettle_ecc_ecdsa_sign
0049 #define ecc_ecdsa_sign_itch nettle_ecc_ecdsa_sign_itch
0050 #define ecc_ecdsa_verify nettle_ecc_ecdsa_verify
0051 #define ecc_ecdsa_verify_itch nettle_ecc_ecdsa_verify_itch
0052
0053
0054
0055
0056
0057 void
0058 ecdsa_sign (const struct ecc_scalar *key,
0059 void *random_ctx, nettle_random_func *random,
0060 size_t digest_length,
0061 const uint8_t *digest,
0062 struct dsa_signature *signature);
0063
0064 int
0065 ecdsa_verify (const struct ecc_point *pub,
0066 size_t length, const uint8_t *digest,
0067 const struct dsa_signature *signature);
0068
0069 void
0070 ecdsa_generate_keypair (struct ecc_point *pub,
0071 struct ecc_scalar *key,
0072 void *random_ctx, nettle_random_func *random);
0073
0074
0075 mp_size_t
0076 ecc_ecdsa_sign_itch (const struct ecc_curve *ecc);
0077
0078 void
0079 ecc_ecdsa_sign (const struct ecc_curve *ecc,
0080 const mp_limb_t *zp,
0081
0082
0083 const mp_limb_t *kp,
0084 size_t length, const uint8_t *digest,
0085 mp_limb_t *rp, mp_limb_t *sp,
0086 mp_limb_t *scratch);
0087
0088 mp_size_t
0089 ecc_ecdsa_verify_itch (const struct ecc_curve *ecc);
0090
0091 int
0092 ecc_ecdsa_verify (const struct ecc_curve *ecc,
0093 const mp_limb_t *pp,
0094 size_t length, const uint8_t *digest,
0095 const mp_limb_t *rp, const mp_limb_t *sp,
0096 mp_limb_t *scratch);
0097
0098
0099 #ifdef __cplusplus
0100 }
0101 #endif
0102
0103 #endif