kdf of crypto module
更多...
kdf of crypto module
◆ CRYPT_EAL_KdfCopyCtx()
| int32_t CRYPT_EAL_KdfCopyCtx |
( |
CRYPT_EAL_KdfCtx * | to, |
|
|
const CRYPT_EAL_KdfCtx * | from ) |
Copy the context of kdf Note: When using HKDF for key derivation in CRYPT_KDF_HKDF_MODE_EXTRACT mode, need set the new context's extended length use CRYPT_PARAM_KDF_EXLEN.
- 参数
-
| from | [IN] kdf context |
| to | [OUT] kdf context |
◆ CRYPT_EAL_KdfDeInitCtx()
| int32_t CRYPT_EAL_KdfDeInitCtx |
( |
CRYPT_EAL_KdfCtx * | ctx | ) |
|
Deinitialize the context of kdf
- 参数
-
- 返回值
-
◆ CRYPT_EAL_KdfDerive()
| int32_t CRYPT_EAL_KdfDerive |
( |
CRYPT_EAL_KdfCtx * | ctx, |
|
|
uint8_t * | key, |
|
|
uint32_t | keyLen ) |
Derived key
- 参数
-
| ctx | [IN] kdf context |
| key | [OUT] Derived key |
| keyLen | [IN] Specify the key derivation length |
- 返回值
-
◆ CRYPT_EAL_KdfDupCtx()
| CRYPT_EAL_KdfCtx * CRYPT_EAL_KdfDupCtx |
( |
const CRYPT_EAL_KdfCtx * | from | ) |
|
Dup the kdf context.
- 参数
-
| from | [IN] original kdf context. |
- 返回值
-
| CRYPT_EAL_KdfCtx,kdf | context pointer. NULL, if the operation fails. |
◆ CRYPT_EAL_KdfFreeCtx()
| void CRYPT_EAL_KdfFreeCtx |
( |
CRYPT_EAL_KdfCtx * | ctx | ) |
|
Free the context of kdf
- 参数
-
◆ CRYPT_EAL_KdfIsValidAlgId()
Check whether the given kdf algorithm ID is valid.
- 注解
- Not supported in provider mode.
- 参数
-
- 返回值
-
| Valid,true | is returned. Invalid, false is returned. |
◆ CRYPT_EAL_KdfNewCtx()
Generate kdf handles
- 参数
-
| algId | [IN] kdf algorithm ID. |
- 返回值
-
| Success | kdf ctx. Fails: NULL. |
◆ CRYPT_EAL_KdfSetParam()
| int32_t CRYPT_EAL_KdfSetParam |
( |
CRYPT_EAL_KdfCtx * | ctx, |
|
|
const BSL_Param * | param ) |
Set the parameters of Algorithm kdf
- 参数
-
| ctx | [IN] kdf context |
| param | [IN] parameters |
- 返回值
-
◆ CRYPT_EAL_ProviderKdfNewCtx()
| CRYPT_EAL_KdfCtx * CRYPT_EAL_ProviderKdfNewCtx |
( |
CRYPT_EAL_LibCtx * | libCtx, |
|
|
int32_t | algId, |
|
|
const char * | attrName ) |
Generate kdf handles in the providers
- 参数
-
| libCtx | [IN] Library context |
| attrName | [IN] Specify expected attribute values |
| algId | [IN] kdf algorithm ID. |
- 返回值
-
| Success | kdf ctx. Fails: NULL. |