https://github.com/arkworks-rs/spongefish

Fiat-Shamir for the masses.

https://github.com/arkworks-rs/spongefish

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords

fiat-shamir snark zero-knowledge
Last synced: 5 months ago · JSON representation

Repository

Fiat-Shamir for the masses.

Basic Info
Statistics
  • Stars: 67
  • Watchers: 2
  • Forks: 26
  • Open Issues: 7
  • Releases: 0
Topics
fiat-shamir snark zero-knowledge
Created over 2 years ago · Last pushed 8 months ago
Metadata Files
Readme License

README.md

spongefish: a duplex sponge Fiat-Shamir library 🧽🐟

Sponge FiSh (duplex sponge Fiat-Shamir) is a permutation-agnostic Fiat-Shamir library that believes in random oracles. It facilitates the writing of multi-round public coin protocols. It provides a generic API for generating the verifier's random coins and the prover randomness. The project has the following crates:

  • spongefish: the core library, with bindings for group and ark-ff. This crate provides the basic traits for hashes and a duplex sponge API;
  • spongefish-pow: an extension for challenges computed via grinding / proof-of-work;
  • spongefish-poseidon: a WORK IN PROGRESS implementation of the Poseidon hash function (in arkworks).
  • spongefish-anemoi: a WORK IN PROGRESS implementation of the Anemoi hash function (in arkworks);

Legacy hash functions, such as compression functions, are also supported via Rust's generic Digest API.

Features

Automatic transcript generation. spongefish comes with batteries included for serializing/deserializing algebraic elements such as field/group elements in arkworks and zkcrypto. Users can build on the top of it via extension traits.

Support custom hash function. To build a secure Fiat-Shamir transformation, the minimal requirement is a permutation function over some set that supports byte-encoding. It can be a u8 representing $\mathbb{F}{2^8}$ or any large-characteristic prime field $\mathbb{F}p$.

Retro-compatibility. We have a legacy interface for any hash function that satisfies the digest::Digest trait, such as sha2 and blake2.

  • Preprocessing. In recursive SNARKs, minimizing the number of hash invocations while maintaining security is crucial. We offer tools for preprocessing the Transcript (i.e., the state of the Fiat-Shamir transformation) to achieve this goal.

  • Private randomness generation. It is vital to avoid providing two different challenges for the same prover message. We do our best to avoid it by tying down the prover randomness to the protocol transcript, without making the proof deterministic.

More information

Check out the documentation and some examples/.

Funding

This project is funded through NGI0 Entrust, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.

NLnet foundation logo NGI Zero Logo

Owner

  • Name: arkworks
  • Login: arkworks-rs
  • Kind: organization

An ecosystem for developing and programming with zkSNARKs

GitHub Events

Total
  • Issues event: 3
  • Watch event: 17
  • Issue comment event: 18
  • Push event: 31
  • Pull request review comment event: 24
  • Pull request review event: 16
  • Pull request event: 49
  • Fork event: 7
  • Create event: 1
Last Year
  • Issues event: 3
  • Watch event: 17
  • Issue comment event: 18
  • Push event: 31
  • Pull request review comment event: 24
  • Pull request review event: 16
  • Pull request event: 49
  • Fork event: 7
  • Create event: 1

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 14
  • Total pull requests: 46
  • Average time to close issues: 5 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 3
  • Total pull request authors: 15
  • Average comments per issue: 0.57
  • Average comments per pull request: 0.93
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 8
  • Pull requests: 40
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 3 days
  • Issue authors: 3
  • Pull request authors: 12
  • Average comments per issue: 0.88
  • Average comments per pull request: 0.93
  • Merged pull requests: 33
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mmaker (5)
Pull Request Authors
  • tcoratger (40)
  • WizardOfMenlo (9)
  • recmo (7)
  • rex4539 (3)
  • iamslown (2)
  • alxiong (2)
  • veljkovranic (1)
  • kustosz (1)
  • maximevtush (1)
  • davidjsonn (1)
  • rkdud007 (1)
  • AlexThemelis (1)
  • cknabs (1)
  • nougzarm (1)
  • SuccinctPaul (1)
Top Labels
Issue Labels
good first issue (1)
Pull Request Labels

Dependencies

.github/workflows/docs.yml actions
  • actions-rs/cargo v1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v2 composite
  • actions/upload-pages-artifact v1 composite
Cargo.lock cargo
  • ahash 0.8.3
  • ark-bls12-381 0.4.0
  • ark-crypto-primitives 0.4.0
  • ark-ec 0.4.2
  • ark-ff 0.4.2
  • ark-ff-asm 0.4.2
  • ark-ff-macros 0.4.2
  • ark-poly 0.4.2
  • ark-relations 0.4.0
  • ark-serialize 0.4.2
  • ark-serialize-derive 0.4.2
  • ark-snark 0.4.0
  • ark-std 0.4.0
  • autocfg 1.1.0
  • bincode 1.3.3
  • blake2 0.10.6
  • block-buffer 0.10.4
  • cfg-if 1.0.0
  • cpufeatures 0.2.8
  • crypto-common 0.1.6
  • derivative 2.2.0
  • digest 0.10.7
  • either 1.8.1
  • generic-array 0.14.7
  • getrandom 0.2.10
  • hashbrown 0.13.2
  • itertools 0.10.5
  • keccak 0.1.4
  • libc 0.2.147
  • num-bigint 0.4.3
  • num-integer 0.1.45
  • num-traits 0.2.15
  • once_cell 1.18.0
  • paste 1.0.12
  • pin-project-lite 0.2.9
  • ppv-lite86 0.2.17
  • proc-macro2 1.0.63
  • quote 1.0.28
  • rand 0.8.5
  • rand_chacha 0.3.1
  • rand_core 0.6.4
  • rustc_version 0.4.0
  • semver 1.0.17
  • serde 1.0.164
  • sha2 0.10.7
  • subtle 2.5.0
  • syn 1.0.109
  • syn 2.0.22
  • tracing 0.1.37
  • tracing-core 0.1.31
  • tracing-subscriber 0.2.25
  • typenum 1.16.0
  • unicode-ident 1.0.9
  • valuable 0.1.0
  • version_check 0.9.4
  • wasi 0.11.0+wasi-snapshot-preview1
  • zeroize 1.6.0
  • zeroize_derive 1.4.2
Cargo.toml cargo
  • ark-bls12-381 0.4.0 development
  • ark-std 0.4.0 development
  • blake2 0.10.6 development
  • sha2 0.10.7 development
  • ark-crypto-primitives 0.4.0
  • ark-ec 0.4.0
  • ark-ff 0.4.0
  • ark-serialize 0.4.2
  • bincode 1.3.3
  • digest 0.10.7
  • generic-array 0.14.7
  • keccak 0.1.4
  • rand 0.8.5
  • serde 1.0.164
  • zeroize 1.6.0