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

spake2+ of pake module 更多...

函数

Spake2plusCtxSpake2PlusNewCtx (CRYPT_PKEY_ParaId curve)
 Create a new SPAKE2+ context
void Spake2PlusFreeCtx (Spake2plusCtx *ctx)
 Free SPAKE2+ context and associated resources
int32_t Spake2PlusInitCipherSuite (Spake2plusCtx *ctx, HITLS_AUTH_PAKE_CipherSuite *ciphersuite)
 Initialize the cipher suite for SPAKE2+ context
int32_t HITLS_AUTH_Spake2plusReqRegister (HITLS_AUTH_PakeCtx *ctx, CRYPT_EAL_KdfCtx *kdfCtx, BSL_Buffer exist_w0, BSL_Buffer exist_w1, BSL_Buffer exist_l)
 Register pre-computed parameters for SPAKE2+ requester
int32_t HITLS_AUTH_Spake2plusRespRegister (HITLS_AUTH_PakeCtx *ctx, BSL_Buffer exist_w0, BSL_Buffer exist_w1, BSL_Buffer exist_l)
 Register pre-computed parameters for SPAKE2+ responder
int32_t HITLS_AUTH_Spake2plusReqSetup (HITLS_AUTH_PakeCtx *ctx, BSL_Buffer x, BSL_Buffer *shareP)
 Perform SPAKE2+ requester setup phase
int32_t HITLS_AUTH_Spake2plusRespSetup (HITLS_AUTH_PakeCtx *ctx, BSL_Buffer y, BSL_Buffer shareP, BSL_Buffer *shareV, BSL_Buffer *confirmV)
 Perform SPAKE2+ responder setup phase
int32_t HITLS_AUTH_Spake2plusReqDerive (HITLS_AUTH_PakeCtx *ctx, BSL_Buffer shareV, BSL_Buffer confirmV, BSL_Buffer *confirmP, BSL_Buffer *out)
 Derive session keys for SPAKE2+ requester
int32_t HITLS_AUTH_Spake2plusRespDerive (HITLS_AUTH_PakeCtx *ctx, BSL_Buffer confirmP, BSL_Buffer *out)
 Derive session keys for SPAKE2+ responder
void * HITLS_AUTH_PakeGetInternalCtx (HITLS_AUTH_PakeCtx *ctx)
 Get internal context from PAKE context
BSL_Buffer HITLS_AUTH_PakeGetPassword (HITLS_AUTH_PakeCtx *ctx)
 Get password from PAKE context
BSL_Buffer HITLS_AUTH_PakeGetProver (HITLS_AUTH_PakeCtx *ctx)
 Get prover from PAKE context
BSL_Buffer HITLS_AUTH_PakeGetVerifier (HITLS_AUTH_PakeCtx *ctx)
 Get verifier identity from PAKE context
BSL_Buffer HITLS_AUTH_PakeGetContext (HITLS_AUTH_PakeCtx *ctx)
 Get context data from PAKE context

详细描述

spake2+ of pake module

函数说明

◆ HITLS_AUTH_PakeGetContext()

BSL_Buffer HITLS_AUTH_PakeGetContext ( HITLS_AUTH_PakeCtx * ctx)

Get context data from PAKE context

参数
ctx[IN] PAKE context
返回值
BSL_Buffercontaining additional protocol context data

◆ HITLS_AUTH_PakeGetInternalCtx()

void * HITLS_AUTH_PakeGetInternalCtx ( HITLS_AUTH_PakeCtx * ctx)

Get internal context from PAKE context

参数
ctx[IN] PAKE context
返回值
non-NULLInternal SPAKE2+ context pointer NULL Invalid context

◆ HITLS_AUTH_PakeGetPassword()

BSL_Buffer HITLS_AUTH_PakeGetPassword ( HITLS_AUTH_PakeCtx * ctx)

Get password from PAKE context

参数
ctx[IN] PAKE context
返回值
BSL_Buffercontaining the authentication password

◆ HITLS_AUTH_PakeGetProver()

BSL_Buffer HITLS_AUTH_PakeGetProver ( HITLS_AUTH_PakeCtx * ctx)

Get prover from PAKE context

参数
ctx[IN] PAKE context
返回值
BSL_Buffercontaining the prover information

◆ HITLS_AUTH_PakeGetVerifier()

BSL_Buffer HITLS_AUTH_PakeGetVerifier ( HITLS_AUTH_PakeCtx * ctx)

Get verifier identity from PAKE context

参数
ctx[IN] PAKE context
返回值
BSL_Buffercontaining verifier identity information

◆ HITLS_AUTH_Spake2plusReqDerive()

int32_t HITLS_AUTH_Spake2plusReqDerive ( HITLS_AUTH_PakeCtx * ctx,
BSL_Buffer shareV,
BSL_Buffer confirmV,
BSL_Buffer * confirmP,
BSL_Buffer * out )

Derive session keys for SPAKE2+ requester

参数
ctx[IN] PAKE context
shareV[IN] Public share point received from responder
confirmV[IN] Confirmation value received from responder
confirmP[OUT] Output confirmation value for responder verification
out[OUT] Output derived key material
返回值
#HITLS_AUTH_SUCCESSKey derivation successful Other error codes defined in hitls_errno.h if an error occurs

◆ HITLS_AUTH_Spake2plusReqRegister()

int32_t HITLS_AUTH_Spake2plusReqRegister ( HITLS_AUTH_PakeCtx * ctx,
CRYPT_EAL_KdfCtx * kdfCtx,
BSL_Buffer exist_w0,
BSL_Buffer exist_w1,
BSL_Buffer exist_l )

Register pre-computed parameters for SPAKE2+ requester

参数
ctx[IN] PAKE context
kdfCtx[IN] KDF context
exist_w0[IN] Pre-computed w0 parameter which can be null
exist_w1[IN] Pre-computed w1 parameter which can be null
exist_l[IN] Pre-computed L point which can be null
返回值
#HITLS_AUTH_SUCCESSif successful Other error codes defined in hitls_errno.h if an error occurs

◆ HITLS_AUTH_Spake2plusReqSetup()

int32_t HITLS_AUTH_Spake2plusReqSetup ( HITLS_AUTH_PakeCtx * ctx,
BSL_Buffer x,
BSL_Buffer * shareP )

Perform SPAKE2+ requester setup phase

参数
ctx[IN] PAKE context
x[IN] random number for key generation which can be null
shareP[OUT] Output public share point to be sent to responder
返回值
#HITLS_AUTH_SUCCESSSetup successful Other error codes defined in hitls_errno.h if an error occurs

◆ HITLS_AUTH_Spake2plusRespDerive()

int32_t HITLS_AUTH_Spake2plusRespDerive ( HITLS_AUTH_PakeCtx * ctx,
BSL_Buffer confirmP,
BSL_Buffer * out )

Derive session keys for SPAKE2+ responder

参数
ctx[IN] PAKE context
confirmP[IN] Confirmation value received from requester
out[OUT] Output derived key material
返回值
#HITLS_AUTH_SUCCESSKey derivation successful Other error codes defined in hitls_errno.h if an error occurs

◆ HITLS_AUTH_Spake2plusRespRegister()

int32_t HITLS_AUTH_Spake2plusRespRegister ( HITLS_AUTH_PakeCtx * ctx,
BSL_Buffer exist_w0,
BSL_Buffer exist_w1,
BSL_Buffer exist_l )

Register pre-computed parameters for SPAKE2+ responder

参数
ctx[IN] PAKE context
exist_w0[IN] Pre-computed w0 parameter
exist_w1[IN] Pre-computed w1 parameter
exist_l[IN] Pre-computed L point
返回值
#HITLS_AUTH_SUCCESSif successful Other error codes defined in hitls_errno.h if an error occurs

◆ HITLS_AUTH_Spake2plusRespSetup()

int32_t HITLS_AUTH_Spake2plusRespSetup ( HITLS_AUTH_PakeCtx * ctx,
BSL_Buffer y,
BSL_Buffer shareP,
BSL_Buffer * shareV,
BSL_Buffer * confirmV )

Perform SPAKE2+ responder setup phase

参数
ctx[IN] PAKE context
y[IN] Input scalar for key generation which can be null
shareP[IN] Public share point received from requester
shareV[OUT] Output public share point to be sent to requester
confirmV[OUT] Output confirmation value for initial verification
返回值
#HITLS_AUTH_SUCCESSSetup successful Other error codes defined in hitls_errno.h if an error occurs

◆ Spake2PlusFreeCtx()

void Spake2PlusFreeCtx ( Spake2plusCtx * ctx)

Free SPAKE2+ context and associated resources

参数
ctx[IN] SPAKE2+ context to free

◆ Spake2PlusInitCipherSuite()

int32_t Spake2PlusInitCipherSuite ( Spake2plusCtx * ctx,
HITLS_AUTH_PAKE_CipherSuite * ciphersuite )

Initialize the cipher suite for SPAKE2+ context

参数
ctx[IN] SPAKE2+ context
ciphersuite[IN] Cipher suite configuration containing cryptographic algorithms
返回值
#HITLS_AUTH_SUCCESSif successful Other error codes defined in hitls_errno.h if an error occurs

◆ Spake2PlusNewCtx()

Spake2plusCtx * Spake2PlusNewCtx ( CRYPT_PKEY_ParaId curve)

Create a new SPAKE2+ context

参数
curve[IN] Elliptic curve parameter identifier
返回值
Spake2plusCtxpointer if successful, NULL if failed