From 7c59b7a073fc6430bda38177769eb4e93c82ba0e Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 25 May 2021 15:46:56 +0100 Subject: [PATCH] Improve psa_pake_set_peer()/user() documentation Signed-off-by: Janos Follath --- include/psa/crypto.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index 3df82d91d..2d4c80df9 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -4422,9 +4422,10 @@ psa_status_t psa_pake_set_password_stretch( /** Set the user ID for a password-authenticated key exchange. * - * Some PAKE algorithms associate only a single user identifier with the - * session. Such algorithms must call this function (psa_pake_set_user()) to - * set the identifier for the PAKE context. + * Call this function to set the user ID. For PAKE algorithms that associate a + * user identifier with each side of the session you need to call + * psa_pake_set_peer() as well. For PAKE algorithms that associate a single + * user identifier with the session, call psa_pake_set_user() only. * * Refer to the documentation of individual PAKE algorithm types (`PSA_ALG_XXX` * values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true) @@ -4461,9 +4462,10 @@ psa_status_t psa_pake_set_user(psa_pake_operation_t *operation, /** Set the peer ID for a password-authenticated key exchange. * - * Some PAKE algorithms associate only a single user identifier with the - * session. Such algorithms must call psa_pake_set_user() to set the - * identifier for the PAKE context. + * Call this function in addition to psa_pake_set_user() for PAKE algorithms + * that associate a user identifier with each side of the session. For PAKE + * algorithms that associate a single user identifier with the session, call + * psa_pake_set_user() only. * * Refer to the documentation of individual PAKE algorithm types (`PSA_ALG_XXX` * values of type ::psa_algorithm_t such that #PSA_ALG_IS_PAKE(\c alg) is true)