Lines Matching refs:expanded_key
1363 aes_expanded_key_t expanded_key) { in aes_expand_encryption_key() argument
1370 expanded_key[0].v32[0] = key->v32[0]; in aes_expand_encryption_key()
1371 expanded_key[0].v32[1] = key->v32[1]; in aes_expand_encryption_key()
1372 expanded_key[0].v32[2] = key->v32[2]; in aes_expand_encryption_key()
1373 expanded_key[0].v32[3] = key->v32[3]; in aes_expand_encryption_key()
1377 "expanded key[0]: %s", v128_hex_string(&expanded_key[0])); in aes_expand_encryption_key()
1384 expanded_key[i].v8[0] = aes_sbox[expanded_key[i-1].v8[13]] ^ rc; in aes_expand_encryption_key()
1385 expanded_key[i].v8[1] = aes_sbox[expanded_key[i-1].v8[14]]; in aes_expand_encryption_key()
1386 expanded_key[i].v8[2] = aes_sbox[expanded_key[i-1].v8[15]]; in aes_expand_encryption_key()
1387 expanded_key[i].v8[3] = aes_sbox[expanded_key[i-1].v8[12]]; in aes_expand_encryption_key()
1389 expanded_key[i].v32[0] ^= expanded_key[i-1].v32[0]; in aes_expand_encryption_key()
1394 expanded_key[i].v32[1] = in aes_expand_encryption_key()
1395 expanded_key[i].v32[0] ^ expanded_key[i-1].v32[1]; in aes_expand_encryption_key()
1397 expanded_key[i].v32[2] = in aes_expand_encryption_key()
1398 expanded_key[i].v32[1] ^ expanded_key[i-1].v32[2]; in aes_expand_encryption_key()
1400 expanded_key[i].v32[3] = in aes_expand_encryption_key()
1401 expanded_key[i].v32[2] ^ expanded_key[i-1].v32[3]; in aes_expand_encryption_key()
1405 "expanded key[%d]: %s", i,v128_hex_string(&expanded_key[i])); in aes_expand_encryption_key()
1416 aes_expanded_key_t expanded_key) { in aes_expand_decryption_key() argument
1419 aes_expand_encryption_key(key, expanded_key); in aes_expand_decryption_key()
1424 v128_copy(&tmp, &expanded_key[10-i]); in aes_expand_decryption_key()
1425 v128_copy(&expanded_key[10-i], &expanded_key[i]); in aes_expand_decryption_key()
1426 v128_copy(&expanded_key[i], &tmp); in aes_expand_decryption_key()
1441 tmp = expanded_key[i].v32[0]; in aes_expand_decryption_key()
1442 expanded_key[i].v32[0] = in aes_expand_decryption_key()
1448 tmp = expanded_key[i].v32[1]; in aes_expand_decryption_key()
1449 expanded_key[i].v32[1] = in aes_expand_decryption_key()
1455 tmp = expanded_key[i].v32[2]; in aes_expand_decryption_key()
1456 expanded_key[i].v32[2] = in aes_expand_decryption_key()
1462 tmp = expanded_key[i].v32[3]; in aes_expand_decryption_key()
1463 expanded_key[i].v32[3] = in aes_expand_decryption_key()
1472 c0 = U0[aes_sbox[expanded_key[i].v8[0]]] in aes_expand_decryption_key()
1473 ^ U1[aes_sbox[expanded_key[i].v8[1]]] in aes_expand_decryption_key()
1474 ^ U2[aes_sbox[expanded_key[i].v8[2]]] in aes_expand_decryption_key()
1475 ^ U3[aes_sbox[expanded_key[i].v8[3]]]; in aes_expand_decryption_key()
1477 c1 = U0[aes_sbox[expanded_key[i].v8[4]]] in aes_expand_decryption_key()
1478 ^ U1[aes_sbox[expanded_key[i].v8[5]]] in aes_expand_decryption_key()
1479 ^ U2[aes_sbox[expanded_key[i].v8[6]]] in aes_expand_decryption_key()
1480 ^ U3[aes_sbox[expanded_key[i].v8[7]]]; in aes_expand_decryption_key()
1482 c2 = U0[aes_sbox[expanded_key[i].v8[8]]] in aes_expand_decryption_key()
1483 ^ U1[aes_sbox[expanded_key[i].v8[9]]] in aes_expand_decryption_key()
1484 ^ U2[aes_sbox[expanded_key[i].v8[10]]] in aes_expand_decryption_key()
1485 ^ U3[aes_sbox[expanded_key[i].v8[11]]]; in aes_expand_decryption_key()
1487 c3 = U0[aes_sbox[expanded_key[i].v8[12]]] in aes_expand_decryption_key()
1488 ^ U1[aes_sbox[expanded_key[i].v8[13]]] in aes_expand_decryption_key()
1489 ^ U2[aes_sbox[expanded_key[i].v8[14]]] in aes_expand_decryption_key()
1490 ^ U3[aes_sbox[expanded_key[i].v8[15]]]; in aes_expand_decryption_key()
1492 expanded_key[i].v32[0] = c0; in aes_expand_decryption_key()
1493 expanded_key[i].v32[1] = c1; in aes_expand_decryption_key()
1494 expanded_key[i].v32[2] = c2; in aes_expand_decryption_key()
1495 expanded_key[i].v32[3] = c3; in aes_expand_decryption_key()