| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef NETTLE_GOSTDSA_H_INCLUDED |
| #define NETTLE_GOSTDSA_H_INCLUDED |
|
|
| #include "ecc.h" |
| #include "dsa.h" |
| #include "ecdsa.h" |
|
|
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
|
|
| |
| #define gostdsa_sign nettle_gostdsa_sign |
| #define gostdsa_verify nettle_gostdsa_verify |
| #define gostdsa_vko nettle_gostdsa_vko |
| #define ecc_gostdsa_sign nettle_ecc_gostdsa_sign |
| #define ecc_gostdsa_sign_itch nettle_ecc_gostdsa_sign_itch |
| #define ecc_gostdsa_verify nettle_ecc_gostdsa_verify |
| #define ecc_gostdsa_verify_itch nettle_ecc_gostdsa_verify_itch |
|
|
| |
| #define gostdsa_generate_keypair ecdsa_generate_keypair |
|
|
| |
| |
| |
| |
| void |
| gostdsa_sign (const struct ecc_scalar *key, |
| void *random_ctx, nettle_random_func *random, |
| size_t digest_length, |
| const uint8_t *digest, |
| struct dsa_signature *signature); |
|
|
| int |
| gostdsa_verify (const struct ecc_point *pub, |
| size_t length, const uint8_t *digest, |
| const struct dsa_signature *signature); |
|
|
| void |
| gostdsa_vko (const struct ecc_scalar *key, |
| const struct ecc_point *pub, |
| size_t ukm_length, const uint8_t *ukm, |
| uint8_t *out); |
|
|
| |
| mp_size_t |
| ecc_gostdsa_sign_itch (const struct ecc_curve *ecc); |
|
|
| void |
| ecc_gostdsa_sign (const struct ecc_curve *ecc, |
| const mp_limb_t *zp, |
| |
| |
| const mp_limb_t *kp, |
| size_t length, const uint8_t *digest, |
| mp_limb_t *rp, mp_limb_t *sp, |
| mp_limb_t *scratch); |
|
|
| mp_size_t |
| ecc_gostdsa_verify_itch (const struct ecc_curve *ecc); |
|
|
| int |
| ecc_gostdsa_verify (const struct ecc_curve *ecc, |
| const mp_limb_t *pp, |
| size_t length, const uint8_t *digest, |
| const mp_limb_t *rp, const mp_limb_t *sp, |
| mp_limb_t *scratch); |
|
|
|
|
| #ifdef __cplusplus |
| } |
| #endif |
|
|
| #endif |
|
|