Lines Matching refs:N_BLOCK
319 #define block_copy(d, s) memcpy(d, s, N_BLOCK)
412 static void add_round_key(uint_8t d[N_BLOCK], const uint_8t k[N_BLOCK]) { in add_round_key() argument
416 static void shift_sub_rows(uint_8t st[N_BLOCK]) { in shift_sub_rows() argument
444 static void inv_shift_sub_rows(uint_8t st[N_BLOCK]) { in inv_shift_sub_rows() argument
473 static void mix_sub_columns(uint_8t dt[N_BLOCK]) { argument
474 uint_8t st[N_BLOCK];
477 static void mix_sub_columns(uint_8t dt[N_BLOCK], uint_8t st[N_BLOCK]) {
501 static void inv_mix_sub_columns(uint_8t dt[N_BLOCK]) { argument
502 uint_8t st[N_BLOCK];
505 static void inv_mix_sub_columns(uint_8t dt[N_BLOCK], uint_8t st[N_BLOCK]) {
598 return_type aes_encrypt(const unsigned char in[N_BLOCK], argument
599 unsigned char out[N_BLOCK], const aes_context ctx[1]) { argument
601 uint_8t s1[N_BLOCK], r;
608 add_round_key(s1, ctx->ksch + r * N_BLOCK);
612 uint_8t s2[N_BLOCK];
614 copy_and_key(s1, s2, ctx->ksch + r * N_BLOCK);
618 copy_and_key(out, s1, ctx->ksch + r * N_BLOCK);
627 int n_block, unsigned char iv[N_BLOCK], argument
632 memcpy(out, iv, N_BLOCK);
633 in += N_BLOCK;
634 out += N_BLOCK;
645 return_type aes_decrypt(const unsigned char in[N_BLOCK], argument
646 unsigned char out[N_BLOCK], const aes_context ctx[1]) { argument
648 uint_8t s1[N_BLOCK], r;
649 copy_and_key(s1, in, ctx->ksch + ctx->rnd * N_BLOCK);
655 add_round_key(s1, ctx->ksch + r * N_BLOCK);
660 uint_8t s2[N_BLOCK];
661 copy_and_key(s2, s1, ctx->ksch + r * N_BLOCK);
674 int n_block, unsigned char iv[N_BLOCK], argument
677 uint_8t tmp[N_BLOCK];
679 memcpy(tmp, in, N_BLOCK);
682 memcpy(iv, tmp, N_BLOCK);
683 in += N_BLOCK;
684 out += N_BLOCK;
695 static void update_encrypt_key_128(uint_8t k[N_BLOCK], uint_8t* rc) { argument
714 void aes_encrypt_128(const unsigned char in[N_BLOCK], argument
715 unsigned char out[N_BLOCK], argument
716 const unsigned char key[N_BLOCK], argument
717 unsigned char o_key[N_BLOCK]) { argument
718 uint_8t s1[N_BLOCK], r, rc = 1;
732 uint_8t s2[N_BLOCK];
750 static void update_decrypt_key_128(uint_8t k[N_BLOCK], uint_8t* rc) { argument
768 void aes_decrypt_128(const unsigned char in[N_BLOCK], argument
769 unsigned char out[N_BLOCK], argument
770 const unsigned char key[N_BLOCK], argument
771 unsigned char o_key[N_BLOCK]) { argument
772 uint_8t s1[N_BLOCK], r, rc = 0x6c;
787 uint_8t s2[N_BLOCK];
803 static void update_encrypt_key_256(uint_8t k[2 * N_BLOCK], uint_8t* rc) { argument
834 void aes_encrypt_256(const unsigned char in[N_BLOCK], argument
835 unsigned char out[N_BLOCK], argument
836 const unsigned char key[2 * N_BLOCK],
837 unsigned char o_key[2 * N_BLOCK]) {
838 uint_8t s1[N_BLOCK], r, rc = 1;
858 uint_8t s2[N_BLOCK];
880 static void update_decrypt_key_256(uint_8t k[2 * N_BLOCK], uint_8t* rc) { argument
912 void aes_decrypt_256(const unsigned char in[N_BLOCK], argument
913 unsigned char out[N_BLOCK], argument
914 const unsigned char key[2 * N_BLOCK],
915 unsigned char o_key[2 * N_BLOCK]) {
916 uint_8t s1[N_BLOCK], r, rc = 0x80;
938 uint_8t s2[N_BLOCK];