Commit 89e12654 authored by Sebastian Siewior's avatar Sebastian Siewior Committed by Herbert Xu
Browse files

[CRYPTO] aes: Move common defines into a header file



This three defines are used in all AES related hardware.

Signed-off-by: default avatarSebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f1901f1f
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -16,17 +16,12 @@
 *
 */

#include <crypto/aes.h>
#include <crypto/algapi.h>
#include <linux/module.h>
#include <linux/init.h>
#include "crypt_s390.h"

#define AES_MIN_KEY_SIZE	16
#define AES_MAX_KEY_SIZE	32

/* data block size for all key lengths */
#define AES_BLOCK_SIZE		16

#define AES_KEYLEN_128		1
#define AES_KEYLEN_192		2
#define AES_KEYLEN_256		4
+1 −3
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
 */

#include <asm/byteorder.h>
#include <crypto/aes.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -48,9 +49,6 @@
asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src);

#define AES_MIN_KEY_SIZE	16
#define AES_MAX_KEY_SIZE	32
#define AES_BLOCK_SIZE		16
#define AES_KS_LENGTH		4 * AES_BLOCK_SIZE
#define RC_LENGTH		29

+1 −5
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
*/

#include <asm/byteorder.h>
#include <crypto/aes.h>
#include <linux/bitops.h>
#include <linux/crypto.h>
#include <linux/errno.h>
@@ -61,11 +62,6 @@
#include <linux/module.h>
#include <linux/types.h>

#define AES_MIN_KEY_SIZE	16
#define AES_MAX_KEY_SIZE	32

#define AES_BLOCK_SIZE		16

/*
 * #define byte(x, nr) ((unsigned char)((x) >> (nr*8)))
 */
+1 −5
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
    s/RIJNDAEL(d_key)/D_KEY/g
*/

#include <crypto/aes.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
@@ -59,11 +60,6 @@
#include <linux/crypto.h>
#include <asm/byteorder.h>

#define AES_MIN_KEY_SIZE	16
#define AES_MAX_KEY_SIZE	32

#define AES_BLOCK_SIZE		16

/*
 * #define byte(x, nr) ((unsigned char)((x) >> (nr*8))) 
 */
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/crypto.h>
#include <linux/spinlock.h>
#include <crypto/algapi.h>
#include <crypto/aes.h>

#include <asm/io.h>
#include <asm/delay.h>
Loading