summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2024-04-04 17:18:55 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2024-04-12 10:07:52 +0300
commit4dc50330a437e91063c68da074574bf6459d68a5 (patch)
tree45b1acead0c4aa6e15a8216fe1638f1ca1b0394d /crypto/algapi.c
parenta7d45ba77d3d20ba029532090da4cbf058d3f36b (diff)
downloadlinux-4dc50330a437e91063c68da074574bf6459d68a5.tar.xz
crypto: asymmetric_keys - Adjust signature size calculation for NIST P521
Adjust the calculation of the maximum signature size for support of NIST P521. While existing curves may prepend a 0 byte to their coordinates (to make the number positive), NIST P521 will not do this since only the first bit in the most significant byte is used. If the encoding of the x & y coordinates requires at least 128 bytes then an additional byte is needed for the encoding of the length. Take this into account when calculating the maximum signature size. Reviewed-by: Lukas Wunner <lukas@wunner.de> Tested-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algapi.c')
0 files changed, 0 insertions, 0 deletions