WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
mbedtls_platform_hardware_config.h
浏览该文件的文档.
1
7#ifndef MBEDTLS_PLATFORM_HARDWARE_CONFIG_H
8#define MBEDTLS_PLATFORM_HARDWARE_CONFIG_H
9
10#if defined(MBEDTLS_HARDEN_OPEN)
11/*******************************************unsupport macro begin*********************************************/
12#undef MBEDTLS_CIPHER_MODE_CFB
13#undef MBEDTLS_CIPHER_MODE_XTS
14/*******************************************unsupport macro end*********************************************/
15
16/*******************************************alternative macro begin*********************************************/
17/*
18 * Accelerate the AES algorithm by hardware.
19 *
20 * Requires: MBEDTLS_AES_C
21 *
22 * Module: library/aes.c
23*/
24#ifndef MBEDTLS_AES_ALT
25#define MBEDTLS_AES_ALT
26#endif
27
28/*
29 * use hardware entropy instead.
30 *
31 * Requires: MBEDTLS_ENTROPY_C
32 *
33 * Module: library/entropy.c
34*/
35#ifndef MBEDTLS_ENTROPY_HARDWARE_ALT
36#define MBEDTLS_ENTROPY_HARDWARE_ALT
37#endif
38
39#if !defined(MBEDTLS_ECP_RESTARTABLE)
40/*
41 * Accelerate the ECDH algorithm by hardware.
42 *
43 * This configuration replaces the following interfaces with the hardware acceleration implementation:
44 * mbedtls_ecdh_compute_shared
45 *
46 * Requires: MBEDTLS_ECDH_C
47 *
48 * Module: library/ecdh.c
49*/
50#ifndef MBEDTLS_ECDH_COMPUTE_SHARED_ALT
51#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
52#endif
53
54/*
55 * Accelerate the ECDSA Sign algorithm by hardware.
56 *
57 * This configuration replaces the following interfaces with the hardware acceleration implementation:
58 * mbedtls_ecdsa_sign
59 *
60 * Requires: MBEDTLS_ECDSA_C
61 *
62 * Module: library/ecdsa.c
63*/
64#ifndef MBEDTLS_ECDSA_SIGN_ALT
65#define MBEDTLS_ECDSA_SIGN_ALT
66#endif
67
68/*
69 * Accelerate the ECDSA Verify algorithm by hardware.
70 *
71 * This configuration replaces the following interfaces with the hardware acceleration implementation:
72 * mbedtls_ecdsa_verify
73 *
74 * Requires: MBEDTLS_ECDSA_C
75 *
76 * Module: library/ecdsa.c
77*/
78#ifndef MBEDTLS_ECDSA_VERIFY_ALT
79#define MBEDTLS_ECDSA_VERIFY_ALT
80#endif
81
82/*
83 * Accelerate the ECDSA Gen Key algorithm by hardware.
84 *
85 * This configuration replaces the following interfaces with the hardware acceleration implementation:
86 * mbedtls_ecdsa_genkey
87 *
88 * Requires: MBEDTLS_ECDSA_C
89 *
90 * Module: library/ecdsa.c
91*/
92#ifndef MBEDTLS_ECDSA_GENKEY_ALT
93#define MBEDTLS_ECDSA_GENKEY_ALT
94#endif
95#endif
96
97/*
98 * Accelerate the SHA1 algorithm by hardware.
99 *
100 * Requires: MBEDTLS_SHA1_C
101 *
102 * Module: library/sha1.c
103*/
104#ifndef MBEDTLS_SHA1_ALT
105#define MBEDTLS_SHA1_ALT
106#endif
107/*
108 * Accelerate the SHA224/256 algorithm by hardware.
109 *
110 * Requires: MBEDTLS_SHA256_C
111 *
112 * Module: library/sha256.c
113*/
114#ifndef MBEDTLS_SHA256_ALT
115#define MBEDTLS_SHA256_ALT
116#endif
117
118/*
119 * Accelerate the SHA384/512 algorithm by hardware.
120 *
121 * Requires: MBEDTLS_SHA512_C
122 *
123 * Module: library/sha512.c
124*/
125#ifndef MBEDTLS_SHA512_ALT
126#define MBEDTLS_SHA512_ALT
127#endif
128/*
129 * Accelerate the PBKDF2 algorithm by hardware.
130 *
131 * This configuration replaces the following interfaces with the hardware acceleration implementation:
132 * mbedtls_pkcs5_pbkdf2_hmac
133 *
134 * Requires: MBEDTLS_PKCS5_C
135 *
136 * Module: library/pkcs5.c
137*/
138#ifndef MBEDTLS_PBKDF2_HMAC_ALT
139#define MBEDTLS_PBKDF2_HMAC_ALT
140#endif
141/*******************************************alternative macro end*********************************************/
142
143/*******************************************hardware macro begin*********************************************/
144/*
145 * Accelerate the EXP MOD by hardware.
146 * If the data format is not supported, the software calculation is still used.
147 *
148 * This configuration affects the following interfaces with the hardware acceleration implementation:
149 * mbedtls_mpi_exp_mod
150 *
151 * Requires: MBEDTLS_BIGNUM_C
152 *
153 * Module: library/bignum.c
154*/
155#define MBEDTLS_BIGNUM_EXP_MOD_USE_HARDWARE
156
157/*******************************************hardware macro end*******************************************/
158
159#endif
160
161#endif /* MBEDTLS_PLATFORM_USER_CONFIG_H */