Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
d5e787e3
Commit
d5e787e3
authored
Mar 10, 2015
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed return type for curve25519_mul to void.
parent
ac804944
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
15 deletions
+11
-15
ChangeLog
ChangeLog
+7
-0
curve25519-mul.c
curve25519-mul.c
+1
-2
curve25519.h
curve25519.h
+1
-2
examples/hogweed-benchmark.c
examples/hogweed-benchmark.c
+1
-2
testsuite/curve25519-dh-test.c
testsuite/curve25519-dh-test.c
+1
-9
No files found.
ChangeLog
View file @
d5e787e3
2015-03-10 Niels Möller <nisse@diamant.hack.org>
* curve25519-mul.c (curve25519_mul): Changed return type to void.
* examples/hogweed-benchmark.c (bench_curve25519_mul): Drop check
of curve25519_mul return value.
* testsuite/curve25519-dh-test.c (test_a): Likewise.
2015-02-26 Niels Möller <nisse@diamant.hack.org>
* nettle.texinfo: Document curve25519 and eddsa.
...
...
curve25519-mul.c
View file @
d5e787e3
...
...
@@ -41,7 +41,7 @@
#include "ecc-internal.h"
/* Intended to be compatible with NaCl's crypto_scalarmult. */
int
void
curve25519_mul
(
uint8_t
*
q
,
const
uint8_t
*
n
,
const
uint8_t
*
p
)
{
const
struct
ecc_curve
*
ecc
=
&
nettle_curve25519
;
...
...
@@ -139,5 +139,4 @@ curve25519_mul (uint8_t *q, const uint8_t *n, const uint8_t *p)
mpn_get_base256_le
(
q
,
CURVE25519_SIZE
,
x2
,
ecc
->
p
.
size
);
gmp_free_limbs
(
scratch
,
itch
);
return
1
;
}
curve25519.h
View file @
d5e787e3
...
...
@@ -47,8 +47,7 @@ extern "C" {
void
curve25519_mul_g
(
uint8_t
*
q
,
const
uint8_t
*
n
);
/* FIXME: Switch to void return type? */
int
void
curve25519_mul
(
uint8_t
*
q
,
const
uint8_t
*
n
,
const
uint8_t
*
p
);
#ifdef __cplusplus
...
...
examples/hogweed-benchmark.c
View file @
d5e787e3
...
...
@@ -669,8 +669,7 @@ bench_curve25519_mul (void *p)
{
struct
curve25519_ctx
*
ctx
=
p
;
char
q
[
CURVE25519_SIZE
];
if
(
!
curve25519_mul
(
q
,
ctx
->
s
,
ctx
->
x
))
die
(
"Internal error, curve25519_mul failed.
\n
"
);
curve25519_mul
(
q
,
ctx
->
s
,
ctx
->
x
);
}
static
void
...
...
testsuite/curve25519-dh-test.c
View file @
d5e787e3
...
...
@@ -55,15 +55,7 @@ static void
test_a
(
const
uint8_t
*
s
,
const
uint8_t
*
b
,
const
uint8_t
*
r
)
{
uint8_t
p
[
CURVE25519_SIZE
];
if
(
!
curve25519_mul
(
p
,
s
,
b
))
{
printf
(
"curve25519_mul returned 0:
\n
s = "
);
print_hex
(
CURVE25519_SIZE
,
s
);
printf
(
"
\n
b = "
);
print_hex
(
CURVE25519_SIZE
,
b
);
printf
(
"
\n
"
);
abort
();
}
curve25519_mul
(
p
,
s
,
b
);
if
(
!
MEMEQ
(
CURVE25519_SIZE
,
p
,
r
))
{
...
...
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