aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/journal/README.md8
-rw-r--r--docs/journal/pages/field-extension.md11
-rw-r--r--docs/journal/pages/finite-fields.md25
-rw-r--r--docs/journal/pages/template.md11
4 files changed, 55 insertions, 0 deletions
diff --git a/docs/journal/README.md b/docs/journal/README.md
new file mode 100644
index 0000000..7407bff
--- /dev/null
+++ b/docs/journal/README.md
@@ -0,0 +1,8 @@
+# PLONKers! Development Journal
+
+This directory contains the development journal for PLONKers!. It is a collection of markdown files that document the development process as well as concepts that I learned along the way.
+
+## Table of Contents
+
+1. [Finite Fields](./pages/finite-fields.md)
+2. [Field Extension](./pages/field-extension.md)
diff --git a/docs/journal/pages/field-extension.md b/docs/journal/pages/field-extension.md
new file mode 100644
index 0000000..6494df5
--- /dev/null
+++ b/docs/journal/pages/field-extension.md
@@ -0,0 +1,11 @@
+> [Index](../README.md)
+
+# Title
+
+Body.
+
+# Resources
+
+- [Polynomial Ring](https://en.wikipedia.org/wiki/Polynomial_ring)
+
+> [Index](../README.md)
diff --git a/docs/journal/pages/finite-fields.md b/docs/journal/pages/finite-fields.md
new file mode 100644
index 0000000..43518f7
--- /dev/null
+++ b/docs/journal/pages/finite-fields.md
@@ -0,0 +1,25 @@
+> [Index](../README.md)
+
+# Finite Fields
+
+One of the mathematical principles underpinning the PLONK proof systems are finite fields. These are used in both the PLONK circuits themselves, but also in the eliptic curve pairings necessary for the proof system.
+
+In PLONKers!, we are building a very specific PLONK construction over the BN254 curve (sometimes referred to as "alt-bn128" or "bn128" - why? They are **B**arreto-**N**aehrig curves with a **254**-bit prime and an initially estimated security of **128** bits). This curve is defined over a finite field with a prime modulus. This sounds complicated, but it really means that:
+
+- `p = 21888242871839275222246405745257275088696311157297823662689037894645226208583`, a very large prime
+- It is the set of whole numbers from `0` to `p - 1` (inclusive)
+- Addition and multiplication are done modulo `p`
+- Substraction is the addition of the additive inverse (`-a = p - a`, so `a + (-a) = 0` for all `a`)
+- Division is the multiplication by the multiplicative inverse (`1/a = a ^ (p - 2) mod p`, so `a * (1/a) = 1` for all `a` except `0`, the inverse of `0` is undefined)
+
+And with this we build the "numbers" that we use for PLONK and eliptic curve operations.
+
+The BLS12-381 curve as it has some nicer properties over BN254, and may show up in a future episode :).
+
+# Resources
+
+- [BN256 For The Rest Of Us](https://hackmd.io/@jpw/bn254)
+- [BLS12-381 For The Rest Of Us](https://hackmd.io/@benjaminion/bls12-381)
+- [`ethereum/py_ecc`](https://github.com/ethereum/py_ecc)
+
+> [Index](../README.md)
diff --git a/docs/journal/pages/template.md b/docs/journal/pages/template.md
new file mode 100644
index 0000000..4178ac7
--- /dev/null
+++ b/docs/journal/pages/template.md
@@ -0,0 +1,11 @@
+> [Index](../README.md)
+
+# Title
+
+Body.
+
+# Resources
+
+- [Resource](https://example.com)
+
+> [Index](../README.md)