Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/group.h
/********************************************************************** | /********************************************************************** | ||||
* Copyright (c) 2013, 2014 Pieter Wuille * | * Copyright (c) 2013, 2014 Pieter Wuille * | ||||
* Distributed under the MIT software license, see the accompanying * | * Distributed under the MIT software license, see the accompanying * | ||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||||
**********************************************************************/ | **********************************************************************/ | ||||
#ifndef _SECP256K1_GROUP_ | #ifndef SECP256K1_GROUP_H | ||||
#define _SECP256K1_GROUP_ | #define SECP256K1_GROUP_H | ||||
#include "num.h" | #include "num.h" | ||||
#include "field.h" | #include "field.h" | ||||
/** A group element of the secp256k1 curve, in affine coordinates. */ | /** A group element of the secp256k1 curve, in affine coordinates. */ | ||||
typedef struct { | typedef struct { | ||||
secp256k1_fe x; | secp256k1_fe x; | ||||
secp256k1_fe y; | secp256k1_fe y; | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a); | static void secp256k1_ge_from_storage(secp256k1_ge *r, const secp256k1_ge_storage *a); | ||||
/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ | /** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ | ||||
static void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag); | static void secp256k1_ge_storage_cmov(secp256k1_ge_storage *r, const secp256k1_ge_storage *a, int flag); | ||||
/** Rescale a jacobian point by b which must be non-zero. Constant-time. */ | /** Rescale a jacobian point by b which must be non-zero. Constant-time. */ | ||||
static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *b); | static void secp256k1_gej_rescale(secp256k1_gej *r, const secp256k1_fe *b); | ||||
#endif | #endif /* SECP256K1_GROUP_H */ |