Lines Matching refs:chacha
20 struct crypto_skcipher_spawn chacha; member
26 struct crypto_skcipher *chacha; member
66 struct chacha_req chacha; member
127 struct chacha_req *creq = &rctx->u.chacha; in chacha_decrypt()
143 skcipher_request_set_tfm(&creq->req, ctx->chacha); in chacha_decrypt()
365 struct chacha_req *creq = &rctx->u.chacha; in poly_genkey()
383 skcipher_request_set_tfm(&creq->req, ctx->chacha); in poly_genkey()
403 struct chacha_req *creq = &rctx->u.chacha; in chacha_encrypt()
419 skcipher_request_set_tfm(&creq->req, ctx->chacha); in chacha_encrypt()
485 crypto_skcipher_clear_flags(ctx->chacha, CRYPTO_TFM_REQ_MASK); in chachapoly_setkey()
486 crypto_skcipher_set_flags(ctx->chacha, crypto_aead_get_flags(aead) & in chachapoly_setkey()
488 return crypto_skcipher_setkey(ctx->chacha, key, keylen); in chachapoly_setkey()
505 struct crypto_skcipher *chacha; in chachapoly_init() local
513 chacha = crypto_spawn_skcipher(&ictx->chacha); in chachapoly_init()
514 if (IS_ERR(chacha)) { in chachapoly_init()
516 return PTR_ERR(chacha); in chachapoly_init()
519 ctx->chacha = chacha; in chachapoly_init()
530 crypto_skcipher_reqsize(chacha), in chachapoly_init()
543 crypto_free_skcipher(ctx->chacha); in chachapoly_exit()
550 crypto_drop_skcipher(&ctx->chacha); in chachapoly_free()
561 struct skcipher_alg *chacha; in chachapoly_create() local
578 err = crypto_grab_skcipher(&ctx->chacha, aead_crypto_instance(inst), in chachapoly_create()
582 chacha = crypto_spawn_skcipher_alg(&ctx->chacha); in chachapoly_create()
594 if (crypto_skcipher_alg_ivsize(chacha) != CHACHA_IV_SIZE) in chachapoly_create()
597 if (chacha->base.cra_blocksize != 1) in chachapoly_create()
602 "%s(%s,%s)", name, chacha->base.cra_name, in chachapoly_create()
606 "%s(%s,%s)", name, chacha->base.cra_driver_name, in chachapoly_create()
610 inst->alg.base.cra_priority = (chacha->base.cra_priority + in chachapoly_create()
613 inst->alg.base.cra_alignmask = chacha->base.cra_alignmask | in chachapoly_create()
618 inst->alg.chunksize = crypto_skcipher_alg_chunksize(chacha); in chachapoly_create()