Home | History | Annotate | Download | only in smp

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] )
407 static void shift_sub_rows( uint_8t st[N_BLOCK] )
423 static void inv_shift_sub_rows( uint_8t st[N_BLOCK] )
440 static void mix_sub_columns( uint_8t dt[N_BLOCK] )
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] )
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_context ctx[1] )
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] )
602 while(n_block--)
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_context ctx[1] )
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] )
652 while(n_block--)
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 )
692 void aes_encrypt_128( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
693 const unsigned char key[N_BLOCK], unsigned char o_key[N_BLOCK] )
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 )
745 void aes_decrypt_128( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
746 const unsigned char key[N_BLOCK], unsigned char o_key[N_BLOCK] )
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 )
812 void aes_encrypt_256( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
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 )
893 void aes_decrypt_256( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
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];