HelenOS sources
ELEMS 228 uspace/lib/crypto/aes.c static void sub_bytes(uint8_t state[ELEMS][ELEMS], bool inv)
ELEMS 232 uspace/lib/crypto/aes.c for (size_t i = 0; i < ELEMS; i++) {
ELEMS 233 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++) {
ELEMS 245 uspace/lib/crypto/aes.c static void shift_rows(uint8_t state[ELEMS][ELEMS])
ELEMS 247 uspace/lib/crypto/aes.c uint8_t temp[ELEMS];
ELEMS 249 uspace/lib/crypto/aes.c for (size_t i = 1; i < ELEMS; i++) {
ELEMS 251 uspace/lib/crypto/aes.c memmove(state[i], state[i] + i, ELEMS - i);
ELEMS 252 uspace/lib/crypto/aes.c memcpy(state[i] + ELEMS - i, temp, i);
ELEMS 261 uspace/lib/crypto/aes.c static void inv_shift_rows(uint8_t state[ELEMS][ELEMS])
ELEMS 263 uspace/lib/crypto/aes.c uint8_t temp[ELEMS];
ELEMS 265 uspace/lib/crypto/aes.c for (size_t i = 1; i < ELEMS; i++) {
ELEMS 266 uspace/lib/crypto/aes.c memcpy(temp, state[i], ELEMS - i);
ELEMS 267 uspace/lib/crypto/aes.c memmove(state[i], state[i] + ELEMS - i, i);
ELEMS 268 uspace/lib/crypto/aes.c memcpy(state[i] + i, temp, ELEMS - i);
ELEMS 306 uspace/lib/crypto/aes.c static void mix_columns(uint8_t state[ELEMS][ELEMS])
ELEMS 308 uspace/lib/crypto/aes.c uint8_t orig_state[ELEMS][ELEMS];
ELEMS 311 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++) {
ELEMS 340 uspace/lib/crypto/aes.c static void inv_mix_columns(uint8_t state[ELEMS][ELEMS])
ELEMS 342 uspace/lib/crypto/aes.c uint8_t orig_state[ELEMS][ELEMS];
ELEMS 345 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++) {
ELEMS 375 uspace/lib/crypto/aes.c static void add_round_key(uint8_t state[ELEMS][ELEMS], uint32_t *round_key)
ELEMS 381 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++) {
ELEMS 382 uspace/lib/crypto/aes.c for (size_t i = 0; i < ELEMS; i++) {
ELEMS 438 uspace/lib/crypto/aes.c for (size_t i = CIPHER_ELEMS; i < ELEMS * (ROUNDS + 1); i++) {
ELEMS 470 uspace/lib/crypto/aes.c uint32_t key_exp[ELEMS * (ROUNDS + 1)];
ELEMS 474 uspace/lib/crypto/aes.c uint8_t state[ELEMS][ELEMS];
ELEMS 475 uspace/lib/crypto/aes.c for (size_t i = 0; i < ELEMS; i++) {
ELEMS 476 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++)
ELEMS 477 uspace/lib/crypto/aes.c state[i][j] = input[i + ELEMS * j];
ELEMS 490 uspace/lib/crypto/aes.c add_round_key(state, key_exp + k * ELEMS);
ELEMS 494 uspace/lib/crypto/aes.c for (size_t i = 0; i < ELEMS; i++) {
ELEMS 495 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++)
ELEMS 496 uspace/lib/crypto/aes.c output[i + j * ELEMS] = state[i][j];
ELEMS 522 uspace/lib/crypto/aes.c uint32_t key_exp[ELEMS * (ROUNDS + 1)];
ELEMS 526 uspace/lib/crypto/aes.c uint8_t state[ELEMS][ELEMS];
ELEMS 527 uspace/lib/crypto/aes.c for (size_t i = 0; i < ELEMS; i++) {
ELEMS 528 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++)
ELEMS 529 uspace/lib/crypto/aes.c state[i][j] = input[i + ELEMS * j];
ELEMS 533 uspace/lib/crypto/aes.c add_round_key(state, key_exp + ROUNDS * ELEMS);
ELEMS 538 uspace/lib/crypto/aes.c add_round_key(state, key_exp + k * ELEMS);
ELEMS 545 uspace/lib/crypto/aes.c for (size_t i = 0; i < ELEMS; i++) {
ELEMS 546 uspace/lib/crypto/aes.c for (size_t j = 0; j < ELEMS; j++)
ELEMS 547 uspace/lib/crypto/aes.c output[i + j * ELEMS] = state[i][j];
HelenOS homepage, sources at GitHub