Lines Matching full:ctr
23 struct crypto_skcipher_spawn ctr; member
28 struct crypto_skcipher *ctr; member
97 struct crypto_skcipher *ctr = ctx->ctr; in crypto_gcm_setkey() local
109 crypto_skcipher_clear_flags(ctr, CRYPTO_TFM_REQ_MASK); in crypto_gcm_setkey()
110 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_gcm_setkey()
112 err = crypto_skcipher_setkey(ctr, key, keylen); in crypto_gcm_setkey()
116 data = kzalloc(sizeof(*data) + crypto_skcipher_reqsize(ctr), in crypto_gcm_setkey()
123 skcipher_request_set_tfm(&data->req, ctr); in crypto_gcm_setkey()
188 skcipher_request_set_tfm(skreq, ctx->ctr); in crypto_gcm_init_crypt()
526 struct crypto_skcipher *ctr; in crypto_gcm_init_tfm() local
535 ctr = crypto_spawn_skcipher(&ictx->ctr); in crypto_gcm_init_tfm()
536 err = PTR_ERR(ctr); in crypto_gcm_init_tfm()
537 if (IS_ERR(ctr)) in crypto_gcm_init_tfm()
540 ctx->ctr = ctr; in crypto_gcm_init_tfm()
548 crypto_skcipher_reqsize(ctr), in crypto_gcm_init_tfm()
564 crypto_free_skcipher(ctx->ctr); in crypto_gcm_exit_tfm()
571 crypto_drop_skcipher(&ctx->ctr); in crypto_gcm_free()
584 struct skcipher_alg *ctr; in crypto_gcm_create_common() local
608 err = crypto_grab_skcipher(&ctx->ctr, aead_crypto_instance(inst), in crypto_gcm_create_common()
612 ctr = crypto_spawn_skcipher_alg(&ctx->ctr); in crypto_gcm_create_common()
614 /* The skcipher algorithm must be CTR mode, using 16-byte blocks. */ in crypto_gcm_create_common()
616 if (strncmp(ctr->base.cra_name, "ctr(", 4) != 0 || in crypto_gcm_create_common()
617 crypto_skcipher_alg_ivsize(ctr) != 16 || in crypto_gcm_create_common()
618 ctr->base.cra_blocksize != 1) in crypto_gcm_create_common()
623 "gcm(%s", ctr->base.cra_name + 4) >= CRYPTO_MAX_ALG_NAME) in crypto_gcm_create_common()
627 "gcm_base(%s,%s)", ctr->base.cra_driver_name, in crypto_gcm_create_common()
633 ctr->base.cra_priority) / 2; in crypto_gcm_create_common()
636 ctr->base.cra_alignmask; in crypto_gcm_create_common()
639 inst->alg.chunksize = crypto_skcipher_alg_chunksize(ctr); in crypto_gcm_create_common()
667 if (snprintf(ctr_name, CRYPTO_MAX_ALG_NAME, "ctr(%s)", cipher_name) >= in crypto_gcm_create()