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
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
c33b0ea6
Commit
c33b0ea6
authored
Sep 23, 2017
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment fixes.
parent
1a6bd65f
Changes
2
Hide whitespace changes
Inline
Sidebyside
Showing
2 changed files
with
8 additions
and
8 deletions
+8
8
eccehtoa.c
eccehtoa.c
+4
3
eccinternal.h
eccinternal.h
+4
5
No files found.
eccehtoa.c
View file @
c33b0ea6
...
...
@@ 68,9 +68,10 @@ ecc_eh_to_a (const struct ecc_curve *ecc,
/* Skip y coordinate */
if
(
op
>
1
)
{
/* Reduce modulo q. FIXME: Hardcoded for curve25519,
duplicates end of ecc_25519_modq. FIXME: Is this needed
at all? Full reduction mod p is maybe sufficient. */
/* Reduce modulo q. Hardcoded for curve25519, duplicates end
of ecc_25519_modq. FIXME: Is this needed at all? op > 0
is only used by ecdsa code, and ecdsa on Edwards curves
makes little sense and is is only used by tests. */
unsigned
shift
;
assert
(
ecc
>
p
.
bit_size
==
255
);
shift
=
ecc
>
q
.
bit_size

1

GMP_NUMB_BITS
*
(
ecc
>
p
.
size

1
);
...
...
eccinternal.h
View file @
c33b0ea6
...
...
@@ 283,17 +283,16 @@ ecc_a_to_j (const struct ecc_curve *ecc,
/* Converts a point P in jacobian coordinates into a point R in affine
coordinates. If op == 1, produce x coordinate only. If op == 2,
produce the x coordiante only, and in also it modulo q. FIXME: For
the public interface, have separate for the three cases, and use
this flag argument only for the internal ecc>h_to_a function. */
produce the x coordinate only, and also reduce it modulo q. */
void
ecc_j_to_a
(
const
struct
ecc_curve
*
ecc
,
int
op
,
mp_limb_t
*
r
,
const
mp_limb_t
*
p
,
mp_limb_t
*
scratch
);
/* Converts a point P on an Edwards curve to affine coordinates on
the corresponding Montgomery curve. */
/* Converts a point P in homogeneous coordinates on an Edwards curve
to affine coordinates. Meaning of op is the same as for
ecc_j_to_a. */
void
ecc_eh_to_a
(
const
struct
ecc_curve
*
ecc
,
int
op
,
...
...
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