|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +parent: Stanford Blockchain Conference 2019 |
| 4 | +grand_parent: Stanford Blockchain Conference |
| 5 | +title: Aurora Transparent Succinct Arguments R1Cs |
| 6 | +nav_exclude: true |
| 7 | +transcript_by: Bryan Bishop |
| 8 | +--- |
| 9 | + |
| 10 | +{% if page.transcript_by %} <i>Transcript by: |
| 11 | +{{ page.transcript_by }}</i> {% endif %} Aurora: Transparent succinct |
| 12 | +arguments for R1CS |
| 13 | + |
| 14 | +Alessandro Chiesa |
| 15 | + |
| 16 | +<https://twitter.com/kanzure/status/1090741190100545536> |
| 17 | + |
| 18 | +## Introduction |
| 19 | + |
| 20 | +Hi. I am Alessandro Chiesa, a faculty member at UC Berkeley. I work on |
| 21 | +cryptography. I'm also a chief scientist at Starkware. I was a founder |
| 22 | +of zcash. Today I will like to tell you about recent work in |
| 23 | +cryptographic proof systems. This is joint work with people at |
| 24 | +Starkware, UC Berkeley, MIT Media Lab, and others. In the prior talk, we |
| 25 | +talked about scalability. But this current talk is more about privacy by |
| 26 | +using cryptographic proofs. |
| 27 | + |
| 28 | +paper: <https://eprint.iacr.org/2018/828> |
| 29 | + |
| 30 | +## zkSNARKs |
| 31 | + |
| 32 | +Let me spend just one slide to remind you what zkSNARKs are. They are a |
| 33 | +cryptographic proof system that allows you to produce non-interactive |
| 34 | +proofs for computational integrity. You can say I know w such that y = |
| 35 | +F(w) without revealing w. The privacy property here is called |
| 36 | +zero-knowledge. The proof itself provably hides the secret. The |
| 37 | +efficient properties of SNARKs have to do with the size of the proof. |
| 38 | +Succinctness dictates that the size of the proof only grows |
| 39 | +polylogarithmically in the length of the proof being produced. In the |
| 40 | +previous talk, we also focused on succinctness of the verifier. The |
| 41 | +process of verifying the proof must be exponentially faster than making |
| 42 | +a new proof. |
| 43 | + |
| 44 | +Over the past few years, there have been many beautiful and efficient |
| 45 | +constructions of zero-knowledge proofs. We've seen real world |
| 46 | +deployments like zcash and so on. |
| 47 | + |
| 48 | +We wanted to study a class of zkSNARKs that are transparent. These are |
| 49 | +those that don't rely on any ... any public parameters are just pure |
| 50 | +public parameters. I am not going to give an overview of trusted setup, |
| 51 | +I am sure there's enough resources online about trusted setup. |
| 52 | + |
| 53 | +## How to construct a zkSNARK |
| 54 | + |
| 55 | +Most instructions have two parts. You can think about a frontend, a |
| 56 | +reduction that takes a problem you care about, and a statement about the |
| 57 | +computation, and reduce it to some intermediate representation that |
| 58 | +involves statements. You have a proof system that picks up the |
| 59 | +intermediate representation, and produce a proof string that represents |
| 60 | +some properties about the intermediate representation. The choice of |
| 61 | +intermediate representation is very important because it impacts |
| 62 | +efficiency of reduction and the efficiency of the proof system. |
| 63 | + |
| 64 | +Today I will tell you about a proof system for an intermediate |
| 65 | +representation that has shown strong properties. |
| 66 | + |
| 67 | +## Rank-1 constraint satisfaction (R1CS) |
| 68 | + |
| 69 | +How many of you have heard of R1CS before? Okay, so about a third of |
| 70 | +you. That's great. R1CS construction is a very simple language. Let me |
| 71 | +define it for you in a little box. It says let give you three things, A, |
| 72 | +B, and C and some public input x. The problem you're trying to solve is, |
| 73 | +does there exist an input w such that if you take A and multiply it by |
| 74 | +the vector xw, and take B and multiply by vector xw, and C and do the |
| 75 | +same, you get three vectors that are.... You use an element-wise |
| 76 | +product, where you multiply by coordinates. So does the first coordinate |
| 77 | +of the first vector multiplied by the second, equal the first |
| 78 | +coordinator of the last vector? |
| 79 | + |
| 80 | +Why are we looking at this funny looking problem? It generalizes a |
| 81 | +rather natural type of computation which is circuit computations. |
| 82 | +Circuits might not sound natural, but they are natural for cryptographic |
| 83 | +proof systems. It's a type of problem from which you can construct proof |
| 84 | +systems. R1CS is a more general problem within that. It's easy to make |
| 85 | +certain circuits in this system. It's a simple linear algebraic |
| 86 | +structure which simplifies the backend. It generalizes arithmetic |
| 87 | +circuit SAT on the frontend. It's a good tradeoff between frontend and |
| 88 | +backend. |
| 89 | + |
| 90 | +This is not just in principle, but we have a lot of empirical evidence |
| 91 | +that real world programmers out there have been able to express problems |
| 92 | +of interest in this language. They built zcash, libsnark, xJsnark, |
| 93 | +ZoKrates, Snarky, etc. |
| 94 | + |
| 95 | +## Aurora |
| 96 | + |
| 97 | +In this work, we put forward a construction of a zkSNARK that does not |
| 98 | +have a trusted setup. It only relies on public randomness and |
| 99 | +cryptographic hash functions. It lets you prove satisfiability of rank-1 |
| 100 | +satisfaction constraint problems. The parameters of this proof system |
| 101 | +are a good verifying itme, and we get very small proofs- they are |
| 102 | +exponentially smaller than the computation. The number of gates or |
| 103 | +constraints in your circuit, the proof size only grows |
| 104 | +polylogarithmically in the size of your computation. That's the key |
| 105 | +efficiency property we're trying to achieve here. |
| 106 | + |
| 107 | +In terms of real world numbers, the proving time for millions of gates |
| 108 | +is mere minutes. The size of this proof is going to be on the order of |
| 109 | +10-20 of kilobytes. Verification will be in a few seconds for millions |
| 110 | +of gates. |
| 111 | + |
| 112 | +Why are we studying this type of construction? Well, they have this |
| 113 | +transparent setup. It has a black box use of symmetric-key crypto (a |
| 114 | +random oracle), and it's plausibly post-quantum secure and we have very |
| 115 | +few constructions of SNARKs that can withstand quantum adversaries. |
| 116 | + |
| 117 | +## How does this compare against other transparent succinct arguments? |
| 118 | + |
| 119 | +The first proof size achieved in Aurora is 50x larger than the proofs in |
| 120 | +bulletproofs. It's another proof systme for circuits that has a |
| 121 | +transparent setup. These proof systems are not competitive with other |
| 122 | +constructions that rely on public-key cryptography that relies on the |
| 123 | +hardness of discrete logs. |
| 124 | + |
| 125 | +On the other hand, what we achieve in Aurora, is that among |
| 126 | +constructions that use ... we achieve 10x improvement in the proof size |
| 127 | +compared to prior works that when applied ot these circuits. So, the |
| 128 | +punchline is that in this work we achieved the smallest known-to-date |
| 129 | +post-quantum SNARK for circuits of the R1CS problem. |
| 130 | + |
| 131 | +## zkSNARKs from PCPs |
| 132 | + |
| 133 | +I'd like to tell you about what's happening in these SNARKs and where |
| 134 | +does this class of post-quantum SNARKs come from. The first SNARK |
| 135 | +discovered was already done in the cryptography community in the mid |
| 136 | +90s. Back then we didn't call them SNARKs, they had another name. We had |
| 137 | +constructions where if you give me a probabilistically checkable proof- |
| 138 | +which you can check by querying a few locations in the proof- then using |
| 139 | +such a proof you can build a SNARK. Already back then, this construction |
| 140 | +had a property that today we recognize is very attractive such as a |
| 141 | +transparent setup, you only use random oracles and cryptographic hash |
| 142 | +functions, and it was already post-quantum secure plausibly back in the |
| 143 | +90s. But PCPs were treated as bad constructions because they were making |
| 144 | +use of strong cryptographic assumptions (namely the random oracle) so |
| 145 | +for the most part they were not treated as a satisfying construction. |
| 146 | + |
| 147 | +From a practical perspective, for us, these are great properties. They |
| 148 | +are easy to deploy, they are plausibly post-quantum secure, and they |
| 149 | +don't need new crypto. So why not deploy these? Well, we still don't |
| 150 | +have good asymptotic results for PCPs or even good implementations of |
| 151 | +this object. Okay, well, it means that whatever I'm discussing today is |
| 152 | +not built from PCPs. |
| 153 | + |
| 154 | +So how do we achieve post-quantum SNARKs today? |
| 155 | + |
| 156 | +## zkSNARKs from IOPs |
| 157 | + |
| 158 | +A few years ago, in a paper, we proposed an alternative approach where |
| 159 | +we extended PCPs with interactive oracle proofs. It's a multi-round |
| 160 | +analog proof, and over the past few years we have been able to show that |
| 161 | +in this model we can still get all the previous advantages of PCPs while |
| 162 | +circumventing many of the issues. We were able to achieve interactive |
| 163 | +oracle proofs with optimal proof size. We were also able to put together |
| 164 | +complete efficiency prototypes with..... The STARKs in the previous talk |
| 165 | +had an interactive oracle proof underneath. The scalability properties |
| 166 | +come from advances and limtiations of interactive oracle proofs on which |
| 167 | +we layer other crypto. |
| 168 | + |
| 169 | +## An IOP for R1CS |
| 170 | + |
| 171 | +If we want to focus on the language of R1CS, then it sounds reasonable |
| 172 | +that -- it shouldn't be surprising that the core of the work is |
| 173 | +designing an interactive oracle proof for this problem. I want to design |
| 174 | +such a proof for checking satisfiyability of this problem of rank-one |
| 175 | +constraint satisfaction problem. We are able to show that for this |
| 176 | +problem you are able to achieve opitmal proof size, this is the size of |
| 177 | +the proof you're checking which is linear. We can generate small proofs. |
| 178 | +Are people still following? Something I like about this work is that the |
| 179 | +construction behind this work isn't that difficult. If I had a full |
| 180 | +hour, I could actually give you a reasonable picture of what's happening |
| 181 | +in the protocol itself and you'd have some sense for what's happening. |
| 182 | + |
| 183 | +## Protocol design: Naieve checking |
| 184 | + |
| 185 | +Instead, I will tell you a little bit about the high-level structure of |
| 186 | +how you go about taking a problem like R1CS and checking it with small |
| 187 | +proofs. The problem is, I give you three matrices, a public vector x, |
| 188 | +and I want to ask if I can extend this public vector with a secret |
| 189 | +extension such that a certain constraint is kept. This looks like a |
| 190 | +circuit. |
| 191 | + |
| 192 | +The naive way of checking this problem would be for the prover to send |
| 193 | +to the verifier the secret value. I could just send you z, which is |
| 194 | +large, almost as large as the computation so I haven't saved everything. |
| 195 | +Okay, fine. Let's make the problem simpler. What about instead of r1cs, |
| 196 | +we can do a sub-problem that can communicate less information. Instead |
| 197 | +of sending z, I send A, B, C and z, and then you as a verifier check |
| 198 | +that A, B, and C are the correct linear transformations of z and that A, |
| 199 | +B, and C given that they are correct linear transformations, then they |
| 200 | +satisfy a coordinate-wise product. Whatever I was checking before, I |
| 201 | +have translated it into four subproblems that are equivalent to what I |
| 202 | +was checking before. |
| 203 | + |
| 204 | +## Reed-Solomon refresher |
| 205 | + |
| 206 | +In the prior talk, at some point the word "codes" was mentioned. In all |
| 207 | +of these STARK constructions, error correcting codes play an important |
| 208 | +role because you take all of these computation traces (like check |
| 209 | +signatures, check paths, etc.). What we do with this computation trace |
| 210 | +is, what happens in all these proof systems including SNARKs in zcash, |
| 211 | +we take those computation traces and encode them using special codes |
| 212 | +that give us some error correcting properties that later give rise to |
| 213 | +the properties of probabilistic checking. |
| 214 | + |
| 215 | +In these constructions, the code of choice is the Reed-Solomon code. In |
| 216 | +the theory of error correcting codes, this is a foundational code. When |
| 217 | +you want to encode information, you're going to pick some field that is |
| 218 | +large enough. And you pick two sets- one is called the interpolation |
| 219 | +set. That's called H. Inside the interpolation set, you lay out your |
| 220 | +computation trace. Then you pick an evaluation set. What do you do with |
| 221 | +these sets? First you think about, that I can put a computation trace |
| 222 | +inside the interpolation set, and then you interpolate. That's why we |
| 223 | +call it an interpolation set. You get a unique polyonomial that includes |
| 224 | +information inside it about the trace. This evaluation has information |
| 225 | +inside the computation trace, but it has it in some sort of redundant |
| 226 | +form. Essentially, two different computation traces even if they differ |
| 227 | +at one step, now in only one step, wants to encode them, they will |
| 228 | +differ in many many locations. So it amplifies differences between |
| 229 | +different execution traces. |
| 230 | + |
| 231 | +Intuitively, this should have something t odo with catching errors in a |
| 232 | +computation with small number of queries. If small differences create |
| 233 | +big differences in encoding, then maybe the prover would have a harder |
| 234 | +time cheating. But this is only at a high level. This is just to suggest |
| 235 | +why there are many roles for codes to play here. |
| 236 | + |
| 237 | +## Encoded checking via subproblems |
| 238 | + |
| 239 | +At the very high level, we translate each of these sub-problems that we |
| 240 | +have to check into corresponding questions about polynomials. Instead of |
| 241 | +talking about vectors and matrices, now we talk about operations on |
| 242 | +polynomials. |
| 243 | + |
| 244 | +The way that our interactive oracle proof works in our work works, we |
| 245 | +have subprotocols for these linear relations (lincheck) and for checking |
| 246 | +the coordinate-wise product we call it rowcheck. And lincheck reduces to |
| 247 | +univariate sumcheck, and there's Reed-Solomon testing as well. For |
| 248 | +rowcheck there's standard PCP checks. |
| 249 | + |
| 250 | +## Implementation |
| 251 | + |
| 252 | +Enough with technical things. We've been developing a library called |
| 253 | +libiop. It enables the construction of post-quantum SNARKs starting with |
| 254 | +interactive oracle proofs. It's a C++ toolchain that we hope to put |
| 255 | +online in the next couple months. This library enables you to make |
| 256 | +constructions of zkSNARKs with transparent setup (only random oracle |
| 257 | +model), lightweight crypto (only random oracle model), and it's |
| 258 | +post-quantum secure. There are also other components, we automize the |
| 259 | +construction of a post-quantum SNARK and we show how to construct not |
| 260 | +just Aurora but other protocols from the literature such as Ligero or |
| 261 | +direct LDT or FRI LDT. |
| 262 | + |
| 263 | +I want to thank Dev Ojha at UC Berkeley who has been doing lots of great |
| 264 | +work on improving and cleaning up this library for an upcoming |
| 265 | +open-source release. |
| 266 | + |
| 267 | +## Evaluation: Comparison of Aurora, Ligero, and STARKs |
| 268 | + |
| 269 | +The key property that we have achieved in this work is the shortest |
| 270 | +proof size of circuits. It grows log squared in the size of the circuit. |
| 271 | +I hope that you have learned something about post-quantum SNARKs today, |
| 272 | +and I'd be happy to answer questions. |
0 commit comments