Field storage type

This commit is contained in:
Pieter Wuille
2015-01-24 23:04:48 -04:00
parent 7137be8110
commit ff889f7d90
6 changed files with 134 additions and 0 deletions

View File

@@ -110,7 +110,14 @@ static void secp256k1_fe_get_hex(char *r64, const secp256k1_fe_t *a);
/** Convert a 64-character hexadecimal string to a field element. */
static int secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a64);
/** Convert a field element to the storage type. */
static void secp256k1_fe_to_storage(secp256k1_fe_storage_t *r, const secp256k1_fe_t*);
/** Convert a field element back from the storage type. */
static void secp256k1_fe_from_storage(secp256k1_fe_t *r, const secp256k1_fe_storage_t*);
/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */
static void secp256k1_fe_cmov(secp256k1_fe_t *r, const secp256k1_fe_t *a, int flag);
static void secp256k1_fe_storage_cmov(secp256k1_fe_storage_t *r, const secp256k1_fe_storage_t *a, int flag);
#endif