Mathematical Background on Lattices - Introduction to Lattice-Based Cryptography
Table of Contents
This is the first post in the series: Introduction to Lattice-based Cryptography. We focus on lattices as an independent mathematical concept and its properties. However, we focus on aspects that would be useful in the study of Lattice-based Cryptography.
Throughout this series, we use 2-dimensions and 3-dimensions because they are easy to work with. In practice we use sufficiently higher dimensions.
The only prequisite to start this series is to understand the following:
- represents the set of all real numbers.
- represents the set of all integers.
- represents the set of all rational numbers.
- represents the set of all n-dimensional real vectors
- represents the set of all n-dimensional integer vectors
What is a Lattice?
A Lattice is an infinite set of vectors constructed based two condition: discreteness and additivity.
Formally, an -dimensional lattice is a discrete additive subgroup of generated by a basis as an integer linear combination:
where is an arbitrary integer
- discrete: This means that every vector point has some “neighborhood” in which is the only lattice point. Loosely speaking, this means that, for every point there is “good space” around it. By using an integer linear combination and not just linear combination we have achieve reasonable discreteness between vector points. This is shown below using rationals as a counter example.
- additive subgroup: a lattice is an additive subgroup if it contains identity element (the zero vector), and if for any , we have and
Below, we will see what a lattice is and what it is not.
- The singleton set is a lattice (for any positive integer ). That is, the zero vector in any dimension is a lattice.
- The integers form a 1-dimensional lattice .
- The integer grid is an n-dimensional lattice
The set is a lattice; it is often called the “checkerboard” or “chessboard” lattice, especially in two dimensions. It contains all -vectors of integers such that the sum of the components of , i.e , is an even integer. That is, the sum of elements in the vector is an even integer.
The opposite is not true. That is is not a lattice. Although it is discrete, it is not an additive subgroup of mainly because it doesn’t contain the identity element (the all-zeros vector) as shown in non-example diagram below. Recall, that a lattice is an additive subgroup if it contains identity element , and if any , we have and .
Example:
Non-example(opposite):
Example 1: Just even integers
- Example 2: random 2-tuples and 3-tuples with sum of even integer
- Non-example: random 2-tuples and 3-tuples with sum of odd integer
The rationals do not form a lattice, because although they form a subgroup, it is not discrete: there exist rational numbers that are arbitrarily close to zero.
For two arbitrary rational numbers and , where there are inifinitely many rational numbers between them therefore making it impossible for either and to be discrete.
For example, below is a graph of points in between 1 and 2.
The odd integers do not form a lattice, because although they are discrete, they do not form a subgroup of .
The odd integers do not contain 0
Basis
A basis of a lattice is a set of linearly independent vector whose integer linear combinations generate the lattice:
Recall two vectors and are said to be linearly independent if and where is an arbitrary integers.
For example, and are linearly independent while and are not. Why? and where and are and respectively. But, we can’t find any for which and vice versa.
In general, the vectors are said to be linearly independent if for any vector in the set, it cannot be generated by the linear combination of one, some or all of the other vectors in the set. That is, where is an arbitrary natural number.
We can also represent a basis as a matrix. This is an matrix where the basis vectors are the ordered columns of the matrix. This is a non-singular matrix.
With this we can represent a lattice
For example, given a basis where , and respectively, we have a matrix and the finite set of integer vectors where , and respectively, we can generate a lattice with three points , and .
This way of representing the basis is instrumental in understanding the next topic: unimodular matrix
Unimodular Matrix
Bases , generate the same lattice if and only if there exists a unimodular such that .
An integer matrix is said to be unimodular if it determinant is .
This property for two bases being able to generate the same lattice is what makes lattice-based cryptography possible. We will see why this is true later in this series.
We can efficiently test whether two given matrices , generate the same lattice, by checking whether is unimodular.
Norms
A norm or vector norm is a generalization of what we would normally call the length or magnitude of a vector.
Recall, , the magnitude or length or size of a vector . This is a type of norm called the Euclidean norm .
Formally, a norm on a vector space over or is a function that satisfies the properties for all vectors , and all scalars :
Non-negativity: , and
Homogeneity:
Triangle Inequality:
For example, the Euclidean norm for the vector is .
The graphical representation is displayed below. The length of the arrow is .
This graph would help us understand the next topic: -th successive minimum
Other norms include the Manhattan Norm, Maximum Norm and p-norm. For now, we only care about Euclidean norms.
Successive Minimum
The Euclidean Norm of any vector in a lattice can be interpreted as the radius of a circle (or sphere in higher dimensions) where the origin of the graph is the centre of the circle as shown in the diagram below.
Given a lattice and a norm(i.e. the Euclidean norm), the -th successive minimum is the smallest radius such that contains at least linearly independent lattice vectors of norm at most within a ball of radius centered at the origin.
In other words, what is the smallest radius such that we can find linearly independent vectors inside the circle(or sphere) with radius ? Recall, that we interpret the norm of a vector as a radius when the centre is at the origin .
For example, if we generate the vectors , and given the basis points and creating a lattice , what is the 1st successive minimum ? Or, What is -th successive minimum when is 1?
We start by finding the norm of the vectors(including the basis vectors):
The smallest norm is and if we draw a circle using this norm as the radius, we find the linearly independent vector within the circle. Therefore, is the the 1st successive minimum.
Notice how it is the closest vector to the origin. It is called the smallest nonzero vector in the lattice. Take note of this, we discuss this later in the series.
Again, what is the 2nd successive minimum? We are looking for the smallest radius(i.e norm) that creates a circle containing two linearly independent vectors.
From the computed norms, we know that the second smallest vector is with norm of . Drawing a circle using this norm as the radius, the circle contains and . Therefore, is the 2nd successive minimum.
Thirdly, what is the 3rd successive minimum?
Probably , the third smallest norm. It turns out this is not the case. They are not linearly independent because was generated by and therefore there are only two linearly independent vectors(i.e and ) in the circle with radius .
How about ? The fourth smallest norm. This is still not the 3rd successive minimum for the same reason as before, was generated by and therefore the circle with radius contains only two linearly independent vectors.
And, lastly, how about ? The largest norm. Is it the 3rd successive minimum? No, it’s not. For the same reason as before.
With this, it is safe to say the 3rd successive minimum and above does not exist because all other vectors were generated by the basis points and .
In general, the maximum in the -th successive minimum is the number of basis vectors.
It’s important to point out that a lattice might have multiple basis vectors and this is an instrumental property of lattices that makes certain types of lattice-based cryptography possible.
The goal of this material was to introduce these concepts independently; appreciating their beauty without drawing parallels to their applications in lattice-based cryptography; we will do that in the other posts in this series.
In the next post, we will be looking into Hard Problems in Lattice-Based Cryptography. See you there!