Macros | |
#define | CRYS_ECPKI_BuildPublKey(pDomain, PublKeyIn_ptr, PublKeySizeInBytes, pUserPublKey) _DX_ECPKI_BuildPublKey((pDomain), (PublKeyIn_ptr), (PublKeySizeInBytes), CheckPointersAndSizesOnly, (pUserPublKey), NULL) |
This macro calls _DX_ECPKI_BuildPublKey function for building the public key while checking input pointers and sizes. For a description of the parameters see _DX_ECPKI_BuildPublKey. More... | |
#define | CRYS_ECPKI_BuildPublKeyPartlyCheck(pDomain, PublKeyIn_ptr, PublKeySizeInBytes, pUserPublKey, pTempBuff) _DX_ECPKI_BuildPublKey((pDomain), (PublKeyIn_ptr), (PublKeySizeInBytes), ECpublKeyPartlyCheck, (pUserPublKey), (pTempBuff)) |
This macro calls _DX_ECPKI_BuildPublKey function for building the public key with partial validation of the key [SEC1] - 3.2.3. For a description of the parameters see _DX_ECPKI_BuildPublKey. More... | |
#define | CRYS_ECPKI_BuildPublKeyFullCheck(pDomain, PublKeyIn_ptr, PublKeySizeInBytes, pUserPublKey, pTempBuff) _DX_ECPKI_BuildPublKey((pDomain), (PublKeyIn_ptr), (PublKeySizeInBytes), (ECpublKeyFullCheck), (pUserPublKey), (pTempBuff)) |
This macro calls _DX_ECPKI_BuildPublKey function for building the public key with full validation of the key [SEC1] - 3.2.2. For a description of the parameters and return values see _DX_ECPKI_BuildPublKey. More... | |
Functions | |
CRYSError_t | CRYS_ECPKI_BuildPrivKey (const CRYS_ECPKI_Domain_t *pDomain, const uint8_t *pPrivKeyIn, uint32_t PrivKeySizeInBytes, CRYS_ECPKI_UserPrivKey_t *pUserPrivKey) |
Builds (imports) the user private key structure from an existing private key so that this structure can be used by other EC primitives. This function should be called before using of the private key. Input domain structure must be initialized by EC parameters and auxiliary values, using CRYS_ECPKI_GetDomain or CRYS_ECPKI_SetDomain functions. More... | |
CRYSError_t | _DX_ECPKI_BuildPublKey (const CRYS_ECPKI_Domain_t *pDomain, uint8_t *PublKeyIn_ptr, uint32_t PublKeySizeInBytes, EC_PublKeyCheckMode_t CheckMode, CRYS_ECPKI_UserPublKey_t *pUserPublKey, CRYS_ECPKI_BUILD_TempData_t *pTempBuff) |
Builds a user public key structure from an imported public key, so it can be used by other EC primitives. When operating the EC cryptographic algorithms with imported EC public key, this function should be called before using of the public key. More... | |
CRYSError_t | CRYS_ECPKI_ExportPublKey (CRYS_ECPKI_UserPublKey_t *pUserPublKey, CRYS_ECPKI_PointCompression_t compression, uint8_t *pExternPublKey, uint32_t *pPublKeySizeBytes) |
Converts an existing public key from internal representation to Big-Endian export representation. The function converts the X,Y coordinates of public key EC point to big endianness, and sets the public key as follows: More... | |
#define CRYS_ECPKI_BuildPublKey | ( | pDomain, | |
PublKeyIn_ptr, | |||
PublKeySizeInBytes, | |||
pUserPublKey | |||
) | _DX_ECPKI_BuildPublKey((pDomain), (PublKeyIn_ptr), (PublKeySizeInBytes), CheckPointersAndSizesOnly, (pUserPublKey), NULL) |
This macro calls _DX_ECPKI_BuildPublKey function for building the public key while checking input pointers and sizes. For a description of the parameters see _DX_ECPKI_BuildPublKey.
Definition at line 148 of file crys_ecpki_build.h.
#define CRYS_ECPKI_BuildPublKeyFullCheck | ( | pDomain, | |
PublKeyIn_ptr, | |||
PublKeySizeInBytes, | |||
pUserPublKey, | |||
pTempBuff | |||
) | _DX_ECPKI_BuildPublKey((pDomain), (PublKeyIn_ptr), (PublKeySizeInBytes), (ECpublKeyFullCheck), (pUserPublKey), (pTempBuff)) |
This macro calls _DX_ECPKI_BuildPublKey function for building the public key with full validation of the key [SEC1] - 3.2.2. For a description of the parameters and return values see _DX_ECPKI_BuildPublKey.
Definition at line 170 of file crys_ecpki_build.h.
#define CRYS_ECPKI_BuildPublKeyPartlyCheck | ( | pDomain, | |
PublKeyIn_ptr, | |||
PublKeySizeInBytes, | |||
pUserPublKey, | |||
pTempBuff | |||
) | _DX_ECPKI_BuildPublKey((pDomain), (PublKeyIn_ptr), (PublKeySizeInBytes), ECpublKeyPartlyCheck, (pUserPublKey), (pTempBuff)) |
This macro calls _DX_ECPKI_BuildPublKey function for building the public key with partial validation of the key [SEC1] - 3.2.3. For a description of the parameters see _DX_ECPKI_BuildPublKey.
Definition at line 159 of file crys_ecpki_build.h.
CRYSError_t _DX_ECPKI_BuildPublKey | ( | const CRYS_ECPKI_Domain_t * | pDomain, |
uint8_t * | PublKeyIn_ptr, | ||
uint32_t | PublKeySizeInBytes, | ||
EC_PublKeyCheckMode_t | CheckMode, | ||
CRYS_ECPKI_UserPublKey_t * | pUserPublKey, | ||
CRYS_ECPKI_BUILD_TempData_t * | pTempBuff | ||
) |
Builds a user public key structure from an imported public key, so it can be used by other EC primitives. When operating the EC cryptographic algorithms with imported EC public key, this function should be called before using of the public key.
The user may call this function by appropriate macros, according to necessary validation level [SEC1. ECC standard: 3.2, ANS X9.62]:
[in] | pDomain | The EC domain (curve). |
[in] | PublKeyIn_ptr | Pointer to the input public key data, in compressed or uncompressed or hybrid form: [PC||X||Y] Big-Endian representation, structured according to [IEEE1363], where:
|
[in] | PublKeySizeInBytes | The size of public key data (in bytes). |
[in] | CheckMode | The required level of public key verification (higher verification level means longer verification time):
|
[out] | pUserPublKey | Pointer to the output public key structure. This structure is used as input to the ECPKI cryptographic primitives. |
[in] | pTempBuff | Pointer for a temporary buffer required for the build function. |
CRYSError_t CRYS_ECPKI_BuildPrivKey | ( | const CRYS_ECPKI_Domain_t * | pDomain, |
const uint8_t * | pPrivKeyIn, | ||
uint32_t | PrivKeySizeInBytes, | ||
CRYS_ECPKI_UserPrivKey_t * | pUserPrivKey | ||
) |
Builds (imports) the user private key structure from an existing private key so that this structure can be used by other EC primitives. This function should be called before using of the private key. Input domain structure must be initialized by EC parameters and auxiliary values, using CRYS_ECPKI_GetDomain or CRYS_ECPKI_SetDomain functions.
[in] | pDomain | The EC domain (curve). |
[in] | pPrivKeyIn | Pointer to private key data. |
[in] | PrivKeySizeInBytes | Size of private key data (in bytes). |
[out] | pUserPrivKey | Pointer to the private key structure. This structure is used as input to the ECPKI cryptographic primitives. |
CRYSError_t CRYS_ECPKI_ExportPublKey | ( | CRYS_ECPKI_UserPublKey_t * | pUserPublKey, |
CRYS_ECPKI_PointCompression_t | compression, | ||
uint8_t * | pExternPublKey, | ||
uint32_t * | pPublKeySizeBytes | ||
) |
Converts an existing public key from internal representation to Big-Endian export representation. The function converts the X,Y coordinates of public key EC point to big endianness, and sets the public key as follows:
[in] | pUserPublKey | Pointer to the input public key structure (in Little-Endian form). |
[in] | compression | Compression mode: Compressed, Uncompressed or Hybrid. |
[out] | pExternPublKey | Pointer to the exported public key array, in compressed or uncompressed or hybrid form: [PC||X||Y] Big-Endian representation, structured according to [IEEE1363]. In compressed form, Y is omitted. |
[in,out] | pPublKeySizeBytes | Pointer used for the input of the user public key buffer size (in bytes), and the output of the size of the converted public key in bytes. |