Skip to article frontmatterSkip to article content

Ajtai’s Hash Functions and Commitment Schemes

ZKPunk

Ajtai’s work in the mid-1990s introduced a family of hash functions Ajtai, 1996 that are provably collision-resistant, assuming the hardness of certain worst-case lattice problems. These functions are fundamental to many lattice-based cryptographic constructions, including commitment schemes.

Overview

The core idea is to use a randomly chosen matrix AinmathbbZqntimesmA \\in \\mathbb{Z}_q^{n \\times m} (where qq is a prime modulus, and m>nlogqm > n \log q) as the public key or description of the hash function.

The function hA:0,1mtomathbbZqnh_A: \\{0,1\\}^m \\to \\mathbb{Z}_q^n is defined as:

hA(x)=Ax(modq)h_A(x) = Ax \pmod q

where xx is a binary vector of length mm.

Properties:

Commitment Scheme from Ajtai’s Hash Functions

Ajtai’s hash functions can be directly used to build statistically hiding and computationally binding commitment schemes.

Scheme:

  1. Setup:

    • Choose a prime qq.
    • Choose dimensions n,mn, m such that m>nlogqm > n \log q.
    • Generate a random matrix AZqn×mA \in \mathbb{Z}_q^{n \times m} as the public parameter.
  2. Commit: To commit to a bit b0,1b \in \\{0,1\\}:

    • If b=0b=0: Choose a random short vector r0,1mr \in \\{0,1\\}^m (e.g., with Hamming weight kmk \ll m). The commitment is c=Ar(modq)c = Ar \pmod q.
    • If b=1b=1: Choose a random vector sZqns \in \mathbb{Z}_q^n. The commitment is c=sc = s. (A more common way to commit to a message MM is to choose a random short vector rr and compute c=Ar+M(modq)c = Ar + M' \pmod q, where MM' is an encoding of MM. For simplicity, we’ll stick to the bit commitment idea for illustration.)

    A more standard approach for committing to a message x{0,1}kx \in \{0,1\}^k (where kk is the message length) is:

    • Choose a random “blinding” vector r{0,1}mr \in \{0,1\}^m with a small Hamming weight.
    • The commitment is c=A(xr)(modq)c = A \begin{pmatrix} x \\ r' \end{pmatrix} \pmod q, where rr' is a portion of rr or rr is structured appropriately to hide xx. Alternatively, and more directly related to the hash function:
    • To commit to a short vector x{1,0,1}mx \in \{-1, 0, 1\}^m (or a vector with small integer entries):
      • The commitment is c=Ax(modq)c = Ax \pmod q.
  3. Open: To open the commitment, the committer reveals xx (and rr if used for blinding). The verifier checks if xx is short (has small coefficients) and if c=Ax(modq)c = Ax \pmod q.

Properties:

Significance

Ajtai’s constructions were groundbreaking because they provided the first cryptographic primitives whose security could be based on the worst-case hardness of lattice problems. This is a stronger type of security guarantee than relying on average-case hardness or specific number-theoretic assumptions.

These commitment schemes are a building block for more complex lattice-based cryptographic protocols, including:

The efficiency and provable security of Ajtai’s hash functions and commitment schemes have made them a cornerstone of modern lattice-based cryptography.

References
  1. Ajtai, M. (1996). Generating hard instances of lattice problems. STOC ’96: Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, 99–108. 10.1145/237814.237838
  2. Nguyen, W., & Setty, S. (2025). Neo: Lattice-based folding scheme for CCS over small fields and pay-per-bit commitments. Cryptology ePrint Archive, Paper 2025/294. https://eprint.iacr.org/2025/294