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
b5b6bd9b
Commit
b5b6bd9b
authored
Jul 11, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eccdata: Corrected curve25519-related constant. And output the constant.
parent
93ea0d33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
ChangeLog
ChangeLog
+6
-0
eccdata.c
eccdata.c
+8
-6
No files found.
ChangeLog
View file @
b5b6bd9b
2014-07-11 Niels Möller <nisse@lysator.liu.se>
* eccdata.c (ecc_curve_init): For curve 25519, use correct
constant for edwards coordinate transform, and output the constant
as ecc_edwards.
2014-07-06 Niels Möller <nisse@lysator.liu.se>
* eccdata.c: Use separate is_zero flag to represent the neutral
...
...
eccdata.c
View file @
b5b6bd9b
...
...
@@ -565,11 +565,10 @@ ecc_curve_init (struct ecc_curve *ecc, unsigned bit_size)
*/
"20ae19a1b8a086b4e01edd2c7748d14c"
"923d4d7e6d7c61b229e9c5a27eced3d9"
,
/* (121665/121666) mod p, from PARI/GP
c = Mod(121665, p); c / (c+1)
*/
"2dfc9311d490018c7338bf8688861767"
"ff8ff5b2bebe27548a14b235eca6874a"
);
/* sqrt(486664) mod p, from PARI/GP
sqrt(Mod(486664, p)) */
"141b0b6806563d503de05885280b5910"
"9ca5ee38d7b56c9c165db7106377bbd8"
);
ecc
->
ref
=
ecc_alloc
(
3
);
ecc_set_str
(
&
ecc
->
ref
[
0
],
/* 2 g */
"20d342d51873f1b7d9750c687d157114"
...
...
@@ -995,7 +994,10 @@ output_curve (const struct ecc_curve *ecc, unsigned bits_per_limb)
mpz_add_ui
(
t
,
ecc
->
q
,
1
);
mpz_fdiv_q_2exp
(
t
,
t
,
1
);
output_bignum
(
"ecc_qp1h"
,
t
,
limb_size
,
bits_per_limb
);
if
(
ecc
->
use_edwards
)
output_bignum
(
"ecc_edwards"
,
ecc
->
t
,
limb_size
,
bits_per_limb
);
/* Trailing zeros in p+1 correspond to trailing ones in p. */
redc_limbs
=
mpz_scan0
(
ecc
->
p
,
0
)
/
bits_per_limb
;
if
(
redc_limbs
>
0
)
...
...
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