• Home
  • Raw
  • Download

Lines Matching refs:RK

532     uint32_t *RK;  in mbedtls_aes_setkey_enc()  local
558 ctx->rk = RK = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ); in mbedtls_aes_setkey_enc()
561 ctx->rk = RK = ctx->buf; in mbedtls_aes_setkey_enc()
570 RK[i] = MBEDTLS_GET_UINT32_LE( key, i << 2 ); in mbedtls_aes_setkey_enc()
577 for( i = 0; i < 10; i++, RK += 4 ) in mbedtls_aes_setkey_enc()
579 RK[4] = RK[0] ^ RCON[i] ^ in mbedtls_aes_setkey_enc()
580 ( (uint32_t) FSb[ MBEDTLS_BYTE_1( RK[3] ) ] ) ^ in mbedtls_aes_setkey_enc()
581 ( (uint32_t) FSb[ MBEDTLS_BYTE_2( RK[3] ) ] << 8 ) ^ in mbedtls_aes_setkey_enc()
582 ( (uint32_t) FSb[ MBEDTLS_BYTE_3( RK[3] ) ] << 16 ) ^ in mbedtls_aes_setkey_enc()
583 ( (uint32_t) FSb[ MBEDTLS_BYTE_0( RK[3] ) ] << 24 ); in mbedtls_aes_setkey_enc()
585 RK[5] = RK[1] ^ RK[4]; in mbedtls_aes_setkey_enc()
586 RK[6] = RK[2] ^ RK[5]; in mbedtls_aes_setkey_enc()
587 RK[7] = RK[3] ^ RK[6]; in mbedtls_aes_setkey_enc()
593 for( i = 0; i < 8; i++, RK += 6 ) in mbedtls_aes_setkey_enc()
595 RK[6] = RK[0] ^ RCON[i] ^ in mbedtls_aes_setkey_enc()
596 ( (uint32_t) FSb[ MBEDTLS_BYTE_1( RK[5] ) ] ) ^ in mbedtls_aes_setkey_enc()
597 ( (uint32_t) FSb[ MBEDTLS_BYTE_2( RK[5] ) ] << 8 ) ^ in mbedtls_aes_setkey_enc()
598 ( (uint32_t) FSb[ MBEDTLS_BYTE_3( RK[5] ) ] << 16 ) ^ in mbedtls_aes_setkey_enc()
599 ( (uint32_t) FSb[ MBEDTLS_BYTE_0( RK[5] ) ] << 24 ); in mbedtls_aes_setkey_enc()
601 RK[7] = RK[1] ^ RK[6]; in mbedtls_aes_setkey_enc()
602 RK[8] = RK[2] ^ RK[7]; in mbedtls_aes_setkey_enc()
603 RK[9] = RK[3] ^ RK[8]; in mbedtls_aes_setkey_enc()
604 RK[10] = RK[4] ^ RK[9]; in mbedtls_aes_setkey_enc()
605 RK[11] = RK[5] ^ RK[10]; in mbedtls_aes_setkey_enc()
611 for( i = 0; i < 7; i++, RK += 8 ) in mbedtls_aes_setkey_enc()
613 RK[8] = RK[0] ^ RCON[i] ^ in mbedtls_aes_setkey_enc()
614 ( (uint32_t) FSb[ MBEDTLS_BYTE_1( RK[7] ) ] ) ^ in mbedtls_aes_setkey_enc()
615 ( (uint32_t) FSb[ MBEDTLS_BYTE_2( RK[7] ) ] << 8 ) ^ in mbedtls_aes_setkey_enc()
616 ( (uint32_t) FSb[ MBEDTLS_BYTE_3( RK[7] ) ] << 16 ) ^ in mbedtls_aes_setkey_enc()
617 ( (uint32_t) FSb[ MBEDTLS_BYTE_0( RK[7] ) ] << 24 ); in mbedtls_aes_setkey_enc()
619 RK[9] = RK[1] ^ RK[8]; in mbedtls_aes_setkey_enc()
620 RK[10] = RK[2] ^ RK[9]; in mbedtls_aes_setkey_enc()
621 RK[11] = RK[3] ^ RK[10]; in mbedtls_aes_setkey_enc()
623 RK[12] = RK[4] ^ in mbedtls_aes_setkey_enc()
624 ( (uint32_t) FSb[ MBEDTLS_BYTE_0( RK[11] ) ] ) ^ in mbedtls_aes_setkey_enc()
625 ( (uint32_t) FSb[ MBEDTLS_BYTE_1( RK[11] ) ] << 8 ) ^ in mbedtls_aes_setkey_enc()
626 ( (uint32_t) FSb[ MBEDTLS_BYTE_2( RK[11] ) ] << 16 ) ^ in mbedtls_aes_setkey_enc()
627 ( (uint32_t) FSb[ MBEDTLS_BYTE_3( RK[11] ) ] << 24 ); in mbedtls_aes_setkey_enc()
629 RK[13] = RK[5] ^ RK[12]; in mbedtls_aes_setkey_enc()
630 RK[14] = RK[6] ^ RK[13]; in mbedtls_aes_setkey_enc()
631 RK[15] = RK[7] ^ RK[14]; in mbedtls_aes_setkey_enc()
649 uint32_t *RK; in mbedtls_aes_setkey_dec() local
662 ctx->rk = RK = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ); in mbedtls_aes_setkey_dec()
665 ctx->rk = RK = ctx->buf; in mbedtls_aes_setkey_dec()
684 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
685 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
686 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
687 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
693 *RK++ = AES_RT0( FSb[ MBEDTLS_BYTE_0( *SK ) ] ) ^ in mbedtls_aes_setkey_dec()
700 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
701 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
702 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
703 *RK++ = *SK++; in mbedtls_aes_setkey_dec()
792 (X0) = *RK++ ^ AES_FT0( MBEDTLS_BYTE_0( Y0 ) ) ^ \
797 (X1) = *RK++ ^ AES_FT0( MBEDTLS_BYTE_0( Y1 ) ) ^ \
802 (X2) = *RK++ ^ AES_FT0( MBEDTLS_BYTE_0( Y2 ) ) ^ \
807 (X3) = *RK++ ^ AES_FT0( MBEDTLS_BYTE_0( Y3 ) ) ^ \
816 (X0) = *RK++ ^ AES_RT0( MBEDTLS_BYTE_0( Y0 ) ) ^ \
821 (X1) = *RK++ ^ AES_RT0( MBEDTLS_BYTE_0( Y1 ) ) ^ \
826 (X2) = *RK++ ^ AES_RT0( MBEDTLS_BYTE_0( Y2 ) ) ^ \
831 (X3) = *RK++ ^ AES_RT0( MBEDTLS_BYTE_0( Y3 ) ) ^ \
846 uint32_t *RK = ctx->rk; in mbedtls_internal_aes_encrypt() local
853 t.X[0] = MBEDTLS_GET_UINT32_LE( input, 0 ); t.X[0] ^= *RK++; in mbedtls_internal_aes_encrypt()
854 t.X[1] = MBEDTLS_GET_UINT32_LE( input, 4 ); t.X[1] ^= *RK++; in mbedtls_internal_aes_encrypt()
855 t.X[2] = MBEDTLS_GET_UINT32_LE( input, 8 ); t.X[2] ^= *RK++; in mbedtls_internal_aes_encrypt()
856 t.X[3] = MBEDTLS_GET_UINT32_LE( input, 12 ); t.X[3] ^= *RK++; in mbedtls_internal_aes_encrypt()
866 t.X[0] = *RK++ ^ \ in mbedtls_internal_aes_encrypt()
872 t.X[1] = *RK++ ^ \ in mbedtls_internal_aes_encrypt()
878 t.X[2] = *RK++ ^ \ in mbedtls_internal_aes_encrypt()
884 t.X[3] = *RK++ ^ \ in mbedtls_internal_aes_encrypt()
910 uint32_t *RK = ctx->rk; in mbedtls_internal_aes_decrypt() local
917 t.X[0] = MBEDTLS_GET_UINT32_LE( input, 0 ); t.X[0] ^= *RK++; in mbedtls_internal_aes_decrypt()
918 t.X[1] = MBEDTLS_GET_UINT32_LE( input, 4 ); t.X[1] ^= *RK++; in mbedtls_internal_aes_decrypt()
919 t.X[2] = MBEDTLS_GET_UINT32_LE( input, 8 ); t.X[2] ^= *RK++; in mbedtls_internal_aes_decrypt()
920 t.X[3] = MBEDTLS_GET_UINT32_LE( input, 12 ); t.X[3] ^= *RK++; in mbedtls_internal_aes_decrypt()
930 t.X[0] = *RK++ ^ \ in mbedtls_internal_aes_decrypt()
936 t.X[1] = *RK++ ^ \ in mbedtls_internal_aes_decrypt()
942 t.X[2] = *RK++ ^ \ in mbedtls_internal_aes_decrypt()
948 t.X[3] = *RK++ ^ \ in mbedtls_internal_aes_decrypt()