mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-12 14:21:20 +03:00
Document JPAKE limitations
Document limitations on the user ID, peer ID, primitive (elliptic curve) and
hash for `PSA_ALG_JPAKE`.
https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/502
https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/503
https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/504
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
(cherry picked from commit 8ca2a5bf95)
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
committed by
Minos Galanakis
parent
bafcf5bddf
commit
90eac7fc7a
@@ -760,6 +760,16 @@ int psa_can_do_cipher(psa_key_type_t key_type, psa_algorithm_t cipher_alg);
|
|||||||
* To make the authentication explicit there are various methods, see Section 5
|
* To make the authentication explicit there are various methods, see Section 5
|
||||||
* of RFC 8236 for two examples.
|
* of RFC 8236 for two examples.
|
||||||
*
|
*
|
||||||
|
* \note The JPAKE implementation has the following limitations:
|
||||||
|
* - The only supported primitive is ECC on the curve secp256r1, i.e.
|
||||||
|
* `PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC,
|
||||||
|
* PSA_ECC_FAMILY_SECP_R1, 256)`.
|
||||||
|
* - The only supported hash algorithm is SHA-256, i.e.
|
||||||
|
* `PSA_ALG_SHA_256`.
|
||||||
|
* - When using the built-in implementation, the user ID and the peer ID
|
||||||
|
* must be `"client"` (6-byte string) or `"server"` (6-byte string).
|
||||||
|
* Third-party drivers may or may not have this limitation.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
#define PSA_ALG_JPAKE ((psa_algorithm_t) 0x0a000100)
|
#define PSA_ALG_JPAKE ((psa_algorithm_t) 0x0a000100)
|
||||||
|
|
||||||
@@ -1196,6 +1206,8 @@ static psa_algorithm_t psa_pake_cs_get_algorithm(
|
|||||||
* This function overwrites any PAKE algorithm
|
* This function overwrites any PAKE algorithm
|
||||||
* previously set in \p cipher_suite.
|
* previously set in \p cipher_suite.
|
||||||
*
|
*
|
||||||
|
* \note For #PSA_ALG_JPAKE, the only supported hash algorithm is SHA-256.
|
||||||
|
*
|
||||||
* \param[out] cipher_suite The cipher suite structure to write to.
|
* \param[out] cipher_suite The cipher suite structure to write to.
|
||||||
* \param algorithm The PAKE algorithm to write.
|
* \param algorithm The PAKE algorithm to write.
|
||||||
* (`PSA_ALG_XXX` values of type ::psa_algorithm_t
|
* (`PSA_ALG_XXX` values of type ::psa_algorithm_t
|
||||||
@@ -1219,6 +1231,10 @@ static psa_pake_primitive_t psa_pake_cs_get_primitive(
|
|||||||
*
|
*
|
||||||
* This function overwrites any primitive previously set in \p cipher_suite.
|
* This function overwrites any primitive previously set in \p cipher_suite.
|
||||||
*
|
*
|
||||||
|
* \note For #PSA_ALG_JPAKE, the only supported primitive is ECC on the curve
|
||||||
|
* secp256r1, i.e. `PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC,
|
||||||
|
* PSA_ECC_FAMILY_SECP_R1, 256)`.
|
||||||
|
*
|
||||||
* \param[out] cipher_suite The cipher suite structure to write to.
|
* \param[out] cipher_suite The cipher suite structure to write to.
|
||||||
* \param primitive The primitive to write. If this is 0, the
|
* \param primitive The primitive to write. If this is 0, the
|
||||||
* primitive type in \p cipher_suite becomes
|
* primitive type in \p cipher_suite becomes
|
||||||
@@ -1555,6 +1571,10 @@ psa_status_t psa_pake_set_password_key(psa_pake_operation_t *operation,
|
|||||||
* values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)
|
* values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)
|
||||||
* for more information.
|
* for more information.
|
||||||
*
|
*
|
||||||
|
* \note When using the built-in implementation of #PSA_ALG_JPAKE, the user ID
|
||||||
|
* must be `"client"` (6-byte string) or `"server"` (6-byte string).
|
||||||
|
* Third-party drivers may or may not have this limitation.
|
||||||
|
*
|
||||||
* \param[in,out] operation The operation object to set the user ID for. It
|
* \param[in,out] operation The operation object to set the user ID for. It
|
||||||
* must have been set up by psa_pake_setup() and
|
* must have been set up by psa_pake_setup() and
|
||||||
* not yet in use (neither psa_pake_output() nor
|
* not yet in use (neither psa_pake_output() nor
|
||||||
@@ -1596,6 +1616,10 @@ psa_status_t psa_pake_set_user(psa_pake_operation_t *operation,
|
|||||||
* values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)
|
* values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)
|
||||||
* for more information.
|
* for more information.
|
||||||
*
|
*
|
||||||
|
* \note When using the built-in implementation of #PSA_ALG_JPAKE, the peer ID
|
||||||
|
* must be `"client"` (6-byte string) or `"server"` (6-byte string).
|
||||||
|
* Third-party drivers may or may not have this limitation.
|
||||||
|
*
|
||||||
* \param[in,out] operation The operation object to set the peer ID for. It
|
* \param[in,out] operation The operation object to set the peer ID for. It
|
||||||
* must have been set up by psa_pake_setup() and
|
* must have been set up by psa_pake_setup() and
|
||||||
* not yet in use (neither psa_pake_output() nor
|
* not yet in use (neither psa_pake_output() nor
|
||||||
|
|||||||
Reference in New Issue
Block a user