123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- #ifndef OCRYPTO_CURVE_P256_H
- #define OCRYPTO_CURVE_P256_H
- #include "ocrypto_sc_p256.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct {
- ocrypto_mod_p256 x;
- ocrypto_mod_p256 y;
- } ocrypto_cp_p256;
- int ocrypto_curve_p256_from32bytes(ocrypto_cp_p256 *r, const uint8_t p[32]);
- int ocrypto_curve_p256_from64bytes(ocrypto_cp_p256 *r, const uint8_t p[64]);
- void ocrypto_curve_p256_to32bytes(uint8_t r[32], ocrypto_cp_p256 *p);
- void ocrypto_curve_p256_to64bytes(uint8_t r[64], ocrypto_cp_p256 *p);
- int ocrypto_curve_p256_scalarmult(ocrypto_cp_p256 *r, const ocrypto_cp_p256 *p, const ocrypto_sc_p256 *s);
- int ocrypto_curve_p256_scalarmult_base(ocrypto_cp_p256 *r, const ocrypto_sc_p256 *s);
- #ifdef __cplusplus
- }
- #endif
- #endif
|