summaryrefslogtreecommitdiff
path: root/rsa-sha512-verify.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2012-06-03 22:02:59 +0200
committerNiels Möller <nisse@lysator.liu.se>2012-06-03 22:02:59 +0200
commitadad6eaac2d03fba830eb1630b5458c1ac7f1907 (patch)
treeea02b675e2cf8f3c6584f35f9f73fd0d072b3428 /rsa-sha512-verify.c
parent0589865876f8c89047eaee1698071e31956b0480 (diff)
downloadnettle-adad6eaac2d03fba830eb1630b5458c1ac7f1907.tar.gz
Changes to pkcs1_signature_prefix interface.
Diffstat (limited to 'rsa-sha512-verify.c')
-rw-r--r--rsa-sha512-verify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rsa-sha512-verify.c b/rsa-sha512-verify.c
index 0fca6b87..90f82347 100644
--- a/rsa-sha512-verify.c
+++ b/rsa-sha512-verify.c
@@ -42,10 +42,9 @@ rsa_sha512_verify(const struct rsa_public_key *key,
int res;
mpz_t m;
- assert(key->size > 0);
mpz_init(m);
- res = (pkcs1_rsa_sha512_encode(m, key->size - 1, hash)
+ res = (pkcs1_rsa_sha512_encode(m, key->size, hash)
&& _rsa_verify(key, m, s));
mpz_clear(m);
@@ -61,10 +60,9 @@ rsa_sha512_verify_digest(const struct rsa_public_key *key,
int res;
mpz_t m;
- assert(key->size > 0);
mpz_init(m);
- res = (pkcs1_rsa_sha512_encode_digest(m, key->size - 1, digest)
+ res = (pkcs1_rsa_sha512_encode_digest(m, key->size, digest)
&& _rsa_verify(key, m, s));
mpz_clear(m);