From 0d5b2c25fd305157df96708387e2c72a221f91f6 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Thu, 15 Aug 2024 10:18:08 -0700 Subject: [PATCH] refactor!: start on bigbook content --- bigbook.typ | 53 +++++++++++-------- easy.typ | 7 --- .../bigbook-frontmatter.typ | 16 +++--- {old-stuff => src}/cq.typ | 0 {old-stuff => src}/groth16.typ | 0 {old-stuff => src}/ipa.typ | 0 src/preamble.typ | 8 +++ {old-stuff => src}/sumcheck.typ | 0 8 files changed, 50 insertions(+), 34 deletions(-) rename old-stuff/frontmatter.typ => src/bigbook-frontmatter.typ (83%) rename {old-stuff => src}/cq.typ (100%) rename {old-stuff => src}/groth16.typ (100%) rename {old-stuff => src}/ipa.typ (100%) rename {old-stuff => src}/sumcheck.typ (100%) diff --git a/bigbook.typ b/bigbook.typ index 9467d86..726535d 100644 --- a/bigbook.typ +++ b/bigbook.typ @@ -1,13 +1,7 @@ #import "src/preamble.typ":* #let chapter(filename) = { include filename - pagebreak(weak: true) } -#let part(s) = { - set text(size:1.4em, fill: rgb("#002299")) - heading(numbering: none, s) -} - #show: evan.with( title: "Notes on Programmable Cryptography", author: "0xPARC", @@ -24,27 +18,44 @@ #toc #pagebreak() -#chapter("src/frontmatter.typ") -#chapter("src/intro.typ") +#set heading(offset: 1) +#part[Introduction] +#chapter("src/bigbook-frontmatter.typ") +#chapter("src/intro.typ") // needs some rewriting though + +#part[Two-party Computation] +#chapter("src/mpc.typ") +#chapter("src/ot.typ") +#chapter("src/2pc-takeaways.typ") -#part[zkSNARK constructions] -#chapter("src/h-zksnark.typ") +#part[SNARKs Prelude: Elliptic Curves and Polynomial Commitments] #chapter("src/ec.typ") #chapter("src/pair.typ") #chapter("src/kzg.typ") -#chapter("src/ipa.typ") +#chapter("src/kzg-takeaways.typ") + +#part[Your first SNARK: The PLONK Protocol] +#chapter("src/zkintro.typ") #chapter("src/plonk.typ") +#chapter("src/copy-constraints.typ") +#chapter("src/fs.typ") +#chapter("src/snark-takeaways.typ") + +#part[Another STARK: GROTH-16] +#chapter("src/ipa.typ") #chapter("src/groth16.typ") -#chapter("src/cq.typ") -#part[Multi-party computation and garbled circuits] -#chapter("src/h-mpc.typ") -#chapter("src/mpc.typ") +#part[Binius] +#chapter("src/sumcheck.typ") -#part[Fully homomorphic encryption] -#chapter("src/h-fhe.typ") +#part[Fully Homomorphic Encryption with LWE] +#chapter("src/fhe0.typ") +#chapter("src/lwe.typ") +#chapter("src/fhe2.typ") +#chapter("src/fhe3.typ") +#chapter("src/fhe-takeaways.typ") -#part[Appendix: Classical PCP] -#chapter("src/h-classical-pcp.typ") -#chapter("src/sumcheck.typ") -#chapter("src/pcp.typ") +#part[Oblivious RAM] + +#part[Others] +#chapter("src/cq.typ") diff --git a/easy.typ b/easy.typ index 618e660..4a72433 100644 --- a/easy.typ +++ b/easy.typ @@ -9,13 +9,6 @@ #let chapter(filename) = { include filename } -#let part(s) = { - let rstate = state("rhead", "") - rstate.update(rhead => s) - pagebreak(weak: true) - // set text(fill: rgb("#002299")) - heading(offset: 0, s) -} #show: evan.with( title: "Three Easy Pieces in Programmable Cryptography", diff --git a/old-stuff/frontmatter.typ b/src/bigbook-frontmatter.typ similarity index 83% rename from old-stuff/frontmatter.typ rename to src/bigbook-frontmatter.typ index 2f3c4cc..bf1875d 100644 --- a/old-stuff/frontmatter.typ +++ b/src/bigbook-frontmatter.typ @@ -1,14 +1,18 @@ #import "preamble.typ":* -= Frontmatter - -These are compiled lecture notes from a reading group hosted by the -#link("https://0xparc.org", "0xPARC Foundation"). -It's not meant to be a exhaustive textbook or mathematically complete reference, += About this novel + +This novel _Notes on Programmable Cryptography_ is a sequel +to the novella _Three Easy Pieces in Programmable Cryptography_, +from the #link("https://0xparc.org", "0xPARC Foundation"). +Whereas the novella was short enough to print and give to friends +as a souvenir to read on a plane ride, +this novel is meant to be a bit of a deeper dive. +Nonetheless, it's still not meant to be a exhaustive textbook or mathematically complete reference; but rather a introduction to the general landscape and ideas for newcomers. We assume a bit of general undergraduate math background, but not too much. -(For example, I'll just use the word "abelian group" freely, +(For example, we'll just use the word "abelian group" freely, and the reader is assumed to know modular arithmetic.) We don't assume specialized knowledge like elliptic curve magic. diff --git a/old-stuff/cq.typ b/src/cq.typ similarity index 100% rename from old-stuff/cq.typ rename to src/cq.typ diff --git a/old-stuff/groth16.typ b/src/groth16.typ similarity index 100% rename from old-stuff/groth16.typ rename to src/groth16.typ diff --git a/old-stuff/ipa.typ b/src/ipa.typ similarity index 100% rename from old-stuff/ipa.typ rename to src/ipa.typ diff --git a/src/preamble.typ b/src/preamble.typ index 80995e9..17e1a03 100644 --- a/src/preamble.typ +++ b/src/preamble.typ @@ -99,6 +99,14 @@ #let pmod(x) = $space (mod #x)$ #let rstate = state("rhead", "Table of contents") +#let part(s) = { + let rstate = state("rhead", "") + rstate.update(rhead => s) + pagebreak(weak: true) + // set text(fill: rgb("#002299")) + heading(offset: 0, s) +} + // Main entry point to use in a global show rule #let evan( diff --git a/old-stuff/sumcheck.typ b/src/sumcheck.typ similarity index 100% rename from old-stuff/sumcheck.typ rename to src/sumcheck.typ