Home | History | Annotate | Download | only in smp

Lines Matching refs:n_block

301 #  define block_copy(d, s)          memcpy(d, s, N_BLOCK)
399 static void add_round_key( uint_8t d[N_BLOCK], const uint_8t k[N_BLOCK] )
404 static void shift_sub_rows( uint_8t st[N_BLOCK] )
420 static void inv_shift_sub_rows( uint_8t st[N_BLOCK] )
437 static void mix_sub_columns( uint_8t dt[N_BLOCK] )
438 { uint_8t st[N_BLOCK];
441 static void mix_sub_columns( uint_8t dt[N_BLOCK], uint_8t st[N_BLOCK] )
466 static void inv_mix_sub_columns( uint_8t dt[N_BLOCK] )
467 { uint_8t st[N_BLOCK];
470 static void inv_mix_sub_columns( uint_8t dt[N_BLOCK], uint_8t st[N_BLOCK] )
561 return_type aes_encrypt( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], const aes_context ctx[1] )
565 uint_8t s1[N_BLOCK], r;
572 add_round_key( s1, ctx->ksch + r * N_BLOCK);
575 { uint_8t s2[N_BLOCK];
577 copy_and_key( s1, s2, ctx->ksch + r * N_BLOCK);
581 copy_and_key( out, s1, ctx->ksch + r * N_BLOCK );
591 int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1] )
594 while(n_block--)
599 memcpy(out, iv, N_BLOCK);
600 in += N_BLOCK;
601 out += N_BLOCK;
612 return_type aes_decrypt( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], const aes_context ctx[1] )
616 uint_8t s1[N_BLOCK], r;
617 copy_and_key( s1, in, ctx->ksch + ctx->rnd * N_BLOCK );
623 add_round_key( s1, ctx->ksch + r * N_BLOCK );
627 { uint_8t s2[N_BLOCK];
628 copy_and_key( s2, s1, ctx->ksch + r * N_BLOCK );
642 int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1] )
644 while(n_block--)
645 { uint_8t tmp[N_BLOCK];
647 memcpy(tmp, in, N_BLOCK);
651 memcpy(iv, tmp, N_BLOCK);
652 in += N_BLOCK;
653 out += N_BLOCK;
664 static void update_encrypt_key_128( uint_8t k[N_BLOCK], uint_8t *rc )
684 void aes_encrypt_128( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
685 const unsigned char key[N_BLOCK], unsigned char o_key[N_BLOCK] )
686 { uint_8t s1[N_BLOCK], r, rc = 1;
700 { uint_8t s2[N_BLOCK];
718 static void update_decrypt_key_128( uint_8t k[N_BLOCK], uint_8t *rc )
737 void aes_decrypt_128( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
738 const unsigned char key[N_BLOCK], unsigned char o_key[N_BLOCK] )
740 uint_8t s1[N_BLOCK], r, rc = 0x6c;
755 { uint_8t s2[N_BLOCK];
771 static void update_encrypt_key_256( uint_8t k[2 * N_BLOCK], uint_8t *rc )
804 void aes_encrypt_256( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
805 const unsigned char key[2 * N_BLOCK], unsigned char o_key[2 * N_BLOCK] )
807 uint_8t s1[N_BLOCK], r, rc = 1;
828 { uint_8t s2[N_BLOCK];
851 static void update_decrypt_key_256( uint_8t k[2 * N_BLOCK], uint_8t *rc )
885 void aes_decrypt_256( const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK],
886 const unsigned char key[2 * N_BLOCK], unsigned char o_key[2 * N_BLOCK] )
888 uint_8t s1[N_BLOCK], r, rc = 0x80;
912 { uint_8t s2[N_BLOCK];