Lines Matching refs:tfm
20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key,
23 struct cipher_alg *cia = crypto_cipher_alg(tfm);
24 unsigned long alignmask = crypto_cipher_alignmask(tfm);
36 ret = cia->cia_setkey(crypto_cipher_tfm(tfm), alignbuffer, keylen);
43 int crypto_cipher_setkey(struct crypto_cipher *tfm,
46 struct cipher_alg *cia = crypto_cipher_alg(tfm);
47 unsigned long alignmask = crypto_cipher_alignmask(tfm);
53 return setkey_unaligned(tfm, key, keylen);
55 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen);
59 static inline void cipher_crypt_one(struct crypto_cipher *tfm,
62 unsigned long alignmask = crypto_cipher_alignmask(tfm);
63 struct cipher_alg *cia = crypto_cipher_alg(tfm);
68 unsigned int bs = crypto_cipher_blocksize(tfm);
73 fn(crypto_cipher_tfm(tfm), tmp, tmp);
76 fn(crypto_cipher_tfm(tfm), dst, src);
80 void crypto_cipher_encrypt_one(struct crypto_cipher *tfm,
83 cipher_crypt_one(tfm, dst, src, true);
87 void crypto_cipher_decrypt_one(struct crypto_cipher *tfm,
90 cipher_crypt_one(tfm, dst, src, false);
96 struct crypto_tfm *tfm = crypto_cipher_tfm(cipher);
97 struct crypto_alg *alg = tfm->__crt_alg;
114 ntfm->crt_flags = tfm->crt_flags;