-
Notifications
You must be signed in to change notification settings - Fork 74
feat: Add support for Twisted Edwards Curves into the elliptic curve VM extension #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
39db1c0 to
87757aa
Compare
This comment has been minimized.
This comment has been minimized.
extensions/ecc/circuit/Cargo.toml
Outdated
| openvm-ecc-transpiler = { workspace = true } | ||
|
|
||
| num-bigint = { workspace = true } | ||
| num-bigint-dig = { workspace = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we got rid of num-bigint-dig, let's only use num-bigint from now on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
num-bigint-dig has jacobi symbol computation while num-bigint doesn't. I'll try to replicate it with num-bigint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need jacobi symbol for checking if a is QR and d is not QR for completeness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm... that is really unfortunate (I don't want two bigint crates, and num-bigint-dig is less maintained than num-bigint) let me investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to update you, but I have removed the dependency on num-bigint-dig. I copied over the jacobi symbol code into extensions/ecc/circuit/src/edwards_chip/utils.rs
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3672c6b to
0d99466
Compare
4bb302d to
963e4f7
Compare
b6aaa08 to
e46b959
Compare
ad295b3 to
2fbe8e7
Compare
|
FYI: I added some more changes that fix a bug that I found (weierstrass and edwards opcodes would overlap in some cases) I also added decompression hints (just like for weierstrass) to the edwards curves since I will use it in eddsa |
ff27e26 to
c689ccc
Compare
|
Update: rebased onto develop |
da70861 to
021bb79
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bca1c23 to
7ff6b91
Compare
This comment has been minimized.
This comment has been minimized.
7ff6b91 to
f18bd8a
Compare
f18bd8a to
5a88dc6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: 1f0d42c |
|
Closing this in favor of #1858 Can we force reset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come github can't detect this is a git mv weierstrass_extension.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the content is different enough that it can't detect it as a rename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

New changes after rebase:
Primary change:
mod-builderframeworkaanddfrom the equation of a Twisted Edwards curve are correctais a quadratic residue and thatdis not a quadratic residue. This property of a Twisted Edwards curve ensures that the addition operation is the same for all input pointsCachedMulTablemsm approach for Twisted Edwards curvesWeierstrassExtensiontoEccExtensionRelated changes:
mod-builderframework to handle setup rows that verify more than one constantmod-builderframework to the new method of padding rows. That is, by using a temporary range checker and constructing a dummy row (see fix: EcDoubleChip dummy row #1239)mod-builderframeworkCurveConfigstruct to accommodate for curves in Twisted Edwards curve formSee this document for code-level details on differences between SW and TE curves.
Closes INT-2999