Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
b645d892
Commit
b645d892
authored
Oct 18, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaked argument order for _eddsa_verify.
parent
4418b01d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
ChangeLog
ChangeLog
+8
-0
eddsa-verify.c
eddsa-verify.c
+1
-1
eddsa.h
eddsa.h
+1
-1
testsuite/eddsa-verify-test.c
testsuite/eddsa-verify-test.c
+6
-6
No files found.
ChangeLog
View file @
b645d892
2014-10-18 Niels Möller <nisse@lysator.liu.se>
* eddsa-verify.c (_eddsa_verify): Change argument order, putting A
before ctx.
* eddsa.h: Updated prototype.
* testsuite/eddsa-verify-test.c (test_eddsa): Updated
_eddsa_verify calls.
2014-10-14 Niels Möller <nisse@lysator.liu.se>
* eddsa-verify.c (equal_h): New function.
...
...
eddsa-verify.c
View file @
b645d892
...
...
@@ -76,8 +76,8 @@ int
_eddsa_verify
(
const
struct
ecc_curve
*
ecc
,
const
struct
nettle_hash
*
H
,
const
uint8_t
*
pub
,
void
*
ctx
,
const
mp_limb_t
*
A
,
void
*
ctx
,
size_t
length
,
const
uint8_t
*
msg
,
const
uint8_t
*
signature
,
...
...
eddsa.h
View file @
b645d892
...
...
@@ -96,8 +96,8 @@ int
_eddsa_verify
(
const
struct
ecc_curve
*
ecc
,
const
struct
nettle_hash
*
H
,
const
uint8_t
*
pub
,
void
*
ctx
,
const
mp_limb_t
*
A
,
void
*
ctx
,
size_t
length
,
const
uint8_t
*
msg
,
const
uint8_t
*
signature
,
...
...
testsuite/eddsa-verify-test.c
View file @
b645d892
...
...
@@ -51,7 +51,7 @@ test_eddsa (const struct ecc_curve *ecc,
die
(
"Invalid eddsa public key.
\n
"
);
memcpy
(
csignature
,
signature
,
2
*
nbytes
);
if
(
!
_eddsa_verify
(
ecc
,
H
,
pub
,
ctx
,
A
,
if
(
!
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
,
msg
->
data
,
csignature
,
scratch
))
{
fprintf
(
stderr
,
"eddsa_verify failed with valid signature.
\n
"
);
...
...
@@ -68,7 +68,7 @@ test_eddsa (const struct ecc_curve *ecc,
memcpy
(
csignature
,
signature
,
2
*
nbytes
);
csignature
[
nbytes
/
3
]
^=
0x40
;
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
ctx
,
A
,
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
,
msg
->
data
,
csignature
,
scratch
))
{
fprintf
(
stderr
,
...
...
@@ -79,7 +79,7 @@ test_eddsa (const struct ecc_curve *ecc,
memcpy
(
csignature
,
signature
,
2
*
nbytes
);
csignature
[
5
*
nbytes
/
3
]
^=
0x8
;
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
ctx
,
A
,
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
,
msg
->
data
,
csignature
,
scratch
))
{
fprintf
(
stderr
,
...
...
@@ -90,7 +90,7 @@ test_eddsa (const struct ecc_curve *ecc,
memcpy
(
csignature
,
signature
,
2
*
nbytes
);
if
(
msg
->
length
==
0
)
{
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
ctx
,
A
,
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
3
,
"foo"
,
csignature
,
scratch
))
{
fprintf
(
stderr
,
...
...
@@ -100,7 +100,7 @@ test_eddsa (const struct ecc_curve *ecc,
}
else
{
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
ctx
,
A
,
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
-
1
,
msg
->
data
,
csignature
,
scratch
))
{
...
...
@@ -110,7 +110,7 @@ test_eddsa (const struct ecc_curve *ecc,
}
memcpy
(
csignature
,
signature
,
2
*
nbytes
);
cmsg
[
2
*
msg
->
length
/
3
]
^=
0x20
;
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
ctx
,
A
,
if
(
_eddsa_verify
(
ecc
,
H
,
pub
,
A
,
ctx
,
msg
->
length
,
cmsg
,
csignature
,
scratch
))
{
fprintf
(
stderr
,
...
...
Write
Preview
Markdown
is supported
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