API参考
载入中...
搜索中...
未找到
Crypt_eal_kdf

kdf of crypto module 更多...

Crypt_eal_kdf 的协作图:

函数

bool CRYPT_EAL_KdfIsValidAlgId (CRYPT_KDF_AlgId id)
 Check whether the given kdf algorithm ID is valid.
CRYPT_EAL_KdfCtx * CRYPT_EAL_ProviderKdfNewCtx (CRYPT_EAL_LibCtx *libCtx, int32_t algId, const char *attrName)
 Generate kdf handles in the providers
CRYPT_EAL_KdfCtx * CRYPT_EAL_KdfNewCtx (CRYPT_KDF_AlgId algId)
 Generate kdf handles
int32_t CRYPT_EAL_KdfSetParam (CRYPT_EAL_KdfCtx *ctx, const BSL_Param *param)
 Set the parameters of Algorithm kdf
int32_t CRYPT_EAL_KdfDerive (CRYPT_EAL_KdfCtx *ctx, uint8_t *key, uint32_t keyLen)
 Derived key
int32_t CRYPT_EAL_KdfDeInitCtx (CRYPT_EAL_KdfCtx *ctx)
 Deinitialize the context of kdf
void CRYPT_EAL_KdfFreeCtx (CRYPT_EAL_KdfCtx *ctx)
 Free the context of kdf
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.
CRYPT_EAL_KdfCtx * CRYPT_EAL_KdfDupCtx (const CRYPT_EAL_KdfCtx *from)
 Dup the kdf context.

详细描述

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

参数
ctx[IN] kdf context
返回值
CRYPT_SUCCESSFor other error codes, see crypt_errno.h.

◆ 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_SUCCESSFor other error codes, see crypt_errno.h.

◆ 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,kdfcontext pointer. NULL, if the operation fails.

◆ CRYPT_EAL_KdfFreeCtx()

void CRYPT_EAL_KdfFreeCtx ( CRYPT_EAL_KdfCtx * ctx)

Free the context of kdf

参数
ctx[IN] kdf context

◆ CRYPT_EAL_KdfIsValidAlgId()

bool CRYPT_EAL_KdfIsValidAlgId ( CRYPT_KDF_AlgId id)

Check whether the given kdf algorithm ID is valid.

注解
Not supported in provider mode.
参数
id[IN] kdf algorithm ID.
返回值
Valid,trueis returned. Invalid, false is returned.

◆ CRYPT_EAL_KdfNewCtx()

CRYPT_EAL_KdfCtx * CRYPT_EAL_KdfNewCtx ( CRYPT_KDF_AlgId algId)

Generate kdf handles

参数
algId[IN] kdf algorithm ID.
返回值
Successkdf 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_SUCCESSFor other error codes, see crypt_errno.h.

◆ 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.
返回值
Successkdf ctx. Fails: NULL.