A subsequent patch will make the crypto/dh's dh_is_pubkey_valid() toReviewed-by: Hannes Reinecke <hare@xxxxxxx>
calculate the Q value from the P domain parameter for safe-prime groups,
for which by definition Q = (P - 1)/2. However, dh_is_pubkey_valid() will
need to check first whether the group in question is actually a safe-prime
group. In order to make this information available, introduce a new
->group_id member to struct dh_ctx and let dh_set_params() set it to the
value found in the struct dh as deserialized via crypto_dh_decode_key().
Signed-off-by: Nicolai Stange <nstange@xxxxxxx>
---
crypto/dh.c | 3 +++
1 file changed, 3 insertions(+)