Skip to content

Commit

Permalink
Correct documentation for PKCS5_PBKDF2_HMAC
Browse files Browse the repository at this point in the history
In OpenSSL 3.x, the documentation for PKCS5_PBKDF2_HMAC incorrectly states
that an iter value less than 1 is treated as a single iteration. Upon further
investigation in providers/implementations/kdfs/pbkdf2.c, it appears that
invalid iter values will result in failure and raise the
PROV_R_INVALID_ITERATION_COUNT error. This commit corrects the documentation
to accurately reflect the behavior in OpenSSL 3.x.

Closes #22168

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #22252)

(cherry picked from commit 82496b8)
  • Loading branch information
heygauri authored and t8m committed Oct 4, 2023
1 parent f11f24e commit ffef6d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/man3/PKCS5_PBKDF2_HMAC.pod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ be NULL terminated.

B<iter> is the iteration count and its value should be greater than or
equal to 1. RFC 2898 suggests an iteration count of at least 1000. Any
B<iter> less than 1 is treated as a single iteration.
B<iter> value less than 1 is invalid; such values will result in failure
and raise the PROV_R_INVALID_ITERATION_COUNT error.

B<digest> is the message digest function used in the derivation.
PKCS5_PBKDF2_HMAC_SHA1() calls PKCS5_PBKDF2_HMAC() with EVP_sha1().
Expand Down

0 comments on commit ffef6d8

Please sign in to comment.