Commit c0ea0a1f authored by Niels Möller's avatar Niels Möller

Fixed allocation bug and overwrite in ed25519_sha512_public_key.

parent 9234e662
2015-03-25 Niels Möller <nisse@diamant.hack.org>
* ed25519-sha512-pubkey.c: Fix stack overwrite. The digest array
must have room for a complete sha512 digest.
2015-03-19 Niels Möller <nisse@diamant.hack.org>
* Makefile.in (OPT_HOGWEED_SOURCES): Deleted make variable.
......
......@@ -43,7 +43,7 @@ ed25519_sha512_public_key (uint8_t *pub, const uint8_t *priv)
{
const struct ecc_curve *ecc = &_nettle_curve25519;
struct sha512_ctx ctx;
uint8_t digest[ED25519_KEY_SIZE];
uint8_t digest[SHA512_DIGEST_SIZE];
mp_size_t itch = ecc->q.size + _eddsa_public_key_itch (ecc);
mp_limb_t *scratch = gmp_alloc_limbs (itch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment