df_sp80090a.h 660 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright Stephan Mueller <smueller@chronox.de>, 2014
  4. */
  5. #ifndef _CRYPTO_DF80090A_H
  6. #define _CRYPTO_DF80090A_H
  7. #include <crypto/internal/cipher.h>
  8. #include <crypto/aes.h>
  9. static inline int crypto_drbg_ctr_df_datalen(u8 statelen, u8 blocklen)
  10. {
  11. return statelen + /* df_data */
  12. blocklen + /* pad */
  13. blocklen + /* iv */
  14. statelen + blocklen; /* temp */
  15. }
  16. int crypto_drbg_ctr_df(struct aes_enckey *aes,
  17. unsigned char *df_data,
  18. size_t bytes_to_return,
  19. struct list_head *seedlist,
  20. u8 blocklen_bytes,
  21. u8 statelen);
  22. #endif /* _CRYPTO_DF80090A_H */