-
Notifications
You must be signed in to change notification settings - Fork 4
z-tech/stir #13
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
Open
z-tech
wants to merge
110
commits into
main
Choose a base branch
from
z-tech/STIR
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
z-tech/stir #13
Changes from all commits
Commits
Show all changes
110 commits
Select commit
Hold shift + click to select a range
ae1156f
inital commit
z-tech 1572f8e
chkpt
z-tech 9338912
chkpt
z-tech cd80d87
checkpoint
z-tech 25fb525
z-tech/tmp
z-tech a5d23c9
chkpt
z-tech 2611be2
chkpt
z-tech 67d5d96
z-tech: mapped FRI onto traits
z-tech 00b16bb
z-tech: LowDegreeTest impl for FRI
z-tech 2bf52dd
z-tech: LowDegreeTest impl for STIR chkpt
z-tech f8f56e5
debug stir verifier chkpt
z-tech 9bfaa45
z-tech: stir fixed
z-tech 09bc086
z-tech: chkpt
z-tech 30f0683
z-tech: another chkpt
z-tech e9275f0
checkpoint
z-tech de22d2e
chkpt
z-tech 8092528
chkpt
z-tech 8ced8e5
final round proof chkpt
z-tech 528aec2
checkpoint
z-tech 26a92cf
chkpt
z-tech e7a8c09
chkpt
z-tech 7a47686
rm commitment from verifier
z-tech 8ec3e72
arg trait for directLDT
z-tech 318e9d5
chkpt impl witness
z-tech 51e5a99
impl witness FRI
z-tech 2dab6cc
impl witness STIR
z-tech 498ffa9
larger witness trait
z-tech ae627f8
chkpt
z-tech e2e1b78
chkpt 2
z-tech 796e226
SingleWitness for LDTs
z-tech 39293f2
chkpt
z-tech dede7c7
cleanup chkpt
z-tech 8bfbbce
cleanup chkpt 2
z-tech 0d5f75b
cleanup chkpt 3
z-tech 8305477
rn to witness
z-tech e2c82f7
cleanup chkpt 4
z-tech 019b35c
cleanup chkpt 5
z-tech f4db5a9
stopping pt
z-tech baadc10
chkpt
z-tech e726a92
simplify stir proof
z-tech 7941a4f
cleanup chkpt 6
z-tech a51ec29
compute round chkpt
z-tech fc4672a
cleanup chkpt 7
z-tech de668ea
cleanup stopping point
z-tech fd09448
chkpt
z-tech dd3ff97
chkpt
z-tech d08e3cb
chkpt 2
z-tech 5089d34
chkpt 3
z-tech 9adf815
chkpt
z-tech 672b00d
chkpt
z-tech 9e30e57
chkpt
z-tech 878d151
checkpoint
z-tech 8d206c9
checkpoint
z-tech 10af760
next_state
z-tech 089bb55
final_round
z-tech 3764943
final_round
z-tech 6d84935
update_commitment
z-tech 0edd97d
checkpoint
z-tech d531ba3
checkpoint
z-tech 2ccf0c6
checkpoint
z-tech 1a6bba3
ahhh, yes
z-tech ea0d925
rn round state to round and claim to statement
z-tech 27eae02
stir config
z-tech 892b139
chkpt
z-tech fce2d2c
chkpt
z-tech 58e178d
chkpt
z-tech 26c902e
chkpt
z-tech d459c73
chkpt
z-tech 21a912f
chkpt
z-tech 7bcbcab
chkpt
z-tech 3083b8d
verifier_state
z-tech d96cbf1
chkpt
z-tech 3d541dc
chkpt
z-tech a564761
chkpt
z-tech 934f189
folded_evaluations
z-tech c5efbb8
folded_evaluations chkpt
z-tech fbc8327
move stuff into verifier state
z-tech c8d6f83
stopping point for the day
z-tech 84afcc4
chkpt
z-tech 9835db5
chkpt 2
z-tech 40dc09d
chkpt
z-tech e4d6730
chkpt
z-tech 1595d82
chkpt
z-tech e236979
chkpt
z-tech 9656b33
verify
z-tech 249bedb
cleanup
z-tech a49393e
chkpt
z-tech 381d3ca
chkpt cleanup
z-tech da4fdcb
new branch commit
z-tech 6caa96e
more cleanup
z-tech da351bc
patch crates io
z-tech 3ed1289
multi_proof API
z-tech 40895de
update comment
z-tech a66df7c
forgot to switch crypto-primitives back to git
z-tech 3ec4311
no_std flag
z-tech 599823c
chkpt
z-tech 39af9e7
chkpt
z-tech 8f556fc
update readme
z-tech 9c3e93a
ds_store
z-tech 7e28a73
ds_store banished
z-tech 49e0224
nuke poseidon paramgen
z-tech 90aaf15
derive clone for configs
z-tech 78c341e
rm lazy_static
z-tech a4c17b0
no_std
z-tech 39c0756
put no_std behind flags
z-tech 2711204
chkpt
z-tech be1e41b
std feature
z-tech 775f096
add profiles back
z-tech 4e74c11
dedup challenges, squeeze range eq num of leaves in mt
z-tech 1bcedea
move crypto folder to test_helpers
z-tech 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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,53 @@ | ||
| [package] | ||
| name = "ark-ldt" | ||
| version = "0.1.0" | ||
| version = "1.1.0" | ||
| authors = ["arkworks contributors"] | ||
| edition = "2018" | ||
|
|
||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
| edition = "2021" | ||
|
|
||
| [dependencies] | ||
| ark-ff = { version = "^0.3.0", default-features = false } | ||
| ark-std = { version = "^0.3.0", default-features = false } | ||
| ark-r1cs-std = { version = "^0.3.0", default-features = false} | ||
| ark-sponge = { version = "^0.3.0", default-features = false } | ||
| ark-poly = { version = "0.3.0", default-features = false } | ||
| ark-relations = { version = "^0.3.0", default-features = false, optional = true} | ||
| tracing = { version = "0.1", default-features = false, features = [ "attributes" ], optional = true} | ||
|
|
||
| [dev-dependencies] | ||
| ark-test-curves = { version = "^0.3.0", default-features = false, features = ["bls12_381_scalar_field", "mnt4_753_scalar_field"] } | ||
| ark-crypto-primitives = { version = "^0.4.0", default-features = false, features = ["merkle_tree", "sponge"] } | ||
| ark-ff = { version = "0.4", default-features = false } | ||
| ark-poly = { version = "0.4.2", default-features = false } | ||
| ark-std = { version = "^0.4.0", default-features = false } | ||
| ark-serialize = { version = "0.4", default-features = false } | ||
| ark-test-curves = { version = "0.4", default-features = false, features = ["bls12_381_curve"] } | ||
| itertools = { version = "0.13.0", default-features = false } | ||
| spin = { version = "0.9.8", default-features = false, features = ["once", "mutex", "spin_mutex"] } | ||
| hashbrown = { version = "0.14.5" } | ||
|
|
||
| [patch.crates-io] | ||
| ark-sponge = {git = "https://github.com/arkworks-rs/sponge"} | ||
| ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std" } | ||
| ark-crypto-primitives = { git = "https://github.com/arkworks-rs/crypto-primitives" } | ||
| ark-ec = { git = "https://github.com/arkworks-rs/algebra" } | ||
| ark-ff = { git = "https://github.com/arkworks-rs/algebra" } | ||
| ark-poly = { git = "https://github.com/arkworks-rs/algebra" } | ||
| ark-serialize = { git = "https://github.com/arkworks-rs/algebra" } | ||
| ark-std = { git = "https://github.com/arkworks-rs/std" } | ||
| ark-test-curves = { git = "https://github.com/arkworks-rs/algebra" } | ||
|
|
||
| [profile.release] | ||
| opt-level = 3 | ||
| lto = "thin" | ||
| incremental = true | ||
| panic = 'abort' | ||
|
|
||
| [profile.bench] | ||
| opt-level = 3 | ||
| debug = false | ||
| rpath = false | ||
| lto = "thin" | ||
| incremental = true | ||
| debug-assertions = false | ||
|
|
||
| [profile.dev] | ||
| opt-level = 0 | ||
| panic = 'abort' | ||
|
|
||
| [profile.test] | ||
| opt-level = 3 | ||
| lto = "thin" | ||
| incremental = true | ||
| debug-assertions = true | ||
| debug = true | ||
|
|
||
| [features] | ||
| default = ["std"] | ||
| std = ["ark-ff/std", "ark-std/std", "ark-relations/std", "ark-r1cs-std/std", "ark-sponge/std", "ark-poly/std"] | ||
| r1cs = ["ark-sponge/r1cs", "tracing", "ark-relations"] | ||
| std = [ "ark-crypto-primitives/std", "ark-ff/std", "ark-poly/std", "ark-serialize/std" ] | ||
|
|
||
| [profile.release] | ||
| opt-level = 3 | ||
| lto = "thin" | ||
| incremental = true | ||
| panic = 'abort' | ||
|
|
||
| [profile.bench] | ||
| opt-level = 3 | ||
| debug = false | ||
| rpath = false | ||
| lto = "thin" | ||
| incremental = true | ||
| debug-assertions = false | ||
|
|
||
| [profile.dev] | ||
| opt-level = 0 | ||
| panic = 'abort' | ||
|
|
||
| [profile.test] | ||
| opt-level = 3 | ||
| lto = "thin" | ||
| incremental = true | ||
| debug-assertions = true | ||
| debug = true |
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,31 @@ | ||
| use ark_crypto_primitives::{ | ||
| merkle_tree::{Config as MerkleConfig, LeafParam, TwoToOneParam}, | ||
| sponge::CryptographicSponge, | ||
| }; | ||
|
|
||
| #[derive(Clone)] | ||
| pub struct DirectConfig<M: MerkleConfig, S: CryptographicSponge> { | ||
| pub degree: usize, | ||
| pub num_challenges: usize, | ||
| pub merkle_leaf_hash_param: LeafParam<M>, | ||
| pub merkle_two_to_one_param: TwoToOneParam<M>, | ||
| pub sponge_config: S::Config, | ||
z-tech marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| impl<M: MerkleConfig, S: CryptographicSponge> DirectConfig<M, S> { | ||
| pub fn new( | ||
| degree: usize, | ||
| num_challenges: usize, | ||
| merkle_leaf_hash_param: LeafParam<M>, | ||
| merkle_two_to_one_param: TwoToOneParam<M>, | ||
| sponge_config: S::Config, | ||
| ) -> Self { | ||
| DirectConfig { | ||
| degree, | ||
| num_challenges, | ||
| merkle_leaf_hash_param, | ||
| merkle_two_to_one_param, | ||
| sponge_config, | ||
| } | ||
| } | ||
| } | ||
This file was deleted.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| use ark_crypto_primitives::{ | ||
| merkle_tree::{Config as MerkleConfig, MultiPath}, | ||
| sponge::{Absorb, CryptographicSponge}, | ||
| }; | ||
| use ark_ff::FftField; | ||
| use ark_std::{marker::PhantomData, vec::Vec}; | ||
|
|
||
| use crate::{ | ||
| direct::{config::DirectConfig, prover::DirectProver, verifier::DirectVerifier}, | ||
| ldt::{LowDegreeTest, Prover, Verifier}, | ||
| witness::Witness, | ||
| }; | ||
|
|
||
| use super::proof::DirectProof; | ||
|
|
||
| pub struct DirectLDT<F: FftField, M: MerkleConfig, S: CryptographicSponge, W: Witness<F, M>> { | ||
| _field: PhantomData<F>, | ||
| _merkle_config: PhantomData<M>, | ||
| _sponge: PhantomData<S>, | ||
| _witness: PhantomData<W>, | ||
| } | ||
| impl<F, M, S, W> LowDegreeTest<F> for DirectLDT<F, M, S, W> | ||
| where | ||
| F: FftField, | ||
| M: MerkleConfig<Leaf = Vec<F>> + Clone, | ||
| M::InnerDigest: Absorb, | ||
| S: CryptographicSponge, | ||
| S::Config: Clone, | ||
| W: Witness< | ||
| F, | ||
| M, | ||
| MerkleConfig = M, | ||
| ChallengeAnswers = MultiPath<M>, | ||
| CommittedValues = Vec<Vec<F>>, | ||
| Challenges = Vec<usize>, | ||
| > + Clone, | ||
| W::ChallengeAnswers: Clone, | ||
| { | ||
| type LDTConfig = DirectConfig<M, S>; | ||
| type Proof = DirectProof<F, M, S>; | ||
| type Prover = DirectProver<F, M, S, W>; | ||
| type Verifier = DirectVerifier<F, M, S, W>; | ||
|
|
||
| fn new(config: Self::LDTConfig) -> (Self::Prover, Self::Verifier) { | ||
| ( | ||
| Self::Prover::new(config.clone()), | ||
| Self::Verifier::new(config), | ||
| ) | ||
| } | ||
| } |
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.
Maybe num_queries?