Commit 6ec7ff92 by Alexandre Adomnicai Committed by Enrico Pozzobon

romulus armsrc

parent f33d270a
...@@ -35,15 +35,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -35,15 +35,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 1 // round 1
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#0] \n\t" // load RC "eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#512] \n\t" "str.w r6, [r0,#512] \n\t"
"str.w r7, [r0,#516] \n\t" "str.w r3, [r0,#516] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -90,15 +86,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -90,15 +86,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 2 // round 2
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#1] \n\t" // load RC "eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#520] \n\t" "str.w r6, [r0,#520] \n\t"
"str.w r7, [r0,#524] \n\t" "str.w r3, [r0,#524] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -145,15 +137,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -145,15 +137,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 3 // round 3
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#2] \n\t" // load RC "eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#528] \n\t" "str.w r6, [r0,#528] \n\t"
"str.w r7, [r0,#532] \n\t" "str.w r3, [r0,#532] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -200,15 +188,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -200,15 +188,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 4 // round 4
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#3] \n\t" // load RC "eor.w r6, r2, #0xf \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#536] \n\t" "str.w r6, [r0,#536] \n\t"
"str.w r7, [r0,#540] \n\t" "str.w r3, [r0,#540] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -255,11 +239,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -255,11 +239,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 5 // round 5
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#4] \n\t" // load RC "eor.w r6, r2, #0xf \n\t" // k0^rc
"eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#544] \n\t" "str.w r6, [r0,#544] \n\t"
...@@ -310,11 +291,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -310,11 +291,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 6 // round 6
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#5] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#552] \n\t" "str.w r6, [r0,#552] \n\t"
...@@ -365,11 +343,9 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -365,11 +343,9 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 7 // round 7
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#6] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#560] \n\t" "str.w r6, [r0,#560] \n\t"
...@@ -420,11 +396,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -420,11 +396,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 8 // round 8
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#7] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#568] \n\t" "str.w r6, [r0,#568] \n\t"
...@@ -475,11 +448,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -475,11 +448,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 9 // round 9
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#8] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#576] \n\t" "str.w r6, [r0,#576] \n\t"
...@@ -530,11 +500,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -530,11 +500,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 10 // round 10
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#9] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xf \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#584] \n\t" "str.w r6, [r0,#584] \n\t"
...@@ -585,11 +552,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -585,11 +552,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 11 // round 11
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#10] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#592] \n\t" "str.w r6, [r0,#592] \n\t"
...@@ -640,11 +604,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -640,11 +604,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 12 // round 12
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#11] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#600] \n\t" "str.w r6, [r0,#600] \n\t"
...@@ -695,11 +656,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -695,11 +656,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 13 // round 13
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#12] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#608] \n\t" "str.w r6, [r0,#608] \n\t"
...@@ -750,11 +708,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -750,11 +708,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 14 // round 14
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#13] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#616] \n\t" "str.w r6, [r0,#616] \n\t"
...@@ -805,11 +760,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -805,11 +760,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 15 // round 15
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#14] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#624] \n\t" "str.w r6, [r0,#624] \n\t"
...@@ -860,15 +812,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -860,15 +812,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 16 // round 16
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#15] \n\t" // load RC "eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#632] \n\t" "str.w r6, [r0,#632] \n\t"
"str.w r7, [r0,#636] \n\t" "str.w r3, [r0,#636] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -915,11 +863,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -915,11 +863,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 17 // round 17
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#16] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#640] \n\t" "str.w r6, [r0,#640] \n\t"
...@@ -970,11 +915,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -970,11 +915,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 18 // round 18
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#17] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xa \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#648] \n\t" "str.w r6, [r0,#648] \n\t"
...@@ -1025,11 +967,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1025,11 +967,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 19 // round 19
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#18] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x5 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#656] \n\t" "str.w r6, [r0,#656] \n\t"
...@@ -1080,11 +1019,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1080,11 +1019,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 20 // round 20
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#19] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#664] \n\t" "str.w r6, [r0,#664] \n\t"
...@@ -1135,11 +1071,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1135,11 +1071,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 21 // round 21
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#20] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#672] \n\t" "str.w r6, [r0,#672] \n\t"
...@@ -1190,11 +1123,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1190,11 +1123,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 22 // round 22
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#21] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#680] \n\t" "str.w r6, [r0,#680] \n\t"
...@@ -1245,11 +1175,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1245,11 +1175,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 23 // round 23
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#22] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x8 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#688] \n\t" "str.w r6, [r0,#688] \n\t"
...@@ -1300,11 +1227,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1300,11 +1227,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 24 // round 24
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#23] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x0 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#696] \n\t" "str.w r6, [r0,#696] \n\t"
...@@ -1355,11 +1279,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1355,11 +1279,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 25 // round 25
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#24] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#704] \n\t" "str.w r6, [r0,#704] \n\t"
...@@ -1410,15 +1331,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1410,15 +1331,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 26 // round 26
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#25] \n\t" // load RC "eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#712] \n\t" "str.w r6, [r0,#712] \n\t"
"str.w r7, [r0,#716] \n\t" "str.w r3, [r0,#716] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1465,15 +1382,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1465,15 +1382,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 27 // round 27
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#26] \n\t" // load RC "eor.w r6, r2, #0x5 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#720] \n\t" "str.w r6, [r0,#720] \n\t"
"str.w r7, [r0,#724] \n\t" "str.w r3, [r0,#724] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1520,15 +1433,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1520,15 +1433,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 28 // round 28
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#27] \n\t" // load RC "eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#728] \n\t" "str.w r6, [r0,#728] \n\t"
"str.w r7, [r0,#732] \n\t" "str.w r3, [r0,#732] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1575,11 +1484,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1575,11 +1484,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 29 // round 29
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#28] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#736] \n\t" "str.w r6, [r0,#736] \n\t"
...@@ -1630,11 +1536,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1630,11 +1536,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 30 // round 30
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#29] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#744] \n\t" "str.w r6, [r0,#744] \n\t"
...@@ -1685,11 +1588,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1685,11 +1588,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 31 // round 31
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#30] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#752] \n\t" "str.w r6, [r0,#752] \n\t"
...@@ -1740,11 +1640,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1740,11 +1640,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 32 // round 32
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#31] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x8 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#760] \n\t" "str.w r6, [r0,#760] \n\t"
...@@ -1795,11 +1692,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1795,11 +1692,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 33 // round 33
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#32] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#768] \n\t" "str.w r6, [r0,#768] \n\t"
...@@ -1850,11 +1744,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1850,11 +1744,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 34 // round 34
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#33] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#776] \n\t" "str.w r6, [r0,#776] \n\t"
...@@ -1905,15 +1796,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1905,15 +1796,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 35 // round 35
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#34] \n\t" // load RC "eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#784] \n\t" "str.w r6, [r0,#784] \n\t"
"str.w r7, [r0,#788] \n\t" "str.w r3, [r0,#788] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1960,15 +1847,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1960,15 +1847,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 36 // round 36
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#35] \n\t" // load RC "eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#792] \n\t" "str.w r6, [r0,#792] \n\t"
"str.w r7, [r0,#796] \n\t" "str.w r3, [r0,#796] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2015,11 +1898,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2015,11 +1898,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 37 // round 37
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#36] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#800] \n\t" "str.w r6, [r0,#800] \n\t"
...@@ -2070,11 +1950,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2070,11 +1950,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 38 // round 38
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#37] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#808] \n\t" "str.w r6, [r0,#808] \n\t"
...@@ -2125,11 +2002,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2125,11 +2002,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 39 // round 39
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#38] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#816] \n\t" "str.w r6, [r0,#816] \n\t"
...@@ -2180,11 +2054,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2180,11 +2054,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 40 // round 40
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#39] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xa \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#824] \n\t" "str.w r6, [r0,#824] \n\t"
...@@ -2235,11 +2106,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2235,11 +2106,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 41 // round 41
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#40] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x4 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#832] \n\t" "str.w r6, [r0,#832] \n\t"
...@@ -2290,11 +2158,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2290,11 +2158,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 42 // round 42
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#41] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#840] \n\t" "str.w r6, [r0,#840] \n\t"
...@@ -2345,11 +2210,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2345,11 +2210,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 43 // round 43
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#42] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#848] \n\t" "str.w r6, [r0,#848] \n\t"
...@@ -2400,11 +2262,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2400,11 +2262,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 44 // round 44
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#43] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x4 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#856] \n\t" "str.w r6, [r0,#856] \n\t"
...@@ -2455,15 +2314,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2455,15 +2314,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 45 // round 45
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#44] \n\t" // load RC "eor.w r6, r2, #0x8 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#864] \n\t" "str.w r6, [r0,#864] \n\t"
"str.w r7, [r0,#868] \n\t" "str.w r3, [r0,#868] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2510,11 +2365,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2510,11 +2365,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 46 // round 46
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#45] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#872] \n\t" "str.w r6, [r0,#872] \n\t"
...@@ -2565,11 +2417,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2565,11 +2417,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 47 // round 47
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#46] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#880] \n\t" "str.w r6, [r0,#880] \n\t"
...@@ -2620,15 +2469,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2620,15 +2469,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 48 // round 48
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#47] \n\t" // load RC "eor.w r6, r2, #0x4 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#888] \n\t" "str.w r6, [r0,#888] \n\t"
"str.w r7, [r0,#892] \n\t" "str.w r3, [r0,#892] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2675,15 +2520,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2675,15 +2520,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 49 // round 49
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#48] \n\t" // load RC "eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#896] \n\t" "str.w r6, [r0,#896] \n\t"
"str.w r7, [r0,#900] \n\t" "str.w r3, [r0,#900] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2730,11 +2571,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2730,11 +2571,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 50 // round 50
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#49] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#904] \n\t" "str.w r6, [r0,#904] \n\t"
...@@ -2785,11 +2623,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2785,11 +2623,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 51 // round 51
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#50] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#912] \n\t" "str.w r6, [r0,#912] \n\t"
...@@ -2840,15 +2675,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2840,15 +2675,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 52 // round 52
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#51] \n\t" // load RC "eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#920] \n\t" "str.w r6, [r0,#920] \n\t"
"str.w r7, [r0,#924] \n\t" "str.w r3, [r0,#924] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2895,11 +2726,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2895,11 +2726,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 53 // round 53
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#52] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#928] \n\t" "str.w r6, [r0,#928] \n\t"
...@@ -2950,11 +2778,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2950,11 +2778,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 54 // round 54
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#53] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#936] \n\t" "str.w r6, [r0,#936] \n\t"
...@@ -3005,12 +2830,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -3005,12 +2830,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 55 // round 55
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#54] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x5 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#944] \n\t" "str.w r6, [r0,#944] \n\t"
"str.w r7, [r0,#948] \n\t" "str.w r7, [r0,#948] \n\t"
...@@ -3060,15 +2881,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -3060,15 +2881,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 56 // round 56
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#55] \n\t" // load RC "eor.w r6, r2, #0xa \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#952] \n\t" "str.w r6, [r0,#952] \n\t"
"str.w r7, [r0,#956] \n\t" "str.w r3, [r0,#956] \n\t"
// permutation // permutation
......
...@@ -35,15 +35,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -35,15 +35,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 1 // round 1
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#0] \n\t" // load RC "eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#512] \n\t" "str.w r6, [r0,#512] \n\t"
"str.w r7, [r0,#516] \n\t" "str.w r3, [r0,#516] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -90,15 +86,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -90,15 +86,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 2 // round 2
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#1] \n\t" // load RC "eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#520] \n\t" "str.w r6, [r0,#520] \n\t"
"str.w r7, [r0,#524] \n\t" "str.w r3, [r0,#524] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -145,15 +137,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -145,15 +137,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 3 // round 3
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#2] \n\t" // load RC "eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#528] \n\t" "str.w r6, [r0,#528] \n\t"
"str.w r7, [r0,#532] \n\t" "str.w r3, [r0,#532] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -200,15 +188,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -200,15 +188,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 4 // round 4
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#3] \n\t" // load RC "eor.w r6, r2, #0xf \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#536] \n\t" "str.w r6, [r0,#536] \n\t"
"str.w r7, [r0,#540] \n\t" "str.w r3, [r0,#540] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -255,11 +239,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -255,11 +239,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 5 // round 5
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#4] \n\t" // load RC "eor.w r6, r2, #0xf \n\t" // k0^rc
"eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#544] \n\t" "str.w r6, [r0,#544] \n\t"
...@@ -310,11 +291,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -310,11 +291,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 6 // round 6
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#5] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#552] \n\t" "str.w r6, [r0,#552] \n\t"
...@@ -365,11 +343,9 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -365,11 +343,9 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 7 // round 7
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#6] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#560] \n\t" "str.w r6, [r0,#560] \n\t"
...@@ -420,11 +396,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -420,11 +396,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 8 // round 8
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#7] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#568] \n\t" "str.w r6, [r0,#568] \n\t"
...@@ -475,11 +448,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -475,11 +448,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 9 // round 9
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#8] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#576] \n\t" "str.w r6, [r0,#576] \n\t"
...@@ -530,11 +500,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -530,11 +500,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 10 // round 10
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#9] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xf \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#584] \n\t" "str.w r6, [r0,#584] \n\t"
...@@ -585,11 +552,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -585,11 +552,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 11 // round 11
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#10] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#592] \n\t" "str.w r6, [r0,#592] \n\t"
...@@ -640,11 +604,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -640,11 +604,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 12 // round 12
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#11] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#600] \n\t" "str.w r6, [r0,#600] \n\t"
...@@ -695,11 +656,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -695,11 +656,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 13 // round 13
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#12] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#608] \n\t" "str.w r6, [r0,#608] \n\t"
...@@ -750,11 +708,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -750,11 +708,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 14 // round 14
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#13] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#616] \n\t" "str.w r6, [r0,#616] \n\t"
...@@ -805,11 +760,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -805,11 +760,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 15 // round 15
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#14] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#624] \n\t" "str.w r6, [r0,#624] \n\t"
...@@ -860,15 +812,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -860,15 +812,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 16 // round 16
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#15] \n\t" // load RC "eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#632] \n\t" "str.w r6, [r0,#632] \n\t"
"str.w r7, [r0,#636] \n\t" "str.w r3, [r0,#636] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -915,11 +863,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -915,11 +863,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 17 // round 17
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#16] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#640] \n\t" "str.w r6, [r0,#640] \n\t"
...@@ -970,11 +915,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -970,11 +915,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 18 // round 18
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#17] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0xa \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#648] \n\t" "str.w r6, [r0,#648] \n\t"
...@@ -1025,11 +967,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1025,11 +967,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 19 // round 19
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#18] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x5 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#656] \n\t" "str.w r6, [r0,#656] \n\t"
...@@ -1080,11 +1019,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1080,11 +1019,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 20 // round 20
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#19] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#664] \n\t" "str.w r6, [r0,#664] \n\t"
...@@ -1135,11 +1071,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1135,11 +1071,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 21 // round 21
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#20] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#672] \n\t" "str.w r6, [r0,#672] \n\t"
...@@ -1190,11 +1123,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1190,11 +1123,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 22 // round 22
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#21] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#680] \n\t" "str.w r6, [r0,#680] \n\t"
...@@ -1245,11 +1175,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1245,11 +1175,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 23 // round 23
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#22] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x8 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#688] \n\t" "str.w r6, [r0,#688] \n\t"
...@@ -1300,11 +1227,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1300,11 +1227,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 24 // round 24
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#23] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x0 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#696] \n\t" "str.w r6, [r0,#696] \n\t"
...@@ -1355,11 +1279,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1355,11 +1279,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 25 // round 25
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#24] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#704] \n\t" "str.w r6, [r0,#704] \n\t"
...@@ -1410,15 +1331,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1410,15 +1331,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 26 // round 26
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#25] \n\t" // load RC "eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#712] \n\t" "str.w r6, [r0,#712] \n\t"
"str.w r7, [r0,#716] \n\t" "str.w r3, [r0,#716] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1465,15 +1382,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1465,15 +1382,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 27 // round 27
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#26] \n\t" // load RC "eor.w r6, r2, #0x5 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#720] \n\t" "str.w r6, [r0,#720] \n\t"
"str.w r7, [r0,#724] \n\t" "str.w r3, [r0,#724] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1520,15 +1433,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1520,15 +1433,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 28 // round 28
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#27] \n\t" // load RC "eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#728] \n\t" "str.w r6, [r0,#728] \n\t"
"str.w r7, [r0,#732] \n\t" "str.w r3, [r0,#732] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1575,11 +1484,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1575,11 +1484,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 29 // round 29
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#28] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x7 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#736] \n\t" "str.w r6, [r0,#736] \n\t"
...@@ -1630,11 +1536,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1630,11 +1536,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 30 // round 30
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#29] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xe \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#744] \n\t" "str.w r6, [r0,#744] \n\t"
...@@ -1685,11 +1588,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1685,11 +1588,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 31 // round 31
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#30] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#752] \n\t" "str.w r6, [r0,#752] \n\t"
...@@ -1740,11 +1640,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1740,11 +1640,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 32 // round 32
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#31] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x8 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#760] \n\t" "str.w r6, [r0,#760] \n\t"
...@@ -1795,11 +1692,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1795,11 +1692,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 33 // round 33
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#32] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#768] \n\t" "str.w r6, [r0,#768] \n\t"
...@@ -1850,11 +1744,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1850,11 +1744,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 34 // round 34
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#33] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#776] \n\t" "str.w r6, [r0,#776] \n\t"
...@@ -1905,15 +1796,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1905,15 +1796,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 35 // round 35
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#34] \n\t" // load RC "eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#784] \n\t" "str.w r6, [r0,#784] \n\t"
"str.w r7, [r0,#788] \n\t" "str.w r3, [r0,#788] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -1960,15 +1847,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -1960,15 +1847,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 36 // round 36
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#35] \n\t" // load RC "eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#792] \n\t" "str.w r6, [r0,#792] \n\t"
"str.w r7, [r0,#796] \n\t" "str.w r3, [r0,#796] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2015,11 +1898,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2015,11 +1898,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 37 // round 37
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#36] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xb \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#800] \n\t" "str.w r6, [r0,#800] \n\t"
...@@ -2070,11 +1950,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2070,11 +1950,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 38 // round 38
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#37] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#808] \n\t" "str.w r6, [r0,#808] \n\t"
...@@ -2125,11 +2002,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2125,11 +2002,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 39 // round 39
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#38] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0xd \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#816] \n\t" "str.w r6, [r0,#816] \n\t"
...@@ -2180,11 +2054,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2180,11 +2054,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 40 // round 40
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#39] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0xa \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#824] \n\t" "str.w r6, [r0,#824] \n\t"
...@@ -2235,11 +2106,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2235,11 +2106,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 41 // round 41
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#40] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x4 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#832] \n\t" "str.w r6, [r0,#832] \n\t"
...@@ -2290,11 +2158,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2290,11 +2158,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 42 // round 42
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#41] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#840] \n\t" "str.w r6, [r0,#840] \n\t"
...@@ -2345,11 +2210,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2345,11 +2210,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 43 // round 43
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#42] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#848] \n\t" "str.w r6, [r0,#848] \n\t"
...@@ -2400,11 +2262,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2400,11 +2262,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 44 // round 44
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#43] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x4 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#856] \n\t" "str.w r6, [r0,#856] \n\t"
...@@ -2455,15 +2314,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2455,15 +2314,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 45 // round 45
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#44] \n\t" // load RC "eor.w r6, r2, #0x8 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#864] \n\t" "str.w r6, [r0,#864] \n\t"
"str.w r7, [r0,#868] \n\t" "str.w r3, [r0,#868] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2510,11 +2365,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2510,11 +2365,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 46 // round 46
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#45] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x1 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#872] \n\t" "str.w r6, [r0,#872] \n\t"
...@@ -2565,11 +2417,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2565,11 +2417,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 47 // round 47
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#46] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#880] \n\t" "str.w r6, [r0,#880] \n\t"
...@@ -2620,15 +2469,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2620,15 +2469,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 48 // round 48
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#47] \n\t" // load RC "eor.w r6, r2, #0x4 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#888] \n\t" "str.w r6, [r0,#888] \n\t"
"str.w r7, [r0,#892] \n\t" "str.w r3, [r0,#892] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2675,15 +2520,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2675,15 +2520,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 49 // round 49
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#48] \n\t" // load RC "eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#896] \n\t" "str.w r6, [r0,#896] \n\t"
"str.w r7, [r0,#900] \n\t" "str.w r3, [r0,#900] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2730,11 +2571,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2730,11 +2571,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 50 // round 50
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#49] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x3 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#904] \n\t" "str.w r6, [r0,#904] \n\t"
...@@ -2785,11 +2623,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2785,11 +2623,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 51 // round 51
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#50] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x6 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#912] \n\t" "str.w r6, [r0,#912] \n\t"
...@@ -2840,15 +2675,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2840,15 +2675,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 52 // round 52
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#51] \n\t" // load RC "eor.w r6, r2, #0xc \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#920] \n\t" "str.w r6, [r0,#920] \n\t"
"str.w r7, [r0,#924] \n\t" "str.w r3, [r0,#924] \n\t"
// permutation // permutation
// r2 (k3 k2 k1 k0) k13 k8 k15 k9 // r2 (k3 k2 k1 k0) k13 k8 k15 k9
...@@ -2895,11 +2726,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2895,11 +2726,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 53 // round 53
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#52] \n\t" // load RC "eor.w r7, r3, #0x1 \n\t" // k0^rc
"eor.w r6, r2, #0x9 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#928] \n\t" "str.w r6, [r0,#928] \n\t"
...@@ -2950,11 +2778,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -2950,11 +2778,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 54 // round 54
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#53] \n\t" // load RC "eor.w r7, r3, #0x3 \n\t" // k0^rc
"eor.w r6, r2, #0x2 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#936] \n\t" "str.w r6, [r0,#936] \n\t"
...@@ -3005,12 +2830,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -3005,12 +2830,8 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 55 // round 55
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#54] \n\t" // load RC "eor.w r7, r3, #0x2 \n\t" // k0^rc
"eor.w r6, r2, #0x5 \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#944] \n\t" "str.w r6, [r0,#944] \n\t"
"str.w r7, [r0,#948] \n\t" "str.w r7, [r0,#948] \n\t"
...@@ -3060,15 +2881,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC) ...@@ -3060,15 +2881,11 @@ void RunEncryptionKeyScheduleTK3(unsigned char *roundKeys, unsigned char *pRC)
// round 56 // round 56
// AC(c0 c1) // AC(c0 c1)
"ldrb.w r6, [r1,#55] \n\t" // load RC "eor.w r6, r2, #0xa \n\t" // k0^rc
"eor.w r7, r3, r6, lsr #4 \n\t" // k4^rc
"and.w r6, r6, #0xf \n\t"
"eor.w r6, r6, r2 \n\t" // k0^rc
// round key store // round key store
"str.w r6, [r0,#952] \n\t" "str.w r6, [r0,#952] \n\t"
"str.w r7, [r0,#956] \n\t" "str.w r3, [r0,#956] \n\t"
// permutation // permutation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment