summaryrefslogtreecommitdiffstats
path: root/crypto/kpp.c
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-02 23:47:52 +0100
commit35d2bf20683f60288441844ab19ce671075643e6 (patch)
treea4d663305324fd63e4bea9e9a145fe9928d77236 /crypto/kpp.c
parentlib/mpi: export mpi_rshift (diff)
downloadlinux-35d2bf20683f60288441844ab19ce671075643e6.tar.xz
linux-35d2bf20683f60288441844ab19ce671075643e6.zip
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/kpp.c')
0 files changed, 0 insertions, 0 deletions