Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
39186131
Commit
39186131
authored
10 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Small tweaks to make curve25519-donna32 compile with our warnings
parent
8cc08605
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ext/curve25519_donna/curve25519-donna.c
+5
-1
5 additions, 1 deletion
src/ext/curve25519_donna/curve25519-donna.c
with
5 additions
and
1 deletion
src/ext/curve25519_donna/curve25519-donna.c
+
5
−
1
View file @
39186131
...
...
@@ -271,6 +271,7 @@ div_by_2_25(const limb v)
return
(
v
+
roundoff
)
>>
25
;
}
#if 0
/* return v / (2^25), using only shifts and adds.
*
* On entry: v can take any value. */
...
...
@@ -280,6 +281,7 @@ div_s32_by_2_25(const s32 v)
const s32 roundoff = ((uint32_t)(v >> 31)) >> 7;
return (v + roundoff) >> 25;
}
#endif
/* Reduce all coefficients of the short form input so that |x| < 2^26.
*
...
...
@@ -485,7 +487,7 @@ fcontract(u8 *output, limb *input_limbs) {
/* |input_limbs[i]| < 2^26, so it's valid to convert to an s32. */
for
(
i
=
0
;
i
<
10
;
i
++
)
{
input
[
i
]
=
input_limbs
[
i
];
input
[
i
]
=
(
s32
)
input_limbs
[
i
];
}
for
(
j
=
0
;
j
<
2
;
++
j
)
{
...
...
@@ -848,6 +850,8 @@ crecip(limb *out, const limb *z) {
/* 2^255 - 21 */
fmul
(
out
,
t1
,
z11
);
}
int
curve25519_donna
(
u8
*
mypublic
,
const
u8
*
secret
,
const
u8
*
basepoint
);
int
curve25519_donna
(
u8
*
mypublic
,
const
u8
*
secret
,
const
u8
*
basepoint
)
{
limb
bp
[
10
],
x
[
10
],
z
[
11
],
zmone
[
10
];
...
...
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