DLC Temp. Space Qualifiers
[Discrete Logarithm Cryptography (DLC)]

Temp. space qualifiers for DL based cryptography (exclusive RSA). More...

Defines

#define C4E_DLC_TMP_NUM(tmpid, keylen)
 Calculate the number of temp. space elements of type C4eArchDigit for DLC algorithms (exclusive RSA).
#define C4E_DLC_DH_TMPID_STD
 Temp. space qualifier associated with c4e_dlc_dh_std().
#define C4E_DLC_DH_TMPID_TLS
 Temp. space qualifier associated with c4e_dlc_dh_tls().
#define C4E_DLC_DH_TMPID_MAX
 Temp. space qualifier applicable to all DH functions over prime field $ \mathbb{F}_p $.
#define C4E_DLC_DSA_TMPID_SIGN
 Temp. space qualifier associated with c4e_dlc_dsa_sign().
#define C4E_DLC_DSA_TMPID_VERIFY
 Temp. space qualifier associated with c4e_dlc_dsa_verify().
#define C4E_DLC_DSA_TMPID_MAX
 Temp. space qualifier applicable to all DSA functions.

Detailed Description

Temp. space qualifiers for DL based cryptography (exclusive RSA).

The temp. space qualifiers shall be used as first argument to macro C4E_DLC_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 DL functions.


Define Documentation

#define C4E_DLC_TMP_NUM ( tmpid,
keylen   ) 

Calculate the number of temp. space elements of type C4eArchDigit for DLC algorithms (exclusive RSA).

Calculates the number of C4eArchDigit elements from the DLC field size (in bytes).

For dynamic memory allocation the recommended usage is:

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

in case C4E_DLC_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.
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 DLC Temp. Space Qualifiers.
[in] keylen Key length (field size, in bytes) for which the number of C4eArchDigit array elements has to be calculated.
Returns:
Number of elements of type C4eArchDigit to be reserved (allocated) as temporary memory space.

Definition at line 211 of file c4e_dlc.h.

#define C4E_DLC_DH_TMPID_MAX

Temp. space qualifier applicable to all DH functions over prime field $ \mathbb{F}_p $.

This means, it can be used for all DH functions declared in this file. But notice that using this define may allocate more memory space as required by a particular function.

Definition at line 67 of file c4e_dlc_dh.h.

#define C4E_DLC_DSA_TMPID_MAX

Temp. space qualifier applicable to all DSA functions.

This means, it can be used for all DSA functions declared in this file.

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

Definition at line 138 of file c4e_dlc_dsa.h.