hkdf.h 524 B

1234567891011121314151617181920
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * HKDF: HMAC-based Key Derivation Function (HKDF), RFC 5869
  4. *
  5. * Extracted from fs/crypto/hkdf.c, which has
  6. * Copyright 2019 Google LLC
  7. */
  8. #ifndef _CRYPTO_HKDF_H
  9. #define _CRYPTO_HKDF_H
  10. #include <crypto/hash.h>
  11. int hkdf_extract(struct crypto_shash *hmac_tfm, const u8 *ikm,
  12. unsigned int ikmlen, const u8 *salt, unsigned int saltlen,
  13. u8 *prk);
  14. int hkdf_expand(struct crypto_shash *hmac_tfm,
  15. const u8 *info, unsigned int infolen,
  16. u8 *okm, unsigned int okmlen);
  17. #endif