Lines Matching refs:rk
539 uint32_t *rk; in aes_nohw_set_encrypt_key() local
561 rk = aeskey->rd_key; in aes_nohw_set_encrypt_key()
563 rk[0] = GETU32(key); in aes_nohw_set_encrypt_key()
564 rk[1] = GETU32(key + 4); in aes_nohw_set_encrypt_key()
565 rk[2] = GETU32(key + 8); in aes_nohw_set_encrypt_key()
566 rk[3] = GETU32(key + 12); in aes_nohw_set_encrypt_key()
569 temp = rk[3]; in aes_nohw_set_encrypt_key()
570 rk[4] = rk[0] ^ (Te2[(temp >> 16) & 0xff] & 0xff000000) ^ in aes_nohw_set_encrypt_key()
574 rk[5] = rk[1] ^ rk[4]; in aes_nohw_set_encrypt_key()
575 rk[6] = rk[2] ^ rk[5]; in aes_nohw_set_encrypt_key()
576 rk[7] = rk[3] ^ rk[6]; in aes_nohw_set_encrypt_key()
580 rk += 4; in aes_nohw_set_encrypt_key()
583 rk[4] = GETU32(key + 16); in aes_nohw_set_encrypt_key()
584 rk[5] = GETU32(key + 20); in aes_nohw_set_encrypt_key()
587 temp = rk[5]; in aes_nohw_set_encrypt_key()
588 rk[6] = rk[0] ^ (Te2[(temp >> 16) & 0xff] & 0xff000000) ^ in aes_nohw_set_encrypt_key()
592 rk[7] = rk[1] ^ rk[6]; in aes_nohw_set_encrypt_key()
593 rk[8] = rk[2] ^ rk[7]; in aes_nohw_set_encrypt_key()
594 rk[9] = rk[3] ^ rk[8]; in aes_nohw_set_encrypt_key()
598 rk[10] = rk[4] ^ rk[9]; in aes_nohw_set_encrypt_key()
599 rk[11] = rk[5] ^ rk[10]; in aes_nohw_set_encrypt_key()
600 rk += 6; in aes_nohw_set_encrypt_key()
603 rk[6] = GETU32(key + 24); in aes_nohw_set_encrypt_key()
604 rk[7] = GETU32(key + 28); in aes_nohw_set_encrypt_key()
607 temp = rk[7]; in aes_nohw_set_encrypt_key()
608 rk[8] = rk[0] ^ (Te2[(temp >> 16) & 0xff] & 0xff000000) ^ in aes_nohw_set_encrypt_key()
612 rk[9] = rk[1] ^ rk[8]; in aes_nohw_set_encrypt_key()
613 rk[10] = rk[2] ^ rk[9]; in aes_nohw_set_encrypt_key()
614 rk[11] = rk[3] ^ rk[10]; in aes_nohw_set_encrypt_key()
618 temp = rk[11]; in aes_nohw_set_encrypt_key()
619 rk[12] = rk[4] ^ (Te2[(temp >> 24)] & 0xff000000) ^ in aes_nohw_set_encrypt_key()
623 rk[13] = rk[5] ^ rk[12]; in aes_nohw_set_encrypt_key()
624 rk[14] = rk[6] ^ rk[13]; in aes_nohw_set_encrypt_key()
625 rk[15] = rk[7] ^ rk[14]; in aes_nohw_set_encrypt_key()
627 rk += 8; in aes_nohw_set_encrypt_key()
635 uint32_t *rk; in aes_nohw_set_decrypt_key() local
645 rk = aeskey->rd_key; in aes_nohw_set_decrypt_key()
649 temp = rk[i]; in aes_nohw_set_decrypt_key()
650 rk[i] = rk[j]; in aes_nohw_set_decrypt_key()
651 rk[j] = temp; in aes_nohw_set_decrypt_key()
652 temp = rk[i + 1]; in aes_nohw_set_decrypt_key()
653 rk[i + 1] = rk[j + 1]; in aes_nohw_set_decrypt_key()
654 rk[j + 1] = temp; in aes_nohw_set_decrypt_key()
655 temp = rk[i + 2]; in aes_nohw_set_decrypt_key()
656 rk[i + 2] = rk[j + 2]; in aes_nohw_set_decrypt_key()
657 rk[j + 2] = temp; in aes_nohw_set_decrypt_key()
658 temp = rk[i + 3]; in aes_nohw_set_decrypt_key()
659 rk[i + 3] = rk[j + 3]; in aes_nohw_set_decrypt_key()
660 rk[j + 3] = temp; in aes_nohw_set_decrypt_key()
665 rk += 4; in aes_nohw_set_decrypt_key()
666 rk[0] = in aes_nohw_set_decrypt_key()
667 Td0[Te1[(rk[0] >> 24)] & 0xff] ^ Td1[Te1[(rk[0] >> 16) & 0xff] & 0xff] ^ in aes_nohw_set_decrypt_key()
668 Td2[Te1[(rk[0] >> 8) & 0xff] & 0xff] ^ Td3[Te1[(rk[0]) & 0xff] & 0xff]; in aes_nohw_set_decrypt_key()
669 rk[1] = in aes_nohw_set_decrypt_key()
670 Td0[Te1[(rk[1] >> 24)] & 0xff] ^ Td1[Te1[(rk[1] >> 16) & 0xff] & 0xff] ^ in aes_nohw_set_decrypt_key()
671 Td2[Te1[(rk[1] >> 8) & 0xff] & 0xff] ^ Td3[Te1[(rk[1]) & 0xff] & 0xff]; in aes_nohw_set_decrypt_key()
672 rk[2] = in aes_nohw_set_decrypt_key()
673 Td0[Te1[(rk[2] >> 24)] & 0xff] ^ Td1[Te1[(rk[2] >> 16) & 0xff] & 0xff] ^ in aes_nohw_set_decrypt_key()
674 Td2[Te1[(rk[2] >> 8) & 0xff] & 0xff] ^ Td3[Te1[(rk[2]) & 0xff] & 0xff]; in aes_nohw_set_decrypt_key()
675 rk[3] = in aes_nohw_set_decrypt_key()
676 Td0[Te1[(rk[3] >> 24)] & 0xff] ^ Td1[Te1[(rk[3] >> 16) & 0xff] & 0xff] ^ in aes_nohw_set_decrypt_key()
677 Td2[Te1[(rk[3] >> 8) & 0xff] & 0xff] ^ Td3[Te1[(rk[3]) & 0xff] & 0xff]; in aes_nohw_set_decrypt_key()
683 const uint32_t *rk; in aes_nohw_encrypt() local
688 rk = key->rd_key; in aes_nohw_encrypt()
692 s0 = GETU32(in) ^ rk[0]; in aes_nohw_encrypt()
693 s1 = GETU32(in + 4) ^ rk[1]; in aes_nohw_encrypt()
694 s2 = GETU32(in + 8) ^ rk[2]; in aes_nohw_encrypt()
695 s3 = GETU32(in + 12) ^ rk[3]; in aes_nohw_encrypt()
701 Te3[(s3) & 0xff] ^ rk[4]; in aes_nohw_encrypt()
703 Te3[(s0) & 0xff] ^ rk[5]; in aes_nohw_encrypt()
705 Te3[(s1) & 0xff] ^ rk[6]; in aes_nohw_encrypt()
707 Te3[(s2) & 0xff] ^ rk[7]; in aes_nohw_encrypt()
709 rk += 8; in aes_nohw_encrypt()
715 Te3[(t3) & 0xff] ^ rk[0]; in aes_nohw_encrypt()
717 Te3[(t0) & 0xff] ^ rk[1]; in aes_nohw_encrypt()
719 Te3[(t1) & 0xff] ^ rk[2]; in aes_nohw_encrypt()
721 Te3[(t2) & 0xff] ^ rk[3]; in aes_nohw_encrypt()
727 rk[0]; in aes_nohw_encrypt()
731 rk[1]; in aes_nohw_encrypt()
735 rk[2]; in aes_nohw_encrypt()
739 rk[3]; in aes_nohw_encrypt()
744 const uint32_t *rk; in aes_nohw_decrypt() local
749 rk = key->rd_key; in aes_nohw_decrypt()
753 s0 = GETU32(in) ^ rk[0]; in aes_nohw_decrypt()
754 s1 = GETU32(in + 4) ^ rk[1]; in aes_nohw_decrypt()
755 s2 = GETU32(in + 8) ^ rk[2]; in aes_nohw_decrypt()
756 s3 = GETU32(in + 12) ^ rk[3]; in aes_nohw_decrypt()
762 Td3[(s1) & 0xff] ^ rk[4]; in aes_nohw_decrypt()
764 Td3[(s2) & 0xff] ^ rk[5]; in aes_nohw_decrypt()
766 Td3[(s3) & 0xff] ^ rk[6]; in aes_nohw_decrypt()
768 Td3[(s0) & 0xff] ^ rk[7]; in aes_nohw_decrypt()
770 rk += 8; in aes_nohw_decrypt()
776 Td3[(t1) & 0xff] ^ rk[0]; in aes_nohw_decrypt()
778 Td3[(t2) & 0xff] ^ rk[1]; in aes_nohw_decrypt()
780 Td3[(t3) & 0xff] ^ rk[2]; in aes_nohw_decrypt()
782 Td3[(t0) & 0xff] ^ rk[3]; in aes_nohw_decrypt()
790 ((uint32_t)Td4[(t1) & 0xff]) ^ rk[0]; in aes_nohw_decrypt()
795 ((uint32_t)Td4[(t2) & 0xff]) ^ rk[1]; in aes_nohw_decrypt()
800 ((uint32_t)Td4[(t3) & 0xff]) ^ rk[2]; in aes_nohw_decrypt()
805 ((uint32_t)Td4[(t0) & 0xff]) ^ rk[3]; in aes_nohw_decrypt()