Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wim Lewis
nettle
Commits
c0ea0a1f
Commit
c0ea0a1f
authored
Mar 25, 2015
by
Niels Möller
Browse files
Fixed allocation bug and overwrite in ed25519_sha512_public_key.
parent
9234e662
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
c0ea0a1f
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.
...
...
ed25519-sha512-pubkey.c
View file @
c0ea0a1f
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment