summaryrefslogtreecommitdiff
path: root/crypto/ecdsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ecdsa.c')
-rw-r--r--crypto/ecdsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ecdsa.c b/crypto/ecdsa.c
index 9b84ab50..75d3eea8 100644
--- a/crypto/ecdsa.c
+++ b/crypto/ecdsa.c
@@ -266,7 +266,7 @@ static unsigned int ecdsa_max_size(struct crypto_akcipher *tfm)
{
struct ecc_ctx *ctx = akcipher_tfm_ctx(tfm);
- return ctx->pub_key.ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
+ return DIV_ROUND_UP(ctx->curve->nbits, 8);
}
static int ecdsa_nist_p384_init_tfm(struct crypto_akcipher *tfm)