Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OTRv4
libgoldilocks
Commits
70303957
Commit
70303957
authored
Oct 13, 2017
by
Michael Hamburg
Browse files
toggle elligator sign back to match Dalek
parent
2bcccebd
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
aux/ristretto/ristretto.sage
View file @
70303957
...
...
@@ -50,7 +50,7 @@ def isqrt(x,exn=InvalidEncodingException("Not on curve")):
if x==0: return 0
if not is_square(x): raise exn
s = sqrt(x)
if negative(s): s=-s
#
if negative(s): s=-s
return 1/s
def inv0(x): return 1/x if x != 0 else 0
...
...
src/GENERATED/c/curve25519/decaf.c
View file @
70303957
...
...
@@ -50,7 +50,7 @@ const uint8_t decaf_x25519_base_point[DECAF_X25519_PUBLIC_BYTES] = { 0x09 };
#define RISTRETTO_FACTOR DECAF_255_RISTRETTO_FACTOR
const
gf
RISTRETTO_FACTOR
=
{{{
0x
0fdaa805d40ea
,
0x2eb482e57d339
,
0x007610274bc58
,
0x6510b613dc8ff
,
0x786c8905cfaff
0x
702557fa2bf03
,
0x514b7d1a82cc6
,
0x7f89efd8b43a7
,
0x1aef49ec23700
,
0x079376fa30500
}}};
#if IMAGINE_TWIST
...
...
src/GENERATED/c/curve25519/decaf_tables.c
View file @
70303957
This diff is collapsed.
Click to expand it.
src/per_curve/decaf.tmpl.c
View file @
70303957
...
...
@@ -39,7 +39,7 @@ const uint8_t decaf_x$(gf_shortname)_base_point[DECAF_X$(gf_shortname)_PUBLIC_BY
#define RISTRETTO_FACTOR $(C_NS)_RISTRETTO_FACTOR
const
gf
RISTRETTO_FACTOR
=
{{{
$
(
ser
(
msqrt
(
d
-
1
if
imagine_twist
else
-
d
,
modulus
,
lo
_bit_clear
=
True
),
gf_lit_limb_bits
))
$
(
ser
(
msqrt
(
d
-
1
if
imagine_twist
else
-
d
,
modulus
,
hi
_bit_clear
=
True
),
gf_lit_limb_bits
))
}}};
#if IMAGINE_TWIST
...
...
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