Lines Matching refs:ecdh

120 		struct hpre_ecdh_ctx ecdh;  member
135 struct kpp_request *ecdh; member
1200 if (is_ecdh && ctx->ecdh.p) { in hpre_ecc_clear_ctx()
1202 memzero_explicit(ctx->ecdh.p + shift, sz); in hpre_ecc_clear_ctx()
1203 dma_free_coherent(dev, sz << 3, ctx->ecdh.p, ctx->ecdh.dma_p); in hpre_ecc_clear_ctx()
1204 ctx->ecdh.p = NULL; in hpre_ecc_clear_ctx()
1252 static int hpre_ecdh_fill_curve(struct hpre_ctx *ctx, struct ecdh *params, in hpre_ecdh_fill_curve()
1257 void *p = ctx->ecdh.p + ctx->key_sz - cur_sz; in hpre_ecdh_fill_curve()
1258 void *a = ctx->ecdh.p + shifta - cur_sz; in hpre_ecdh_fill_curve()
1259 void *b = ctx->ecdh.p + shiftb - cur_sz; in hpre_ecdh_fill_curve()
1260 void *x = ctx->ecdh.g + ctx->key_sz - cur_sz; in hpre_ecdh_fill_curve()
1261 void *y = ctx->ecdh.g + shifta - cur_sz; in hpre_ecdh_fill_curve()
1304 static int hpre_ecdh_set_param(struct hpre_ctx *ctx, struct ecdh *params) in hpre_ecdh_set_param()
1320 if (!ctx->ecdh.p) { in hpre_ecdh_set_param()
1321 ctx->ecdh.p = dma_alloc_coherent(dev, sz << 3, &ctx->ecdh.dma_p, in hpre_ecdh_set_param()
1323 if (!ctx->ecdh.p) in hpre_ecdh_set_param()
1328 ctx->ecdh.g = ctx->ecdh.p + shift; in hpre_ecdh_set_param()
1329 ctx->ecdh.dma_g = ctx->ecdh.dma_p + shift; in hpre_ecdh_set_param()
1334 dma_free_coherent(dev, sz << 3, ctx->ecdh.p, ctx->ecdh.dma_p); in hpre_ecdh_set_param()
1335 ctx->ecdh.p = NULL; in hpre_ecdh_set_param()
1353 static int ecdh_gen_privkey(struct hpre_ctx *ctx, struct ecdh *params) in ecdh_gen_privkey()
1380 struct ecdh params; in hpre_ecdh_set_secret()
1412 memcpy(ctx->ecdh.p + sz_shift, params.key, params.key_size); in hpre_ecdh_set_secret()
1454 areq = req->areq.ecdh; in hpre_ecdh_cb()
1487 h_req->areq.ecdh = req; in hpre_ecdh_msg_request_set()
1492 msg->key = cpu_to_le64(ctx->ecdh.dma_p); in hpre_ecdh_msg_request_set()
1583 msg->in = cpu_to_le64(ctx->ecdh.dma_g); in hpre_ecdh_compute_value()