Skip to content

Commit c6184a9

Browse files
frkvmbolivar-nordic
authored andcommitted
[nrf noup] mbedtls: Improve prompt-less configurations noting support
-This commit improves the scheme for telling the build system that a certain feature is supported. The prompt-less configurations are used for automatic assigning of key-type support as well as supported algorithm types. Previously some of these configurations where using prompts and default, now they are automatic and prompt-less. -Removing menu "PSA key support" since all types are automatically assigned and prompt-less. -Removing unnecessary key types: PSA_WANT_KEY_TYPE_ARIA PSA_WANT_KEY_TYPE_CAMELLIA PSA_WANT_KEY_TYPE_DES -Adding help-text to prompt-less configurations -Fixing dependency between ECC and deterministic ECDSA -This commit is noup since it is touching configurations that is in the process of being replaced with a different scheme. Please see referenced task for details. ref: NCSDK-17840 Signed-off-by: Frank Audun Kvamtrø <[email protected]> (cherry picked from commit fbe6048)
1 parent 45f86b1 commit c6184a9

File tree

1 file changed

+38
-59
lines changed

1 file changed

+38
-59
lines changed

modules/mbedtls/Kconfig.psa

Lines changed: 38 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -21,94 +21,73 @@ config PSA_WANT_ALG_HMAC_DRBG
2121

2222
endmenu # RNG support
2323

24-
menu "PSA Key support"
25-
2624
config PSA_HAS_KEY_SUPPORT
2725
bool
2826
default y
29-
depends on PSA_WANT_KEY_TYPE_DERIVE || \
30-
PSA_WANT_KEY_TYPE_HMAC || \
27+
depends on PSA_WANT_KEY_TYPE_DERIVE || \
28+
PSA_WANT_KEY_TYPE_HMAC || \
3129
PSA_WANT_KEY_TYPE_AES || \
32-
PSA_WANT_KEY_TYPE_ARIA || \
33-
PSA_WANT_KEY_TYPE_CAMELLIA || \
3430
PSA_WANT_KEY_TYPE_CHACHA20 || \
35-
PSA_WANT_KEY_TYPE_DES || \
3631
PSA_WANT_KEY_TYPE_ECC_KEY_PAIR || \
3732
PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY || \
3833
PSA_WANT_KEY_TYPE_RSA_KEY_PAIR || \
3934
PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY
4035

4136
config PSA_WANT_KEY_TYPE_DERIVE
4237
bool
43-
prompt "PSA Key derivation support" if !PSA_PROMPTLESS
44-
default y if !PSA_DEFAULT_OFF
38+
default y
39+
depends on PSA_HAS_KEY_DERIVATION
40+
help
41+
Prompt-less configuration that states that the derived key type is used.
4542

4643
config PSA_WANT_KEY_TYPE_HMAC
4744
bool
48-
prompt "PSA Key type HMAC support" if !PSA_PROMPTLESS
49-
default y if !PSA_DEFAULT_OFF
45+
default y
5046
depends on PSA_HAS_MAC_SUPPORT
47+
help
48+
Prompt-less configuration that states that the HMAC key type is used.
5149

5250
config PSA_WANT_KEY_TYPE_AES
5351
bool
54-
prompt "PSA Key Type AES support" if !PSA_PROMPTLESS
55-
default y if !PSA_DEFAULT_OFF
52+
default y
5653
depends on PSA_HAS_CIPHER_SUPPORT || PSA_HAS_AEAD_SUPPORT
57-
58-
config PSA_WANT_KEY_TYPE_ARIA
59-
bool
60-
default y if !PSA_DEFAULT_OFF
61-
help
62-
Currently not supported
63-
64-
config PSA_WANT_KEY_TYPE_CAMELLIA
65-
bool
66-
depends on PSA_HAS_CIPHER_SUPPORT
6754
help
68-
Currently not supported
55+
Prompt-less configuration that states that AES key type is used.
6956

7057
config PSA_WANT_KEY_TYPE_CHACHA20
7158
bool
72-
prompt "PSA Key type Chacha20 support" if !PSA_PROMPTLESS
73-
default y if !PSA_DEFAULT_OFF
59+
default y
7460
depends on PSA_WANT_ALG_CHACHA20_POLY1305
75-
76-
config PSA_WANT_KEY_TYPE_DES
77-
bool
78-
depends on PSA_HAS_CIPHER_SUPPORT
7961
help
80-
Currently not supported
62+
Prompt-less configuration that states that CHACHA20 key type is used.
8163

8264
config PSA_WANT_KEY_TYPE_ECC_KEY_PAIR
8365
bool
84-
prompt "PSA Key type ECC key pair support" if !PSA_PROMPTLESS
85-
default y if !PSA_DEFAULT_OFF
66+
default y
8667
depends on PSA_HAS_ECC_SUPPORT
68+
help
69+
Prompt-less configuration that states that ECC key pair type is used.
8770

8871
config PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY
8972
bool
90-
prompt "PSA Key type ECC public key support" if !PSA_PROMPTLESS
91-
default y if !PSA_DEFAULT_OFF
73+
default y
9274
depends on PSA_HAS_ECC_SUPPORT
93-
94-
config PSA_WANT_KEY_TYPE_RAW_DATA
95-
bool
96-
prompt "PSA Key type RAW key support" if !PSA_PROMPTLESS
97-
default y if !PSA_DEFAULT_OFF
75+
help
76+
Prompt-less configuration that states that ECC public key type is used.
9877

9978
config PSA_WANT_KEY_TYPE_RSA_KEY_PAIR
10079
bool
101-
prompt "PSA Key type RSA key pair support" if !PSA_PROMPTLESS
102-
default y if !PSA_DEFAULT_OFF
80+
default y
10381
depends on PSA_HAS_RSA_SUPPORT
82+
help
83+
Prompt-less configuration that states that RSA key pair type is used.
10484

10585
config PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY
10686
bool
107-
prompt "PSA Key type RSA Public key support" if !PSA_PROMPTLESS
108-
default y if !PSA_DEFAULT_OFF
87+
default y
10988
depends on PSA_HAS_RSA_SUPPORT
110-
111-
endmenu # PSA_KEY_DERIVATION
89+
help
90+
Prompt-less configuration that states that RSA public key type is used.
11291

11392
menu "PSA AEAD support"
11493

@@ -118,6 +97,8 @@ config PSA_HAS_AEAD_SUPPORT
11897
depends on PSA_WANT_ALG_CCM || \
11998
PSA_WANT_ALG_GCM || \
12099
PSA_WANT_ALG_CHACHA20_POLY1305
100+
help
101+
Prompt-less configuration that states that AEAD is supported.
121102

122103
config PSA_WANT_ALG_CCM
123104
bool
@@ -137,7 +118,7 @@ config PSA_WANT_ALG_CHACHA20_POLY1305
137118
endmenu # PSA AEAD support
138119

139120

140-
menu "PSA Mac support"
121+
menu "PSA MAC support"
141122

142123
config PSA_HAS_MAC_SUPPORT
143124
bool
@@ -146,8 +127,7 @@ config PSA_HAS_MAC_SUPPORT
146127
PSA_WANT_ALG_CMAC || \
147128
PSA_WANT_ALG_HMAC
148129
help
149-
Prompt-less configuration that states the PSA APIs enables
150-
a configuration that adds the PSA mac module.
130+
Prompt-less configuration that states that MAC is supported.
151131

152132
config PSA_WANT_ALG_CBC_MAC
153133
bool
@@ -164,7 +144,7 @@ config PSA_WANT_ALG_HMAC
164144
prompt "PSA HMAC support" if !PSA_PROMPTLESS
165145
default y if !PSA_DEFAULT_OFF
166146

167-
endmenu # PSA Mac support
147+
endmenu # PSA MAC support
168148

169149

170150
menu "PSA Hash support"
@@ -179,6 +159,8 @@ config PSA_HAS_HASH_SUPPORT
179159
PSA_WANT_ALG_SHA_512 || \
180160
PSA_WANT_ALG_RIPEMD160 || \
181161
PSA_WANT_ALG_MD5
162+
help
163+
Prompt-less configuration that states that hash is supported.
182164

183165
config PSA_WANT_ALG_SHA_1
184166
bool
@@ -231,8 +213,7 @@ config PSA_HAS_CIPHER_SUPPORT
231213
PSA_WANT_ALG_CTR || \
232214
PSA_WANT_ALG_XTS
233215
help
234-
Prompt-less configuration that states the PSA APIs enables
235-
a configuration that adds the PSA Cipher module.
216+
Prompt-less configuration that states that cipher is supported.
236217

237218
config PSA_WANT_ALG_ECB_NO_PADDING
238219
bool
@@ -282,8 +263,7 @@ config PSA_HAS_KEY_DERIVATION
282263
PSA_WANT_ALG_TLS12_PRF || \
283264
PSA_WANT_ALG_TLS12_PSK_TO_MS
284265
help
285-
Prompt-less configuration that states the PSA APIs enables
286-
a configuration that adds the PSA key derivation module.
266+
Prompt-less configuration that states that key derivation is supported.
287267

288268
config PSA_WANT_ALG_HKDF
289269
bool
@@ -323,7 +303,8 @@ config PSA_HAS_ASYM_ENCRYPT_SUPPORT
323303
config PSA_HAS_ASYM_SIGN_SUPPORT
324304
bool
325305
default y
326-
depends on PSA_WANT_ALG_ECDSA || \
306+
depends on PSA_WANT_ALG_DETERMINISTIC_ECDSA || \
307+
PSA_WANT_ALG_ECDSA || \
327308
PSA_WANT_ALG_RSA_PKCS1V15_SIGN || \
328309
PSA_WANT_ALG_RSA_PSS
329310

@@ -336,8 +317,7 @@ config PSA_HAS_ECC_SUPPORT
336317
depends on PSA_WANT_ALG_ECDH || PSA_WANT_ALG_ECDSA || PSA_WANT_ALG_DETERMINISTIC_ECDSA
337318
default y
338319
help
339-
Prompt-less configuration that states the PSA APIs enables
340-
a configuration that adds the PSA encrypt/sign module for ECC.
320+
Prompt-less configuration that states that ECC is supported.
341321

342322
config PSA_WANT_ALG_ECDH
343323
bool
@@ -418,8 +398,7 @@ config PSA_HAS_RSA_SUPPORT
418398
PSA_WANT_ALG_RSA_PSS
419399
default y
420400
help
421-
Prompt-less configuration that states the PSA APIs enables
422-
a configuration that adds the PSA encrypt/sign module for RSA.
401+
Prompt-less configuration that states that RSA is supported.
423402

424403
config PSA_WANT_ALG_RSA_OAEP
425404
bool

0 commit comments

Comments
 (0)