Lines Matching full:cipher
3 * Symmetric key cipher operations.
13 #include <crypto/internal/cipher.h>
132 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in skcipher_setkey_unaligned() local
144 ret = cipher->setkey(tfm, alignbuffer, keylen); in skcipher_setkey_unaligned()
152 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in crypto_skcipher_setkey() local
156 if (cipher->co.base.cra_type != &crypto_skcipher_type) { in crypto_skcipher_setkey()
167 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) in crypto_skcipher_setkey()
173 err = cipher->setkey(tfm, key, keylen); in crypto_skcipher_setkey()
537 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in skcipher_setkey_simple() local
539 crypto_cipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in skcipher_setkey_simple()
540 crypto_cipher_set_flags(cipher, crypto_skcipher_get_flags(tfm) & in skcipher_setkey_simple()
542 return crypto_cipher_setkey(cipher, key, keylen); in skcipher_setkey_simple()
550 struct crypto_cipher *cipher; in skcipher_init_tfm_simple() local
552 cipher = crypto_spawn_cipher(spawn); in skcipher_init_tfm_simple()
553 if (IS_ERR(cipher)) in skcipher_init_tfm_simple()
554 return PTR_ERR(cipher); in skcipher_init_tfm_simple()
556 ctx->cipher = cipher; in skcipher_init_tfm_simple()
564 crypto_free_cipher(ctx->cipher); in skcipher_exit_tfm_simple()
574 * skcipher_alloc_instance_simple - allocate instance of simple block cipher mode
576 * Allocate an skcipher_instance for a simple block cipher mode of operation,
578 * that for the underlying cipher. The {min,max}_keysize, ivsize, blocksize,
579 * alignmask, and priority are set from the underlying cipher but can be
643 MODULE_DESCRIPTION("Symmetric key cipher type");