aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/blowfish.h
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-09-01 18:45:07 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2011-09-22 07:25:25 -0400
commit52ba867c8c23dcb24865f80a95c191501e101b9f (patch)
tree421448ac9400c97e11a233769ae7993dcf36e70a /include/crypto/blowfish.h
parentb2bac6acf86d05d8af0499f37d91ecac15722803 (diff)
crypto: blowfish - split generic and common c code
Patch splits up the blowfish crypto routine into a common part (key setup) which will be used by blowfish crypto modules (x86_64 assembly and generic-c). Also fixes errors/warnings reported by checkpatch. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/blowfish.h')
-rw-r--r--include/crypto/blowfish.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/crypto/blowfish.h b/include/crypto/blowfish.h
new file mode 100644
index 000000000000..1450d4a27980
--- /dev/null
+++ b/include/crypto/blowfish.h
@@ -0,0 +1,23 @@
1/*
2 * Common values for blowfish algorithms
3 */
4
5#ifndef _CRYPTO_BLOWFISH_H
6#define _CRYPTO_BLOWFISH_H
7
8#include <linux/types.h>
9#include <linux/crypto.h>
10
11#define BF_BLOCK_SIZE 8
12#define BF_MIN_KEY_SIZE 4
13#define BF_MAX_KEY_SIZE 56
14
15struct bf_ctx {
16 u32 p[18];
17 u32 s[1024];
18};
19
20int blowfish_setkey(struct crypto_tfm *tfm, const u8 *key,
21 unsigned int key_len);
22
23#endif