Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
df7b4aca
Commit
df7b4aca
authored
Sep 06, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output points also for the Ed25519 curve.
parent
9802640c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
misc/ecc-ref.gp
misc/ecc-ref.gp
+10
-0
No files found.
misc/ecc-ref.gp
View file @
df7b4aca
...
...
@@ -118,4 +118,14 @@ if (S != ellpow(curve25519, B, a), error("curve25519 dh error"));
print("curve25519");
out(a, A, b, B, S);
/* Convert point on curve25519 to a point on the twisted edwards curve */
beta = -sqrt(Mod(-486664, p25519));
ed25519(p) = [p[1] * beta / p[2], (p[1] - 1) / (p[1] + 1)];
Ae = ed25519(A);
Be = ed25519(B);
Se = ed25519(S);
print("ed25519");
out(a, Ae, b, Be, Se);
quit
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