Lines Matching refs:rk
23 static void rijndaelEncrypt(const u32 rk[], int Nr, const u8 pt[16], u8 ct[16]) in rijndaelEncrypt() argument
34 s0 = GETU32(pt ) ^ rk[0]; in rijndaelEncrypt()
35 s1 = GETU32(pt + 4) ^ rk[1]; in rijndaelEncrypt()
36 s2 = GETU32(pt + 8) ^ rk[2]; in rijndaelEncrypt()
37 s3 = GETU32(pt + 12) ^ rk[3]; in rijndaelEncrypt()
40 d##0 = TE0(s##0) ^ TE1(s##1) ^ TE2(s##2) ^ TE3(s##3) ^ rk[4 * i]; \ in rijndaelEncrypt()
41 d##1 = TE0(s##1) ^ TE1(s##2) ^ TE2(s##3) ^ TE3(s##0) ^ rk[4 * i + 1]; \ in rijndaelEncrypt()
42 d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \ in rijndaelEncrypt()
43 d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3] in rijndaelEncrypt()
65 rk += Nr << 2; in rijndaelEncrypt()
73 rk += 8; in rijndaelEncrypt()
87 s0 = TE41(t0) ^ TE42(t1) ^ TE43(t2) ^ TE44(t3) ^ rk[0]; in rijndaelEncrypt()
89 s1 = TE41(t1) ^ TE42(t2) ^ TE43(t3) ^ TE44(t0) ^ rk[1]; in rijndaelEncrypt()
91 s2 = TE41(t2) ^ TE42(t3) ^ TE43(t0) ^ TE44(t1) ^ rk[2]; in rijndaelEncrypt()
93 s3 = TE41(t3) ^ TE42(t0) ^ TE43(t1) ^ TE44(t2) ^ rk[3]; in rijndaelEncrypt()
100 u32 *rk; in aes_encrypt_init() local
106 rk = os_malloc(AES_PRIV_SIZE); in aes_encrypt_init()
107 if (rk == NULL) in aes_encrypt_init()
109 res = rijndaelKeySetupEnc(rk, key, len * 8); in aes_encrypt_init()
111 os_free(rk); in aes_encrypt_init()
114 rk[AES_PRIV_NR_POS] = res; in aes_encrypt_init()
115 return rk; in aes_encrypt_init()
121 u32 *rk = ctx; in aes_encrypt() local
122 rijndaelEncrypt(ctx, rk[AES_PRIV_NR_POS], plain, crypt); in aes_encrypt()