Add group element storage type

This commit is contained in:
Pieter Wuille
2015-01-25 00:31:56 -04:00
parent ff889f7d90
commit e68d7208ec
2 changed files with 28 additions and 0 deletions

View File

@@ -25,6 +25,11 @@ typedef struct {
int infinity; /* whether this represents the point at infinity */
} secp256k1_gej_t;
typedef struct {
secp256k1_fe_storage_t x;
secp256k1_fe_storage_t y;
} secp256k1_ge_storage_t;
/** Set a group element equal to the point at infinity */
static void secp256k1_ge_set_infinity(secp256k1_ge_t *r);
@@ -99,4 +104,10 @@ static void secp256k1_gej_clear(secp256k1_gej_t *r);
/** Clear a secp256k1_ge_t to prevent leaking sensitive information. */
static void secp256k1_ge_clear(secp256k1_ge_t *r);
/** Convert a group element to the storage type. */
static void secp256k1_ge_to_storage(secp256k1_ge_storage_t *r, const secp256k1_ge_t*);
/** Convert a group element back from the storage type. */
static void secp256k1_ge_from_storage(secp256k1_ge_t *r, const secp256k1_ge_storage_t*);
#endif