Lines Matching defs:in
81 added in the next CPU revisions. */
211 static void ecb_crypt_copy(const u8 *in, u8 *out, u32 *key,
216 * Assume there are at least 16 bytes of stack already in use.
221 memcpy(tmp, in, count * AES_BLOCK_SIZE);
225 static u8 *cbc_crypt_copy(const u8 *in, u8 *out, u32 *key,
230 * Assume there are at least 16 bytes of stack already in use.
235 memcpy(tmp, in, count * AES_BLOCK_SIZE);
239 static inline void ecb_crypt(const u8 *in, u8 *out, u32 *key,
242 /* Padlock in ECB mode fetches at least ecb_fetch_bytes of data.
245 if (unlikely(offset_in_page(in) + ecb_fetch_bytes > PAGE_SIZE)) {
246 ecb_crypt_copy(in, out, key, cword, count);
250 rep_xcrypt_ecb(in, out, key, cword, count);
253 static inline u8 *cbc_crypt(const u8 *in, u8 *out, u32 *key,
256 /* Padlock in CBC mode fetches at least cbc_fetch_bytes of data. */
257 if (unlikely(offset_in_page(in) + cbc_fetch_bytes > PAGE_SIZE))
258 return cbc_crypt_copy(in, out, key, iv, cword, count);
260 return rep_xcrypt_cbc(in, out, key, iv, cword, count);
306 static void padlock_aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
311 ecb_crypt(in, out, ctx->E, &ctx->cword.encrypt, 1);
315 static void padlock_aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
320 ecb_crypt(in, out, ctx->D, &ctx->cword.decrypt, 1);