Lines Matching defs:cx
52 for each cx->n_col and nk value is:
56 cx->n_col = 4 10 9 8 7 7
57 cx->n_col = 5 14 11 10 9 9
58 cx->n_col = 6 19 15 12 11 11
59 cx->n_col = 7 21 19 16 13 14
60 cx->n_col = 8 29 23 19 17 14
97 aes_rval aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1])
100 cx->ks[0] = ss[0] = word_in(key, 0);
101 cx->ks[1] = ss[1] = word_in(key, 1);
102 cx->ks[2] = ss[2] = word_in(key, 2);
103 cx->ks[3] = ss[3] = word_in(key, 3);
109 ke4(cx->ks, i);
112 ke4(cx->ks, 0); ke4(cx->ks, 1);
113 ke4(cx->ks, 2); ke4(cx->ks, 3);
114 ke4(cx->ks, 4); ke4(cx->ks, 5);
115 ke4(cx->ks, 6); ke4(cx->ks, 7);
116 ke4(cx->ks, 8);
118 kel4(cx->ks, 9);
119 cx->rn = 10;
129 aes_rval aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1])
132 cx->ks[0] = ss[0] = word_in(key, 0);
133 cx->ks[1] = ss[1] = word_in(key, 1);
134 cx->ks[2] = ss[2] = word_in(key, 2);
135 cx->ks[3] = ss[3] = word_in(key, 3);
136 cx->ks[4] = ss[4] = word_in(key, 4);
137 cx->ks[5] = ss[5] = word_in(key, 5);
143 ke6(cx->ks, i);
146 ke6(cx->ks, 0); ke6(cx->ks, 1);
147 ke6(cx->ks, 2); ke6(cx->ks, 3);
148 ke6(cx->ks, 4); ke6(cx->ks, 5);
149 ke6(cx->ks, 6);
151 kel6(cx->ks, 7);
152 cx->rn = 12;
162 aes_rval aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1])
165 cx->ks[0] = ss[0] = word_in(key, 0);
166 cx->ks[1] = ss[1] = word_in(key, 1);
167 cx->ks[2] = ss[2] = word_in(key, 2);
168 cx->ks[3] = ss[3] = word_in(key, 3);
169 cx->ks[4] = ss[4] = word_in(key, 4);
170 cx->ks[5] = ss[5] = word_in(key, 5);
171 cx->ks[6] = ss[6] = word_in(key, 6);
172 cx->ks[7] = ss[7] = word_in(key, 7);
178 ke8(cx->ks, i);
181 ke8(cx->ks, 0); ke8(cx->ks, 1);
182 ke8(cx->ks, 2); ke8(cx->ks, 3);
183 ke8(cx->ks, 4); ke8(cx->ks, 5);
185 kel8(cx->ks, 6);
186 cx->rn = 14;
196 aes_rval aes_encrypt_key(const unsigned char *key, int key_len, aes_encrypt_ctx cx[1])
201 case 16: case 128: return aes_encrypt_key128(key, cx);
202 case 24: case 192: return aes_encrypt_key192(key, cx);
203 case 32: case 256: return aes_encrypt_key256(key, cx);
206 case 16: case 128: aes_encrypt_key128(key, cx); return;
207 case 24: case 192: aes_encrypt_key192(key, cx); return;
208 case 32: case 256: aes_encrypt_key256(key, cx); return;
307 aes_rval aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1])
312 cx->ks[0] = ss[0] = word_in(key, 0);
313 cx->ks[1] = ss[1] = word_in(key, 1);
314 cx->ks[2] = ss[2] = word_in(key, 2);
315 cx->ks[3] = ss[3] = word_in(key, 3);
321 ke4(cx->ks, i);
322 kel4(cx->ks, 9);
325 cx->ks[i] = inv_mcol(cx->ks[i]);
329 kdf4(cx->ks, 0); kd4(cx->ks, 1);
330 kd4(cx->ks, 2); kd4(cx->ks, 3);
331 kd4(cx->ks, 4); kd4(cx->ks, 5);
332 kd4(cx->ks, 6); kd4(cx->ks, 7);
333 kd4(cx->ks, 8); kdl4(cx->ks, 9);
335 cx->rn = 10;
345 aes_rval aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1])
350 cx->ks[0] = ss[0] = word_in(key, 0);
351 cx->ks[1] = ss[1] = word_in(key, 1);
352 cx->ks[2] = ss[2] = word_in(key, 2);
353 cx->ks[3] = ss[3] = word_in(key, 3);
356 cx->ks[4] = ss[4] = word_in(key, 4);
357 cx->ks[5] = ss[5] = word_in(key, 5);
361 ke6(cx->ks, i);
362 kel6(cx->ks, 7);
365 cx->ks[i] = inv_mcol(cx->ks[i]);
369 cx->ks[4] = ff(ss[4] = word_in(key, 4));
370 cx->ks[5] = ff(ss[5] = word_in(key, 5));
371 kdf6(cx->ks, 0); kd6(cx->ks, 1);
372 kd6(cx->ks, 2); kd6(cx->ks, 3);
373 kd6(cx->ks, 4); kd6(cx->ks, 5);
374 kd6(cx->ks, 6); kdl6(cx->ks, 7);
376 cx->rn = 12;
386 aes_rval aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1])
391 cx->ks[0] = ss[0] = word_in(key, 0);
392 cx->ks[1] = ss[1] = word_in(key, 1);
393 cx->ks[2] = ss[2] = word_in(key, 2);
394 cx->ks[3] = ss[3] = word_in(key, 3);
397 cx->ks[4] = ss[4] = word_in(key, 4);
398 cx->ks[5] = ss[5] = word_in(key, 5);
399 cx->ks[6] = ss[6] = word_in(key, 6);
400 cx->ks[7] = ss[7] = word_in(key, 7);
404 ke8(cx->ks, i);
405 kel8(cx->ks, i);
408 cx->ks[i] = inv_mcol(cx->ks[i]);
413 cx->ks[4] = ff(ss[4] = word_in(key, 4));
414 cx->ks[5] = ff(ss[5] = word_in(key, 5));
415 cx->ks[6] = ff(ss[6] = word_in(key, 6));
416 cx->ks[7] = ff(ss[7] = word_in(key, 7));
417 kdf8(cx->ks, 0); kd8(cx->ks, 1);
418 kd8(cx->ks, 2); kd8(cx->ks, 3);
419 kd8(cx->ks, 4); kd8(cx->ks, 5);
420 kdl8(cx->ks, 6);
422 cx->rn = 14;
432 aes_rval aes_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1])
437 case 16: case 128: return aes_decrypt_key128(key, cx);
438 case 24: case 192: return aes_decrypt_key192(key, cx);
439 case 32: case 256: return aes_decrypt_key256(key, cx);
442 case 16: case 128: aes_decrypt_key128(key, cx); return;
443 case 24: case 192: aes_decrypt_key192(key, cx); return;
444 case 32: case 256: aes_decrypt_key256(key, cx); return;