Lines Matching refs:cipher
8 #include <crypto/internal/cipher.h>
16 static int crypto_ecb_crypt(struct crypto_cipher *cipher, const u8 *src,
20 const unsigned int bsize = crypto_cipher_blocksize(cipher);
23 fn(crypto_cipher_tfm(cipher), dst, src);
38 struct crypto_cipher *cipher = *ctx;
40 return crypto_ecb_crypt(cipher, src, dst, len,
42 crypto_cipher_alg(cipher)->cia_encrypt);
49 struct crypto_cipher *cipher = *ctx;
51 return crypto_ecb_crypt(cipher, src, dst, len,
53 crypto_cipher_alg(cipher)->cia_decrypt);
60 struct crypto_cipher *cipher = *ctx;
62 crypto_cipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK);
63 crypto_cipher_set_flags(cipher, crypto_lskcipher_get_flags(tfm) &
65 return crypto_cipher_setkey(cipher, key, keylen);
73 struct crypto_cipher *cipher;
76 cipher = crypto_spawn_cipher(spawn);
77 if (IS_ERR(cipher))
78 return PTR_ERR(cipher);
80 *ctx = cipher;
226 MODULE_DESCRIPTION("ECB block cipher mode of operation");