Suyash Bagad
Research Team
2016
Groth'16
Bootle / Bulletproofs
2018
2019
Plonk
2022
HyperPlonk
2025
Twist & Shout
.section .data
array: .word 0, 0, 0, 0 # Initially, memory is all zeros
.section .text
.global _start
_start:
# Step 1: Load base address of array
la t0, array
# Step 2: Store Initial Values Explicitly
li t1, 10 # Load immediate 10 into t1
li t2, 20 # Load immediate 20 into t2
sw t1, 0(t0) # Store t1 (10) into array[0]
sw t2, 4(t0) # Store t2 (20) into array[1]
# Step 3: Explicitly Load Values Back into Registers
lw t1, 0(t0) # Load array[0] (10) into t1
lw t2, 4(t0) # Load array[1] (20) into t2
# Step 4: Perform Arithmetic Operations
add t3, t1, t2 # t3 = t1 + t2 (10 + 20 = 30)
mul t4, t1, t2 # t4 = t1 * t2 (10 * 20 = 200)
# Step 5: Store Computation Results in Memory
sw t3, 8(t0) # Store sum at array[2]
sw t4, 12(t0) # Store multiplication result at array[3]
# Step 6: Exit Program
li a7, 10 # syscall for exit
ecall
Write 10
Read 10
Prove: these two are equal
| address | value |
| 0x2000 | 0 |
| 0x2004 | 0 |
| 0x2008 | 0 |
| 0x200C | 0 |
\(\text{Memory}\)
| address | value |
| 0x2000 | 0 |
| 0x2004 | 0 |
| 0x2008 | 0 |
| 0x200C | 0 |
\(\text{Memory}\)
user-input
\(\text{Memory}\)
user-input
| address | value |
| 0x2000 | 0 |
| 0x2004 | 0 |
| 0x2008 | 0 |
| 0x200C | 0 |
\(\text{Memory}\)
| address | value |
| 0x2000 | 0 |
| 0x2004 | 0 |
| 0x2008 | 0 |
| 0x200C | 0 |
store 10
\(\text{Memory}\)
| address | value |
| 0x2000 | 10 |
| 0x2004 | 0 |
| 0x2008 | 0 |
| 0x200C | 0 |
store 20
\(\text{Memory}\)
\(\text{Memory}\)
load 10
\(\text{Memory}\)
load 20
\(\text{Memory}\)
\(\text{Memory}\)
\(\text{Memory}\)
store 30
\(\text{Memory}\)
store 200
\(\text{Memory}\)
store 200
\(\text{Memory}\)
Prove the reads and writes to and from memory were performed correctly.
🎯
writes 10
reads 10
writes 10
reads 10
writes 20
reads 20
\(\therefore\) Reordered memory operations are a permutation of the original memory operation!
| address | value |
| 0x2000 | 10 |
| 0x2004 | 20 |
| 0x2008 | 30 |
| 0x200C | 200 |
| ... | ... |
| ... | ... |
\(\text{ROM}\)
| encoding |
| ... |
| address | value |
| 0x2000 | 10 |
| 0x2004 | 20 |
| 0x2008 | 30 |
| 0x200C | 200 |
| ... | ... |
| ... | ... |
\(\text{ROM}\)
| encoding |
| ... |
| address | value |
| 0x2000 | 10 |
| 0x2004 | 20 |
| 0x2008 | 30 |
| 0x200C | 200 |
| ... | ... |
| ... | ... |
\(\text{ROM}\)
| one-hot |
| ... |
| 2d one-hot |
| address | value |
| 0x2000 | 10 |
| 0x2004 | 20 |
| 0x2008 | 30 |
| 0x200C | 200 |
| ... | ... |
| ... | ... |
\(\text{ROM}\)
| one-hot |
| ... |
| 2d one-hot |
| address | value |
| 0x2000 | 10 |
| 0x2004 | 20 |
| 0x2008 | 30 |
| 0x200C | 200 |
| ... | ... |
| ... | ... |
\(\text{ROM}\)
| 2d one-hot |
| address | value |
| 0x2000 | 10 |
| 0x2004 | 20 |
| 0x2008 | 30 |
| 0x200C | 200 |
| ... | ... |
| ... | ... |
\(\text{RAM}\)
| encoding |
| ... |
By Suyash Bagad