Binary Field EC Temp. Space Qualifiers
[ECC over binary field]

Temp. space qualifiers for EC based cryptography over binary field. More...

Defines

#define C4E_ECC2N_TMPID_DOM_CHECK
 Temp. space qualifier associated with c4e_ecc2n_domchk().
#define C4E_ECC2N_TMPID_KEY_CHECK
 Temp. space qualifier associated with c4e_ecc2n_keychk_pub().
#define C4E_ECC2N_TMPID_PT2OS
 Temp. space qualifier associated with c4e_ecc2n_pt2os().
#define C4E_ECC2N_TMPID_OS2PT
 Temp. space qualifier associated with c4e_ecc2n_os2pt().
#define C4E_ECC2N_TMPID_MAX
 Temp. space qualifier applicable to all ECC functions over binary field $ \mathbb{F}_{2^n} $ in this file.
#define C4E_ECC2N_TMP_NUM(tmpid, keylen)
 Calculates the number of temp. space elements of type C4eArchDigit for algorithms based on elliptic curves over binary field.
#define C4E_ECC2N_DH_TMPID_ORD
 Temp. space qualifier associated with c4e_ecc2n_dh(), which must be applied in case the EC domain parameter C4eEcDomain::h is equal to zero / one (interpreted as a big number).
#define C4E_ECC2N_DH_TMPID_COF
 Temp. space qualifier associated with c4e_ecc2n_dh(), which must be applied in case the EC domain parameter C4eEcDomain::h is unequal to zero / one (interpreted as a big number).
#define C4E_ECC2N_DH_TMPID_MAX
 Temp. space qualifier applicable to all ECDH functions over binary field $ \mathbb{F}_{2^n} $ in this file.
#define C4E_ECC2N_DSA_TMPID_SIGN
 Temp. space qualifier associated with c4e_ecc2n_dsa_sign().
#define C4E_ECC2N_DSA_TMPID_VERIFY
 Temp. space qualifier associated with c4e_ecc2n_dsa_verify().
#define C4E_ECC2N_DSA_TMPID_MAX
 Temp. space qualifier applicable to all ECDSA functions.

Detailed Description

Temp. space qualifiers for EC based cryptography over binary field.

The temp. space qualifiers shall be used as first argument to macro C4E_ECC2N_TMP_NUM(). Finally they determine the size of temporary memory space (an array of elements of type C4eArchDigit), which must be provided by the caller to some ECC2N functions.


Define Documentation

#define C4E_ECC2N_TMPID_MAX

Temp. space qualifier applicable to all ECC functions over binary field $ \mathbb{F}_{2^n} $ in this file.

Note:
Using this define may allocate more memory space as required by a particular function.

Definition at line 102 of file c4e_ecc2n.h.

#define C4E_ECC2N_TMP_NUM ( tmpid,
keylen   ) 

Calculates the number of temp. space elements of type C4eArchDigit for algorithms based on elliptic curves over binary field.

Calculates the number of C4eArchDigit elements from the EC field size (in bytes) of underlying binary field $ \mathbb{F}_{2^n} $.

For dynamic memory allocation the recommended usage is:

with C4E_ECC2N_TMPID_KEY_CHECK as an example. For static memory reservation it might be used as:

in case C4E_EC_GF_BYTES_MAX is defined.

Attention:
Do not forget to multiply the return value with C4E_ARCH_DIGIT_SIZE, when dynamically allocating memory.
Note:
For best performance keylen should be a constant. In this case the compiler calculates the return value.
In $ \mathbb{F}_{2^n} $ the size of irreducible polynomial m(x) is one bit larger than the maximum size $ n $ of each field element. Because the parameter to C4E_GF2N_INV_SPACE() is the size of polynomial m(x), we must reserve one byte more than keylen.
Parameters:
[in] tmpid Temp. space qualifier associated with the function, for which finally memory space shall be allocated. Pass in here one of the defines from Binary Field EC Temp. Space Qualifiers.
[in] keylen Key length (ground field size, in bytes) for which the number of C4eArchDigit elements has to be calculated.
Returns:
Number of elements of type C4eArchDigit to be reserved (allocated) as temporary memory space.

Definition at line 150 of file c4e_ecc2n.h.

#define C4E_ECC2N_DH_TMPID_MAX

Temp. space qualifier applicable to all ECDH functions over binary field $ \mathbb{F}_{2^n} $ in this file.

Note:
Using this define may allocate more memory space as required by a particular function.

Definition at line 75 of file c4e_ecc2n_dh.h.

#define C4E_ECC2N_DSA_TMPID_SIGN

Temp. space qualifier associated with c4e_ecc2n_dsa_sign().

Attention:
This temp. space qualifier should not be used for (a kind of very uncommon/rare) elliptic curves, identified by:
              dom->q.val.size > dom->m.val.size
See also:
C4E_EC_FIELD_BITS_MAX()

Definition at line 57 of file c4e_ecc2n_dsa.h.

#define C4E_ECC2N_DSA_TMPID_VERIFY

Temp. space qualifier associated with c4e_ecc2n_dsa_verify().

Attention:
This temp. space qualifier should not be used for (a kind of very uncommon/rare) elliptic curves, identified by:
              dom->q.val.size > dom->m.val.size
See also:
C4E_EC_FIELD_BITS_MAX()

Definition at line 71 of file c4e_ecc2n_dsa.h.

#define C4E_ECC2N_DSA_TMPID_MAX

Temp. space qualifier applicable to all ECDSA functions.

This means, it can be used for all ECDSA functions over $ \mathbb{F}_{2^n} $ declared in this file.

Note:
Using this define may allocate more memory space as required by a particular function.
Attention:
This temp. space qualifier should not be used for (a kind of very uncommon/rare) elliptic curves, identified by:
              dom->q.val.size > dom->m.val.size
See also:
C4E_EC_FIELD_BITS_MAX()

Definition at line 92 of file c4e_ecc2n_dsa.h.