forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 1k
Extract curve25519 crate from zk-token-sdk #951
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
Merged
samkim-crypto
merged 17 commits into
anza-xyz:master
from
kevinheavey:zk-token-curve25519
Jun 18, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5d9944a
extract curve25519 crate
kevinheavey 824345e
remove obsolete comment
kevinheavey 382aadd
fix Cargo.toml files
kevinheavey 6b43ae4
fix imports
kevinheavey e3768ea
update lock file
kevinheavey 9efb931
remove unused deps from zk-token-sdk
kevinheavey bcb06d6
fmt
kevinheavey 4d5c427
add solana-curve25519 patch
kevinheavey a6b9388
add missing override to programs/sbf/Cargo.toml
kevinheavey 22e71ed
copy over an allow()
kevinheavey 88dbbe6
move new crate to curves dir
kevinheavey 6d67e4d
use workspace version
kevinheavey 683d14f
add back missing dev dep
kevinheavey 82d59be
add missing dependencies to programs/sbf
kevinheavey e20f8b2
fmt
kevinheavey 3062a95
move dep to the correct dependency table
kevinheavey 568e201
remove #[cfg(not(target_os = "solana"))] above errors mod
kevinheavey 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /farf/ |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [package] | ||
| name = "solana-curve25519" | ||
| description = "Solana Curve25519 Syscalls" | ||
| documentation = "https://docs.rs/solana-curve25519" | ||
| version = { workspace = true } | ||
| authors = { workspace = true } | ||
| repository = { workspace = true } | ||
| homepage = { workspace = true } | ||
| license = { workspace = true } | ||
| edition = { workspace = true } | ||
|
|
||
| [dependencies] | ||
| bytemuck = { workspace = true, features = ["derive"] } | ||
| solana-program = { workspace = true } | ||
| thiserror = { workspace = true } | ||
|
|
||
| [target.'cfg(not(target_os = "solana"))'.dependencies] | ||
| curve25519-dalek = { workspace = true, features = ["serde"] } |
File renamed without changes.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| use thiserror::Error; | ||
|
|
||
| #[derive(Error, Clone, Debug, Eq, PartialEq)] | ||
| pub enum Curve25519Error { | ||
| #[error("pod conversion failed")] | ||
| PodConversion, | ||
| } | ||
|
|
||
| #[derive(Error, Clone, Debug, Eq, PartialEq)] | ||
| pub enum ElGamalError { | ||
| #[error("key derivation method not supported")] | ||
| DerivationMethodNotSupported, | ||
| #[error("seed length too short for derivation")] | ||
| SeedLengthTooShort, | ||
| #[error("seed length too long for derivation")] | ||
| SeedLengthTooLong, | ||
| #[error("failed to deserialize ciphertext")] | ||
| CiphertextDeserialization, | ||
| #[error("failed to deserialize public key")] | ||
| PubkeyDeserialization, | ||
| #[error("failed to deserialize keypair")] | ||
| KeypairDeserialization, | ||
| #[error("failed to deserialize secret key")] | ||
| SecretKeyDeserialization, | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #![allow(clippy::arithmetic_side_effects, clippy::op_ref)] | ||
| //! Syscall operations for curve25519 | ||
|
|
||
| pub mod curve_syscall_traits; | ||
| pub mod edwards; | ||
| pub mod errors; | ||
| pub mod ristretto; | ||
| pub mod scalar; | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.