Lines Matching defs:enc

82  * @enc: True, if this is an encode request
91 bool enc;
166 * @enc: Flag indicating either encryption or decryption
175 u8 enc;
194 * @enc: true if this is an encode request
213 bool enc;
478 u8 enc, u8 *sc_buf)
485 if (enc)
494 if (ad->inv_key && !enc) {
559 if (cfg->enc) {
696 struct algo_data *ad, u8 enc, u32 *swinfo)
707 if (enc)
736 if (sa_set_sc_enc(ad, enc_key, enc_key_sz, enc,
816 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys,
819 sa_free_ctx_info(&ctx->enc, data);
835 ret = sa_init_ctx_info(&ctx->enc, data);
840 sa_free_ctx_info(&ctx->enc, data);
853 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys,
887 if (sa_init_sc(&ctx->enc, key, keylen, NULL, 0, ad, 1,
888 &ctx->enc.epib[1]))
892 (u8 *)ctx->enc.cmdl,
893 &ctx->enc.cmdl_upd_info);
897 ctx->enc.cmdl_size = cmdl_len;
1065 struct sa_ctx_info *sa_ctx = req->enc ? &req->ctx->enc : &req->ctx->dec;
1109 if (req->enc)
1228 rxd->enc = req->enc;
1271 static int sa_cipher_run(struct skcipher_request *req, u8 *iv, int enc)
1296 if (enc)
1311 sa_req.enc = enc;
1419 sa_req.enc = true;
1449 if (sa_init_sc(&ctx->enc, NULL, 0, NULL, 0, ad, 0,
1450 &ctx->enc.epib[1]))
1454 (u8 *)ctx->enc.cmdl,
1455 &ctx->enc.cmdl_upd_info);
1459 ctx->enc.cmdl_size = cmdl_len;
1476 ret = sa_init_ctx_info(&ctx->enc, data);
1500 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys,
1657 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys,
1661 sa_free_ctx_info(&ctx->enc, data);
1693 if (rxd->enc) {
1737 ret = sa_init_ctx_info(&ctx->enc, data);
1743 sa_free_ctx_info(&ctx->enc, data);
1748 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys,
1774 sa_free_ctx_info(&ctx->enc, data);
1810 cfg.enc = true;
1819 if (sa_init_sc(&ctx->enc, keys.enckey, keys.enckeylen,
1821 ad, 1, &ctx->enc.epib[1]))
1825 (u8 *)ctx->enc.cmdl,
1826 &ctx->enc.cmdl_upd_info);
1830 ctx->enc.cmdl_size = cmdl_len;
1838 cfg.enc = false;
1888 static int sa_aead_run(struct aead_request *req, u8 *iv, int enc)
1898 if (!enc) {
1916 ret = enc ? crypto_aead_encrypt(subreq) :
1927 sa_req.enc = enc;