This folder contains codes for our paper DualMatrix: Conquering zk-SNARK for Large Matrix Multiplication.
Given a pairing
then the two-tier commitment
Suppose the prover has made commitments to three matrices
Then, the prover can generate a zero-knowledge proof with
We employ the random oracle approach.
For more details, refer to the math in our paper.
To run the experiment in the DualMatrix paper, run the following command:
cd /path/to/zkmatrix
cargo bench
- Rust Toolchain: 3.10.12
- Environment: Ubuntu 22.04
- util/ Utility functions for Fiat-Shamir transformation, matrix projections, and inner products.
- protocols/ The MatMul protocol and its sub-protocols.
- zkprotocols/ The zero-knowledge MatMul protocol and its sub-protocols.
DualMatrix contains four subprotocols:
- Scalar projection argument
- Left projection argument
- Right projection argument
- Inner product argument in
$\mathbb{G}_T$
The scalar projection argument, for example, is for the following relation:
The pseudo-code for this subprotocol is as follows:
If our work benefits to your research, please cite our paper as follows:
Anonymous