@@ -760,6 +760,17 @@ int psa_can_do_cipher(psa_key_type_t key_type, psa_algorithm_t cipher_alg);
760760 * To make the authentication explicit there are various methods, see Section 5
761761 * of RFC 8236 for two examples.
762762 *
763+ * \note The JPAKE implementation has the following limitations:
764+ * - The only supported primitive is ECC on the curve secp256r1, i.e.
765+ * `PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC,
766+ * PSA_ECC_FAMILY_SECP_R1, 256)`.
767+ * - The only supported hash algorithm is SHA-256, i.e.
768+ * `PSA_ALG_SHA_256`.
769+ * - When using the built-in implementation, the user ID and the peer ID
770+ * must be `"client"` (6-byte string) and `"server"` (6-byte string),
771+ * or the other way round.
772+ * Third-party drivers may or may not have this limitation.
773+ *
763774 */
764775#define PSA_ALG_JPAKE ((psa_algorithm_t) 0x0a000100)
765776
@@ -1196,6 +1207,8 @@ static psa_algorithm_t psa_pake_cs_get_algorithm(
11961207 * This function overwrites any PAKE algorithm
11971208 * previously set in \p cipher_suite.
11981209 *
1210+ * \note For #PSA_ALG_JPAKE, the only supported hash algorithm is SHA-256.
1211+ *
11991212 * \param[out] cipher_suite The cipher suite structure to write to.
12001213 * \param algorithm The PAKE algorithm to write.
12011214 * (`PSA_ALG_XXX` values of type ::psa_algorithm_t
@@ -1219,6 +1232,10 @@ static psa_pake_primitive_t psa_pake_cs_get_primitive(
12191232 *
12201233 * This function overwrites any primitive previously set in \p cipher_suite.
12211234 *
1235+ * \note For #PSA_ALG_JPAKE, the only supported primitive is ECC on the curve
1236+ * secp256r1, i.e. `PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC,
1237+ * PSA_ECC_FAMILY_SECP_R1, 256)`.
1238+ *
12221239 * \param[out] cipher_suite The cipher suite structure to write to.
12231240 * \param primitive The primitive to write. If this is 0, the
12241241 * primitive type in \p cipher_suite becomes
@@ -1555,6 +1572,10 @@ psa_status_t psa_pake_set_password_key(psa_pake_operation_t *operation,
15551572 * values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)
15561573 * for more information.
15571574 *
1575+ * \note When using the built-in implementation of #PSA_ALG_JPAKE, the user ID
1576+ * must be `"client"` (6-byte string) or `"server"` (6-byte string).
1577+ * Third-party drivers may or may not have this limitation.
1578+ *
15581579 * \param[in,out] operation The operation object to set the user ID for. It
15591580 * must have been set up by psa_pake_setup() and
15601581 * not yet in use (neither psa_pake_output() nor
@@ -1596,6 +1617,10 @@ psa_status_t psa_pake_set_user(psa_pake_operation_t *operation,
15961617 * values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)
15971618 * for more information.
15981619 *
1620+ * \note When using the built-in implementation of #PSA_ALG_JPAKE, the peer ID
1621+ * must be `"client"` (6-byte string) or `"server"` (6-byte string).
1622+ * Third-party drivers may or may not have this limitation.
1623+ *
15991624 * \param[in,out] operation The operation object to set the peer ID for. It
16001625 * must have been set up by psa_pake_setup() and
16011626 * not yet in use (neither psa_pake_output() nor
0 commit comments