Elliptic curve (EC) domain basics. More...
#include "c4e_elements.h"
Go to the source code of this file.
Data Structures | |
struct | C4eEcDomain |
Elliptic Curve domain parameters. More... | |
Defines | |
#define | C4E_EC_PTFMT_PC_Y |
#define | C4E_EC_PTFMT_PC_C |
#define | C4E_EC_PTFMT_PC_U |
#define | C4E_EC_PTFMT_PC_H |
#define | C4E_EC_GF_BYTES_MAX |
Maximum size of a field element in the underlying prime field or binary field , in bytes. | |
#define | C4E_EC_ATTR_NONE |
#define | C4E_EC_ATTR_INF |
#define | C4E_EC_ASGN_MEM(pt, mem, size) |
Assign digits memory to an EC point x- and y-coordinate. | |
#define | C4E_EC_IS_ZERO(pt) |
Checks whether an EC point is zero (at infinity) or not. | |
#define | C4E_EC_SET_INIT(pt) |
Sets an EC point (attribute) to it's initial (default) value. | |
#define | C4E_EC_SET_ZERO(pt) |
Sets an EC point (at infinity) to zero. | |
#define | C4E_EC_ASSERT_PTR(pt) |
Assert the pointer members in an EC point structure. | |
#define | C4E_EC_FIELD_BITS_MAX(mbits) |
Maximum size calculation for elliptic curve order (also designated as ) from the size of ground field or , in bits. | |
#define | C4E_EC_FIELD_BYTES_MAX(mlen) |
Maximum size calculation for elliptic curve order (also designated as ) from the size of ground field or , in bytes. | |
#define | C4E_EC_FIELD_DIGITS_MAX(msize) |
Maximum size calculation for elliptic curve order (also designated as ) from the size of ground field or , in digits. | |
Typedefs | |
typedef C4eElemPair | C4eEcPoint |
Elliptic Curve (EC) point. |
Elliptic curve (EC) domain basics.
Definition in file c4e_ec.h.
#define C4E_EC_ATTR_NONE |
none (default) attribute for C4eEcPoint::attr.
#define C4E_EC_ATTR_INF |
Indicates an EC point at infinity, in C4eEcPoint::attr.
#define C4E_EC_ASGN_MEM | ( | pt, | |||
mem, | |||||
size | ) |
Assign digits memory to an EC point x- and y-coordinate.
[in] | pt | Pointer to EC point which must have digits memory assigned to x- and y-coordinate. |
[in] | mem | Digits memory (of type C4eArchDigit*) to be assigned to pt->x and pt->y . |
[in] | size | Number of digits to be assigned to digits pointers of pt->x and pt->y . |
#define C4E_EC_IS_ZERO | ( | pt | ) |
#define C4E_EC_SET_INIT | ( | pt | ) |
#define C4E_EC_SET_ZERO | ( | pt | ) |
Sets an EC point (at infinity) to zero.
[in] | pt | Pointer to EC point. |
#define C4E_EC_ASSERT_PTR | ( | pt | ) |
Assert the pointer members in an EC point structure.
[in] | pt | Pointer to EC point of type C4eEcPoint. |
#define C4E_EC_FIELD_BITS_MAX | ( | mbits | ) |
Maximum size calculation for elliptic curve order (also designated as ) from the size of ground field or , in bits.
From Hasse's theorem (see for example ANSI X9.63, annex B.3 and B.4) it is known that:
Because we have three summands at the right side, we may have two bits of overflow, when adding all together. So the number of bits for is the number of bits used by q plus 2.
[in] | mbits | Size of modulus (a prime number or binary polynomial) in bits, for example calculated by use of function c4e_elem_bits(). |
#define C4E_EC_FIELD_DIGITS_MAX | ( | msize | ) |
Maximum size calculation for elliptic curve order (also designated as ) from the size of ground field or , in digits.
msize
- 1U.