forked from dalek-cryptography/curve25519-dalek
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Risc0 Acceleration for Curve25519 #1
Merged
Merged
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7e1f7fb
add risc0 acceleration
jjtny1 9c9a43f
modify ed25519 crate to work with zkvm
jjtny1 aa8f15b
rm authors
jjtny1 fff10e8
use risc0 modmul for negate
jjtny1 c007979
use single risc0 mul for negation of scalar
jjtny1 ab98850
remove usages of mul_internal/montgomery_reduce back to back code
jjtny1 abd9627
add improvements and lookup tables
jjtny1 c036905
use denormalized form
jjtny1 8083f6d
pr feedback
jjtny1 dfc2614
revert serde version change
jjtny1 442efd7
update comments
jjtny1 89e183b
rm elliptic-curve and fix some uses of denormalize for serialization
jjtny1 ba0f316
rm vector files and use include_bytes! macro instead
jjtny1 69d3430
fix overflow issue and potentially constant-timedness issue
nategraf 326397c
fix a couple more overflow and normalization issues
nategraf 9884d64
Merge pull request #1 from risc0/victor/joby/risc0-accel
jjtny1 ee8d7cd
pr feedback. fix usage of normalized/denormalized
jjtny1 59f1792
Merge branch 'joby/risc0-accel' of github.com:jjtny1/curve25519-dalek…
jjtny1 908b7d6
pr feedback
jjtny1 41981f1
supress warning for risc zero builds
jjtny1 c1471ef
Merge commit 'e94a5fe5ab1c124363504d7ebcf78f0db166362a' into joby/ris…
nategraf 333cb51
address compiler warning
nategraf e722a2e
fix test build
nategraf 2f1feee
fix normalization errors
nategraf 6263e76
very minor edits and comments
nategraf 078f430
remove rust-toolchain.toml
nategraf 9fbd7c6
Merge pull request #2 from risc0/victor/merge-e94a5fe5ab1c124363504d7…
jjtny1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,6 @@ features = ["serde", "rand_core", "digest", "legacy_compatibility"] | |
[dev-dependencies] | ||
sha2 = { version = "0.10", default-features = false } | ||
bincode = "1" | ||
criterion = { version = "0.4.0", features = ["html_reports"] } | ||
hex = "0.4.2" | ||
rand = "0.8" | ||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } | ||
|
||
|
@@ -53,13 +51,18 @@ digest = { version = "0.10", default-features = false, optional = true } | |
subtle = { version = "2.3.0", default-features = false } | ||
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] } | ||
zeroize = { version = "1", default-features = false, optional = true } | ||
crypto-bigint = { version = "0.5", default-features = false, features = ["zeroize"] } | ||
hex = "0.4.3" | ||
|
||
[target.'cfg(target_arch = "x86_64")'.dependencies] | ||
cpufeatures = "0.2.6" | ||
|
||
[target.'cfg(curve25519_dalek_backend = "fiat")'.dependencies] | ||
fiat-crypto = "0.1.19" | ||
|
||
[target.'cfg(not(target_os = "zkvm"))'.dev-dependencies] | ||
criterion = { version = "0.5.1", features = ["html_reports"] } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This library does not build in the zkvm. It's only used for benchmark tests |
||
|
||
[features] | ||
default = ["alloc", "precomputed-tables", "zeroize"] | ||
alloc = ["zeroize?/alloc"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you gate these behind a
cfg(not(target_os = "zkvm"))
? Goal being that building this fork for the host should be essentially the same as upstreamThere 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.
Do you mean
cfg(target_os = "zkvm")
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.
Ah, yes that's what I meant