/crypto/ |
D | aead.c | 85 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_encrypt() local 86 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_encrypt() 91 if (crypto_aead_get_flags(aead) & CRYPTO_TFM_NEED_KEY) in crypto_aead_encrypt() 94 ret = crypto_aead_alg(aead)->encrypt(req); in crypto_aead_encrypt() 102 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_decrypt() local 103 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_decrypt() 108 if (crypto_aead_get_flags(aead) & CRYPTO_TFM_NEED_KEY) in crypto_aead_decrypt() 110 else if (req->cryptlen < crypto_aead_authsize(aead)) in crypto_aead_decrypt() 113 ret = crypto_aead_alg(aead)->decrypt(req); in crypto_aead_decrypt() 121 struct crypto_aead *aead = __crypto_aead_cast(tfm); in crypto_aead_exit_tfm() local [all …]
|
D | algif_aead.c | 40 struct crypto_aead *aead; member 51 struct crypto_aead *tfm = aeadc->aead; in aead_sufficient_data() 68 struct crypto_aead *tfm = aeadc->aead; in aead_sendmsg() 97 struct crypto_aead *tfm = aeadc->aead; in _aead_recvmsg() 395 if (crypto_aead_get_flags(tfm->aead) & CRYPTO_TFM_NEED_KEY) in aead_check_key() 470 struct crypto_aead *aead; in aead_bind() local 477 aead = crypto_alloc_aead(name, type, mask); in aead_bind() 478 if (IS_ERR(aead)) { in aead_bind() 480 return ERR_CAST(aead); in aead_bind() 485 crypto_free_aead(aead); in aead_bind() [all …]
|
D | gcm.c | 44 struct crypto_aead_spawn aead; member 92 static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_gcm_setkey() argument 95 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_setkey() 110 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_gcm_setkey() 138 crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) & in crypto_gcm_setkey() 180 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_init_crypt() local 181 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_init_crypt() 414 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_enc_copy_hash() local 420 crypto_aead_authsize(aead), 1); in gcm_enc_copy_hash() 468 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_verify() local [all …]
|
D | ccm.c | 87 static int crypto_ccm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_ccm_setkey() argument 90 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_setkey() 96 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 103 crypto_ahash_set_flags(mac, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 130 struct crypto_aead *aead = crypto_aead_reqtfm(req); in format_input() local 135 m = crypto_aead_authsize(aead); in format_input() 172 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_auth() local 173 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_auth() 230 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_encrypt_done() local 237 crypto_aead_authsize(aead), 1); in crypto_ccm_encrypt_done() [all …]
|
D | essiv.c | 53 struct crypto_aead *aead; member 102 crypto_aead_clear_flags(tctx->u.aead, CRYPTO_TFM_REQ_MASK); in essiv_aead_setkey() 103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 105 err = crypto_aead_setkey(tctx->u.aead, key, keylen); in essiv_aead_setkey() 131 return crypto_aead_setauthsize(tctx->u.aead, authsize); in essiv_aead_setauthsize() 246 aead_request_set_tfm(subreq, tctx->u.aead); in essiv_aead_crypt() 327 struct crypto_aead *aead; in essiv_aead_init_tfm() local 334 aead = crypto_spawn_aead(&ictx->u.aead_spawn); in essiv_aead_init_tfm() 335 if (IS_ERR(aead)) in essiv_aead_init_tfm() 336 return PTR_ERR(aead); in essiv_aead_init_tfm() [all …]
|
D | geniv.c | 109 int aead_init_geniv(struct crypto_aead *aead) in aead_init_geniv() argument 111 struct aead_geniv_ctx *ctx = crypto_aead_ctx(aead); in aead_init_geniv() 112 struct aead_instance *inst = aead_alg_instance(aead); in aead_init_geniv() 123 crypto_aead_ivsize(aead)); in aead_init_geniv() 139 crypto_aead_set_reqsize(aead, crypto_aead_reqsize(child) + in aead_init_geniv()
|
D | pcrypt.c | 98 struct crypto_aead *aead = crypto_aead_reqtfm(req); in pcrypt_aead_encrypt() local 99 struct pcrypt_aead_ctx *ctx = crypto_aead_ctx(aead); in pcrypt_aead_encrypt() 103 ictx = pcrypt_tfm_ictx(aead); in pcrypt_aead_encrypt() 147 struct crypto_aead *aead = crypto_aead_reqtfm(req); in pcrypt_aead_decrypt() local 148 struct pcrypt_aead_ctx *ctx = crypto_aead_ctx(aead); in pcrypt_aead_decrypt() 152 ictx = pcrypt_tfm_ictx(aead); in pcrypt_aead_decrypt()
|
D | crypto_user_stat.c | 39 raead.stat_encrypt_cnt = atomic64_read(&alg->stats.aead.encrypt_cnt); in crypto_report_aead() 40 raead.stat_encrypt_tlen = atomic64_read(&alg->stats.aead.encrypt_tlen); in crypto_report_aead() 41 raead.stat_decrypt_cnt = atomic64_read(&alg->stats.aead.decrypt_cnt); in crypto_report_aead() 42 raead.stat_decrypt_tlen = atomic64_read(&alg->stats.aead.decrypt_tlen); in crypto_report_aead() 43 raead.stat_err_cnt = atomic64_read(&alg->stats.aead.err_cnt); in crypto_report_aead()
|
D | testmgr.c | 150 struct aead_test_suite aead; member 2321 &ctx->test_desc->suite.aead, in try_to_generate_inauthentic_testvec() 2442 &ctx->test_desc->suite.aead, in test_aead_vs_generic_impl() 2491 for (i = 0; i < test_desc->suite.aead.count; i++) in test_aead_extra() 2493 test_desc->suite.aead.vecs[i].klen); in test_aead_extra() 2548 const struct aead_test_suite *suite = &desc->suite.aead; in alg_test_aead() 4166 .aead = __VECS(aegis128_tv_template) 4178 .aead = __VECS(hmac_md5_ecb_cipher_null_tv_template) 4185 .aead = __VECS(hmac_sha1_aes_cbc_tv_temp) 4191 .aead = __VECS(hmac_sha1_des_cbc_tv_temp) [all …]
|
D | algapi.c | 1097 atomic64_inc(&alg->stats.aead.err_cnt); in crypto_stats_aead_encrypt() 1099 atomic64_inc(&alg->stats.aead.encrypt_cnt); in crypto_stats_aead_encrypt() 1100 atomic64_add(cryptlen, &alg->stats.aead.encrypt_tlen); in crypto_stats_aead_encrypt() 1110 atomic64_inc(&alg->stats.aead.err_cnt); in crypto_stats_aead_decrypt() 1112 atomic64_inc(&alg->stats.aead.decrypt_cnt); in crypto_stats_aead_decrypt() 1113 atomic64_add(cryptlen, &alg->stats.aead.decrypt_tlen); in crypto_stats_aead_decrypt()
|
D | fips140-selftests.c | 135 struct aead_testvec aead; member 302 const struct aead_testvec *vec = &test->aead; in fips_test_aead() 769 .aead = {
|
D | chacha20poly1305.c | 474 static int chachapoly_setkey(struct crypto_aead *aead, const u8 *key, in chachapoly_setkey() argument 477 struct chachapoly_ctx *ctx = crypto_aead_ctx(aead); in chachapoly_setkey() 486 crypto_skcipher_set_flags(ctx->chacha, crypto_aead_get_flags(aead) & in chachapoly_setkey()
|
D | aegis128-core.c | 366 static int crypto_aegis128_setkey(struct crypto_aead *aead, const u8 *key, in crypto_aegis128_setkey() argument 369 struct aegis_ctx *ctx = crypto_aead_ctx(aead); in crypto_aegis128_setkey()
|
D | Makefile | 16 obj-$(CONFIG_CRYPTO_AEAD2) += aead.o
|