HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
scipr-lab
libsnark
C++2014–2023
scipr-lab / libsnark

libsnark

C++ library for zkSNARKs

7Distinct people
7Mentions
0Explicit recommenders
1.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

C++ library for zkSNARKs

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2014-10-17 22:50:07 UTC to 2023-09-15 14:03:11 UTC.

0122014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC211
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC110
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

7 sources
> Also, they typically compile only a restrictive subset of C, It has to be a restrictive subset of C; since not all C code has a combinatorical equivalent. Sequential circuits (those with things like flip flops) do not work with this proof[1]. I also suspect that there is no general zero knowledge proof for these circuits/programs, and there may be sequential circuits for which there is no ZKP at all. This is because variables like "the number of iterations in a loop" can be extracted from the execution proof, making it no longer zero knowledge. I don't think that this can be masked in a general solution that doesn't completely unroll loops. I don't know how to prove this, but I suspect that the halting problem will be involved in raining on this parade. However, most problems can be converted to this restrictive subset, since given the
Read the rest
size of the input there is usually a bound on the number of iterations of a loop. In general the halting problem should stop you from calculating this bound, but in most specific cases I think this would be doable. > none of the good ones are open source or even publicly available at all. I've not used it, but libsnark (https://github.com/scipr-lab/libsnark) seems to have a bunch of utilities to be able to construct programs using various abstractions it provides. But yeah, no compiler. > you are restricted to proving very trivial statements that are of little practical use Agree 100%. I'm more interested in the cool theory behind it (and its ability to compose with systems like Bitcoin) than actual practical uses. This is pretty much my usual attitude towards such things One practical use I can come up with would be to securely sell a decryption key (or really, any kind of key) via Bitcoin. The bitcoin script already lets you do this, however in the process the key would become publicly known. You can use the trick with the pad mentioned at the bottom of the post in conjunction with ZKP. I suspect that writing the verifier for this using something like libsnark wouldn't be too hard, but I don't know for sure. [1]: They work in the sense that it's still possible to prove things using the same algorithm, but it's no longer zero knowledge: many gates will be visited multiple times, so more than one truth table entry will be revealed, which makes it possible to decrypt the gate. The number of times a gate is visited also leaks information.
In Exploring Zero-Knowledge Proofs
Here's some stuff on zerocash: Zerocash: Decentralized anonymous payments from Bitcoin: http://diyhpl.us/~bryan/papers2/bitcoin/Zerocash:%20Decentra... Zerocoin: anonymous, distributed e-cash from bitcoin: http://diyhpl.us/~bryan/papers2/bitcoin/Zerocoin:%20anonymou... How to explain zero knowledge protocols to other people's children: http://diyhpl.us/~bryan/papers2/bitcoin/snarks/How%20to%20ex... GGPR paper, NIZKs without PCPs: http://diyhpl.us/~bryan/papers2/bitcoin/snarks/Quadratic%20s... Snarks for C: Verifying program execution succinctly and in zero knowledge: http://diyhpl.us/~bryan/papers2/bitcoin/snarks/SNARKs%20for%... Secure sampling of public parameters for succinct zero knowledge proofs: http://diyhpl.us/~bryan/papers2/bitcoin/snarks/Secure%20samp... https://github.com/scipr-lab/libsnark FWIW I think that confidential transa
Read the rest
ctions and even SNARKs will eventually make their way into Bitcoin.
In ZCash (formerly Zerocash/Zerocoin) technology preview
From a brief glance over their publications, the answer seems to be no. I base this claim on a few heuristics: 1. That's clearly not a goal of their research (they discuss using their ORAM and Ostructures in the context of trusted processors). 2. They don't cite any of the relevant work on verifiable computation. 3. They seemingly aren't familiar with the work of the last couple years, in which substantial progress has been made on the problem of stateful verified computation (see Pantry [1], TinyRAM [2], vnTinyRAM [3], and Buffet [4]) (or, at least, they don't acknowledge these advances), since they claim that RAM-to-circuits necessitates O(T N) blowup (in fact, best demonstrated case is O(T log(N)), though solutions with asymptotics more like O(T log(T) log(N)) have better constant factors). I have not carefully examined their results o
Read the rest
r tried to reproduce them locally for comparison to my own work, but if you are interested in experimenting with verifiable computations, there are two research projects with code available you might want to look at: libSNARK [5,6] and Pepper [7,8]. libSNARK contains a beautifully optimized "backend" for verifiable execution (that is, executing the computation after it's been translated into circuits; see the vnTinyRAM paper [3] for more details). The Pepper project has released a full pipeline (from C program to client/server binaries for verifiable execution) and an independent re-implementation of the TinyRAM and vnTinyRAM systems, but the current execution backend is not as highly optimized as libSNARK's (though this will change in the near future). (Full disclosure: I'm on the Pepper team.) [1] https://eprint.iacr.org/2013/356 [2] https://eprint.iacr.org/2013/507 [3] https://eprint.iacr.org/2013/879 [4] https://eprint.iacr.org/2014/674 [5] http://www.scipr-lab.org/ [6] https://github.com/scipr-lab/libsnark [7] http://www.pepper-project.org [8] https://github.com/pepper-project/pepper/
In ObliVM: Scalable and Programmable Secure Computation

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.