Lines Matching refs:N_BLOCK

304 #  define block_copy(d, s)          memcpy(d, s, N_BLOCK)
402 static void add_round_key( uint_8t d[N_BLOCK], const uint_8t k[N_BLOCK] ) in add_round_key() argument
407 static void shift_sub_rows( uint_8t st[N_BLOCK] ) in shift_sub_rows() argument
423 static void inv_shift_sub_rows( uint_8t st[N_BLOCK] ) in inv_shift_sub_rows() argument
440 static void mix_sub_columns( uint_8t dt[N_BLOCK] ) argument
441 { uint_8t st[N_BLOCK];
444 static void mix_sub_columns( uint_8t dt[N_BLOCK], uint_8t st[N_BLOCK] )
469 static void inv_mix_sub_columns( uint_8t dt[N_BLOCK] ) argument
470 { uint_8t st[N_BLOCK];
473 static void inv_mix_sub_columns( uint_8t dt[N_BLOCK], uint_8t st[N_BLOCK] )
569 return_type aes_encrypt( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], const aes_co… argument
573 uint_8t s1[N_BLOCK], r;
580 add_round_key( s1, ctx->ksch + r * N_BLOCK);
583 { uint_8t s2[N_BLOCK];
585 copy_and_key( s1, s2, ctx->ksch + r * N_BLOCK);
589 copy_and_key( out, s1, ctx->ksch + r * N_BLOCK );
599 int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1] ) argument
607 memcpy(out, iv, N_BLOCK);
608 in += N_BLOCK;
609 out += N_BLOCK;
620 return_type aes_decrypt( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], const aes_con… argument
624 uint_8t s1[N_BLOCK], r;
625 copy_and_key( s1, in, ctx->ksch + ctx->rnd * N_BLOCK );
631 add_round_key( s1, ctx->ksch + r * N_BLOCK );
635 { uint_8t s2[N_BLOCK];
636 copy_and_key( s2, s1, ctx->ksch + r * N_BLOCK );
650 int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1] ) argument
653 { uint_8t tmp[N_BLOCK];
655 memcpy(tmp, in, N_BLOCK);
659 memcpy(iv, tmp, N_BLOCK);
660 in += N_BLOCK;
661 out += N_BLOCK;
672 static void update_encrypt_key_128( uint_8t k[N_BLOCK], uint_8t *rc ) argument
692 void aes_encrypt_128( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], argument
693 const unsigned char key[N_BLOCK], unsigned char o_key[N_BLOCK] ) argument
694 { uint_8t s1[N_BLOCK], r, rc = 1;
708 { uint_8t s2[N_BLOCK];
726 static void update_decrypt_key_128( uint_8t k[N_BLOCK], uint_8t *rc ) argument
745 void aes_decrypt_128( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], argument
746 const unsigned char key[N_BLOCK], unsigned char o_key[N_BLOCK] ) argument
748 uint_8t s1[N_BLOCK], r, rc = 0x6c;
763 { uint_8t s2[N_BLOCK];
779 static void update_encrypt_key_256( uint_8t k[2 * N_BLOCK], uint_8t *rc ) argument
812 void aes_encrypt_256( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], argument
813 const unsigned char key[2 * N_BLOCK], unsigned char o_key[2 * N_BLOCK] )
815 uint_8t s1[N_BLOCK], r, rc = 1;
836 { uint_8t s2[N_BLOCK];
859 static void update_decrypt_key_256( uint_8t k[2 * N_BLOCK], uint_8t *rc ) argument
893 void aes_decrypt_256( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], argument
894 const unsigned char key[2 * N_BLOCK], unsigned char o_key[2 * N_BLOCK] )
896 uint_8t s1[N_BLOCK], r, rc = 0x80;
920 { uint_8t s2[N_BLOCK];