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
6c8d40f7
Commit
6c8d40f7
authored
Aug 18, 2014
by
Niels Möller
Browse files
Renamed curve25519_base -> curve25519_mul_g.
parent
d55f928a
Changes
5
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
6c8d40f7
2014-08-18 Niels Möller <nisse@lysator.liu.se>
* curve25519-mul-g.c (curve25519_mul_g): Renamed file and
function, updated callers.
* curve25519-base.c (curve25519_base): ... old names.
* Makefile.in (hogweed_SOURCES): Updated for rename.
* eccdata.c (output_curve): Compute constants needed for
Shanks-Tonelli.
* ecc-25519.c (ecc_modp_powm_2kp1, ecc_25519_sqrt): New functions.
...
...
Makefile.in
View file @
6c8d40f7
...
...
@@ -174,7 +174,7 @@ hogweed_SOURCES = sexp.c sexp-format.c \
ecc-point.c ecc-scalar.c ecc-point-mul.c ecc-point-mul-g.c
\
ecc-ecdsa-sign.c ecdsa-sign.c
\
ecc-ecdsa-verify.c ecdsa-verify.c ecdsa-keygen.c
\
curve25519-
base
.c
\
curve25519-
mul-g
.c
\
$(OPT_HOGWEED_SOURCES)
HEADERS
=
aes.h arcfour.h arctwo.h asn1.h blowfish.h
\
...
...
curve25519-
base
.c
→
curve25519-
mul-g
.c
View file @
6c8d40f7
/* curve25519-
base
.c
/* curve25519-
mul-g
.c
Copyright (C) 2014 Niels Möller
...
...
@@ -42,7 +42,7 @@
/* Intended to be compatible with NaCl's crypto_scalarmult_base. */
void
curve25519_
base
(
uint8_t
*
r
,
const
uint8_t
*
n
)
curve25519_
mul_g
(
uint8_t
*
r
,
const
uint8_t
*
n
)
{
uint8_t
t
[
CURVE25519_SIZE
];
mp_limb_t
*
scratch
;
...
...
curve25519.h
View file @
6c8d40f7
...
...
@@ -39,11 +39,11 @@ extern "C" {
#endif
/* Name mangling */
#define curve25519_
base
nettle_curve25519_
base
#define curve25519_
mul_g
nettle_curve25519_
mul_g
#define CURVE25519_SIZE 32
void
curve25519_
base
(
uint8_t
*
q
,
const
uint8_t
*
n
);
curve25519_
mul_g
(
uint8_t
*
q
,
const
uint8_t
*
n
);
#endif
/* NETTLE_CURVE25519_H */
testsuite/curve25519-dh-test.c
View file @
6c8d40f7
...
...
@@ -165,10 +165,10 @@ static void
test_g
(
const
uint8_t
*
s
,
const
uint8_t
*
r
)
{
uint8_t
p
[
CURVE25519_SIZE
];
curve25519_
base
(
p
,
s
);
curve25519_
mul_g
(
p
,
s
);
if
(
!
MEMEQ
(
CURVE25519_SIZE
,
p
,
r
))
{
printf
(
"curve25519_
base
failure:
\n
s = "
);
printf
(
"curve25519_
mul_g
failure:
\n
s = "
);
print_hex
(
CURVE25519_SIZE
,
s
);
printf
(
"
\n
p = "
);
print_hex
(
CURVE25519_SIZE
,
p
);
...
...
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