![]() |
xilsecure
Vitis Drivers API Documentation
|
This file consists definitions for LMS OTS operations.
MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ---------------------------------------------------------- 5.4 kal 07/24/24 Initial release
Functions | |
| u32 | XSecure_LmsOtsCoeff (u8 const *const Arr, const u32 ArrayIndex, const u32 w) |
| This function extracts the digits from the array for bytes. More... | |
| int | XSecure_LmsOtsComputeChecksum (const u8 *const Array, const u32 ArrayLen, const u32 w, const u32 ls, u32 *const Checksum) |
| This function calculates the checksum for a given array. More... | |
| int | XSecure_LmsOtsLookupParamSet (XSecure_LmsOtsType Type, XSecure_LmsOtsParam **Parameters) |
| This function returns the parameters for the type of LMS OTS type. More... | |
| u32 XSecure_LmsOtsCoeff | ( | u8 const *const | Arr, |
| const u32 | ArrayIndex, | ||
| const u32 | w | ||
| ) |
This function extracts the digits from the array for bytes.
[1, 2, 3, 4] ^ | coef(S, 0, 4)
If i is larger than the number of w-bit values in S, then coef(S, i, w) is undefined, this cant be checked here
| Array | - Byte array from where the digit needs to be picked |
| ArrayIndex | - When array is divided into array of digits, i represents the index of digit |
| w - Width in bits, for each digit allowed values |
Referenced by XSecure_LmsOtsComputeChecksum().
| int XSecure_LmsOtsComputeChecksum | ( | const u8 *const | Array, |
| const u32 | ArrayLen, | ||
| const u32 | w, | ||
| const u32 | ls, | ||
| u32 *const | Checksum | ||
| ) |
This function calculates the checksum for a given array.
| Array | - Byte array ffor which checksum needs to be calculated |
| ArrayLen- | Length of input array |
| w | - Width in bits, for each digit allowed values |
| ls | - Number of bits to left-shift the calculated checksum |
| Checksum- | Pointer to address, where computed checksum needs to be copied |
References XSECURE_LMS_OTS_CHECKSUM_BUFF_INVALID_LEN_ERROR, and XSecure_LmsOtsCoeff().
| int XSecure_LmsOtsLookupParamSet | ( | XSecure_LmsOtsType | Type, |
| XSecure_LmsOtsParam ** | Parameters | ||
| ) |
This function returns the parameters for the type of LMS OTS type.
| Type | XSecure_LmsOtsType, type of OTS algorithm selected |
| Parameters | Pointer to array location where all predefined parameter values are present XSecure_LmsOtsParam |
lookup table for 'n', 'w', 'p', 'ls' & Signature lengths
References XSECURE_LMS_OTS_LS_NOT_SUPPORTED, XSECURE_LMS_OTS_NOT_SUPPORTED, XSECURE_LMS_OTS_SHA256_N32_W4, XSECURE_LMS_OTS_SHA256_N32_W8, XSECURE_LMS_OTS_SHAKE_N32_W2, XSECURE_LMS_OTS_SHAKE_N32_W4, XSECURE_LMS_OTS_SHAKE_N32_W8, XSECURE_LMS_OTS_TYPE_LOOKUP_GLITCH_ERROR, XSECURE_LMS_OTS_TYPE_MAX_SUPPORTED, XSECURE_LMS_OTS_TYPE_UNSUPPORTED_ERROR, XSECURE_LMS_OTS_W4, XSECURE_LMS_OTS_W4_LS, XSECURE_LMS_OTS_W4_P, XSECURE_LMS_OTS_W4_U, XSECURE_LMS_OTS_W4_V, XSECURE_LMS_OTS_W8, XSECURE_LMS_OTS_W8_LS, XSECURE_LMS_OTS_W8_P, XSECURE_LMS_OTS_W8_U, XSECURE_LMS_OTS_W8_V, XSECURE_SHA2_256_HASH_LEN, XSECURE_SHAKE_256, and XSECURE_SHAKE_256_HASH_LEN.
Referenced by XSecure_HssFinish(), XSecure_HssInit(), and XSecure_LmsSignatureVerification().