Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
68fc6af9
Commit
68fc6af9
authored
Nov 24, 2014
by
Niels Möller
Browse files
Fixed eddsa test case.
parent
dac00f57
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
68fc6af9
2014-11-24 Niels Möller <nisse@lysator.liu.se>
* testsuite/eddsa-verify-test.c (test_eddsa): Fixed test case bug,
showing up as use of uninitialized data with valgrind.
2014-10-23 Niels Möller <nisse@lysator.liu.se>
* examples/nettle-benchmark.c (time_memxor): Allocate buffers as
...
...
testsuite/eddsa-verify-test.c
View file @
68fc6af9
...
...
@@ -87,11 +87,10 @@ test_eddsa (const struct ecc_curve *ecc,
goto
fail
;
}
memcpy
(
csignature
,
signature
,
2
*
nbytes
);
if
(
msg
->
length
==
0
)
{
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
3
,
"foo"
,
c
signature
,
scratch
))
3
,
"foo"
,
signature
,
scratch
))
{
fprintf
(
stderr
,
"ecdsa_verify unexpectedly succeeded with different message.
\n
"
);
...
...
@@ -102,16 +101,16 @@ test_eddsa (const struct ecc_curve *ecc,
{
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
-
1
,
msg
->
data
,
c
signature
,
scratch
))
signature
,
scratch
))
{
fprintf
(
stderr
,
"ecdsa_verify unexpectedly succeeded with truncated message.
\n
"
);
goto
fail
;
}
memcpy
(
c
signature
,
signature
,
2
*
nbytes
);
memcpy
(
c
msg
,
msg
->
data
,
msg
->
length
);
cmsg
[
2
*
msg
->
length
/
3
]
^=
0x20
;
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
,
cmsg
,
c
signature
,
scratch
))
msg
->
length
,
cmsg
,
signature
,
scratch
))
{
fprintf
(
stderr
,
"ecdsa_verify unexpectedly succeeded with modified message.
\n
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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