zkAsm
A Zero-Knowledge circuit assembly language, designed to represent Zero-Knowledge circuits in a compressed format, to be stored on blockchains.
Instructions
ALLOC sig, count
Allocates count
field elements which could then be referred as sig
.
BIT sig Constrains sig
so that it can only accept 0 or 1 values. (-> sig*(1-sig)==0
)
BIN32 src, dst Converts a single src
field element into 32 bits and store in dst
.
BIN64 src, dst Converts a single src
field element into 64 bits and store in dst
.
CONS (a + b + ...) * (c + d + ...) == (e + f + ...) A single constraint.
EXPAND $i = 0 to $N ENDEXPAND Expands the instructions through a loop.
VERIFYSIG Verify signature.