API参考
载入中...
搜索中...
未找到
crypt_cmvp_selftest.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_SELFTEST_H
17#define CRYPT_CMVP_SELFTEST_H
18
19#include "hitls_build.h"
20#if defined(HITLS_CRYPTO_CMVP_ISO19790) || defined(HITLS_CRYPTO_CMVP_SM) || defined(HITLS_CRYPTO_CMVP_FIPS)
21
22#include <stdint.h>
23#include "crypt_cmvp.h"
24#include "crypt_types.h"
25#include "crypt_eal_pkey.h"
26#include "crypt_eal_rand.h"
27#include "crypt_eal_md.h"
28#include "crypt_eal_mac.h"
29#include "crypt_eal_cipher.h"
30#include "crypt_eal_kdf.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36bool CRYPT_CMVP_SelftestDrbg(CRYPT_RAND_AlgId id);
37
38bool CRYPT_CMVP_SelftestProviderDrbg(void *libCtx, const char *attrName, CRYPT_RAND_AlgId id);
39
40bool CRYPT_CMVP_SelftestMd(CRYPT_MD_AlgId id);
41
42bool CRYPT_CMVP_SelftestProviderMd(void *libCtx, const char *attrName, CRYPT_MD_AlgId id);
43
44bool CRYPT_CMVP_SelftestRsa(void);
45
46bool CRYPT_CMVP_SelftestProviderRsa(void *libCtx, const char *attrName);
47
48bool CRYPT_CMVP_SelftestCipher(CRYPT_CIPHER_AlgId id);
49
50bool CRYPT_CMVP_SelftestProviderCipher(void *libCtx, const char *attrName, CRYPT_CIPHER_AlgId id);
51
52bool CRYPT_CMVP_SelftestChacha20poly1305(void);
53
54bool CRYPT_CMVP_SelftestProviderChacha20poly1305(void *libCtx, const char *attrName);
55
56bool CRYPT_CMVP_SelftestDh(void);
57
58bool CRYPT_CMVP_SelftestProviderDh(void *libCtx, const char *attrName);
59
60bool CRYPT_CMVP_SelftestDsa(void);
61
62bool CRYPT_CMVP_SelftestProviderDsa(void *libCtx, const char *attrName);
63
64bool CRYPT_CMVP_SelftestEd25519(void);
65
66bool CRYPT_CMVP_SelftestProviderEd25519(void *libCtx, const char *attrName);
67
68bool CRYPT_CMVP_SelftestHkdf(void);
69
70bool CRYPT_CMVP_SelftestProviderHkdf(void *libCtx, const char *attrName);
71
72bool CRYPT_CMVP_SelftestMac(CRYPT_MAC_AlgId id);
73
74bool CRYPT_CMVP_SelftestProviderMac(void *libCtx, const char *attrName, CRYPT_MAC_AlgId id);
75
76bool CRYPT_CMVP_SelftestPbkdf2(CRYPT_MAC_AlgId id);
77
78bool CRYPT_CMVP_SelftestProviderPbkdf2(void *libCtx, const char *attrName, CRYPT_MAC_AlgId id);
79
80bool CRYPT_CMVP_SelftestScrypt(void);
81
82bool CRYPT_CMVP_SelftestProviderScrypt(void *libCtx, const char *attrName);
83
84bool CRYPT_CMVP_SelftestKdfTls12(void);
85
86bool CRYPT_CMVP_SelftestProviderKdfTls12(void *libCtx, const char *attrName);
87
88bool CRYPT_CMVP_SelftestX25519(void);
89
90bool CRYPT_CMVP_SelftestProviderX25519(void *libCtx, const char *attrName);
91
92bool CRYPT_CMVP_SelftestEcdsa(void);
93
94bool CRYPT_CMVP_SelftestProviderEcdsa(void *libCtx, const char *attrName);
95
96bool CRYPT_CMVP_SelftestEcdh(void);
97
98bool CRYPT_CMVP_SelftestProviderEcdh(void *libCtx, const char *attrName);
99
100bool CRYPT_CMVP_SelftestSM2(void);
101
102bool CRYPT_CMVP_SelftestProviderSM2(void *libCtx, const char *attrName);
103
104bool CRYPT_CMVP_SelftestMlkemEncapsDecaps(void);
105
106bool CRYPT_CMVP_SelftestProviderMlkemEncapsDecaps(void *libCtx, const char *attrName);
107
108bool CRYPT_CMVP_SelftestMldsaSignVerify(void);
109
110bool CRYPT_CMVP_SelftestProviderMldsaSignVerify(void *libCtx, const char *attrName);
111
112bool CRYPT_CMVP_SelftestSlhdsaSignVerify(void);
113
114bool CRYPT_CMVP_SelftestProviderSlhdsaSignVerify(void *libCtx, const char *attrName);
115
116bool CRYPT_CMVP_SelftestPkeyPct(void *ctx, int32_t algId);
117
118int32_t CRYPT_CMVP_RandomnessTest(const uint8_t *data, const uint32_t len);
119
120#ifdef __cplusplus
121}
122#endif /* __cplusplus */
123
124#endif /* HITLS_CRYPTO_CMVP_ISO19790 || HITLS_CRYPTO_CMVP_SM || HITLS_CRYPTO_CMVP_FIPS */
125#endif /* CRYPT_CMVP_SELFTEST_H */
CRYPT_RAND_AlgId
定义 crypt_algid.h:41
CRYPT_MD_AlgId
定义 crypt_algid.h:68
CRYPT_MAC_AlgId
定义 crypt_algid.h:91