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