Improving Algorithmic Efficiency using Cryptography
Vinod Vaikuntanathan, Or Zamir
TL;DR
This work investigates accelerating non-cryptographic computation by replacing truly random matrices with trapdoored, cryptographically structured matrices that admit fast multiplication when a trapdoor is available. The core insight is that computational indistinguishability ensures correctness is preserved in black-box algorithmic contexts, enabling near-linear time matrix-vector products and subquadratic matrix-matrix products under standard hardness assumptions. The authors provide multiple constructions: LPN- and McEliece-based trapdoored matrices over finite fields, and real-valued trapdoored matrices via Kac’s random walks and Haar-invariant distributions, plus a unifying framework for worst-case to average-case reductions for matrix multiplication, inversion, solving linear systems, and determinant computation. These results enable broad speedups for dimensionality reduction, inference, and other linear-algebraic tasks, while offering a pathway toward practical cryptographic-assisted algorithm design and stimulating open questions about extending trapdoor techniques to other random objects.
Abstract
Cryptographic primitives have been used for various non-cryptographic objectives, such as eliminating or reducing randomness and interaction. We show how to use cryptography to improve the time complexity of solving computational problems. Specifically, we show that under standard cryptographic assumptions, we can design algorithms that are asymptotically faster than existing ones while maintaining correctness. As a concrete demonstration, we construct a distribution of trapdoored matrices with the following properties: (a) computationally bounded adversaries cannot distinguish a random matrix from one drawn from this distribution (under computational hardness assumptions), and (b) given a trapdoor, we can multiply such an $n \times n$ matrix with any vector in near-linear (in $n$) time. We provide constructions both over finite fields and over the reals. This enables a broad speedup technique: any algorithm relying on a random matrix -- such as those that use various notions of dimensionality reduction -- can replace it with a matrix from our distribution, achieving computational speedups while preserving correctness. Using these trapdoored matrices, we present the first uniform reduction from worst-case to approximate and average-case matrix multiplication with optimal parameters (improving on Hirahara--Shimizu STOC 2025, albeit under computational assumptions), the first worst-case to average-case reductions for matrix inversion, solving a linear system, and computing a determinant, as well as a speedup of inference time in classification models.
