Lines Matching refs:essiv_tfm
331 struct crypto_cipher *essiv_tfm; in crypt_iv_essiv_init() local
342 essiv_tfm = cc->iv_private; in crypt_iv_essiv_init()
344 err = crypto_cipher_setkey(essiv_tfm, essiv->salt, in crypt_iv_essiv_init()
357 struct crypto_cipher *essiv_tfm; in crypt_iv_essiv_wipe() local
362 essiv_tfm = cc->iv_private; in crypt_iv_essiv_wipe()
363 r = crypto_cipher_setkey(essiv_tfm, essiv->salt, salt_size); in crypt_iv_essiv_wipe()
376 struct crypto_cipher *essiv_tfm; in alloc_essiv_cipher() local
380 essiv_tfm = crypto_alloc_cipher(cc->cipher, 0, CRYPTO_ALG_ASYNC); in alloc_essiv_cipher()
381 if (IS_ERR(essiv_tfm)) { in alloc_essiv_cipher()
383 return essiv_tfm; in alloc_essiv_cipher()
386 if (crypto_cipher_blocksize(essiv_tfm) != cc->iv_size) { in alloc_essiv_cipher()
389 crypto_free_cipher(essiv_tfm); in alloc_essiv_cipher()
393 err = crypto_cipher_setkey(essiv_tfm, salt, saltsize); in alloc_essiv_cipher()
396 crypto_free_cipher(essiv_tfm); in alloc_essiv_cipher()
400 return essiv_tfm; in alloc_essiv_cipher()
405 struct crypto_cipher *essiv_tfm; in crypt_iv_essiv_dtr() local
414 essiv_tfm = cc->iv_private; in crypt_iv_essiv_dtr()
416 if (essiv_tfm) in crypt_iv_essiv_dtr()
417 crypto_free_cipher(essiv_tfm); in crypt_iv_essiv_dtr()
425 struct crypto_cipher *essiv_tfm = NULL; in crypt_iv_essiv_ctr() local
453 essiv_tfm = alloc_essiv_cipher(cc, ti, salt, in crypt_iv_essiv_ctr()
455 if (IS_ERR(essiv_tfm)) { in crypt_iv_essiv_ctr()
457 return PTR_ERR(essiv_tfm); in crypt_iv_essiv_ctr()
459 cc->iv_private = essiv_tfm; in crypt_iv_essiv_ctr()
473 struct crypto_cipher *essiv_tfm = cc->iv_private; in crypt_iv_essiv_gen() local
477 crypto_cipher_encrypt_one(essiv_tfm, iv, iv); in crypt_iv_essiv_gen()