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
74dea233
Commit
74dea233
authored
Sep 17, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use struct ecc_curve function pointers also in ecdsa_generate_keypair.
parent
fe776103
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
ChangeLog
ChangeLog
+3
-0
ecdsa-keygen.c
ecdsa-keygen.c
+6
-5
No files found.
ChangeLog
View file @
74dea233
2014-09-17 Niels Möller <nisse@lysator.liu.se>
* ecdsa-keygen.c (ecdsa_generate_keypair): Use struct ecc_curve
function pointers.
* testsuite/curve25519-dup-test.c: Deleted file. In the way for
conversion to Edwards coordiante convention, and in the end
the tests will be done by ecc-dup-test.c.
...
...
ecdsa-keygen.c
View file @
74dea233
...
...
@@ -48,13 +48,14 @@ ecdsa_generate_keypair (struct ecc_point *pub,
void
*
random_ctx
,
nettle_random_func
*
random
)
{
TMP_DECL
(
p
,
mp_limb_t
,
3
*
ECC_MAX_SIZE
+
ECC_MUL_G_ITCH
(
ECC_MAX_SIZE
));
mp_size_t
itch
=
3
*
pub
->
ecc
->
size
+
ECC_MUL_G_ITCH
(
pub
->
ecc
->
size
);
const
struct
ecc_curve
*
ecc
=
pub
->
ecc
;
mp_size_t
itch
=
3
*
ecc
->
size
+
ecc
->
mul_g_itch
;
assert
(
key
->
ecc
==
pub
->
ecc
);
assert
(
key
->
ecc
==
ecc
);
TMP_ALLOC
(
p
,
itch
);
ecc_modq_random
(
key
->
ecc
,
key
->
p
,
random_ctx
,
random
,
p
);
ecc
_mul_g
(
pub
->
ecc
,
p
,
key
->
p
,
p
+
3
*
pub
->
ecc
->
size
);
ecc
_j_to_a
(
pub
->
ecc
,
0
,
pub
->
p
,
p
,
p
+
3
*
pub
->
ecc
->
size
);
ecc_modq_random
(
ecc
,
key
->
p
,
random_ctx
,
random
,
p
);
ecc
->
mul_g
(
ecc
,
p
,
key
->
p
,
p
+
3
*
ecc
->
size
);
ecc
->
h_to_a
(
ecc
,
0
,
pub
->
p
,
p
,
p
+
3
*
ecc
->
size
);
}
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