![]() |
xilsecure
Vitis Drivers API Documentation
|
This file contains the implementation of the interface functions for ECC engine.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 rpo 03/31/20 Initial release 4.2 rpo 03/31/20 Updated file version to sync with library version 4.3 har 08/24/20 Added APIs to generate and verify ECDSA public key and signature Added support for ECDSA P521 curve am 09/25/20 Resolved MISRA C violations har 10/12/20 Addressed security review comments har 10/14/20 Replaced ecdsa with elliptic in names of function and macros 4.5 har 01/18/20 Added support for ECDSA P521 KAT kpt 02/14/21 Added redundancy for ECDSA hash length check har 03/22/21 Added volatile keyword to status variables used in XSECURE_TEMPORAL_CHECK 4.6 har 07/14/21 Fixed doxygen warnings gm 07/16/21 Added support for 64-bit address rb 08/11/21 Fix compilation warnings har 09/13/21 Fixed signature verification issue for P521 curve 4.7 am 01/07/22 Removed unused labels KEY_ERR and SIG_ERR by replacing XSECURE_TEMPORAL_CHECK with XSECURE_TEMPORAL_IMPL macros and status variable is reinitialized with XST_FAILURE before using it further in the respective functions har 01/20/22 Added glitch checks for clearing keys in XSecure_EllipticGenerateKey_64Bit() and XSecure_EllipticGenerateSignature_64Bit() har 02/16/22 Updated Status with ClearStatus only in case of success dc 07/13/22 Modified static function XSecure_EllipticGetCrvData() to non static 5.0 kpt 07/24/22 Moved XSecure_EllipticKat into xsecure_kat.c dc 08/26/22 Removed initializations of arrays 5.1 dc 03/30/23 Added support to accept the data in either big/little endian. 5.2 yog 05/18/23 Updated the flow for Big Endian ECC Mode setting yog 06/07/23 Added support for P-256 Curve ng 07/05/23 Added support for system device tree flow yog 08/07/23 Initialised trng before calling IpCores functions am 08/18/23 Added XSecure_EllipticValidateAndGetCrvInfo and XSecure_EllipticGetCrvSize functions yog 09/04/23 Restricted XSecure_ECCRandInit API support to VersalNet vss 09/11/23 Fixed MISRA-C Rule 8.13 violation 5.3 kpt 03/22/24 Fixed Branch past initialization 5.4 yog 04/29/24 Fixed doxygen warnings. mb 05/23/24 Added P192 curve support mb 05/23/24 Added P224 urve support
Macros | |
| #define | XSECURE_ECDSA_ALGN_CRV_SIZE_IN_BYTES (2U) |
| Align ECDSA curve size in bytes. More... | |
| #define | XSECURE_ECDSA_BITS_IN_BYTES (8U) |
| Bits in bytes. More... | |
Functions | |
| EcdsaCrvInfo * | XSecure_EllipticGetCrvData (XSecure_EllipticCrvTyp CrvTyp) |
| This function gets the curve related information. More... | |
| int | XSecure_EllipticGenerateKey_64Bit (XSecure_EllipticCrvTyp CrvType, const u64 DAddr, const XSecure_EllipticKeyAddr *KeyAddr) |
| This function generates Public Key for a given curve type using private key where both keys located at 64 bit address. More... | |
| int | XSecure_EllipticGenerateKey (XSecure_EllipticCrvTyp CrvType, const u8 *D, const XSecure_EllipticKey *Key) |
| This function generates Public Key for a given curve type. More... | |
| int | XSecure_EllipticGenerateSignature_64Bit (XSecure_EllipticCrvTyp CrvType, const XSecure_EllipticHashData *HashInfo, const u64 DAddr, const u64 KAddr, const XSecure_EllipticSignAddr *SignAddr) |
| This function generates signature for a given hash and curve type where data is located at 64-bit address. More... | |
| int | XSecure_EllipticGenerateSignature (XSecure_EllipticCrvTyp CrvType, const u8 *Hash, const u32 HashLen, const u8 *D, const u8 *K, const XSecure_EllipticSign *Sign) |
| This function generates signature for a given hash and curve type. More... | |
| int | XSecure_EllipticValidateKey_64Bit (XSecure_EllipticCrvTyp CrvType, const XSecure_EllipticKeyAddr *KeyAddr) |
| This function validates the public key for a given curve type where key is located at 64-bit address. More... | |
| int | XSecure_EllipticValidateKey (XSecure_EllipticCrvTyp CrvType, const XSecure_EllipticKey *Key) |
| This function validates the public key for a given curve type. More... | |
| int | XSecure_EllipticVerifySign_64Bit (XSecure_EllipticCrvTyp CrvType, const XSecure_EllipticHashData *HashInfo, const XSecure_EllipticKeyAddr *KeyAddr, const XSecure_EllipticSignAddr *SignAddr) |
| This function verifies the signature for a given hash, key and curve type where data is located at 64-bit address. More... | |
| int | XSecure_EllipticVerifySign (XSecure_EllipticCrvTyp CrvType, const u8 *Hash, const u32 HashLen, const XSecure_EllipticKey *Key, const XSecure_EllipticSign *Sign) |
| This function verifies the signature for a given hash, key and curve type. More... | |
| void | XSecure_PutData (const u32 Size, u8 *Dst, const u64 SrcAddr) |
| This function copies data from 32/64 bit address to local buffer. More... | |
| void | XSecure_GetData (const u32 Size, const u8 *Src, const u64 DstAddr) |
| This function copies data to 32/64 bit address from local buffer. More... | |
| void | XSecure_FixEndiannessNCopy (const u32 Size, u64 DstAddr, const u64 SrcAddr) |
| This function copies data to destination based on library endianness selection. More... | |
| u32 | XSecure_EllipticGetCrvSize (const XSecure_EllipticCrvTyp CrvType) |
| This function gets curve size in bytes. More... | |