Lines Matching defs:params
55 static int dh_set_params(struct dh_ctx *ctx, struct dh *params)
57 if (dh_check_params_length(params->p_size << 3))
60 ctx->p = mpi_read_raw_data(params->p, params->p_size);
64 ctx->g = mpi_read_raw_data(params->g, params->g_size);
75 struct dh params;
80 if (crypto_dh_decode_key(buf, len, ¶ms) < 0)
83 if (dh_set_params(ctx, ¶ms) < 0)
86 ctx->xa = mpi_read_raw_data(params.key, params.key_size);
462 struct dh params = {};
468 err = __crypto_dh_decode_key(buffer, len, ¶ms);
471 if (params.p_size || params.g_size)
475 params.p = inst_ctx->safe_prime->p;
476 params.p_size = inst_ctx->safe_prime->p_size;
477 params.g = safe_prime_g;
478 params.g_size = sizeof(safe_prime_g);
480 if (!params.key_size) {
482 ¶ms.key_size);
485 params.key = key;
488 buf_size = crypto_dh_key_len(¶ms);
495 err = crypto_dh_encode_key(buf, buf_size, ¶ms);