API参考
载入中...
搜索中...
未找到
spake2plus.h
1/*
2* This file is part of the openHiTLS project.
3*
4* openHiTLS is licensed under the Mulan PSL v2.
5* You can use this software according to the terms and conditions of the Mulan PSL v2.
6* You may obtain a copy of Mulan PSL v2 at:
7*
8* http://license.coscl.org.cn/MulanPSL2
9*
10* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13* See the Mulan PSL v2 for more details.
14*/
15
16#ifndef SPAKE2PLUS_H
17#define SPAKE2PLUS_H
18
24
25#include "hitls_build.h"
26
27#include <stdint.h>
28#include "bsl_types.h"
29#include "auth_pake.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
36typedef struct Spake2plusCtx Spake2plusCtx;
37
47
55
67
81int32_t HITLS_AUTH_Spake2plusReqRegister(HITLS_AUTH_PakeCtx* ctx, CRYPT_EAL_KdfCtx* kdfCtx,
82 BSL_Buffer exist_w0, BSL_Buffer exist_w1, BSL_Buffer exist_l);
83
97 BSL_Buffer exist_w0, BSL_Buffer exist_w1, BSL_Buffer exist_l);
98
111
126 BSL_Buffer shareP, BSL_Buffer *shareV, BSL_Buffer *confirmV);
127
142 BSL_Buffer confirmV, BSL_Buffer *confirmP, BSL_Buffer *out);
143
156
167
177
187
197
207
208#ifdef __cplusplus
209}
210#endif
211
212#endif // SPAKE2PLUS_H
CRYPT_PKEY_ParaId
定义 crypt_algid.h:208
void Spake2PlusFreeCtx(Spake2plusCtx *ctx)
Free SPAKE2+ context and associated resources
定义 spake2plus.c:83
BSL_Buffer HITLS_AUTH_PakeGetVerifier(HITLS_AUTH_PakeCtx *ctx)
Get verifier identity from PAKE context
定义 pake.c:397
BSL_Buffer HITLS_AUTH_PakeGetProver(HITLS_AUTH_PakeCtx *ctx)
Get prover from PAKE context
定义 pake.c:390
Spake2plusCtx * Spake2PlusNewCtx(CRYPT_PKEY_ParaId curve)
Create a new SPAKE2+ context
定义 spake2plus.c:128
int32_t HITLS_AUTH_Spake2plusReqSetup(HITLS_AUTH_PakeCtx *ctx, BSL_Buffer x, BSL_Buffer *shareP)
Perform SPAKE2+ requester setup phase
定义 spake2plus.c:1166
void * HITLS_AUTH_PakeGetInternalCtx(HITLS_AUTH_PakeCtx *ctx)
Get internal context from PAKE context
定义 pake.c:376
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
定义 spake2plus.c:378
BSL_Buffer HITLS_AUTH_PakeGetContext(HITLS_AUTH_PakeCtx *ctx)
Get context data from PAKE context
定义 pake.c:411
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
定义 spake2plus.c:1331
int32_t Spake2PlusInitCipherSuite(Spake2plusCtx *ctx, HITLS_AUTH_PAKE_CipherSuite *ciphersuite)
Initialize the cipher suite for SPAKE2+ context
定义 spake2plus.c:100
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
定义 spake2plus.c:231
int32_t HITLS_AUTH_Spake2plusRespDerive(HITLS_AUTH_PakeCtx *ctx, BSL_Buffer confirmP, BSL_Buffer *out)
Derive session keys for SPAKE2+ responder
定义 spake2plus.c:1427
BSL_Buffer HITLS_AUTH_PakeGetPassword(HITLS_AUTH_PakeCtx *ctx)
Get password from PAKE context
定义 pake.c:383
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
定义 spake2plus.c:1215
定义 bsl_types.h:40
定义 auth_pake.h:48
定义 pake.c:29
定义 spake2plus.c:45