pairing

Pairing operations. More...

Modules

 EPID 1.1 specific pairing
 EPID 1.1 pairing operations.
 

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...
 

Detailed Description

Pairing operations.

Provides APIs for defining and using a pairing relationship between two elliptic curve groups.

Function Documentation

void DeletePairingState ( PairingState **  ps)

Frees a previously allocated by PairingState.

Frees memory pointed to by pairing state. Nulls the pointer.

Parameters
[in]psThe pairing state. Can be NULL.
See also
NewPairingState
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.

Parameters
[in]gaThe EcGroup from which the first parameter of the pairing is taken.
[in]gbThe EcGroup from which the second parameter of the pairing is taken.
[in]ffThe result finite field. Must be a Fq12 field.
[in]tA positive integer such that 6(t^2) == q - p, where p and q are parameters of G1.
[in]negSelect the alternate "negate" processing path for Optimal Ate Pairing.
[out]psNewly constructed pairing state.
Returns
EpidStatus
See also
DeletePairingState
EpidStatus Pairing ( PairingState ps,
FfElement d,
EcPoint const *  a,
EcPoint const *  b 
)

Computes an Optimal Ate Pairing for two parameters.

Parameters
[in]psThe pairing state.
[out]dThe result of the pairing. Will be in ff used to create the pairing state.
[in]aThe first value to pair. Must be in ga used to create ps.
[in]bThe second value to pair. Must be in gb used to create ps
Returns
EpidStatus