diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2024-04-04 10:18:55 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-04-12 15:07:52 +0800 |
commit | 4dc50330a437e91063c68da074574bf6459d68a5 (patch) | |
tree | 45b1acead0c4aa6e15a8216fe1638f1ca1b0394d /crypto/scompress.c | |
parent | a7d45ba77d3d20ba029532090da4cbf058d3f36b (diff) |
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/scompress.c')
0 files changed, 0 insertions, 0 deletions