Back to blogs
Written by
Ciara Nightingale
Published on
August 21, 2025

ZK Math 101: Homomorphisms

A homomorphism is structure-preserving map between algebraic structures that allows operations on data while maintaining the original relationship.

Table of Contents

A homomorphism is a structure-preserving map between two algebraic structures that allows us to perform operations on transformed data while maintaining the relationships with the original data.

This article is the sixth in our series of mathematical prerequisites for understanding zero-knowledge (ZK) proofs. Understanding homomorphisms is crucial because it allows us to perform computations on encrypted or committed data without revealing the original values, making zero-knowledge proofs possible.

This article will cover what homomorphisms are, why they're necessary for zero-knowledge proofs, and go through some examples.

A homomorphism is a function between two algebraic structures (like groups, rings, or fields) that preserves the operations of those structures.

Think of a homomorphism as a "translator" that converts elements from one mathematical world to another while keeping all the relationships intact.

More formally, let $(G, \circ)$ and $(H, \star)$ be two groups. (Recall: this notation means that we are defining a group with the sets $G$ and $H$ and binary operators $\circ$ and $\star$ respectively.) A function which maps elements from the set $G$ and $H$, $\phi: G \to H$ is called a group homomorphism if for all elements $a, b \in G$:

$$\phi(a \circ b) = \phi(a) \star \phi(b)$$

This means that, if we first apply the group operation $\circ$ to $a$ and $b$ and then map it to the set $H$ using the function $\phi$, this is equivalent to applying $\phi$ to the elements $a$ and $b$ individually and then operating on the results using $\star$.

The homomorphism $\phi$ preserves the group operation.

Why does this matter? It allows us to perform operations on transformed data while maintaining the relationships from the original data. Exactly what we need for zero-knowledge proofs!

Key properties of homomorphisms

When the function $\phi: G \to H$ is a group homomorphism, several important properties automatically follow:

  1. Identity preservation: $\phi(I_G) = I_H$ (the identity element is preserved)
  2. Inverse preservation: $\phi(a^{-1}) = [\phi(a)]^{-1}$ for all $a \in G$
  3. Power preservation]: $\phi(a^n) = [\phi(a)]^n$ for all $a \in G$ and $n \in \mathbb{Z}$

Note: For additive groups, this becomes $\phi(na) = n[\phi(a)]$

And these properties being preserved show that the algebraic structure itself is completely preserved under the transformation!

Examples of homomorphisms

Let's look at some examples to illustrate different types of homomorphism and really understand what we mean by a “homomorphism”:

Example 1: Group homomorphism

Let’s take the exponential function $\exp$. This function is a homomorphism between the set of real numbers under addition $(\mathbb{R}, +)$ to the set of positive real numbers under multiplication $(\mathbb{R}^+, \cdot)$.

Or mathematically:

$$\exp: (\mathbb{R}, +) \to (\mathbb{R}^+, \cdot)$$

Where \exp is defined as \exp(x) = e^x and is a group homomorphism because for all x, y \in \mathbb{R}:

$$\exp(x + y) = e^{x+y} = e^x \cdot e^y = \exp(x) \cdot \exp(y)$$

This shows that addition in the real numbers corresponds exactly to multiplication in the positive real numbers. Test it yourself: take any two real numbers, add them, and then take the exponent, the result will be equal to taking the exponent and then multiplying the results.

$$\exp(-3 + 5) = e^{-3+5}=e^{-3}\cdot e^5 = \exp(-3) \cdot \exp(5)$$

Example 2: Ring homomorphism

Consider the function $f$: modular reduction by $n$. It maps elements from the set of integers, $\mathbb{Z}$ which forms a ring under addition and multiplication, to the set of integers modulo $n$, $\mathbb{Z}/n\mathbb{Z}$.

Mathematically, we say:

$$f: \mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}$$

Where $f$ is defined as $f(a) = a \bmod n$

This is a ring homomorphism because it preserves both operations:

  • Addition: $f(a + b) = (a + b) \mod n = [(a \mod n) + (b \mod n)] \mod n = f(a) + f(b)$
  • Multiplication: $f(a \cdot b) = (a \cdot b) \mod n = [(a \mod n) \cdot (b \mod n)]\mod n = f(a) \cdot f(b)$

This maps integers $a$ and $b$ to their equivalence classes modulo $n$.

Note: We call it a ring homomorphism because $\mathbb{Z}$ is a ring (not a field), since most integers don't have multiplicative inverses.

Homomorphisms in zero-knowledge proofs

In zero-knowledge proof systems, homomorphisms enable you to prove knowledge of secret information without revealing it.

PLONK uses homomorphic commitment schemes where:

  • You can “commit to” secret values $x$ and $r$ using a commitment function $C(x, r)$ where the output of this function is referred to as the commitment of $x$ and $r$.
  • You can perform operations on commitments: $C(x_1, r_1) + C(x_2, r_2) = C(x_1 + x_2, r_1 + r_2)$
  • The commitments hide the original values but preserve relationships!
  • We will be looking at commitments and how they work in a future article but for now, all you need to know is that they are a special type of function and they have a:
    • "Binding" property: Once applied to the inputs, commitments cannot be reversed to reveal the inputs, and you cannot find two different inputs that produce the same commitment.
    • "Hiding" property: The output also does not reveal anything about the inputs and cannot be reversed to recover them.

The homomorphic structure is what enables the "magic" of ZK proofs.

Private inputs can be transformed into public “commitments” via homomorphisms, AKA these commitment functions. Then, the relationships between private values become relationships between public values, which allows complex computations to be verified through simple algebraic checks on these public values.

In PLONK, we don't just commit to individual numbers, instead, we commit to polynomials. These polynomials encode the complex computations and constraints from our original problem, e.g., I know the inputs $x$ and $y$ that satisfy the constraints $2x + y = 0$ and $y > 0$.

AND the polynomial operations are naturally homomorphic as well:

  • Adding polynomials: $(f + g)(x) = f(x) + g(x)$
  • Scalar multiplication: $(a \cdot f)(x) = a \cdot f(x)$
  • Evaluation of the polynomials at a point $x$: $eval_x(f + g) = eval_x(f) + eval_x(g)$

This means that when we commit to polynomials, we can perform polynomial arithmetic on the commitments themselves and this corresponds directly to the underlying data the polynomial encodes, enabling complex proof systems while maintaining zero-knowledge.

Polynomials are a topic we'll revisit in a future article, so if you feel lost, don’t worry. This is simply a teaser of how everything will link together.

Summary

Homomorphisms let you "move" problems from the secret world to the public world. They do this by preserving the mathematical relationships that need to be proven while keeping private values secret.

In our next article, we'll explore elliptic curves: what they are and the properties that make them extremely useful in cryptography. The homomorphic properties of elliptic curves over finite fields (don’t worry, we will explain what this means in the following article) make them useful in cryptographic signatures and zero-knowledge proofs!

References

Secure your protocol today

Join some of the biggest protocols and companies in creating a better internet. Our security researchers will help you throughout the whole process.
Stay on the bleeding edge of security
Carefully crafted, short smart contract security tips and news freshly delivered every week.