summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/x509_public_key.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2024-04-04 10:18:55 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2024-04-12 15:07:52 +0800
commitac4cf77b106feb9dfa4c0f192a4fe7f59818f48b (patch)
tree92926784403f8b3ae48a0d467867640f07be1ed3 /crypto/asymmetric_keys/x509_public_key.c
parent62cba55fd3c30be1bcfd4aa45cb95fb60761c653 (diff)
downloadlinux-crypto-ac4cf77b106feb9dfa4c0f192a4fe7f59818f48b.tar.gz
linux-crypto-ac4cf77b106feb9dfa4c0f192a4fe7f59818f48b.zip
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/asymmetric_keys/x509_public_key.c')
0 files changed, 0 insertions, 0 deletions