diff --git a/wolfssl/wolfcrypt/srp.h b/wolfssl/wolfcrypt/srp.h index af5ba5207..b028348d2 100644 --- a/wolfssl/wolfcrypt/srp.h +++ b/wolfssl/wolfcrypt/srp.h @@ -184,7 +184,7 @@ WOLFSSL_API int wc_SrpSetParams(Srp* srp, const byte* N, word32 nSz, WOLFSSL_API int wc_SrpSetPassword(Srp* srp, const byte* password, word32 size); /** - * Sets the password. + * Sets the verifier. * * This function MUST be called after wc_SrpSetParams and is SERVER SIDE ONLY. * @@ -200,7 +200,7 @@ WOLFSSL_API int wc_SrpSetVerifier(Srp* srp, const byte* verifier, word32 size); * Gets the verifier. * * The client calculates the verifier with v = g ^ x % N. - * This function MAY be called after wc_SrpSetPassword and is SERVER SIDE ONLY. + * This function MAY be called after wc_SrpSetPassword and is CLIENT SIDE ONLY. * * @param[in,out] srp the Srp structure. * @param[out] verifier the buffer to write the verifier. @@ -250,14 +250,13 @@ WOLFSSL_API int wc_SrpGetPublic(Srp* srp, byte* pub, word32* size); /** * Computes the session key. * - * This function is handy for unit test cases or if the developer wants to use - * an external random source to set the ephemeral value. - * This function MUST be called after wc_SrpSetPassword or wc_SrpSetVerifier. + * The key can be accessed at srp->key after success. * - * @param[in,out] srp the Srp structure. - * @param[out] public the buffer to write the public ephemeral value. - * @param[in,out] size the the buffer size in bytes. Will be updated with - the ephemeral value size. + * @param[in,out] srp the Srp structure. + * @param[in] clientPubKey the client's public ephemeral value. + * @param[in] clientPubKeySz the client's public ephemeral value size. + * @param[in] serverPubKey the server's public ephemeral value. + * @param[in] serverPubKeySz the server's public ephemeral value size. * * @return 0 on success, {@literal <} 0 on error. @see error-crypt.h */