Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
OTRv4
little-ed448-Goldilocks
Commits
1fbd4a0b
Unverified
Commit
1fbd4a0b
authored
Jan 20, 2018
by
Sofia Celi
⛸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of some p521 things
parent
914840e8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
20 deletions
+6
-20
src/GENERATED/c/ed448goldilocks/elligator.c
src/GENERATED/c/ed448goldilocks/elligator.c
+2
-9
src/GENERATED/c/p448/f_generic.c
src/GENERATED/c/p448/f_generic.c
+2
-2
src/per_curve/elligator.tmpl.c
src/per_curve/elligator.tmpl.c
+2
-9
No files found.
src/GENERATED/c/ed448goldilocks/elligator.c
View file @
1fbd4a0b
...
...
@@ -22,6 +22,7 @@
#define COFACTOR 4
static
const
int
EDWARDS_D
=
-
39081
;
/* This is prob also not needed */
#define RISTRETTO_FACTOR DECAF_448_RISTRETTO_FACTOR
extern
const
gf
RISTRETTO_FACTOR
;
...
...
@@ -146,15 +147,7 @@ API_NS(invert_elligator_nonuniform) (
gf_cond_neg
(
b
,
sgn_r0
^
gf_lobit
(
b
));
/* Eliminate duplicate values for identity ... */
succ
&=
~
(
gf_eq
(
b
,
ZERO
)
&
(
sgn_r0
|
sgn_s
));
// #if COFACTOR == 8
// succ &= ~(is_identity & sgn_ed_T); /* NB: there are no preimages of rotated identity. */
// #endif
#if 448 == 8*SER_BYTES + 1
/* p521 */
gf_serialize
(
recovered_hash
,
b
,
0
);
#else
gf_serialize
(
recovered_hash
,
b
,
1
);
#endif
#if 0
recovered_hash[SER_BYTES-1] ^= (hint>>3)<<0;
#endif
...
...
src/GENERATED/c/p448/f_generic.c
View file @
1fbd4a0b
src/per_curve/elligator.tmpl.c
View file @
1fbd4a0b
...
...
@@ -11,6 +11,7 @@
#define COFACTOR $(cofactor)
static
const
int
EDWARDS_D
=
$
(
d
);
/* This is prob also not needed */
#define RISTRETTO_FACTOR $(C_NS)_RISTRETTO_FACTOR
extern
const
gf
RISTRETTO_FACTOR
;
...
...
@@ -135,15 +136,7 @@ API_NS(invert_elligator_nonuniform) (
gf_cond_neg
(
b
,
sgn_r0
^
gf_lobit
(
b
));
/* Eliminate duplicate values for identity ... */
succ
&=
~
(
gf_eq
(
b
,
ZERO
)
&
(
sgn_r0
|
sgn_s
));
// #if COFACTOR == 8
// succ &= ~(is_identity & sgn_ed_T); /* NB: there are no preimages of rotated identity. */
// #endif
#if $(gf_bits) == 8*SER_BYTES + 1
/* p521 */
gf_serialize
(
recovered_hash
,
b
,
0
);
#else
gf_serialize
(
recovered_hash
,
b
,
1
);
#endif
#if $(gf_bits%8)
recovered_hash
[
SER_BYTES
-
1
]
^=
(
hint
>>
3
)
<<
$
(
gf_bits
%
8
);
#endif
...
...
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