Paper 2025/1768

DualMatrix: Conquering zkSNARK for Large Matrix Multiplication

Mingshu Cong, University of Hong Kong
Tsz Hon Yuen, Monash University
Siu-Ming Yiu, University of Hong Kong
Abstract

We present DualMatrix, a zkSNARK solution for large-scale matrix multiplication. Classical zkSNARK protocols typically underperform in data analytic contexts, hampered by the large size of datasets and the superlinear nature of matrix multiplication. DualMatrix excels in its scalability. The prover time of DualMatrix scales linearly with respect to the number of non-zero elements in the input matrices. For $n \times n$ matrix multiplication with $N$ non-zero elements across three input matrices, DualMatrix employs a structured reference string (SRS) of size $O(n)$, and achieves RAM usage of $O(N+n)$, transcript size of $O(\log n)$, prover time of $O(N+n)$, and verifier time of $O(\log n)$. The prover time, notably at $O(N+n)$ and surpassing all existing protocols, includes $O(N+n)$ field multiplications and $O(n)$ exponentiations and pairings within bilinear groups. These efficiencies make DualMatrix effective for linear algebra on large matrices common in real-world applications. We evaluated DualMatrix with $2^{15} \times 2^{15}$ input matrices each containing $1G$ non-zero integers, which necessitate $32T$ integer multiplications in naive matrix multiplication. DualMatrix recorded prover and verifier times of $150.84$s and $0.56$s, respectively. When applied to $1M \times 1M$ sparse matrices each containing $1G$ non-zero integers, it demonstrated prover and verifier times of $1,384.45$s and $0.67$s. Our approach outperforms current zkSNARK solutions by successfully handling the large matrix multiplication task in experiment. We extend matrix operations from field matrices to group matrices, formalizing group matrix algebra. This mathematical advancement brings notable symmetries beneficial for high-dimensional elliptic curve cryptography. By leveraging the bilinear properties of our group matrix algebra in the context of the two-tier commitment scheme, DualMatrix achieves efficiency gains over previous matrix multiplication arguments. To accomplish this, we extend and enhance Bulletproofs to construct an inner product argument featuring a transparent setup and logarithmic verifier time.

Metadata
Available format(s)
PDF
Category
Cryptographic protocols
Publication info
Preprint.
Keywords
zkSNARKSparse Matrix MultiplicationLarge MatrixPairing Group
Contact author(s)
mcong @ connect hku hk
john tszhonyuen @ monash edu
smyiu @ cs hku hk
History
2025-09-30: approved
2025-09-27: received
See all versions
Short URL
https://ia.cr/2025/1768
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2025/1768,
      author = {Mingshu Cong and Tsz Hon Yuen and Siu-Ming Yiu},
      title = {{DualMatrix}: Conquering {zkSNARK} for Large Matrix Multiplication},
      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1768},
      year = {2025},
      url = {https://eprint.iacr.org/2025/1768}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.