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
fb2c801d
Commit
fb2c801d
authored
Aug 29, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make more of the testsuite use ecc->h_to_a.
parent
b8242df2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
6 deletions
+10
-6
ChangeLog
ChangeLog
+5
-1
testsuite/ecc-mul-a-test.c
testsuite/ecc-mul-a-test.c
+1
-1
testsuite/ecc-mul-g-test.c
testsuite/ecc-mul-g-test.c
+1
-1
testsuite/testutils.c
testsuite/testutils.c
+2
-2
testsuite/testutils.h
testsuite/testutils.h
+1
-1
No files found.
ChangeLog
View file @
fb2c801d
2014-08-29 Niels Möller <nisse@lysator.liu.se>
* examples/ecc-benchmark.c (bench_add_jjj): Renamed, to...
* testsuite/testutils.c (test_ecc_mul_j): Renamed, to ...
(test_ecc_mul_h): ... new name. Use ecc->h_to_a function pointer.
Updated callers.
* examples/ecc-benchmark.c (bench_add_jjj): Renamed, to ...
(bench_add_hhh): ... new name. Use ecc->add_hhh function pointer.
(bench_add_ehh): Deleted.
(bench_curve): Use bench_add_hhh for all curves. Use ecc->mul_itch
...
...
testsuite/ecc-mul-a-test.c
View file @
fb2c801d
...
...
@@ -40,7 +40,7 @@ test_main (void)
for
(
n
[
0
]
=
2
;
n
[
0
]
<=
4
;
n
[
0
]
++
)
{
ecc_mul_a
(
ecc
,
p
,
n
,
ecc
->
g
,
scratch
);
test_ecc_mul_
j
(
i
,
n
[
0
],
p
);
test_ecc_mul_
h
(
i
,
n
[
0
],
p
);
}
/* (order - 1) * g = - g */
...
...
testsuite/ecc-mul-g-test.c
View file @
fb2c801d
...
...
@@ -42,7 +42,7 @@ test_main (void)
for
(
n
[
0
]
=
2
;
n
[
0
]
<=
4
;
n
[
0
]
++
)
{
ecc_mul_g
(
ecc
,
p
,
n
,
scratch
);
test_ecc_mul_
j
(
i
,
n
[
0
],
p
);
test_ecc_mul_
h
(
i
,
n
[
0
],
p
);
}
/* (order - 1) * g = - g */
...
...
testsuite/testutils.c
View file @
fb2c801d
...
...
@@ -1371,12 +1371,12 @@ test_ecc_mul_a (unsigned curve, unsigned n, const mp_limb_t *p)
}
void
test_ecc_mul_
j
(
unsigned
curve
,
unsigned
n
,
const
mp_limb_t
*
p
)
test_ecc_mul_
h
(
unsigned
curve
,
unsigned
n
,
const
mp_limb_t
*
p
)
{
const
struct
ecc_curve
*
ecc
=
ecc_curves
[
curve
];
mp_limb_t
*
np
=
xalloc_limbs
(
ecc_size_a
(
ecc
));
mp_limb_t
*
scratch
=
xalloc_limbs
(
ecc_j_to_a_itch
(
ecc
));
ecc
_j
_to_a
(
ecc
,
0
,
np
,
p
,
scratch
);
ecc
->
h
_to_a
(
ecc
,
0
,
np
,
p
,
scratch
);
test_ecc_mul_a
(
curve
,
n
,
np
);
...
...
testsuite/testutils.h
View file @
fb2c801d
...
...
@@ -239,7 +239,7 @@ void
test_ecc_mul_a
(
unsigned
curve
,
unsigned
n
,
const
mp_limb_t
*
p
);
void
test_ecc_mul_
j
(
unsigned
curve
,
unsigned
n
,
const
mp_limb_t
*
p
);
test_ecc_mul_
h
(
unsigned
curve
,
unsigned
n
,
const
mp_limb_t
*
p
);
#endif
/* WITH_HOGWEED */
...
...
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