All Projects → adjoint-io → sonic

adjoint-io / sonic

Licence: MIT license
Zero-Knowledge SNARKs from Linear-Size Universal and Updatable Structured Reference Strings

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to sonic

Srs
SRS is a simple, high efficiency and realtime video server, supports RTMP, WebRTC, HLS, HTTP-FLV, SRT and GB28181.
Stars: ✭ 16,734 (+40714.63%)
Mutual labels:  srs
ripp
Argument systems for inner pairing products
Stars: ✭ 34 (-17.07%)
Mutual labels:  zksnarks
srsRAN
Open source SDR 4G/5G software suite from Software Radio Systems (SRS)
Stars: ✭ 2,759 (+6629.27%)
Mutual labels:  srs
conclave
Query compiler for secure multi-party computation.
Stars: ✭ 86 (+109.76%)
Mutual labels:  multiparty-computation
bellman
Bellman zkSNARK library for community with Ethereum's BN256 support
Stars: ✭ 121 (+195.12%)
Mutual labels:  zksnarks
ephyr
Self-hosted server solution for video streaming powered by Rust, SRS ad FFmpeg
Stars: ✭ 24 (-41.46%)
Mutual labels:  srs
Android-Library-Management
Android Library Management Project
Stars: ✭ 32 (-21.95%)
Mutual labels:  srs
speed-focus-mode
Speed Focus Mode add-on for Anki
Stars: ✭ 19 (-53.66%)
Mutual labels:  srs
awesome-zkp-starter-pack
A curated collection of links for zero-knowledge proof cryptography used in blockchains
Stars: ✭ 63 (+53.66%)
Mutual labels:  zksnarks
snarkOS
A Decentralized Operating System for Zero-Knowledge Applications
Stars: ✭ 1,302 (+3075.61%)
Mutual labels:  zksnarks
GeoArrays.jl
Simple geographical raster interaction built on top of ArchGDAL, GDAL and CoordinateTransformations
Stars: ✭ 42 (+2.44%)
Mutual labels:  crs
srs-docker
Docker image for SRS.
Stars: ✭ 14 (-65.85%)
Mutual labels:  srs
go srs
a rtmp server similar with srs but wrote by golang
Stars: ✭ 34 (-17.07%)
Mutual labels:  srs
Srslte
Open source SDR 4G/5G software suite from Software Radio Systems (SRS)
Stars: ✭ 2,418 (+5797.56%)
Mutual labels:  srs
WeDPR-Lab-Core
Core libraries of WeDPR instant scenario-focused solutions for privacy-inspired business; WeDPR即时可用场景式隐私保护高效解决方案核心算法组件
Stars: ✭ 147 (+258.54%)
Mutual labels:  multiparty-computation
Anki Android
AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
Stars: ✭ 4,425 (+10692.68%)
Mutual labels:  srs
memanki-cli
CLI implementation of memanki
Stars: ✭ 21 (-48.78%)
Mutual labels:  srs
roamsr
Spaced Repetition in Roam Research
Stars: ✭ 96 (+134.15%)
Mutual labels:  srs
srijan-gsoc-2020
Healthcare-Researcher-Connector Package: Federated Learning tool for bridging the gap between Healthcare providers and researchers
Stars: ✭ 17 (-58.54%)
Mutual labels:  multiparty-computation
MOTION
An efficient, user-friendly, modular, and extensible framework for mixed-protocol secure multi-party computation with two or more parties
Stars: ✭ 59 (+43.9%)
Mutual labels:  multiparty-computation

Adjoint Logo

Sonic [1] is a zk-SNARK protocol for general arithmetic circuit satisfiability with universal and updatable Structured Reference String (SRS) proposed by Groth et al. [2] that scales linearly in size. Despite requiring a trusted setup for an SRS, the SRS can be continually strengthened and Sonic only requires a single setup for all circuits.

Sonic allows a prover to demonstrate knowledge of a hidden witness for a given constraint system. It defines its constraint system with respect to the two-variate polynomial equation used in Bulletproofs [3].

Usage

The Sonic protocol can be outlined in three steps: Setup, Prover and Verifier. Due to the universality property of the SRS, the setup phase needs only to be run once. This implementation uses BLS12-381 elliptic curve.

sonicProtocol :: ArithCircuit Fr -> Assignment Fr -> Fr -> IO Bool
sonicProtocol circuit assignment x = do
  -- Setup for an SRS
  srs <- SRS.new <$> randomD n <*> pure x <*> rnd
  -- Prover
  (proof, y, z, ys) <- prove srs assignment circuit
  -- Verifier
  pure $ verify srs circuit proof y z ys
  where
    -- Number of multiplication constraints
    n = length $ aL assignment
    -- Note that 'd' should be large enough to support the circuit depth 'n'
    randomD n = getRandomR (3 * n + 9, 100 * n)

The following example takes an arithmetic circuit of 5 linear constraints and 2 multiplication constraints:

runExample :: IO ()
runExample = do
  pX <- rnd
  pZ <- rnd
  let (arithCircuit, assignment@Assignment{..}) = arithCircuitExample pX pZ
  success <- sonicProtocol arithCircuit assignment pX
  putText $ "Success: " <> show success

The complete code of the example above can be found here.

Disclaimer

This is experimental code meant for research-grade projects only. Please do not use this code in production until it has matured significantly.

References

  1. Maller M., Bowe S., Kohlweiss M. and Meiklejohn S. "Sonic: Zero-Knowledge SNARKs from Linear-Size Universal and Updateable Structured Reference Strings", 2019. https://eprint.iacr.org/2019/099

  2. Groth J., Kohlweiss M., Maller M., Meiklejohn S., Miers M. "Updatable and Universal Common Reference Strings with Applications to zk-SNARKs", 2018. https://eprint.iacr.org/2018/280.pdf

  3. Bunz B., Bootle J., Boneh D., Poelstra A., Wuille P., Maxwell G. "Bulletproofs: Short Proofs for Confidential Transactions and More", 2018. https://eprint.iacr.org/2017/1066.pdf

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].