|
@@ -41,14 +41,14 @@
|
|
#define tlen 1024 // length of each of 4 'xor' arrays (256 32-bit words)
|
|
#define tlen 1024 // length of each of 4 'xor' arrays (256 32-bit words)
|
|
|
|
|
|
/* offsets to parameters with one register pushed onto stack */
|
|
/* offsets to parameters with one register pushed onto stack */
|
|
-#define tfm 8
|
|
|
|
|
|
+#define ctx 8
|
|
#define out_blk 12
|
|
#define out_blk 12
|
|
#define in_blk 16
|
|
#define in_blk 16
|
|
|
|
|
|
-/* offsets in crypto_tfm structure */
|
|
|
|
-#define klen (crypto_tfm_ctx_offset + 480)
|
|
|
|
-#define ekey (crypto_tfm_ctx_offset + 0)
|
|
|
|
-#define dkey (crypto_tfm_ctx_offset + 240)
|
|
|
|
|
|
+/* offsets in crypto_aes_ctx structure */
|
|
|
|
+#define klen (480)
|
|
|
|
+#define ekey (0)
|
|
|
|
+#define dkey (240)
|
|
|
|
|
|
// register mapping for encrypt and decrypt subroutines
|
|
// register mapping for encrypt and decrypt subroutines
|
|
|
|
|
|
@@ -217,7 +217,7 @@
|
|
do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */
|
|
do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */
|
|
|
|
|
|
// AES (Rijndael) Encryption Subroutine
|
|
// AES (Rijndael) Encryption Subroutine
|
|
-/* void aes_enc_blk(struct crypto_tfm *tfm, u8 *out_blk, const u8 *in_blk) */
|
|
|
|
|
|
+/* void aes_enc_blk(struct crypto_aes_ctx *ctx, u8 *out_blk, const u8 *in_blk) */
|
|
|
|
|
|
.global aes_enc_blk
|
|
.global aes_enc_blk
|
|
|
|
|
|
@@ -228,7 +228,7 @@
|
|
|
|
|
|
aes_enc_blk:
|
|
aes_enc_blk:
|
|
push %ebp
|
|
push %ebp
|
|
- mov tfm(%esp),%ebp
|
|
|
|
|
|
+ mov ctx(%esp),%ebp
|
|
|
|
|
|
// CAUTION: the order and the values used in these assigns
|
|
// CAUTION: the order and the values used in these assigns
|
|
// rely on the register mappings
|
|
// rely on the register mappings
|
|
@@ -292,7 +292,7 @@ aes_enc_blk:
|
|
ret
|
|
ret
|
|
|
|
|
|
// AES (Rijndael) Decryption Subroutine
|
|
// AES (Rijndael) Decryption Subroutine
|
|
-/* void aes_dec_blk(struct crypto_tfm *tfm, u8 *out_blk, const u8 *in_blk) */
|
|
|
|
|
|
+/* void aes_dec_blk(struct crypto_aes_ctx *ctx, u8 *out_blk, const u8 *in_blk) */
|
|
|
|
|
|
.global aes_dec_blk
|
|
.global aes_dec_blk
|
|
|
|
|
|
@@ -303,7 +303,7 @@ aes_enc_blk:
|
|
|
|
|
|
aes_dec_blk:
|
|
aes_dec_blk:
|
|
push %ebp
|
|
push %ebp
|
|
- mov tfm(%esp),%ebp
|
|
|
|
|
|
+ mov ctx(%esp),%ebp
|
|
|
|
|
|
// CAUTION: the order and the values used in these assigns
|
|
// CAUTION: the order and the values used in these assigns
|
|
// rely on the register mappings
|
|
// rely on the register mappings
|