2
0

EVP_KDF-PBKDF2.pod 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. =pod
  2. =head1 NAME
  3. EVP_KDF-PBKDF2 - The PBKDF2 EVP_KDF implementation
  4. =head1 DESCRIPTION
  5. Support for computing the B<PBKDF2> password-based KDF through the B<EVP_KDF>
  6. API.
  7. The EVP_KDF-PBKDF2 algorithm implements the PBKDF2 password-based key
  8. derivation function, as described in SP800-132; it derives a key from a password
  9. using a salt and iteration count.
  10. =head2 Identity
  11. "PBKDF2" is the name for this implementation; it
  12. can be used with the EVP_KDF_fetch() function.
  13. =head2 Supported parameters
  14. The supported parameters are:
  15. =over 4
  16. =item "pass" (B<OSSL_KDF_PARAM_PASSWORD>) <octet string>
  17. =item "salt" (B<OSSL_KDF_PARAM_SALT>) <octet string>
  18. =item "iter" (B<OSSL_KDF_PARAM_ITER>) <unsigned integer>
  19. This parameter has a default value of 2048.
  20. =item "properties" (B<OSSL_KDF_PARAM_PROPERTIES>) <UTF8 string>
  21. =item "digest" (B<OSSL_KDF_PARAM_DIGEST>) <UTF8 string>
  22. These parameters work as described in L<EVP_KDF(3)/PARAMETERS>.
  23. =item "pkcs5" (B<OSSL_KDF_PARAM_PKCS5>) <integer>
  24. This parameter can be used to enable or disable SP800-132 compliance checks.
  25. Setting the mode to 0 enables the compliance checks.
  26. The checks performed are:
  27. =over 4
  28. =item - the iteration count is at least 1000.
  29. =item - the salt length is at least 128 bits.
  30. =item - the derived key length is at least 112 bits.
  31. =back
  32. The default provider uses a default mode of 1 for backwards compatibility,
  33. and the fips provider uses a default mode of 0.
  34. The value string is expected to be a decimal number 0 or 1.
  35. =back
  36. =head1 NOTES
  37. A typical application of this algorithm is to derive keying material for an
  38. encryption algorithm from a password in the "pass", a salt in "salt",
  39. and an iteration count.
  40. Increasing the "iter" parameter slows down the algorithm which makes it
  41. harder for an attacker to perform a brute force attack using a large number
  42. of candidate passwords.
  43. No assumption is made regarding the given password; it is simply treated as a
  44. byte sequence.
  45. =head1 CONFORMING TO
  46. SP800-132
  47. =head1 SEE ALSO
  48. L<EVP_KDF(3)>,
  49. L<EVP_KDF_CTX_new(3)>,
  50. L<EVP_KDF_CTX_free(3)>,
  51. L<EVP_KDF_CTX_set_params(3)>,
  52. L<EVP_KDF_derive(3)>,
  53. L<EVP_KDF(3)/PARAMETERS>
  54. =head1 HISTORY
  55. This functionality was added to OpenSSL 3.0.
  56. =head1 COPYRIGHT
  57. Copyright 2018-2019 The OpenSSL Project Authors. All Rights Reserved.
  58. Licensed under the Apache License 2.0 (the "License"). You may not use
  59. this file except in compliance with the License. You can obtain a copy
  60. in the file LICENSE in the source distribution or at
  61. L<https://www.openssl.org/source/license.html>.
  62. =cut