Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wim Lewis
nettle
Commits
bf587cd5
Commit
bf587cd5
authored
12 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Replace mp_bitcnt_t by unsigned, for compatibility with older gmp versions.
parent
fb709927
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
ChangeLog
+6
-0
6 additions, 0 deletions
ChangeLog
ecc-mul-a.c
+4
-2
4 additions, 2 deletions
ecc-mul-a.c
ecc-mul-g.c
+3
-1
3 additions, 1 deletion
ecc-mul-g.c
eccdata.c
+3
-1
3 additions, 1 deletion
eccdata.c
sec-modinv.c
+3
-1
3 additions, 1 deletion
sec-modinv.c
with
19 additions
and
5 deletions
ChangeLog
+
6
−
0
View file @
bf587cd5
2013-04-11 Niels Möller <nisse@lysator.liu.se>
* ecc-mul-a.c (ecc_mul_a): Avoid using mp_bitcnt_t, for
compatibility with older GMP versions.
* ecc-mul-g.c (ecc_mul_g): Likewise.
* eccdata.c (ecc_mul_binary): Likewise.
* sec-modinv.c (sec_modinv): Likewise.
* x86_64/sha3-permute.asm: Go via memory for moves between general
registers and xmm registers.
...
...
This diff is collapsed.
Click to expand it.
ecc-mul-a.c
+
4
−
2
View file @
bf587cd5
...
...
@@ -122,8 +122,10 @@ ecc_mul_a (const struct ecc_curve *ecc,
mp_limb_t
*
scratch_out
=
table
+
(
3
*
ecc
->
size
<<
ECC_MUL_A_WBITS
);
int
is_zero
=
0
;
mp_bitcnt_t
blocks
=
(
ecc
->
bit_size
+
ECC_MUL_A_WBITS
-
1
)
/
ECC_MUL_A_WBITS
;
mp_bitcnt_t
bit_index
=
(
blocks
-
1
)
*
ECC_MUL_A_WBITS
;
/* Avoid the mp_bitcnt_t type for compatibility with older GMP
versions. */
unsigned
blocks
=
(
ecc
->
bit_size
+
ECC_MUL_A_WBITS
-
1
)
/
ECC_MUL_A_WBITS
;
unsigned
bit_index
=
(
blocks
-
1
)
*
ECC_MUL_A_WBITS
;
mp_size_t
limb_index
=
bit_index
/
GMP_NUMB_BITS
;
unsigned
shift
=
bit_index
%
GMP_NUMB_BITS
;
...
...
This diff is collapsed.
Click to expand it.
ecc-mul-g.c
+
3
−
1
View file @
bf587cd5
...
...
@@ -66,7 +66,9 @@ ecc_mul_g (const struct ecc_curve *ecc, mp_limb_t *r,
for
(
j
=
0
;
j
*
c
<
bit_rows
;
j
++
)
{
unsigned
bits
;
mp_bitcnt_t
bit_index
;
/* Avoid the mp_bitcnt_t type for compatibility with older GMP
versions. */
unsigned
bit_index
;
/* Extract c bits from n, stride k, starting at i + kcj,
ending at i + k (cj + c - 1)*/
...
...
This diff is collapsed.
Click to expand it.
eccdata.c
+
3
−
1
View file @
bf587cd5
...
...
@@ -219,7 +219,9 @@ static void
ecc_mul_binary
(
const
struct
ecc_curve
*
ecc
,
struct
ecc_point
*
r
,
const
mpz_t
n
,
const
struct
ecc_point
*
p
)
{
mp_bitcnt_t
k
;
/* Avoid the mp_bitcnt_t type for compatibility with older GMP
versions. */
unsigned
k
;
assert
(
r
!=
p
);
assert
(
mpz_sgn
(
n
)
>
0
);
...
...
This diff is collapsed.
Click to expand it.
sec-modinv.c
+
3
−
1
View file @
bf587cd5
...
...
@@ -72,7 +72,9 @@ sec_modinv (mp_limb_t *vp, mp_limb_t *ap, mp_size_t n,
#define dp (scratch + n)
#define up (scratch + 2*n)
mp_bitcnt_t
i
;
/* Avoid the mp_bitcnt_t type for compatibility with older GMP
versions. */
unsigned
i
;
/* Maintain
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment