API参考
载入中...
搜索中...
未找到
crypt_cmvp.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 CRYPT_CMVP_H
17#define CRYPT_CMVP_H
18
19#include "hitls_build.h"
20#include <stdint.h>
21#include "bsl_params.h"
22#include "crypt_types.h"
23#include "crypt_eal_pkey.h"
24#include "crypt_eal_rand.h"
25#include "crypt_eal_md.h"
26#include "crypt_eal_mac.h"
27#include "crypt_eal_cipher.h"
28#include "crypt_eal_kdf.h"
29#include "crypt_cmvp.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* __cplusplus */
34
35typedef void* (*CmvpProvNewCtx)(void *provCtx);
36typedef const char* (*CmvpGetVersion)(void *ctx);
37typedef int32_t (*CmvpSelftest)(void *ctx, const BSL_Param *param);
38typedef void (*CmvpFreeCtx)(void *ctx);
39
40typedef struct {
41 CmvpProvNewCtx provNewCtx;
42 CmvpGetVersion getVersion;
43 CmvpSelftest selftest;
44 CmvpFreeCtx freeCtx;
46
48 bool isProvider;
50 void *data;
51 uint32_t state;
52 int32_t id;
53};
54
55typedef struct {
57 uint32_t saltLen;
58 uint32_t iter;
59 uint32_t dkeyLen;
61
62typedef struct {
64 uint32_t keyLen;
66
67typedef struct {
71
72typedef struct {
73 const CRYPT_EAL_PkeyPara *para;
74 const CRYPT_EAL_PkeyPub *pub;
75 const CRYPT_EAL_PkeyPrv *prv;
79 const CRYPT_RSA_PkcsV15Para *pkcsv15;
80 BSL_Param *pss;
81 BSL_Param *oaep;
83
84#ifdef __cplusplus
85}
86#endif /* __cplusplus */
87#endif /* CRYPT_CMVP_H */
CRYPT_PKEY_ParaId
定义 crypt_algid.h:208
CRYPT_MD_AlgId
定义 crypt_algid.h:68
CRYPT_MAC_AlgId
定义 crypt_algid.h:91
CRYPT_EVENT_TYPE
定义 crypt_types.h:810
定义 crypt_cmvp.h:62
uint32_t keyLen
定义 crypt_cmvp.h:64
CRYPT_MAC_AlgId macId
定义 crypt_cmvp.h:63
定义 crypt_cmvp.h:67
定义 crypt_cmvp.h:55
CRYPT_MAC_AlgId macId
定义 crypt_cmvp.h:56
uint32_t saltLen
定义 crypt_cmvp.h:57
uint32_t dkeyLen
定义 crypt_cmvp.h:59
定义 crypt_cmvp.h:72
CRYPT_PKEY_ParaId paraId
定义 crypt_cmvp.h:77
CRYPT_MD_AlgId mdId
定义 crypt_cmvp.h:76
定义 crypt_eal_pkey.h:91
定义 crypt_eal_pkey.h:68
定义 crypt_eal_pkey.h:40
Pkcsv15 padding mode, when RSA is used for signature.
定义 crypt_types.h:68
定义 crypt_cmvp.h:40
定义 crypt_cmvp.h:47