Pairing operations. More...
Typedefs | |
| typedef struct PairingState | PairingState |
| A pairing. | |
Functions | |
| EpidStatus | NewPairingState (EcGroup const *ga, EcGroup const *gb, FiniteField *ff, BigNumStr const *t, bool neg, PairingState **ps) |
| Constructs a new Pairing State. More... | |
| void | DeletePairingState (PairingState **ps) |
| Frees a previously allocated by PairingState. More... | |
| EpidStatus | Pairing (PairingState *ps, FfElement *d, EcPoint const *a, EcPoint const *b) |
| Computes an Optimal Ate Pairing for two parameters. More... | |
Pairing operations.
Provides APIs for defining and using a pairing relationship between two Elliptic Curve Groups.
| void DeletePairingState | ( | PairingState ** | ps | ) |
Frees a previously allocated by PairingState.
Frees memory pointed to by pairing state. Nulls the pointer.
| [in] | ps | The Pairing state. Can be NULL. |
| EpidStatus NewPairingState | ( | EcGroup const * | ga, |
| EcGroup const * | gb, | ||
| FiniteField * | ff, | ||
| BigNumStr const * | t, | ||
| bool | neg, | ||
| PairingState ** | ps | ||
| ) |
Constructs a new Pairing State.
Allocates memory and creates a new Pairing State for Optimal Ate Pairing.
Use DeletePairingState() to free memory.
| [in] | ga | The EcGroup from which the first parameter of the pairing is taken. |
| [in] | gb | The EcGroup from which the second parameter of the pairing is taken. |
| [in] | ff | The result finite field. Must be a Fq12 field. |
| [in] | t | A positive integer such that 6(t^2) == q - p, where p and q are parameters of G1. |
| [in] | neg | Select the alternate "negate" processing path for Optimal Ate Pairing. |
| [out] | ps | Newly constructed Pairing State. |
| EpidStatus Pairing | ( | PairingState * | ps, |
| FfElement * | d, | ||
| EcPoint const * | a, | ||
| EcPoint const * | b | ||
| ) |
Computes an Optimal Ate Pairing for two parameters.
| [in] | ps | The pairing state. |
| [out] | d | The result of the pairing. Will be in ff used to create the pairing state. |
| [in] | a | The first value to pair. Must be in ga used to create ps. |
| [in] | b | The second value to pair. Must be in gb used to create ps |