Lines Matching refs:cword

39 struct cword {  struct
62 struct cword encrypt;
63 struct cword decrypt;
64 } cword; member
68 static DEFINE_PER_CPU(struct cword *, paes_last_cword);
130 memset(&ctx->cword, 0, sizeof(ctx->cword)); in aes_set_key()
132 ctx->cword.decrypt.encdec = 1; in aes_set_key()
133 ctx->cword.encrypt.rounds = 10 + (key_len - 16) / 4; in aes_set_key()
134 ctx->cword.decrypt.rounds = ctx->cword.encrypt.rounds; in aes_set_key()
135 ctx->cword.encrypt.ksize = (key_len - 16) / 8; in aes_set_key()
136 ctx->cword.decrypt.ksize = ctx->cword.encrypt.ksize; in aes_set_key()
143 ctx->cword.encrypt.keygen = 1; in aes_set_key()
144 ctx->cword.decrypt.keygen = 1; in aes_set_key()
156 if (&ctx->cword.encrypt == per_cpu(paes_last_cword, cpu) || in aes_set_key()
157 &ctx->cword.decrypt == per_cpu(paes_last_cword, cpu)) in aes_set_key()
166 static inline void padlock_reset_key(struct cword *cword) in padlock_reset_key() argument
170 if (cword != per_cpu(paes_last_cword, cpu)) in padlock_reset_key()
178 static inline void padlock_store_cword(struct cword *cword) in padlock_store_cword() argument
180 per_cpu(paes_last_cword, raw_smp_processor_id()) = cword; in padlock_store_cword()
190 struct cword *control_word, int count) in rep_xcrypt_ecb()
198 u8 *iv, struct cword *control_word, int count) in rep_xcrypt_cbc()
207 struct cword *cword, int count) in ecb_crypt_copy() argument
217 rep_xcrypt_ecb(tmp, out, key, cword, count); in ecb_crypt_copy()
221 u8 *iv, struct cword *cword, int count) in cbc_crypt_copy() argument
231 return rep_xcrypt_cbc(tmp, out, key, iv, cword, count); in cbc_crypt_copy()
235 struct cword *cword, int count) in ecb_crypt() argument
241 ecb_crypt_copy(in, out, key, cword, count); in ecb_crypt()
245 rep_xcrypt_ecb(in, out, key, cword, count); in ecb_crypt()
249 u8 *iv, struct cword *cword, int count) in cbc_crypt() argument
253 return cbc_crypt_copy(in, out, key, iv, cword, count); in cbc_crypt()
255 return rep_xcrypt_cbc(in, out, key, iv, cword, count); in cbc_crypt()
302 padlock_reset_key(&ctx->cword.encrypt); in aes_encrypt()
304 ecb_crypt(in, out, ctx->E, &ctx->cword.encrypt, 1); in aes_encrypt()
306 padlock_store_cword(&ctx->cword.encrypt); in aes_encrypt()
314 padlock_reset_key(&ctx->cword.encrypt); in aes_decrypt()
316 ecb_crypt(in, out, ctx->D, &ctx->cword.decrypt, 1); in aes_decrypt()
318 padlock_store_cword(&ctx->cword.encrypt); in aes_decrypt()
351 padlock_reset_key(&ctx->cword.encrypt); in ecb_aes_encrypt()
359 ctx->E, &ctx->cword.encrypt, in ecb_aes_encrypt()
366 padlock_store_cword(&ctx->cword.encrypt); in ecb_aes_encrypt()
380 padlock_reset_key(&ctx->cword.decrypt); in ecb_aes_decrypt()
388 ctx->D, &ctx->cword.decrypt, in ecb_aes_decrypt()
395 padlock_store_cword(&ctx->cword.encrypt); in ecb_aes_decrypt()
431 padlock_reset_key(&ctx->cword.encrypt); in cbc_aes_encrypt()
440 walk.iv, &ctx->cword.encrypt, in cbc_aes_encrypt()
448 padlock_store_cword(&ctx->cword.decrypt); in cbc_aes_encrypt()
462 padlock_reset_key(&ctx->cword.encrypt); in cbc_aes_decrypt()
470 ctx->D, walk.iv, &ctx->cword.decrypt, in cbc_aes_decrypt()
478 padlock_store_cword(&ctx->cword.encrypt); in cbc_aes_decrypt()