33 #include <linux/module.h>
35 #include <asm/byteorder.h>
37 #include <linux/types.h>
39 #define ANUBIS_MIN_KEY_SIZE 16
40 #define ANUBIS_MAX_KEY_SIZE 40
41 #define ANUBIS_BLOCK_SIZE 16
42 #define ANUBIS_MAX_N 10
43 #define ANUBIS_MAX_ROUNDS (8 + ANUBIS_MAX_N)
52 static const u32 T0[256] = {
53 0xba69d2bb
U, 0x54a84de5
U, 0x2f5ebce2
U, 0x74e8cd25
U,
54 0x53a651f7
U, 0xd3bb6bd0
U, 0xd2b96fd6
U, 0x4d9a29b3
U,
55 0x50a05dfd
U, 0xac458acf
U, 0x8d070e09
U, 0xbf63c6a5
U,
56 0x70e0dd3d
U, 0x52a455f1
U, 0x9a29527b
U, 0x4c982db5
U,
57 0xeac98f46
U, 0xd5b773c4
U, 0x97336655
U, 0xd1bf63dc
U,
58 0x3366ccaa
U, 0x51a259fb
U, 0x5bb671c7
U, 0xa651a2f3
U,
59 0xdea15ffe
U, 0x48903dad
U, 0xa84d9ad7
U, 0x992f5e71
U,
60 0xdbab4be0
U, 0x3264c8ac
U, 0xb773e695
U, 0xfce5d732
U,
61 0xe3dbab70
U, 0x9e214263
U, 0x913f7e41
U, 0x9b2b567d
U,
62 0xe2d9af76
U, 0xbb6bd6bd
U, 0x4182199b
U, 0x6edca579
U,
63 0xa557aef9
U, 0xcb8b0b80
U, 0x6bd6b167
U, 0x95376e59
U,
64 0xa15fbee1
U, 0xf3fbeb10
U, 0xb17ffe81
U, 0x0204080c
U,
65 0xcc851792
U, 0xc49537a2
U, 0x1d3a744e
U, 0x14285078
U,
66 0xc39b2bb0
U, 0x63c69157
U, 0xdaa94fe6
U, 0x5dba69d3
U,
67 0x5fbe61df
U, 0xdca557f2
U, 0x7dfae913
U, 0xcd871394
U,
68 0x7ffee11f
U, 0x5ab475c1
U, 0x6cd8ad75
U, 0x5cb86dd5
U,
69 0xf7f3fb08
U, 0x264c98d4
U, 0xffe3db38
U, 0xedc79354
U,
70 0xe8cd874a
U, 0x9d274e69
U, 0x6fdea17f
U, 0x8e010203
U,
71 0x19326456
U, 0xa05dbae7
U, 0xf0fde71a
U, 0x890f1e11
U,
72 0x0f1e3c22
U, 0x070e1c12
U, 0xaf4386c5
U, 0xfbebcb20
U,
73 0x08102030
U, 0x152a547e
U, 0x0d1a342e
U, 0x04081018
U,
74 0x01020406
U, 0x64c88d45
U, 0xdfa35bf8
U, 0x76ecc529
U,
75 0x79f2f90b
U, 0xdda753f4
U, 0x3d7af48e
U, 0x162c5874
U,
76 0x3f7efc82
U, 0x376edcb2
U, 0x6ddaa973
U, 0x3870e090
U,
77 0xb96fdeb1
U, 0x73e6d137
U, 0xe9cf834c
U, 0x356ad4be
U,
78 0x55aa49e3
U, 0x71e2d93b
U, 0x7bf6f107
U, 0x8c050a0f
U,
79 0x72e4d531
U, 0x880d1a17
U, 0xf6f1ff0e
U, 0x2a54a8fc
U,
80 0x3e7cf884
U, 0x5ebc65d9
U, 0x274e9cd2
U, 0x468c0589
U,
81 0x0c183028
U, 0x65ca8943
U, 0x68d0bd6d
U, 0x61c2995b
U,
82 0x03060c0a
U, 0xc19f23bc
U, 0x57ae41ef
U, 0xd6b17fce
U,
83 0xd9af43ec
U, 0x58b07dcd
U, 0xd8ad47ea
U, 0x66cc8549
U,
84 0xd7b37bc8
U, 0x3a74e89c
U, 0xc88d078a
U, 0x3c78f088
U,
85 0xfae9cf26
U, 0x96316253
U, 0xa753a6f5
U, 0x982d5a77
U,
86 0xecc59752
U, 0xb86ddab7
U, 0xc7933ba8
U, 0xae4182c3
U,
87 0x69d2b96b
U, 0x4b9631a7
U, 0xab4b96dd
U, 0xa94f9ed1
U,
88 0x67ce814f
U, 0x0a14283c
U, 0x478e018f
U, 0xf2f9ef16
U,
89 0xb577ee99
U, 0x224488cc
U, 0xe5d7b364
U, 0xeec19f5e
U,
90 0xbe61c2a3
U, 0x2b56acfa
U, 0x811f3e21
U, 0x1224486c
U,
91 0x831b362d
U, 0x1b366c5a
U, 0x0e1c3824
U, 0x23468cca
U,
92 0xf5f7f304
U, 0x458a0983
U, 0x214284c6
U, 0xce811f9e
U,
93 0x499239ab
U, 0x2c58b0e8
U, 0xf9efc32c
U, 0xe6d1bf6e
U,
94 0xb671e293
U, 0x2850a0f0
U, 0x172e5c72
U, 0x8219322b
U,
95 0x1a34685c
U, 0x8b0b161d
U, 0xfee1df3e
U, 0x8a09121b
U,
96 0x09122436
U, 0xc98f038c
U, 0x87132635
U, 0x4e9c25b9
U,
97 0xe1dfa37c
U, 0x2e5cb8e4
U, 0xe4d5b762
U, 0xe0dda77a
U,
98 0xebcb8b40
U, 0x903d7a47
U, 0xa455aaff
U, 0x1e3c7844
U,
99 0x85172e39
U, 0x60c09d5d
U, 0x00000000
U, 0x254a94de
U,
100 0xf4f5f702
U, 0xf1ffe31c
U, 0x94356a5f
U, 0x0b162c3a
U,
101 0xe7d3bb68
U, 0x75eac923
U, 0xefc39b58
U, 0x3468d0b8
U,
102 0x3162c4a6
U, 0xd4b577c2
U, 0xd0bd67da
U, 0x86112233
U,
103 0x7efce519
U, 0xad478ec9
U, 0xfde7d334
U, 0x2952a4f6
U,
104 0x3060c0a0
U, 0x3b76ec9a
U, 0x9f234665
U, 0xf8edc72a
U,
105 0xc6913fae
U, 0x13264c6a
U, 0x060c1814
U, 0x050a141e
U,
106 0xc59733a4
U, 0x11224466
U, 0x77eec12f
U, 0x7cf8ed15
U,
107 0x7af4f501
U, 0x78f0fd0d
U, 0x366cd8b4
U, 0x1c387048
U,
108 0x3972e496
U, 0x59b279cb
U, 0x18306050
U, 0x56ac45e9
U,
109 0xb37bf68d
U, 0xb07dfa87
U, 0x244890d8
U, 0x204080c0
U,
110 0xb279f28b
U, 0x9239724b
U, 0xa35bb6ed
U, 0xc09d27ba
U,
111 0x44880d85
U, 0x62c49551
U, 0x10204060
U, 0xb475ea9f
U,
112 0x84152a3f
U, 0x43861197
U, 0x933b764d
U, 0xc2992fb6
U,
113 0x4a9435a1
U, 0xbd67cea9
U, 0x8f030605
U, 0x2d5ab4ee
U,
114 0xbc65caaf
U, 0x9c254a6f
U, 0x6ad4b561
U, 0x40801d9d
U,
115 0xcf831b98
U, 0xa259b2eb
U, 0x801d3a27
U, 0x4f9e21bf
U,
116 0x1f3e7c42
U, 0xca890f86
U, 0xaa4992db
U, 0x42841591
U,
119 static const u32 T1[256] = {
120 0x69babbd2
U, 0xa854e54d
U, 0x5e2fe2bc
U, 0xe87425cd
U,
121 0xa653f751
U, 0xbbd3d06b
U, 0xb9d2d66f
U, 0x9a4db329
U,
122 0xa050fd5d
U, 0x45accf8a
U, 0x078d090e
U, 0x63bfa5c6
U,
123 0xe0703ddd
U, 0xa452f155
U, 0x299a7b52
U, 0x984cb52d
U,
124 0xc9ea468f
U, 0xb7d5c473
U, 0x33975566
U, 0xbfd1dc63
U,
125 0x6633aacc
U, 0xa251fb59
U, 0xb65bc771
U, 0x51a6f3a2
U,
126 0xa1defe5f
U, 0x9048ad3d
U, 0x4da8d79a
U, 0x2f99715e
U,
127 0xabdbe04b
U, 0x6432acc8
U, 0x73b795e6
U, 0xe5fc32d7
U,
128 0xdbe370ab
U, 0x219e6342
U, 0x3f91417e
U, 0x2b9b7d56
U,
129 0xd9e276af
U, 0x6bbbbdd6
U, 0x82419b19
U, 0xdc6e79a5
U,
130 0x57a5f9ae
U, 0x8bcb800b
U, 0xd66b67b1
U, 0x3795596e
U,
131 0x5fa1e1be
U, 0xfbf310eb
U, 0x7fb181fe
U, 0x04020c08
U,
132 0x85cc9217
U, 0x95c4a237
U, 0x3a1d4e74
U, 0x28147850
U,
133 0x9bc3b02b
U, 0xc6635791
U, 0xa9dae64f
U, 0xba5dd369
U,
134 0xbe5fdf61
U, 0xa5dcf257
U, 0xfa7d13e9
U, 0x87cd9413
U,
135 0xfe7f1fe1
U, 0xb45ac175
U, 0xd86c75ad
U, 0xb85cd56d
U,
136 0xf3f708fb
U, 0x4c26d498
U, 0xe3ff38db
U, 0xc7ed5493
U,
137 0xcde84a87
U, 0x279d694e
U, 0xde6f7fa1
U, 0x018e0302
U,
138 0x32195664
U, 0x5da0e7ba
U, 0xfdf01ae7
U, 0x0f89111e
U,
139 0x1e0f223c
U, 0x0e07121c
U, 0x43afc586
U, 0xebfb20cb
U,
140 0x10083020
U, 0x2a157e54
U, 0x1a0d2e34
U, 0x08041810
U,
141 0x02010604
U, 0xc864458d
U, 0xa3dff85b
U, 0xec7629c5
U,
142 0xf2790bf9
U, 0xa7ddf453
U, 0x7a3d8ef4
U, 0x2c167458
U,
143 0x7e3f82fc
U, 0x6e37b2dc
U, 0xda6d73a9
U, 0x703890e0
U,
144 0x6fb9b1de
U, 0xe67337d1
U, 0xcfe94c83
U, 0x6a35bed4
U,
145 0xaa55e349
U, 0xe2713bd9
U, 0xf67b07f1
U, 0x058c0f0a
U,
146 0xe47231d5
U, 0x0d88171a
U, 0xf1f60eff
U, 0x542afca8
U,
147 0x7c3e84f8
U, 0xbc5ed965
U, 0x4e27d29c
U, 0x8c468905
U,
148 0x180c2830
U, 0xca654389
U, 0xd0686dbd
U, 0xc2615b99
U,
149 0x06030a0c
U, 0x9fc1bc23
U, 0xae57ef41
U, 0xb1d6ce7f
U,
150 0xafd9ec43
U, 0xb058cd7d
U, 0xadd8ea47
U, 0xcc664985
U,
151 0xb3d7c87b
U, 0x743a9ce8
U, 0x8dc88a07
U, 0x783c88f0
U,
152 0xe9fa26cf
U, 0x31965362
U, 0x53a7f5a6
U, 0x2d98775a
U,
153 0xc5ec5297
U, 0x6db8b7da
U, 0x93c7a83b
U, 0x41aec382
U,
154 0xd2696bb9
U, 0x964ba731
U, 0x4babdd96
U, 0x4fa9d19e
U,
155 0xce674f81
U, 0x140a3c28
U, 0x8e478f01
U, 0xf9f216ef
U,
156 0x77b599ee
U, 0x4422cc88
U, 0xd7e564b3
U, 0xc1ee5e9f
U,
157 0x61bea3c2
U, 0x562bfaac
U, 0x1f81213e
U, 0x24126c48
U,
158 0x1b832d36
U, 0x361b5a6c
U, 0x1c0e2438
U, 0x4623ca8c
U,
159 0xf7f504f3
U, 0x8a458309
U, 0x4221c684
U, 0x81ce9e1f
U,
160 0x9249ab39
U, 0x582ce8b0
U, 0xeff92cc3
U, 0xd1e66ebf
U,
161 0x71b693e2
U, 0x5028f0a0
U, 0x2e17725c
U, 0x19822b32
U,
162 0x341a5c68
U, 0x0b8b1d16
U, 0xe1fe3edf
U, 0x098a1b12
U,
163 0x12093624
U, 0x8fc98c03
U, 0x13873526
U, 0x9c4eb925
U,
164 0xdfe17ca3
U, 0x5c2ee4b8
U, 0xd5e462b7
U, 0xdde07aa7
U,
165 0xcbeb408b
U, 0x3d90477a
U, 0x55a4ffaa
U, 0x3c1e4478
U,
166 0x1785392e
U, 0xc0605d9d
U, 0x00000000
U, 0x4a25de94
U,
167 0xf5f402f7
U, 0xfff11ce3
U, 0x35945f6a
U, 0x160b3a2c
U,
168 0xd3e768bb
U, 0xea7523c9
U, 0xc3ef589b
U, 0x6834b8d0
U,
169 0x6231a6c4
U, 0xb5d4c277
U, 0xbdd0da67
U, 0x11863322
U,
170 0xfc7e19e5
U, 0x47adc98e
U, 0xe7fd34d3
U, 0x5229f6a4
U,
171 0x6030a0c0
U, 0x763b9aec
U, 0x239f6546
U, 0xedf82ac7
U,
172 0x91c6ae3f
U, 0x26136a4c
U, 0x0c061418
U, 0x0a051e14
U,
173 0x97c5a433
U, 0x22116644
U, 0xee772fc1
U, 0xf87c15ed
U,
174 0xf47a01f5
U, 0xf0780dfd
U, 0x6c36b4d8
U, 0x381c4870
U,
175 0x723996e4
U, 0xb259cb79
U, 0x30185060
U, 0xac56e945
U,
176 0x7bb38df6
U, 0x7db087fa
U, 0x4824d890
U, 0x4020c080
U,
177 0x79b28bf2
U, 0x39924b72
U, 0x5ba3edb6
U, 0x9dc0ba27
U,
178 0x8844850d
U, 0xc4625195
U, 0x20106040
U, 0x75b49fea
U,
179 0x15843f2a
U, 0x86439711
U, 0x3b934d76
U, 0x99c2b62f
U,
180 0x944aa135
U, 0x67bda9ce
U, 0x038f0506
U, 0x5a2deeb4
U,
181 0x65bcafca
U, 0x259c6f4a
U, 0xd46a61b5
U, 0x80409d1d
U,
182 0x83cf981b
U, 0x59a2ebb2
U, 0x1d80273a
U, 0x9e4fbf21
U,
183 0x3e1f427c
U, 0x89ca860f
U, 0x49aadb92
U, 0x84429115
U,
186 static const u32 T2[256] = {
187 0xd2bbba69
U, 0x4de554a8
U, 0xbce22f5e
U, 0xcd2574e8
U,
188 0x51f753a6
U, 0x6bd0d3bb
U, 0x6fd6d2b9
U, 0x29b34d9a
U,
189 0x5dfd50a0
U, 0x8acfac45
U, 0x0e098d07
U, 0xc6a5bf63
U,
190 0xdd3d70e0
U, 0x55f152a4
U, 0x527b9a29
U, 0x2db54c98
U,
191 0x8f46eac9
U, 0x73c4d5b7
U, 0x66559733
U, 0x63dcd1bf
U,
192 0xccaa3366
U, 0x59fb51a2
U, 0x71c75bb6
U, 0xa2f3a651
U,
193 0x5ffedea1
U, 0x3dad4890
U, 0x9ad7a84d
U, 0x5e71992f
U,
194 0x4be0dbab
U, 0xc8ac3264
U, 0xe695b773
U, 0xd732fce5
U,
195 0xab70e3db
U, 0x42639e21
U, 0x7e41913f
U, 0x567d9b2b
U,
196 0xaf76e2d9
U, 0xd6bdbb6b
U, 0x199b4182
U, 0xa5796edc
U,
197 0xaef9a557
U, 0x0b80cb8b
U, 0xb1676bd6
U, 0x6e599537
U,
198 0xbee1a15f
U, 0xeb10f3fb
U, 0xfe81b17f
U, 0x080c0204
U,
199 0x1792cc85
U, 0x37a2c495
U, 0x744e1d3a
U, 0x50781428
U,
200 0x2bb0c39b
U, 0x915763c6
U, 0x4fe6daa9
U, 0x69d35dba
U,
201 0x61df5fbe
U, 0x57f2dca5
U, 0xe9137dfa
U, 0x1394cd87
U,
202 0xe11f7ffe
U, 0x75c15ab4
U, 0xad756cd8
U, 0x6dd55cb8
U,
203 0xfb08f7f3
U, 0x98d4264c
U, 0xdb38ffe3
U, 0x9354edc7
U,
204 0x874ae8cd
U, 0x4e699d27
U, 0xa17f6fde
U, 0x02038e01
U,
205 0x64561932
U, 0xbae7a05d
U, 0xe71af0fd
U, 0x1e11890f
U,
206 0x3c220f1e
U, 0x1c12070e
U, 0x86c5af43
U, 0xcb20fbeb
U,
207 0x20300810
U, 0x547e152a
U, 0x342e0d1a
U, 0x10180408
U,
208 0x04060102
U, 0x8d4564c8
U, 0x5bf8dfa3
U, 0xc52976ec
U,
209 0xf90b79f2
U, 0x53f4dda7
U, 0xf48e3d7a
U, 0x5874162c
U,
210 0xfc823f7e
U, 0xdcb2376e
U, 0xa9736dda
U, 0xe0903870
U,
211 0xdeb1b96f
U, 0xd13773e6
U, 0x834ce9cf
U, 0xd4be356a
U,
212 0x49e355aa
U, 0xd93b71e2
U, 0xf1077bf6
U, 0x0a0f8c05
U,
213 0xd53172e4
U, 0x1a17880d
U, 0xff0ef6f1
U, 0xa8fc2a54
U,
214 0xf8843e7c
U, 0x65d95ebc
U, 0x9cd2274e
U, 0x0589468c
U,
215 0x30280c18
U, 0x894365ca
U, 0xbd6d68d0
U, 0x995b61c2
U,
216 0x0c0a0306
U, 0x23bcc19f
U, 0x41ef57ae
U, 0x7fced6b1
U,
217 0x43ecd9af
U, 0x7dcd58b0
U, 0x47ead8ad
U, 0x854966cc
U,
218 0x7bc8d7b3
U, 0xe89c3a74
U, 0x078ac88d
U, 0xf0883c78
U,
219 0xcf26fae9
U, 0x62539631
U, 0xa6f5a753
U, 0x5a77982d
U,
220 0x9752ecc5
U, 0xdab7b86d
U, 0x3ba8c793
U, 0x82c3ae41
U,
221 0xb96b69d2
U, 0x31a74b96
U, 0x96ddab4b
U, 0x9ed1a94f
U,
222 0x814f67ce
U, 0x283c0a14
U, 0x018f478e
U, 0xef16f2f9
U,
223 0xee99b577
U, 0x88cc2244
U, 0xb364e5d7
U, 0x9f5eeec1
U,
224 0xc2a3be61
U, 0xacfa2b56
U, 0x3e21811f
U, 0x486c1224
U,
225 0x362d831b
U, 0x6c5a1b36
U, 0x38240e1c
U, 0x8cca2346
U,
226 0xf304f5f7
U, 0x0983458a
U, 0x84c62142
U, 0x1f9ece81
U,
227 0x39ab4992
U, 0xb0e82c58
U, 0xc32cf9ef
U, 0xbf6ee6d1
U,
228 0xe293b671
U, 0xa0f02850
U, 0x5c72172e
U, 0x322b8219
U,
229 0x685c1a34
U, 0x161d8b0b
U, 0xdf3efee1
U, 0x121b8a09
U,
230 0x24360912
U, 0x038cc98f
U, 0x26358713
U, 0x25b94e9c
U,
231 0xa37ce1df
U, 0xb8e42e5c
U, 0xb762e4d5
U, 0xa77ae0dd
U,
232 0x8b40ebcb
U, 0x7a47903d
U, 0xaaffa455
U, 0x78441e3c
U,
233 0x2e398517
U, 0x9d5d60c0
U, 0x00000000
U, 0x94de254a
U,
234 0xf702f4f5
U, 0xe31cf1ff
U, 0x6a5f9435
U, 0x2c3a0b16
U,
235 0xbb68e7d3
U, 0xc92375ea
U, 0x9b58efc3
U, 0xd0b83468
U,
236 0xc4a63162
U, 0x77c2d4b5
U, 0x67dad0bd
U, 0x22338611
U,
237 0xe5197efc
U, 0x8ec9ad47
U, 0xd334fde7
U, 0xa4f62952
U,
238 0xc0a03060
U, 0xec9a3b76
U, 0x46659f23
U, 0xc72af8ed
U,
239 0x3faec691
U, 0x4c6a1326
U, 0x1814060c
U, 0x141e050a
U,
240 0x33a4c597
U, 0x44661122
U, 0xc12f77ee
U, 0xed157cf8
U,
241 0xf5017af4
U, 0xfd0d78f0
U, 0xd8b4366c
U, 0x70481c38
U,
242 0xe4963972
U, 0x79cb59b2
U, 0x60501830
U, 0x45e956ac
U,
243 0xf68db37b
U, 0xfa87b07d
U, 0x90d82448
U, 0x80c02040
U,
244 0xf28bb279
U, 0x724b9239
U, 0xb6eda35b
U, 0x27bac09d
U,
245 0x0d854488
U, 0x955162c4
U, 0x40601020
U, 0xea9fb475
U,
246 0x2a3f8415
U, 0x11974386
U, 0x764d933b
U, 0x2fb6c299
U,
247 0x35a14a94
U, 0xcea9bd67
U, 0x06058f03
U, 0xb4ee2d5a
U,
248 0xcaafbc65
U, 0x4a6f9c25
U, 0xb5616ad4
U, 0x1d9d4080
U,
249 0x1b98cf83
U, 0xb2eba259
U, 0x3a27801d
U, 0x21bf4f9e
U,
250 0x7c421f3e
U, 0x0f86ca89
U, 0x92dbaa49
U, 0x15914284
U,
253 static const u32 T3[256] = {
254 0xbbd269ba
U, 0xe54da854
U, 0xe2bc5e2f
U, 0x25cde874
U,
255 0xf751a653
U, 0xd06bbbd3
U, 0xd66fb9d2
U, 0xb3299a4d
U,
256 0xfd5da050
U, 0xcf8a45ac
U, 0x090e078d
U, 0xa5c663bf
U,
257 0x3ddde070
U, 0xf155a452
U, 0x7b52299a
U, 0xb52d984c
U,
258 0x468fc9ea
U, 0xc473b7d5
U, 0x55663397
U, 0xdc63bfd1
U,
259 0xaacc6633
U, 0xfb59a251
U, 0xc771b65b
U, 0xf3a251a6
U,
260 0xfe5fa1de
U, 0xad3d9048
U, 0xd79a4da8
U, 0x715e2f99
U,
261 0xe04babdb
U, 0xacc86432
U, 0x95e673b7
U, 0x32d7e5fc
U,
262 0x70abdbe3
U, 0x6342219e
U, 0x417e3f91
U, 0x7d562b9b
U,
263 0x76afd9e2
U, 0xbdd66bbb
U, 0x9b198241
U, 0x79a5dc6e
U,
264 0xf9ae57a5
U, 0x800b8bcb
U, 0x67b1d66b
U, 0x596e3795
U,
265 0xe1be5fa1
U, 0x10ebfbf3
U, 0x81fe7fb1
U, 0x0c080402
U,
266 0x921785cc
U, 0xa23795c4
U, 0x4e743a1d
U, 0x78502814
U,
267 0xb02b9bc3
U, 0x5791c663
U, 0xe64fa9da
U, 0xd369ba5d
U,
268 0xdf61be5f
U, 0xf257a5dc
U, 0x13e9fa7d
U, 0x941387cd
U,
269 0x1fe1fe7f
U, 0xc175b45a
U, 0x75add86c
U, 0xd56db85c
U,
270 0x08fbf3f7
U, 0xd4984c26
U, 0x38dbe3ff
U, 0x5493c7ed
U,
271 0x4a87cde8
U, 0x694e279d
U, 0x7fa1de6f
U, 0x0302018e
U,
272 0x56643219
U, 0xe7ba5da0
U, 0x1ae7fdf0
U, 0x111e0f89
U,
273 0x223c1e0f
U, 0x121c0e07
U, 0xc58643af
U, 0x20cbebfb
U,
274 0x30201008
U, 0x7e542a15
U, 0x2e341a0d
U, 0x18100804
U,
275 0x06040201
U, 0x458dc864
U, 0xf85ba3df
U, 0x29c5ec76
U,
276 0x0bf9f279
U, 0xf453a7dd
U, 0x8ef47a3d
U, 0x74582c16
U,
277 0x82fc7e3f
U, 0xb2dc6e37
U, 0x73a9da6d
U, 0x90e07038
U,
278 0xb1de6fb9
U, 0x37d1e673
U, 0x4c83cfe9
U, 0xbed46a35
U,
279 0xe349aa55
U, 0x3bd9e271
U, 0x07f1f67b
U, 0x0f0a058c
U,
280 0x31d5e472
U, 0x171a0d88
U, 0x0efff1f6
U, 0xfca8542a
U,
281 0x84f87c3e
U, 0xd965bc5e
U, 0xd29c4e27
U, 0x89058c46
U,
282 0x2830180c
U, 0x4389ca65
U, 0x6dbdd068
U, 0x5b99c261
U,
283 0x0a0c0603
U, 0xbc239fc1
U, 0xef41ae57
U, 0xce7fb1d6
U,
284 0xec43afd9
U, 0xcd7db058
U, 0xea47add8
U, 0x4985cc66
U,
285 0xc87bb3d7
U, 0x9ce8743a
U, 0x8a078dc8
U, 0x88f0783c
U,
286 0x26cfe9fa
U, 0x53623196
U, 0xf5a653a7
U, 0x775a2d98
U,
287 0x5297c5ec
U, 0xb7da6db8
U, 0xa83b93c7
U, 0xc38241ae
U,
288 0x6bb9d269
U, 0xa731964b
U, 0xdd964bab
U, 0xd19e4fa9
U,
289 0x4f81ce67
U, 0x3c28140a
U, 0x8f018e47
U, 0x16eff9f2
U,
290 0x99ee77b5
U, 0xcc884422
U, 0x64b3d7e5
U, 0x5e9fc1ee
U,
291 0xa3c261be
U, 0xfaac562b
U, 0x213e1f81
U, 0x6c482412
U,
292 0x2d361b83
U, 0x5a6c361b
U, 0x24381c0e
U, 0xca8c4623
U,
293 0x04f3f7f5
U, 0x83098a45
U, 0xc6844221
U, 0x9e1f81ce
U,
294 0xab399249
U, 0xe8b0582c
U, 0x2cc3eff9
U, 0x6ebfd1e6
U,
295 0x93e271b6
U, 0xf0a05028
U, 0x725c2e17
U, 0x2b321982
U,
296 0x5c68341a
U, 0x1d160b8b
U, 0x3edfe1fe
U, 0x1b12098a
U,
297 0x36241209
U, 0x8c038fc9
U, 0x35261387
U, 0xb9259c4e
U,
298 0x7ca3dfe1
U, 0xe4b85c2e
U, 0x62b7d5e4
U, 0x7aa7dde0
U,
299 0x408bcbeb
U, 0x477a3d90
U, 0xffaa55a4
U, 0x44783c1e
U,
300 0x392e1785
U, 0x5d9dc060
U, 0x00000000
U, 0xde944a25
U,
301 0x02f7f5f4
U, 0x1ce3fff1
U, 0x5f6a3594
U, 0x3a2c160b
U,
302 0x68bbd3e7
U, 0x23c9ea75
U, 0x589bc3ef
U, 0xb8d06834
U,
303 0xa6c46231
U, 0xc277b5d4
U, 0xda67bdd0
U, 0x33221186
U,
304 0x19e5fc7e
U, 0xc98e47ad
U, 0x34d3e7fd
U, 0xf6a45229
U,
305 0xa0c06030
U, 0x9aec763b
U, 0x6546239f
U, 0x2ac7edf8
U,
306 0xae3f91c6
U, 0x6a4c2613
U, 0x14180c06
U, 0x1e140a05
U,
307 0xa43397c5
U, 0x66442211
U, 0x2fc1ee77
U, 0x15edf87c
U,
308 0x01f5f47a
U, 0x0dfdf078
U, 0xb4d86c36
U, 0x4870381c
U,
309 0x96e47239
U, 0xcb79b259
U, 0x50603018
U, 0xe945ac56
U,
310 0x8df67bb3
U, 0x87fa7db0
U, 0xd8904824
U, 0xc0804020
U,
311 0x8bf279b2
U, 0x4b723992
U, 0xedb65ba3
U, 0xba279dc0
U,
312 0x850d8844
U, 0x5195c462
U, 0x60402010
U, 0x9fea75b4
U,
313 0x3f2a1584
U, 0x97118643
U, 0x4d763b93
U, 0xb62f99c2
U,
314 0xa135944a
U, 0xa9ce67bd
U, 0x0506038f
U, 0xeeb45a2d
U,
315 0xafca65bc
U, 0x6f4a259c
U, 0x61b5d46a
U, 0x9d1d8040
U,
316 0x981b83cf
U, 0xebb259a2
U, 0x273a1d80
U, 0xbf219e4f
U,
317 0x427c3e1f
U, 0x860f89ca
U, 0xdb9249aa
U, 0x91158442
U,
320 static const u32 T4[256] = {
321 0xbabababa
U, 0x54545454
U, 0x2f2f2f2f
U, 0x74747474
U,
322 0x53535353
U, 0xd3d3d3d3
U, 0xd2d2d2d2
U, 0x4d4d4d4d
U,
323 0x50505050
U, 0xacacacac
U, 0x8d8d8d8d
U, 0xbfbfbfbf
U,
324 0x70707070
U, 0x52525252
U, 0x9a9a9a9a
U, 0x4c4c4c4c
U,
325 0xeaeaeaea
U, 0xd5d5d5d5
U, 0x97979797
U, 0xd1d1d1d1
U,
326 0x33333333
U, 0x51515151
U, 0x5b5b5b5b
U, 0xa6a6a6a6
U,
327 0xdededede
U, 0x48484848
U, 0xa8a8a8a8
U, 0x99999999
U,
328 0xdbdbdbdb
U, 0x32323232
U, 0xb7b7b7b7
U, 0xfcfcfcfc
U,
329 0xe3e3e3e3
U, 0x9e9e9e9e
U, 0x91919191
U, 0x9b9b9b9b
U,
330 0xe2e2e2e2
U, 0xbbbbbbbb
U, 0x41414141
U, 0x6e6e6e6e
U,
331 0xa5a5a5a5
U, 0xcbcbcbcb
U, 0x6b6b6b6b
U, 0x95959595
U,
332 0xa1a1a1a1
U, 0xf3f3f3f3
U, 0xb1b1b1b1
U, 0x02020202
U,
333 0xcccccccc
U, 0xc4c4c4c4
U, 0x1d1d1d1d
U, 0x14141414
U,
334 0xc3c3c3c3
U, 0x63636363
U, 0xdadadada
U, 0x5d5d5d5d
U,
335 0x5f5f5f5f
U, 0xdcdcdcdc
U, 0x7d7d7d7d
U, 0xcdcdcdcd
U,
336 0x7f7f7f7f
U, 0x5a5a5a5a
U, 0x6c6c6c6c
U, 0x5c5c5c5c
U,
337 0xf7f7f7f7
U, 0x26262626
U, 0xffffffff
U, 0xedededed
U,
338 0xe8e8e8e8
U, 0x9d9d9d9d
U, 0x6f6f6f6f
U, 0x8e8e8e8e
U,
339 0x19191919
U, 0xa0a0a0a0
U, 0xf0f0f0f0
U, 0x89898989
U,
340 0x0f0f0f0f
U, 0x07070707
U, 0xafafafaf
U, 0xfbfbfbfb
U,
341 0x08080808
U, 0x15151515
U, 0x0d0d0d0d
U, 0x04040404
U,
342 0x01010101
U, 0x64646464
U, 0xdfdfdfdf
U, 0x76767676
U,
343 0x79797979
U, 0xdddddddd
U, 0x3d3d3d3d
U, 0x16161616
U,
344 0x3f3f3f3f
U, 0x37373737
U, 0x6d6d6d6d
U, 0x38383838
U,
345 0xb9b9b9b9
U, 0x73737373
U, 0xe9e9e9e9
U, 0x35353535
U,
346 0x55555555
U, 0x71717171
U, 0x7b7b7b7b
U, 0x8c8c8c8c
U,
347 0x72727272
U, 0x88888888
U, 0xf6f6f6f6
U, 0x2a2a2a2a
U,
348 0x3e3e3e3e
U, 0x5e5e5e5e
U, 0x27272727
U, 0x46464646
U,
349 0x0c0c0c0c
U, 0x65656565
U, 0x68686868
U, 0x61616161
U,
350 0x03030303
U, 0xc1c1c1c1
U, 0x57575757
U, 0xd6d6d6d6
U,
351 0xd9d9d9d9
U, 0x58585858
U, 0xd8d8d8d8
U, 0x66666666
U,
352 0xd7d7d7d7
U, 0x3a3a3a3a
U, 0xc8c8c8c8
U, 0x3c3c3c3c
U,
353 0xfafafafa
U, 0x96969696
U, 0xa7a7a7a7
U, 0x98989898
U,
354 0xecececec
U, 0xb8b8b8b8
U, 0xc7c7c7c7
U, 0xaeaeaeae
U,
355 0x69696969
U, 0x4b4b4b4b
U, 0xabababab
U, 0xa9a9a9a9
U,
356 0x67676767
U, 0x0a0a0a0a
U, 0x47474747
U, 0xf2f2f2f2
U,
357 0xb5b5b5b5
U, 0x22222222
U, 0xe5e5e5e5
U, 0xeeeeeeee
U,
358 0xbebebebe
U, 0x2b2b2b2b
U, 0x81818181
U, 0x12121212
U,
359 0x83838383
U, 0x1b1b1b1b
U, 0x0e0e0e0e
U, 0x23232323
U,
360 0xf5f5f5f5
U, 0x45454545
U, 0x21212121
U, 0xcececece
U,
361 0x49494949
U, 0x2c2c2c2c
U, 0xf9f9f9f9
U, 0xe6e6e6e6
U,
362 0xb6b6b6b6
U, 0x28282828
U, 0x17171717
U, 0x82828282
U,
363 0x1a1a1a1a
U, 0x8b8b8b8b
U, 0xfefefefe
U, 0x8a8a8a8a
U,
364 0x09090909
U, 0xc9c9c9c9
U, 0x87878787
U, 0x4e4e4e4e
U,
365 0xe1e1e1e1
U, 0x2e2e2e2e
U, 0xe4e4e4e4
U, 0xe0e0e0e0
U,
366 0xebebebeb
U, 0x90909090
U, 0xa4a4a4a4
U, 0x1e1e1e1e
U,
367 0x85858585
U, 0x60606060
U, 0x00000000
U, 0x25252525
U,
368 0xf4f4f4f4
U, 0xf1f1f1f1
U, 0x94949494
U, 0x0b0b0b0b
U,
369 0xe7e7e7e7
U, 0x75757575
U, 0xefefefef
U, 0x34343434
U,
370 0x31313131
U, 0xd4d4d4d4
U, 0xd0d0d0d0
U, 0x86868686
U,
371 0x7e7e7e7e
U, 0xadadadad
U, 0xfdfdfdfd
U, 0x29292929
U,
372 0x30303030
U, 0x3b3b3b3b
U, 0x9f9f9f9f
U, 0xf8f8f8f8
U,
373 0xc6c6c6c6
U, 0x13131313
U, 0x06060606
U, 0x05050505
U,
374 0xc5c5c5c5
U, 0x11111111
U, 0x77777777
U, 0x7c7c7c7c
U,
375 0x7a7a7a7a
U, 0x78787878
U, 0x36363636
U, 0x1c1c1c1c
U,
376 0x39393939
U, 0x59595959
U, 0x18181818
U, 0x56565656
U,
377 0xb3b3b3b3
U, 0xb0b0b0b0
U, 0x24242424
U, 0x20202020
U,
378 0xb2b2b2b2
U, 0x92929292
U, 0xa3a3a3a3
U, 0xc0c0c0c0
U,
379 0x44444444
U, 0x62626262
U, 0x10101010
U, 0xb4b4b4b4
U,
380 0x84848484
U, 0x43434343
U, 0x93939393
U, 0xc2c2c2c2
U,
381 0x4a4a4a4a
U, 0xbdbdbdbd
U, 0x8f8f8f8f
U, 0x2d2d2d2d
U,
382 0xbcbcbcbc
U, 0x9c9c9c9c
U, 0x6a6a6a6a
U, 0x40404040
U,
383 0xcfcfcfcf
U, 0xa2a2a2a2
U, 0x80808080
U, 0x4f4f4f4f
U,
384 0x1f1f1f1f
U, 0xcacacaca
U, 0xaaaaaaaa
U, 0x42424242
U,
387 static const u32 T5[256] = {
388 0x00000000
U, 0x01020608
U, 0x02040c10
U, 0x03060a18
U,
389 0x04081820
U, 0x050a1e28
U, 0x060c1430
U, 0x070e1238
U,
390 0x08103040
U, 0x09123648
U, 0x0a143c50
U, 0x0b163a58
U,
391 0x0c182860
U, 0x0d1a2e68
U, 0x0e1c2470
U, 0x0f1e2278
U,
392 0x10206080
U, 0x11226688
U, 0x12246c90
U, 0x13266a98
U,
393 0x142878a0
U, 0x152a7ea8
U, 0x162c74b0
U, 0x172e72b8
U,
394 0x183050c0
U, 0x193256c8
U, 0x1a345cd0
U, 0x1b365ad8
U,
395 0x1c3848e0
U, 0x1d3a4ee8
U, 0x1e3c44f0
U, 0x1f3e42f8
U,
396 0x2040c01d
U, 0x2142c615
U, 0x2244cc0d
U, 0x2346ca05
U,
397 0x2448d83d
U, 0x254ade35
U, 0x264cd42d
U, 0x274ed225
U,
398 0x2850f05d
U, 0x2952f655
U, 0x2a54fc4d
U, 0x2b56fa45
U,
399 0x2c58e87d
U, 0x2d5aee75
U, 0x2e5ce46d
U, 0x2f5ee265
U,
400 0x3060a09d
U, 0x3162a695
U, 0x3264ac8d
U, 0x3366aa85
U,
401 0x3468b8bd
U, 0x356abeb5
U, 0x366cb4ad
U, 0x376eb2a5
U,
402 0x387090dd
U, 0x397296d5
U, 0x3a749ccd
U, 0x3b769ac5
U,
403 0x3c7888fd
U, 0x3d7a8ef5
U, 0x3e7c84ed
U, 0x3f7e82e5
U,
404 0x40809d3a
U, 0x41829b32
U, 0x4284912a
U, 0x43869722
U,
405 0x4488851a
U, 0x458a8312
U, 0x468c890a
U, 0x478e8f02
U,
406 0x4890ad7a
U, 0x4992ab72
U, 0x4a94a16a
U, 0x4b96a762
U,
407 0x4c98b55a
U, 0x4d9ab352
U, 0x4e9cb94a
U, 0x4f9ebf42
U,
408 0x50a0fdba
U, 0x51a2fbb2
U, 0x52a4f1aa
U, 0x53a6f7a2
U,
409 0x54a8e59a
U, 0x55aae392
U, 0x56ace98a
U, 0x57aeef82
U,
410 0x58b0cdfa
U, 0x59b2cbf2
U, 0x5ab4c1ea
U, 0x5bb6c7e2
U,
411 0x5cb8d5da
U, 0x5dbad3d2
U, 0x5ebcd9ca
U, 0x5fbedfc2
U,
412 0x60c05d27
U, 0x61c25b2f
U, 0x62c45137
U, 0x63c6573f
U,
413 0x64c84507
U, 0x65ca430f
U, 0x66cc4917
U, 0x67ce4f1f
U,
414 0x68d06d67
U, 0x69d26b6f
U, 0x6ad46177
U, 0x6bd6677f
U,
415 0x6cd87547
U, 0x6dda734f
U, 0x6edc7957
U, 0x6fde7f5f
U,
416 0x70e03da7
U, 0x71e23baf
U, 0x72e431b7
U, 0x73e637bf
U,
417 0x74e82587
U, 0x75ea238f
U, 0x76ec2997
U, 0x77ee2f9f
U,
418 0x78f00de7
U, 0x79f20bef
U, 0x7af401f7
U, 0x7bf607ff
U,
419 0x7cf815c7
U, 0x7dfa13cf
U, 0x7efc19d7
U, 0x7ffe1fdf
U,
420 0x801d2774
U, 0x811f217c
U, 0x82192b64
U, 0x831b2d6c
U,
421 0x84153f54
U, 0x8517395c
U, 0x86113344
U, 0x8713354c
U,
422 0x880d1734
U, 0x890f113c
U, 0x8a091b24
U, 0x8b0b1d2c
U,
423 0x8c050f14
U, 0x8d07091c
U, 0x8e010304
U, 0x8f03050c
U,
424 0x903d47f4
U, 0x913f41fc
U, 0x92394be4
U, 0x933b4dec
U,
425 0x94355fd4
U, 0x953759dc
U, 0x963153c4
U, 0x973355cc
U,
426 0x982d77b4
U, 0x992f71bc
U, 0x9a297ba4
U, 0x9b2b7dac
U,
427 0x9c256f94
U, 0x9d27699c
U, 0x9e216384
U, 0x9f23658c
U,
428 0xa05de769
U, 0xa15fe161
U, 0xa259eb79
U, 0xa35bed71
U,
429 0xa455ff49
U, 0xa557f941
U, 0xa651f359
U, 0xa753f551
U,
430 0xa84dd729
U, 0xa94fd121
U, 0xaa49db39
U, 0xab4bdd31
U,
431 0xac45cf09
U, 0xad47c901
U, 0xae41c319
U, 0xaf43c511
U,
432 0xb07d87e9
U, 0xb17f81e1
U, 0xb2798bf9
U, 0xb37b8df1
U,
433 0xb4759fc9
U, 0xb57799c1
U, 0xb67193d9
U, 0xb77395d1
U,
434 0xb86db7a9
U, 0xb96fb1a1
U, 0xba69bbb9
U, 0xbb6bbdb1
U,
435 0xbc65af89
U, 0xbd67a981
U, 0xbe61a399
U, 0xbf63a591
U,
436 0xc09dba4e
U, 0xc19fbc46
U, 0xc299b65e
U, 0xc39bb056
U,
437 0xc495a26e
U, 0xc597a466
U, 0xc691ae7e
U, 0xc793a876
U,
438 0xc88d8a0e
U, 0xc98f8c06
U, 0xca89861e
U, 0xcb8b8016
U,
439 0xcc85922e
U, 0xcd879426
U, 0xce819e3e
U, 0xcf839836
U,
440 0xd0bddace
U, 0xd1bfdcc6
U, 0xd2b9d6de
U, 0xd3bbd0d6
U,
441 0xd4b5c2ee
U, 0xd5b7c4e6
U, 0xd6b1cefe
U, 0xd7b3c8f6
U,
442 0xd8adea8e
U, 0xd9afec86
U, 0xdaa9e69e
U, 0xdbabe096
U,
443 0xdca5f2ae
U, 0xdda7f4a6
U, 0xdea1febe
U, 0xdfa3f8b6
U,
444 0xe0dd7a53
U, 0xe1df7c5b
U, 0xe2d97643
U, 0xe3db704b
U,
445 0xe4d56273
U, 0xe5d7647b
U, 0xe6d16e63
U, 0xe7d3686b
U,
446 0xe8cd4a13
U, 0xe9cf4c1b
U, 0xeac94603
U, 0xebcb400b
U,
447 0xecc55233
U, 0xedc7543b
U, 0xeec15e23
U, 0xefc3582b
U,
448 0xf0fd1ad3
U, 0xf1ff1cdb
U, 0xf2f916c3
U, 0xf3fb10cb
U,
449 0xf4f502f3
U, 0xf5f704fb
U, 0xf6f10ee3
U, 0xf7f308eb
U,
450 0xf8ed2a93
U, 0xf9ef2c9b
U, 0xfae92683
U, 0xfbeb208b
U,
451 0xfce532b3
U, 0xfde734bb
U, 0xfee13ea3
U, 0xffe338ab
U,
454 static const u32 rc[] = {
455 0xba542f74
U, 0x53d3d24d
U, 0x50ac8dbf
U, 0x70529a4c
U,
456 0xead597d1
U, 0x33515ba6
U, 0xde48a899
U, 0xdb32b7fc
U,
457 0xe39e919b
U, 0xe2bb416e
U, 0xa5cb6b95
U, 0xa1f3b102
U,
458 0xccc41d14
U, 0xc363da5d
U, 0x5fdc7dcd
U, 0x7f5a6c5c
U,
459 0xf726ffed
U, 0xe89d6f8e
U, 0x19a0f089
U,
462 static int anubis_setkey(
struct crypto_tfm *tfm,
const u8 *in_key,
473 case 16:
case 20:
case 24:
case 28:
474 case 32:
case 36:
case 40:
486 for (i = 0; i <
N; i++)
492 for (r = 0; r <=
R; r++) {
497 K0 =
T4[(kappa[N - 1] >> 24) ];
498 K1 =
T4[(kappa[N - 1] >> 16) & 0xff];
499 K2 =
T4[(kappa[N - 1] >> 8) & 0xff];
500 K3 =
T4[(kappa[N - 1] ) & 0xff];
501 for (i = N - 2; i >= 0; i--) {
502 K0 =
T4[(kappa[
i] >> 24) ] ^
503 (T5[(K0 >> 24) ] & 0xff000000
U) ^
504 (T5[(K0 >> 16) & 0xff] & 0x00ff0000
U) ^
505 (T5[(K0 >> 8) & 0xff] & 0x0000ff00
U) ^
506 (T5[(K0 ) & 0xff] & 0x000000ff
U);
507 K1 =
T4[(kappa[
i] >> 16) & 0xff] ^
508 (T5[(K1 >> 24) ] & 0xff000000
U) ^
509 (T5[(K1 >> 16) & 0xff] & 0x00ff0000
U) ^
510 (T5[(K1 >> 8) & 0xff] & 0x0000ff00
U) ^
511 (T5[(K1 ) & 0xff] & 0x000000ff
U);
512 K2 =
T4[(kappa[
i] >> 8) & 0xff] ^
513 (T5[(K2 >> 24) ] & 0xff000000
U) ^
514 (T5[(K2 >> 16) & 0xff] & 0x00ff0000
U) ^
515 (T5[(K2 >> 8) & 0xff] & 0x0000ff00
U) ^
516 (T5[(K2 ) & 0xff] & 0x000000ff
U);
517 K3 =
T4[(kappa[
i] ) & 0xff] ^
518 (T5[(K3 >> 24) ] & 0xff000000
U) ^
519 (T5[(K3 >> 16) & 0xff] & 0x00ff0000
U) ^
520 (T5[(K3 >> 8) & 0xff] & 0x0000ff00
U) ^
521 (T5[(K3 ) & 0xff] & 0x000000ff
U);
534 for (i = 0; i <
N; i++) {
536 inter[
i] =
T0[(kappa[j--] >> 24) ];
539 inter[
i] ^=
T1[(kappa[j--] >> 16) & 0xff];
542 inter[
i] ^=
T2[(kappa[j--] >> 8) & 0xff];
545 inter[
i] ^=
T3[(kappa[
j ] ) & 0xff];
547 kappa[0] = inter[0] ^
rc[
r];
548 for (i = 1; i <
N; i++)
556 for (i = 0; i < 4; i++) {
557 ctx->
D[0][
i] = ctx->
E[
R][
i];
558 ctx->
D[
R][
i] = ctx->
E[0][
i];
560 for (r = 1; r <
R; r++) {
561 for (i = 0; i < 4; i++) {
564 T0[
T4[(v >> 24) ] & 0xff] ^
565 T1[
T4[(v >> 16) & 0xff] & 0xff] ^
566 T2[
T4[(v >> 8) & 0xff] & 0xff] ^
567 T3[
T4[(v ) & 0xff] & 0xff];
575 u8 *ciphertext,
const u8 *plaintext,
const int R)
587 for (i = 0; i < 4; i++)
594 for (r = 1; r <
R; r++) {
596 T0[(state[0] >> 24) ] ^
597 T1[(state[1] >> 24) ] ^
598 T2[(state[2] >> 24) ] ^
599 T3[(state[3] >> 24) ] ^
602 T0[(state[0] >> 16) & 0xff] ^
603 T1[(state[1] >> 16) & 0xff] ^
604 T2[(state[2] >> 16) & 0xff] ^
605 T3[(state[3] >> 16) & 0xff] ^
608 T0[(state[0] >> 8) & 0xff] ^
609 T1[(state[1] >> 8) & 0xff] ^
610 T2[(state[2] >> 8) & 0xff] ^
611 T3[(state[3] >> 8) & 0xff] ^
614 T0[(state[0] ) & 0xff] ^
615 T1[(state[1] ) & 0xff] ^
616 T2[(state[2] ) & 0xff] ^
617 T3[(state[3] ) & 0xff] ^
630 (
T0[(state[0] >> 24) ] & 0xff000000U) ^
631 (
T1[(state[1] >> 24) ] & 0x00ff0000U) ^
632 (
T2[(state[2] >> 24) ] & 0x0000ff00U) ^
633 (
T3[(state[3] >> 24) ] & 0x000000ffU) ^
636 (
T0[(state[0] >> 16) & 0xff] & 0xff000000U) ^
637 (
T1[(state[1] >> 16) & 0xff] & 0x00ff0000U) ^
638 (
T2[(state[2] >> 16) & 0xff] & 0x0000ff00U) ^
639 (
T3[(state[3] >> 16) & 0xff] & 0x000000ffU) ^
642 (
T0[(state[0] >> 8) & 0xff] & 0xff000000U) ^
643 (
T1[(state[1] >> 8) & 0xff] & 0x00ff0000U) ^
644 (
T2[(state[2] >> 8) & 0xff] & 0x0000ff00U) ^
645 (
T3[(state[3] >> 8) & 0xff] & 0x000000ffU) ^
648 (
T0[(state[0] ) & 0xff] & 0xff000000U) ^
649 (
T1[(state[1] ) & 0xff] & 0x00ff0000U) ^
650 (
T2[(state[2] ) & 0xff] & 0x0000ff00U) ^
651 (
T3[(state[3] ) & 0xff] & 0x000000ffU) ^
658 for (i = 0; i < 4; i++)
662 static void anubis_encrypt(
struct crypto_tfm *tfm,
u8 *dst,
const u8 *src)
665 anubis_crypt(ctx->
E, dst, src, ctx->
R);
668 static void anubis_decrypt(
struct crypto_tfm *tfm,
u8 *dst,
const u8 *src)
671 anubis_crypt(ctx->
D, dst, src, ctx->
R);
675 .cra_name =
"anubis",
681 .cra_u = { .cipher = {
684 .cia_setkey = anubis_setkey,
685 .cia_encrypt = anubis_encrypt,
686 .cia_decrypt = anubis_decrypt } }
689 static int __init anubis_mod_init(
void)
697 static void __exit anubis_mod_fini(
void)