Lines Matching +full:0 +full:xa
19 MPI xa; /* Value is guaranteed to be set. */ member
27 mpi_free(ctx->xa); in dh_clear_ctx()
28 memset(ctx, 0, sizeof(*ctx)); in dh_clear_ctx()
33 * ya = g^xa mod p; [RFC2631 sec 2.1.1]
35 * ZZ = yb^xa mod p; [RFC2631 sec 2.1.1]
39 /* val = base^xa mod p */ in _compute_val()
40 return mpi_powm(val, base, ctx->xa, ctx->p); in _compute_val()
50 return (p_len < 1536) ? -EINVAL : 0; in dh_check_params_length()
72 return 0; in dh_set_params()
84 if (crypto_dh_decode_key(buf, len, ¶ms) < 0) in dh_set_secret()
87 if (dh_set_params(ctx, ¶ms) < 0) in dh_set_secret()
90 ctx->xa = mpi_read_raw_data(params.key, params.key_size); in dh_set_secret()
91 if (!ctx->xa) in dh_set_secret()
94 return 0; in dh_set_secret()
121 if (mpi_cmp_ui(y, 1) < 1 || mpi_cmp(y, ctx->p) >= 0) in dh_is_pubkey_valid()
126 MPI val = mpi_alloc(0); in dh_is_pubkey_valid()
143 if (ret != 0) in dh_is_pubkey_valid()
147 return 0; in dh_is_pubkey_valid()
154 MPI base, val = mpi_alloc(0); in dh_compute_value()
155 int ret = 0; in dh_compute_value()
161 if (unlikely(!ctx->xa)) { in dh_compute_value()
195 pone = mpi_alloc(0); in dh_compute_value()
224 if (sign < 0) in dh_compute_value()