Groups
Goal
By the end of this chapter, you should understand what a group is, how to check the group rules, and why groups are one of the main languages of modern cryptography.
You should also be able to distinguish additive notation from multiplicative notation, recognize simple subgroups and cyclic groups, compute the order of an element in small examples, and understand the basic idea of a homomorphism.
Prerequisites
You should be comfortable with modular arithmetic: remainders, congruence modulo , modular addition, modular multiplication, and modular inverses.
You do not need prior abstract algebra.
Motivation
Cryptography often needs a setting where operations are predictable, reversible, and still hard to undo without special information. Groups give us a precise way to talk about such settings.
Instead of saying "these values can be combined somehow," group theory asks:
- is the result still in the same set?
- does the order of parentheses matter?
- is there a do-nothing element?
- can every operation be undone?
Those questions are simple, but they become powerful when the set is large and the operation has a useful structure.
Binary Operations
A binary operation on a set is a rule that combines two elements of to produce an output.
For example, ordinary addition combines two integers:
Ordinary multiplication also combines two integers:
In group theory, we often write a generic operation as :
This notation means "combine and using the operation currently being studied."
Closure
A set is closed under an operation if combining two elements of the set always gives another element of the same set.
Example: the integers are closed under addition. If and are integers, then is also an integer.
The positive integers are not closed under subtraction. For example:
and is not a positive integer.
Modulo arithmetic gives small finite examples. Let:
Under addition modulo , this set is closed:
The result is still in .
Associativity
An operation is associative if parentheses do not matter:
for all , , and in the set.
Ordinary integer addition is associative:
Both sides equal .
Ordinary subtraction is not associative:
but:
Associativity matters because it lets us write expressions like without constantly specifying parentheses.
Identity
An identity element is an element that does nothing when combined with any other element.
For additive notation, the identity is often written :
For multiplicative notation, the identity is often written :
Example: in under addition modulo , the identity is .
Example: in the nonzero residues modulo under multiplication modulo ,
the identity is .
Inverses
An inverse of an element is something that undoes it.
In additive notation, the inverse of is written and satisfies:
Example: modulo , the additive inverse of is because:
In multiplicative notation, the inverse of is written and satisfies:
Example: modulo , the multiplicative inverse of is because:
The notation depends on the operation. The additive inverse of modulo and the multiplicative inverse of modulo happen to both be , but that is a coincidence in this small example.
Definition of a Group
A group is a set together with a binary operation satisfying four rules:
- Closure: if , then .
- Associativity: for all .
- Identity: there is an element such that and for every .
- Inverses: for every , there is an element such that and .
The set and the operation both matter. A set is not a group by itself.
Example: Addition Modulo
For any positive integer , the set:
is a group under addition modulo .
For , the set is:
Check the group rules:
- closure: adding two residues and reducing modulo gives another residue
- associativity: addition is associative before and after reduction
- identity:
- inverses: the inverse of is modulo
Examples of inverses:
Example: Multiplication Modulo
The set is usually not a group under multiplication.
For example, modulo :
But has no multiplicative inverse modulo . There is no such that:
To get a multiplicative group modulo , we use only the residues that are coprime to . This group is written:
For , the invertible residues are:
Check a few products:
The identity is , and each element has a multiplicative inverse.
Additive and Multiplicative Notation
The same group idea can be written in different notation.
In additive notation:
- operation:
- identity:
- inverse:
- repeated operation:
In multiplicative notation:
- operation: or
- identity:
- inverse:
- repeated operation:
The notation is a convention, not a guarantee that the operation is ordinary addition or ordinary multiplication.
Elliptic curve groups are often written additively:
Repeated addition is written:
Unknown-order groups for VDFs are often written multiplicatively:
Read the notation in context.
Abelian Groups
A group is abelian if the operation commutes:
for all .
Addition modulo is abelian:
Multiplication modulo among invertible residues is also abelian:
Not every group is abelian. In later mathematics, examples include groups of symmetries where doing operations in different orders can produce different results.
Many groups used in this book are abelian, but the word should still be stated when it matters.
Subgroups
A subgroup is a smaller group inside a larger group. If is a subgroup of , then:
- every element of is in
- the operation is the same operation used in
- is itself a group
Example: consider under addition. The set:
is a subgroup.
Check:
The identity is present, and each element has an inverse inside .
But:
is not a subgroup under addition modulo , because:
and is not in the set.
Cyclic Groups and Generators
A group is cyclic if one element can generate the entire group by repeated use of the operation. Such an element is called a generator.
In additive notation, the subgroup generated by is:
In multiplicative notation, the subgroup generated by is:
Example: under addition is cyclic. The element generates the whole group:
The element does not generate the whole group:
It generates the subgroup:
Example: under multiplication is:
The element generates the whole group:
So the powers of hit every element.
Order of a Group
The order of a group is the number of elements in the group. It is written .
Example:
under addition modulo .
Example:
because:
For infinite groups, the order is infinite. This book mostly uses finite groups or very large finite groups.
Order of an Element
The order of an element is the smallest positive number of times you apply the operation to get back to the identity.
In additive notation, the order of is the smallest positive such that:
In multiplicative notation, the order of is the smallest positive such that:
Example: in under addition, the element has order :
The element has order :
Example: in , the element has order :
An element is a generator of a finite group if its order equals the order of the group.
Homomorphisms
A homomorphism is a function between groups that preserves the group operation.
Suppose and are groups. A function:
is a homomorphism if:
for all .
Example: define:
by:
This preserves addition:
Try and :
so:
On the other side:
Both sides match.
Homomorphisms matter because they let structure move from one group to another. Later, pairings will be a more advanced example of maps that preserve useful algebraic structure.
Why Cryptography Uses Groups
Groups give cryptography a balance of structure and hardness.
The structure lets honest users compute:
- combine elements
- repeat an operation many times
- verify equations
- use inverses when appropriate
- reason about identities and generators
The hardness comes from choosing groups where some problems appear difficult. For example, in some groups it is easy to compute from and , but hard to recover from and . That is the shape of a discrete logarithm problem.
This chapter does not prove any cryptographic hardness. It only introduces the language needed to state such assumptions carefully.
Chia Connection
Chia uses group-based mathematics in more than one place.
BLS signatures use elliptic-curve groups. These groups are usually written in additive notation, with points such as and combined as and scaled as . Later chapters will explain elliptic curve group law, pairings, BLS12-381, and BLS signatures.
VDFs use groups of unknown order. These are often written multiplicatively, with repeated squaring expressed as:
The phrase "unknown order" refers to the fact that the size of the relevant group is not known to the prover in a useful way. That property is part of what makes the VDF path different from ordinary modular exponentiation in a known finite group.
This chapter gives the group vocabulary. Chia-specific implementation details, constants, and security claims still need primary sources.
Source starting points: Chia Keys and Signatures and Chia green paper introduction.
Common Pitfalls
Talking about a group without naming the operation. The same set may be a group under one operation and not under another.
Confusing additive and multiplicative notation. In additive notation the identity is and inverses look like . In multiplicative notation the identity is and inverses look like .
Assuming multiplication modulo uses all residues. Only residues coprime to have multiplicative inverses modulo .
Forgetting closure when checking subgroups. A subset that contains the identity can still fail to be a subgroup if the operation leaves the subset.
Assuming every cyclic group has only one generator. A cyclic group can have several generators.
Treating notation as implementation. Elliptic curve "addition" is not ordinary coordinate-wise addition. The notation describes the group operation, not necessarily how it is computed internally.
Exercises
- In under addition, find the additive inverse of each element.
- Is a group under multiplication modulo ? If not, which group rule fails?
- List the elements of .
- In under addition, find the order of the element .
- In , find the order of the element and the order of the element .
- Show that is a subgroup of under addition.
- Is a subgroup of under multiplication? Explain.
- In your own words, explain the difference between the order of a group and the order of an element.
- Give a small example of a function between additive groups modulo that preserves addition.
- Explain why a cryptographic group should have enough structure for honest users to compute, but enough hardness to make some attacker tasks infeasible.
Further Reading
- Later chapter: Rings and Fields
- Later chapter: Finite Fields
- Later chapter: Elliptic Curve Group Law
- Later chapter: Unknown-Order Groups
- Any introductory abstract algebra text covering groups and cyclic groups