aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ablkcipher.c5
-rw-r--r--crypto/blkcipher.c6
-rw-r--r--crypto/cipher.c5
-rw-r--r--crypto/hash.c3
4 files changed, 12 insertions, 7 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 3dbb1cc6eab5..47438b650c92 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -16,10 +16,13 @@
16#include <crypto/algapi.h> 16#include <crypto/algapi.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/kernel.h>
19#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h>
20#include <linux/seq_file.h> 22#include <linux/seq_file.h>
21 23
22static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, unsigned int keylen) 24static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key,
25 unsigned int keylen)
23{ 26{
24 struct ablkcipher_alg *cipher = crypto_ablkcipher_alg(tfm); 27 struct ablkcipher_alg *cipher = crypto_ablkcipher_alg(tfm);
25 unsigned long alignmask = crypto_ablkcipher_alignmask(tfm); 28 unsigned long alignmask = crypto_ablkcipher_alignmask(tfm);
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c
index d8f8ec320213..5991c53eabac 100644
--- a/crypto/blkcipher.c
+++ b/crypto/blkcipher.c
@@ -339,7 +339,8 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc,
339 return blkcipher_walk_next(desc, walk); 339 return blkcipher_walk_next(desc, walk);
340} 340}
341 341
342static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) 342static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key,
343 unsigned int keylen)
343{ 344{
344 struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher; 345 struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher;
345 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); 346 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
@@ -360,8 +361,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int
360 return ret; 361 return ret;
361} 362}
362 363
363static int setkey(struct crypto_tfm *tfm, const u8 *key, 364static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
364 unsigned int keylen)
365{ 365{
366 struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher; 366 struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher;
367 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); 367 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
diff --git a/crypto/cipher.c b/crypto/cipher.c
index fc6b46f2a9b0..9a1a7316eeac 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -16,11 +16,12 @@
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/crypto.h> 17#include <linux/crypto.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/scatterlist.h> 19#include <linux/slab.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include "internal.h" 21#include "internal.h"
22 22
23static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) 23static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key,
24 unsigned int keylen)
24{ 25{
25 struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; 26 struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher;
26 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); 27 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
diff --git a/crypto/hash.c b/crypto/hash.c
index 4fd470bd729b..7dcff671c19b 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -12,6 +12,7 @@
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/slab.h>
15#include <linux/seq_file.h> 16#include <linux/seq_file.h>
16 17
17#include "internal.h" 18#include "internal.h"
@@ -46,7 +47,7 @@ static int hash_setkey_unaligned(struct crypto_hash *crt, const u8 *key,
46} 47}
47 48
48static int hash_setkey(struct crypto_hash *crt, const u8 *key, 49static int hash_setkey(struct crypto_hash *crt, const u8 *key,
49 unsigned int keylen) 50 unsigned int keylen)
50{ 51{
51 struct crypto_tfm *tfm = crypto_hash_tfm(crt); 52 struct crypto_tfm *tfm = crypto_hash_tfm(crt);
52 struct hash_alg *alg = &tfm->__crt_alg->cra_hash; 53 struct hash_alg *alg = &tfm->__crt_alg->cra_hash;