/crypto/ |
D | authenc.c | 24 struct crypto_skcipher_spawn enc; member 30 struct crypto_skcipher *enc; member 89 struct crypto_skcipher *enc = ctx->enc; in crypto_authenc_setkey() local 106 crypto_skcipher_clear_flags(enc, CRYPTO_TFM_REQ_MASK); in crypto_authenc_setkey() 107 crypto_skcipher_set_flags(enc, crypto_aead_get_flags(authenc) & in crypto_authenc_setkey() 109 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_setkey() 110 crypto_aead_set_flags(authenc, crypto_skcipher_get_flags(enc) & in crypto_authenc_setkey() 209 struct crypto_skcipher *enc = ctx->enc; in crypto_authenc_encrypt() local 227 skcipher_request_set_tfm(skreq, enc); in crypto_authenc_encrypt() 265 skcipher_request_set_tfm(skreq, ctx->enc); in crypto_authenc_decrypt_tail() [all …]
|
D | authencesn.c | 27 struct crypto_skcipher_spawn enc; member 33 struct crypto_skcipher *enc; member 63 struct crypto_skcipher *enc = ctx->enc; in crypto_authenc_esn_setkey() local 80 crypto_skcipher_clear_flags(enc, CRYPTO_TFM_REQ_MASK); in crypto_authenc_esn_setkey() 81 crypto_skcipher_set_flags(enc, crypto_aead_get_flags(authenc_esn) & in crypto_authenc_esn_setkey() 83 err = crypto_skcipher_setkey(enc, keys.enckey, keys.enckeylen); in crypto_authenc_esn_setkey() 84 crypto_aead_set_flags(authenc_esn, crypto_skcipher_get_flags(enc) & in crypto_authenc_esn_setkey() 198 struct crypto_skcipher *enc = ctx->enc; in crypto_authenc_esn_encrypt() local 217 skcipher_request_set_tfm(skreq, enc); in crypto_authenc_esn_encrypt() 263 skcipher_request_set_tfm(skreq, ctx->enc); in crypto_authenc_esn_decrypt_tail() [all …]
|
D | tcrypt.c | 156 static int do_mult_aead_op(struct test_mb_aead_data *data, int enc, in do_mult_aead_op() argument 163 if (enc == ENCRYPT) in do_mult_aead_op() 182 static int test_mb_aead_jiffies(struct test_mb_aead_data *data, int enc, in test_mb_aead_jiffies() argument 196 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_jiffies() 209 static int test_mb_aead_cycles(struct test_mb_aead_data *data, int enc, in test_mb_aead_cycles() argument 223 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_cycles() 233 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_cycles() 250 static void test_mb_aead_speed(const char *algo, int enc, int secs, in test_mb_aead_speed() argument 275 if (enc == ENCRYPT) in test_mb_aead_speed() 382 *b_size + (enc ? 0 : authsize), in test_mb_aead_speed() [all …]
|
D | xts.c | 87 static int xor_tweak(struct skcipher_request *req, bool second_pass, bool enc) in xor_tweak() argument 115 if (!enc) { in xor_tweak() 121 if (enc && second_pass) in xor_tweak() 137 static int xor_tweak_pre(struct skcipher_request *req, bool enc) in xor_tweak_pre() argument 139 return xor_tweak(req, false, enc); in xor_tweak_pre() 142 static int xor_tweak_post(struct skcipher_request *req, bool enc) in xor_tweak_post() argument 144 return xor_tweak(req, true, enc); in xor_tweak_post()
|
D | algif_aead.c | 58 return ctx->used >= ctx->aead_assoclen + (ctx->enc ? 0 : as); in aead_sufficient_data() 141 if (ctx->enc) in _aead_recvmsg() 215 if (ctx->enc) { in _aead_recvmsg() 296 err = ctx->enc ? crypto_aead_encrypt(&areq->cra_u.aead_req) : in _aead_recvmsg() 309 err = crypto_wait_req(ctx->enc ? in _aead_recvmsg() 568 ctx->enc = 0; in aead_accept_parent_nokey()
|
D | adiantum.c | 93 bool enc; /* true if encrypting, false if decrypting */ member 300 if (!rctx->enc) in adiantum_finish() 330 static int adiantum_crypt(struct skcipher_request *req, bool enc) in adiantum_crypt() argument 343 rctx->enc = enc; in adiantum_crypt() 360 if (enc) in adiantum_crypt()
|
D | testmgr.c | 1837 static int test_aead_vec_cfg(const char *driver, int enc, in test_aead_vec_cfg() argument 1849 const char *op = enc ? "encryption" : "decryption"; in test_aead_vec_cfg() 1904 input[1].iov_base = enc ? (void *)vec->ptext : (void *)vec->ctext; in test_aead_vec_cfg() 1905 input[1].iov_len = enc ? vec->plen : vec->clen; in test_aead_vec_cfg() 1907 vec->alen + (enc ? vec->plen : in test_aead_vec_cfg() 1909 vec->alen + (enc ? vec->clen : in test_aead_vec_cfg() 1922 enc ? vec->plen : vec->clen, iv); in test_aead_vec_cfg() 1926 err = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); in test_aead_vec_cfg() 1932 if (req->cryptlen != (enc ? vec->plen : vec->clen) || in test_aead_vec_cfg() 1943 if (req->cryptlen != (enc ? vec->plen : vec->clen)) in test_aead_vec_cfg() [all …]
|
D | essiv.c | 158 static int essiv_skcipher_crypt(struct skcipher_request *req, bool enc) in essiv_skcipher_crypt() argument 172 return enc ? crypto_skcipher_encrypt(subreq) : in essiv_skcipher_crypt() 196 static int essiv_aead_crypt(struct aead_request *req, bool enc) in essiv_aead_crypt() argument 213 if (req->src == req->dst || !enc) { in essiv_aead_crypt() 265 err = enc ? crypto_aead_encrypt(subreq) : in essiv_aead_crypt()
|
D | algif_skcipher.c | 125 err = ctx->enc ? in _skcipher_recvmsg() 140 err = crypto_wait_req(ctx->enc ? in _skcipher_recvmsg() 359 ctx->enc = 0; in skcipher_accept_parent_nokey()
|
D | gcm.c | 83 static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc); 988 static int crypto_rfc4543_crypt(struct aead_request *req, bool enc) in crypto_rfc4543_crypt() argument 1000 err = crypto_rfc4543_copy_src_to_dst(req, enc); in crypto_rfc4543_crypt() 1012 enc ? 0 : authsize, iv); in crypto_rfc4543_crypt() 1016 return enc ? crypto_aead_encrypt(subreq) : crypto_aead_decrypt(subreq); in crypto_rfc4543_crypt() 1019 static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc) in crypto_rfc4543_copy_src_to_dst() argument 1025 (enc ? 0 : authsize); in crypto_rfc4543_copy_src_to_dst()
|
D | af_alg.c | 824 bool enc = 0; in af_alg_sendmsg() local 836 enc = 1; in af_alg_sendmsg() 839 enc = 0; in af_alg_sendmsg() 856 ctx->enc = enc; in af_alg_sendmsg()
|
/crypto/asymmetric_keys/ |
D | signature.c | 81 const void *data, void *enc) in encrypt_blob() argument 84 return asymmetric_key_eds_op(params, data, enc); in encrypt_blob() 102 const void *enc, void *data) in decrypt_blob() argument 105 return asymmetric_key_eds_op(params, enc, data); in decrypt_blob() 123 const void *data, void *enc) in create_signature() argument 126 return asymmetric_key_eds_op(params, data, enc); in create_signature()
|