summaryrefslogtreecommitdiff
path: root/crypto/async_tx
diff options
context:
space:
mode:
authorNicolai Stange <nstange@suse.de>2022-02-21 13:11:01 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2022-03-03 10:47:52 +1200
commit35d2bf20683f60288441844ab19ce671075643e6 (patch)
treea4d663305324fd63e4bea9e9a145fe9928d77236 /crypto/async_tx
parent81771ff2411a4cd1224c4b16e0b4247e71bba0de (diff)
crypto: dh - calculate Q from P for the full public key verification
As the ->q in struct dh_ctx gets never set anywhere, the code in dh_is_pubkey_valid() for doing the full public key validation in accordance to SP800-56Arev3 is effectively dead. However, for safe-prime groups Q = (P - 1)/2 by definition and as the safe-prime groups are the only possible groups in FIPS mode (via those ffdheXYZ() templates), this enables dh_is_pubkey_valid() to calculate Q on the fly for these. Implement this. With this change, the last code accessing struct dh_ctx's ->q is now gone. Remove this member from struct dh_ctx. Signed-off-by: Nicolai Stange <nstange@suse.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/async_tx')
0 files changed, 0 insertions, 0 deletions