1# Copyright (c) 2018 Linaro
2# Copyright (c) 2024 BayLibre SAS
3# SPDX-License-Identifier: Apache-2.0
4
5menuconfig JWT
6	bool "JSON Web Token generation"
7	select JSON_LIBRARY
8	help
9	  Enable creation of JWT tokens
10
11if JWT
12
13choice
14	prompt "JWT signature algorithm"
15	default JWT_SIGN_RSA_PSA
16	help
17	  Select which algorithm to use for signing JWT tokens.
18
19config JWT_SIGN_RSA_PSA
20	bool "Use RSA signature (RS-256). Use PSA Crypto API."
21	select PSA_CRYPTO
22	select PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY
23	select PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT
24	select PSA_WANT_ALG_RSA_PKCS1V15_SIGN
25	select PSA_WANT_ALG_SHA_256
26
27config JWT_SIGN_ECDSA_PSA
28	bool "Use ECDSA signature (ES-256). Use PSA Crypto API."
29	select PSA_CRYPTO
30	select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
31	select PSA_WANT_ALG_ECDSA
32	select PSA_WANT_ECC_SECP_R1_256
33	select PSA_WANT_ALG_SHA_256
34
35endchoice
36
37endif # JWT
38