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
98333dcd
Commit
98333dcd
authored
Aug 02, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed window-based ecc_mul_a_eh.
parent
7fa54ac5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
ChangeLog
ChangeLog
+8
-0
ecc-internal.h
ecc-internal.h
+3
-2
ecc-mul-a-eh.c
ecc-mul-a-eh.c
+0
-3
No files found.
ChangeLog
View file @
98333dcd
2014-08-02 Niels Möller <nisse@lysator.liu.se>
* ecc-internal.h (ECC_MUL_A_EH_WBITS): Set to 4, to enable
window-based scalar multiplication.
* ecc-mul-a-eh.c (table_init) [ECC_MUL_A_EH_WBITS > 0]: Fixed
initialization of TABLE(1).
2014-07-29 Niels Möller <nisse@lysator.liu.se>
* ecc-internal.h (ECC_MUL_A_EH_WBITS): New constant.
...
...
ecc-internal.h
View file @
98333dcd
...
...
@@ -68,11 +68,12 @@
/* Window size for ecc_mul_a. Using 4 bits seems like a good choice,
for both Intel x86_64 and ARM Cortex A9. For the larger curves, of
384 and 521 bits, we could improve s
eep
d by a few percent if we go
384 and 521 bits, we could improve s
pee
d by a few percent if we go
up to 5 bits, but I don't think that's worth doubling the
storage. */
#define ECC_MUL_A_WBITS 4
#define ECC_MUL_A_EH_WBITS 0
/* And for ecc_mul_a_eh */
#define ECC_MUL_A_EH_WBITS 4
/* Reduces from 2*ecc->size to ecc->size. */
...
...
ecc-mul-a-eh.c
View file @
98333dcd
...
...
@@ -91,8 +91,6 @@ ecc_mul_a_eh (const struct ecc_curve *ecc,
}
#else
/* ECC_MUL_A_EH_WBITS > 1 */
#error Not yet working
#define TABLE_SIZE (1U << ECC_MUL_A_EH_WBITS)
#define TABLE_MASK (TABLE_SIZE - 1)
...
...
@@ -111,7 +109,6 @@ table_init (const struct ecc_curve *ecc,
TABLE
(
0
)[
ecc
->
size
]
=
TABLE
(
0
)[
2
*
ecc
->
size
]
=
1
;
ecc_a_to_eh
(
ecc
,
TABLE
(
1
),
p
,
scratch
);
mpn_copyi
(
TABLE
(
1
),
p
,
3
*
ecc
->
size
);
for
(
j
=
2
;
j
<
size
;
j
+=
2
)
{
...
...
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