Skip to content

Commit ee35bb0

Browse files
authored
[security][mbedtls] 新增 RSA ALT 配置项:硬件模幂最大位宽与超限探测开关,便于按芯片能力控制硬件路径
1 parent 843b446 commit ee35bb0

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

security/mbedtls/Kconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,36 @@ if PKG_USING_MBEDTLS
110110
int "Maxium fragment length in bytes"
111111
default 3584
112112

113+
menu "RSA ALT Configuration"
114+
depends on RT_HWCRYPTO_USING_BIGNUM_EXPTMOD
115+
116+
config MBEDTLS_RSA_ALT_HW_MODEXP_MAX_BITS
117+
int "Max modulus bits for hardware expmod"
118+
range 256 8192
119+
default 3136
120+
help
121+
Maximum modulus bit-length that RSA ALT sends to hardware
122+
modular exponentiation. Typical values:
123+
- 3136 for GD32F5 PKCAU
124+
- 4096 for hardware that supports RSA-4096
125+
This limit applies to modulus N bit-length, not certificate
126+
file size.
127+
128+
config MBEDTLS_RSA_ALT_OVERSIZE_HW_PROBE
129+
bool "Probe hardware for oversize modulus"
130+
default n
131+
help
132+
If enabled, RSA ALT will still try hardware expmod when modulus
133+
size exceeds MBEDTLS_RSA_ALT_HW_MODEXP_MAX_BITS. Disable for
134+
stable production behavior and direct software fallback on
135+
oversize requests.
136+
137+
endmenu
138+
139+
config MBEDTLS_SSL_PROTO_TLS1_3_SUPPORTS
140+
bool "Enable TLS 1.3 support"
141+
default n
142+
113143
config PKG_USING_MBEDTLS_EXAMPLE
114144
bool "Enable a mbedtls client example"
115145
select PKG_USING_MBEDTLS_CERTUM_TRUSTED_NETWORK_ROOT_CA

0 commit comments

Comments
 (0)