Lines Matching refs:chacha20
168 struct crypto_sync_skcipher *chacha20 = in bch2_chacha_encrypt_key() local
172 ret = PTR_ERR_OR_ZERO(chacha20); in bch2_chacha_encrypt_key()
178 ret = crypto_skcipher_setkey(&chacha20->base, in bch2_chacha_encrypt_key()
185 ret = do_encrypt(chacha20, nonce, buf, len); in bch2_chacha_encrypt_key()
187 crypto_free_sync_skcipher(chacha20); in bch2_chacha_encrypt_key()
200 ret = do_encrypt(c->chacha20, nonce, key, sizeof(key)); in gen_poly_key()
255 return do_encrypt(c->chacha20, nonce, data, len); in bch2_encrypt()
354 ret = do_encrypt_sg(c->chacha20, nonce, sgl.data, sgl_len); in __bch2_encrypt_bio()
369 ret = do_encrypt_sg(c->chacha20, nonce, sgl.data, sgl_len); in __bch2_encrypt_bio()
667 if (c->chacha20) in bch2_alloc_ciphers()
670 struct crypto_sync_skcipher *chacha20 = crypto_alloc_sync_skcipher("chacha20", 0, 0); in bch2_alloc_ciphers() local
671 int ret = PTR_ERR_OR_ZERO(chacha20); in bch2_alloc_ciphers()
681 crypto_free_sync_skcipher(chacha20); in bch2_alloc_ciphers()
685 c->chacha20 = chacha20; in bch2_alloc_ciphers()
755 ret = crypto_skcipher_setkey(&c->chacha20->base, in bch2_enable_encryption()
783 if (c->chacha20) in bch2_fs_encryption_exit()
784 crypto_free_sync_skcipher(c->chacha20); in bch2_fs_encryption_exit()
815 ret = crypto_skcipher_setkey(&c->chacha20->base, in bch2_fs_encryption_init()