mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
crypto: cast5/cast6 - move lookup tables to shared module
CAST5 and CAST6 both use same lookup tables, which can be moved shared module 'cast_common'. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f0fcf2002b
commit
044ab52578
10 changed files with 336 additions and 575 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/cast_common.h>
|
||||
|
||||
#define CAST5_BLOCK_SIZE 8
|
||||
#define CAST5_MIN_KEY_SIZE 5
|
||||
|
@ -19,9 +20,4 @@ int cast5_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
|
|||
void __cast5_encrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
|
||||
void __cast5_decrypt(struct cast5_ctx *ctx, u8 *dst, const u8 *src);
|
||||
|
||||
extern const u32 cast5_s1[256];
|
||||
extern const u32 cast5_s2[256];
|
||||
extern const u32 cast5_s3[256];
|
||||
extern const u32 cast5_s4[256];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/cast_common.h>
|
||||
|
||||
#define CAST6_BLOCK_SIZE 16
|
||||
#define CAST6_MIN_KEY_SIZE 16
|
||||
|
@ -20,9 +21,4 @@ int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
|
|||
void __cast6_encrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
|
||||
void __cast6_decrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
|
||||
|
||||
extern const u32 cast6_s1[256];
|
||||
extern const u32 cast6_s2[256];
|
||||
extern const u32 cast6_s3[256];
|
||||
extern const u32 cast6_s4[256];
|
||||
|
||||
#endif
|
||||
|
|
9
include/crypto/cast_common.h
Normal file
9
include/crypto/cast_common.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef _CRYPTO_CAST_COMMON_H
|
||||
#define _CRYPTO_CAST_COMMON_H
|
||||
|
||||
extern const u32 cast_s1[256];
|
||||
extern const u32 cast_s2[256];
|
||||
extern const u32 cast_s3[256];
|
||||
extern const u32 cast_s4[256];
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue