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
Nettle
nettle
Commits
feec2348
Commit
feec2348
authored
Sep 22, 2014
by
Niels Möller
Browse files
Updated benchmarking of mpn_sec_powm.
parent
4d364ccd
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
feec2348
2014-09-22 Niels Möller <nisse@lysator.liu.se>
* examples/ecc-benchmark.c (bench_modinv_powm, bench_curve):
Updated benchmarking of mpn_sec_powm.
* ecc-internal.h (struct ecc_curve): Deleted redc function
pointer. Use only reduce pointer, which is redc or modp as
applicable. Updated all users.
...
...
examples/ecc-benchmark.c
View file @
feec2348
...
...
@@ -195,10 +195,10 @@ bench_modinv_powm (void *p)
const
struct
ecc_curve
*
ecc
=
ctx
->
ecc
;
mp_size_t
size
=
ecc
->
p
.
size
;
mpn_sub_1
(
ctx
->
rp
+
size
,
ecc
->
p
,
size
,
2
);
mpn_sub_1
(
ctx
->
rp
+
size
,
ecc
->
p
.
m
,
size
,
2
);
mpn_sec_powm
(
ctx
->
rp
,
ctx
->
ap
,
size
,
ctx
->
rp
+
size
,
ecc
->
bit_size
,
ecc
->
p
,
size
,
ctx
->
tp
);
ctx
->
rp
+
size
,
ecc
->
p
.
bit_size
,
ecc
->
p
.
m
,
size
,
ctx
->
tp
);
}
#endif
...
...
@@ -280,7 +280,7 @@ bench_curve (const struct ecc_curve *ecc)
#ifdef mpn_sec_powm
{
mp_size_t
powm_itch
=
mpn_sec_powm_itch
(
ecc
->
p
.
size
,
ecc
->
bit_size
,
ecc
->
p
.
size
);
=
mpn_sec_powm_itch
(
ecc
->
p
.
size
,
ecc
->
p
.
bit_size
,
ecc
->
p
.
size
);
if
(
powm_itch
>
itch
)
itch
=
powm_itch
;
}
...
...
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