2 * Glue Code for optimized 586 assembler version of AES
5 #include <crypto/aes.h>
6 #include <linux/module.h>
7 #include <linux/crypto.h>
9 asmlinkage
void aes_enc_blk(struct crypto_tfm
*tfm
, u8
*dst
, const u8
*src
);
10 asmlinkage
void aes_dec_blk(struct crypto_tfm
*tfm
, u8
*dst
, const u8
*src
);
12 static void aes_encrypt(struct crypto_tfm
*tfm
, u8
*dst
, const u8
*src
)
14 aes_enc_blk(tfm
, dst
, src
);
17 static void aes_decrypt(struct crypto_tfm
*tfm
, u8
*dst
, const u8
*src
)
19 aes_dec_blk(tfm
, dst
, src
);
22 static struct crypto_alg aes_alg
= {
24 .cra_driver_name
= "aes-i586",
26 .cra_flags
= CRYPTO_ALG_TYPE_CIPHER
,
27 .cra_blocksize
= AES_BLOCK_SIZE
,
28 .cra_ctxsize
= sizeof(struct crypto_aes_ctx
),
29 .cra_module
= THIS_MODULE
,
30 .cra_list
= LIST_HEAD_INIT(aes_alg
.cra_list
),
33 .cia_min_keysize
= AES_MIN_KEY_SIZE
,
34 .cia_max_keysize
= AES_MAX_KEY_SIZE
,
35 .cia_setkey
= crypto_aes_set_key
,
36 .cia_encrypt
= aes_encrypt
,
37 .cia_decrypt
= aes_decrypt
42 static int __init
aes_init(void)
44 return crypto_register_alg(&aes_alg
);
47 static void __exit
aes_fini(void)
49 crypto_unregister_alg(&aes_alg
);
52 module_init(aes_init
);
53 module_exit(aes_fini
);
55 MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm, i586 asm optimized");
56 MODULE_LICENSE("Dual BSD/GPL");
57 MODULE_AUTHOR("Fruhwirth Clemens, James Morris, Brian Gladman, Adam Richter");