Master Jäämeri Elias 2020
Master Jäämeri Elias 2020
Kim J. E. Jäämeri
School of Science
Supervisor
Advisor
Preface
I would like to extend my most sincere gratitude to Prof. Camilla Hollanti from the
Department of Mathematics and Systems Analysis at Aalto University for instructing
and supervising my thesis. I am deeply indebted from the past year and a half, during
which I have been supported by Prof. Hollanti’s invaluable guidance and expertise.
This thesis would not have been possible without her patience, encouragement and
good nature. In addition to being constantly steered in the right direction, I had
the pleasure of being introduced to her international colleagues and their leading
research in the field of code-based cryptography.
In the same spirit, I would also like to thank Dr. Sven Puchinger from the Al-
gebraic Coding Theory research group at the Technical University of Denmark; Dr.
Julien Lavauzelle from Institut de Recherche Mathématique de Rennes and [Link].
Julian Renner from the Institute for Communications and Engineering from the
Technical University of Munich. Thank you for sharing your ingenious research ideas
and granting me access to your SageMath libraries. Our fruitful discussions last
summer were a key source of insight and inspiration for my thesis work.
Finally, I must express my profound gratitude towards my family for their un-
failing support throughout my years at Aalto University. My parents Kim and Marja
were always understanding and reassuring. Lastly, a special thanks to my partner
Elise, who has brought so much joy and enthusiasm to my master’s studies.
Helsinki, 12.12.2019
Kim J. E. Jäämeri
6
Contents
Abstract 3
Preface 5
Contents 6
1 Introduction 9
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2 Thesis Scope and Structure . . . . . . . . . . . . . . . . . . . . . . . 9
2 Algebraic Preliminaries 11
2.1 Extension Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Linearized Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 The Schur Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Linear Codes 12
3.1 Generator and Parity Check Matrices . . . . . . . . . . . . . . . . . . 13
3.2 The Dual Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 The Hamming Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 The Singleton Bound . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5 Syndrome Decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.6 Reed-Solomon Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5 Code-based Cryptography 22
5.1 Post-Quantum Cryptography . . . . . . . . . . . . . . . . . . . . . . 23
5.2 The McEliece Cryptosystem . . . . . . . . . . . . . . . . . . . . . . . 24
5.3 Binary Goppa Codes and Implementation for McEliece . . . . . . . . 24
5.4 The GPT Cryptosystem . . . . . . . . . . . . . . . . . . . . . . . . . 27
7 Conclusion 39
A Appendix A 45
B Appendix B 46
8
Operators
b
∑
sum over index i, going from a to b
i=a
v1 ⋆ v2 component-wise product of vectors v 1 and v 2
dH (v 1 , v 2 ) Hamming distance between vectors v 1 and v 2
dr (v 1 , v 2 ) rank distance between vectors v 1 and v 2
rk(v)
( ) rank weight of vector v
n
k
binomial coefficients
f :X→Y the map f from domain set X to codomain set Y
x ↦→ y, x ∈ X, y ∈ Y element-wise mapping of the element x ∈ X to y ∈ Y
i
M[i] Mq
mod g(x, α) modulo w.r.t. polynomial g, which is a polynomial with variables x and α
gdc(a, b) the greatest common divisor of integers a and b
Λi (·) Overbeck’s Frobenius operator (also referred to as q-sum)
Abbreviations
RSA Rivest–Shamir–Adleman (cryptosystem)
ECC elliptic curve cryptography
SDP syndrome decoding problem
NP non-deterministic polynomial-time
GPT Gabidulin-Paramonov-Tretjakov
XOR exclusive or (digital logic gate)
MDS maximum distance separable
MRD maximum rank distance
NIST National Institute of Standards and Technology
1 Introduction
1.1 Background
In recent decades, concern for post-quantum cryptography has given rise to a new
field of research in the study of techniques for secure communication. The concern
is that a sufficiently large quantum computer, if constructed, could run e.g. Shor’s
algorithm to break popular cryptographic systems such as RSA and ECC [52]. In
other words, popular methods for cryptography have relied on the hardness of certain
problems that are not, in theory, safe from being solved by means of quantum
computing.
Alternatives that are believed to resist attacks by large quantum computers have
been suggested in the literature [7]. Some of the most promising among these are
the code-based cryptosystems using error-correcting algebraic codes. While the origi-
nal purpose of such codes was to enable communication over noisy communication
channels [24], the defining properties of error-correcting codes have proved equally
convenient for applications in cryptography [7]. The European Commission funded
study group on post-quantum cryptography has recommended this approach for
long-term protection against quantum computers [2].
Chapter 3 introduces the reader to linear codes, the core of algebraic coding theory
and the fundamental basis for the remainder of this thesis. Extending on the general
definitions and discussion, Hamming codes are used to demonstrate a readily under-
stood, clear-cut example and Reed-Solomon codes are subsequently presented to set
the stage for the topics of Chapter 6.
The topic of Chapter 4 is the concept of implementing a rank metric for linear
codes as opposed to the original Hamming metric. The chapter explores the key
differences and parallels stemming from the rank metric and presents the original
construction method for this family of rank metric codes.
10
Chapter 5 describes the cryptographic context for the algebraic linear codes covered
in Chapters 3 and 4. Namely, the cryptosystem presented by McEliece as well as a
similar construction by Gabidulin, Paramonov and Tretjakov (GPT) [13], designed
for codes in the rank metric.
The goal in Chapter 6 is to then delve into the ongoing back and forth process
of both finding new ways to attack the existing code structures as well as fixing them
by adding additional structure to the code [20][21][40][42][46][30].
Last but not least, Chapter 7 concludes the thesis with closing remarks and discussion,
as well as ideas for further research directions.
11
2 Algebraic Preliminaries
2.1 Extension Fields
Finite fields are a core preliminary for constructing linear codes and we often want
to impose some further structure on them. This is especially true for rank metric
codes, which are generally constructed over extension fields. Hence, extension fields
will be introduced before defining linear codes. This is a well-known topic in algebra,
for further reference see e.g. [25].
Definition 1. Let Fq be a finite field with q elements and let f (x) be an irreducible
polynomial of degree m ≥ 1 over Fq [x]. An extension field of degree m over Fq is
defined as the triple (Fqm , +, ·), where Fqm is the set of all q-ary vectors of length m
and + and · are operations for vectors v 1 , v 2 ∈ Fqm defined as:
The final element of the extension field is the zero element, corresponding to the
binary vector [0 0 0]. The addition and multiplication operations are easy to compute
in this framework. For example α4 · α5 = (α2 + α)(α2 + α + 1) = α4 + 2α3 + 2α2 + α
and since 2 ≡ 0 (mod 2), this simplifies to α4 + α and since α4 = α2 + α, we are left
12
v ⋆ w := [v1 · w1 , v2 · w2 , . . . , vn · wn ].
From the above definition, we can later derive a Schur product for linear codes which
has many interesting applications.
3 Linear Codes
Linear codes are a family of error-correcting codes and are an essential pre-requisite
for topics to follow. A general code could technically admit to no specific structure
and the only way to describe it would be to list the entire codebook. Hence, in this
chapter we define the useful concept of a linear code and discuss its parameters and
properties [29].
Codes over the binary field F2 are known as binary codes. The vectors of C are
called codewords and the size of the code, q k , is the number of codewords in C. A
codeword has Hamming weight wH equal to its number of non-zero coordinates. One
standard metric for distance d between two codewords is the Hamming distance.
13
Example 3. One of the most famous Hamming Codes is the [7, 4, 3]2 code, which
has the following generator matrix:
1 0 0 0 1 1 0
⎡ ⎤
⎢ 0 1 0 0 1 0 1 ⎥
G=⎢ ⎥.
⎢ ⎥
⎣ 0 0 1 0 0 1 1 ⎦
0 0 0 1 1 1 1
15
1 0 0 0 0 0 1
The design for having the highest possible code rate while maintaining a minimum
distance d is characterized by the Hamming bound. This bound gives an important
limitation to the efficiency of error-correcting codes and any code achieving the
Hamming bound is said to be a perfect code. We now define the Hamming bound.
Definition 7. The Hamming bound is the limit for the maximum size A(n, d) of a
q-ary linear code of length n and minimum distance d:
qn
A(n, d) ≤ t ( )
, (4)
n
(q − 1)k
∑
k
k=0
⌊ ⌋
d−1
where t = 2
is the maximum number of errors the code can correct.
⌊ ⌋
Proof. Let C be a linear code capable of correcting t = d−1
2
errors and let c ∈ C be
a codeword. The unambiguous error-correction then implies that balls, or Hamming
spheres of radius t centered around each codeword c are non-intersecting. These
Hamming spheres cover q-ary words of length n, which deviate from the centre at
codeword c in at most t components.
These deviations for each component are chosen from (q − 1) possibilities and we
are choosing up to t of the n components to deviate from c. Hence there are a total
t ( )
n
(q − 1)k different possible words within each Hamming sphere.
∑
of k
k=0
We can then consider selecting A(n, d) of these Hamming spheres, that is, the
maximum number of codewords in C( and count the total number of words in the
t )
n
union of these spheres as A(n, d) · (q − 1)k . Clearly this number cannot exceed
∑
k
k=0
q n and hence we have the the bound
qn
A(n, d) ≤ t ( )
.
n
(q − 1)k
∑
k
k=0
Proof. The generator matrix for any linear code can be expressed in the standard
form given in Equation (2). One row in such a generator matrix consists of at most
n − k + 1 non-zero elements, since there are n − k elements in the rows of matrix P
and only one non-zero element in the rows of the identity matrix. Therefore, the
maximum weight of one row in the standard form generator matrix is n − k + 1
and this weight is precisely the Hamming distance to the zero codeword from any
codeword generated by the row in the generator matrix. The bound follows from
this observation.
Linear codes satisfying equality with the Singleton bound are called Maximum
Distance Separable (MDS).
Note that
since cH⊺ = 0. The idea is then that each distinct S corresponds to a distinct error
vector, depending on the parity check matrix of the code. This correspondence may
be presented as a table, and for codes with small parity check matrices the table is
relatively compact.
If the number of errors in the received word is at most the error-correcting capacity
of the code t, then syndrome decoding yields the correct codeword and if wH (e) > t,
then this type of decoding corresponds to maximum likelihood decoding. This
equivalence assumes the probability of an error occurring at one given coordinate
as < 0.5 and that the probability is independent of other errors. Under these
assumptions, syndrome decoding yields the most probable codeword with respect to
the to the received word.
The general case of syndrome decoding a linear code was shown to be an NP-hard
problem by Berlekamp, McEliece, and van Tilborg in 1978 [6], when decoding a
linear code in the presence of t errors without having access to a parity check matrix.
Example 4. Consider the [7, 4, 3]2 Hamming code from Example 3. Let us receive
a word r = [0 1 1 0 1 1 1] and apply syndrome decoding. We compute the error
17
syndrome as:
⎡ ⎤
0 0 1
0 1 0
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢
⎢ 1 0 0 ⎥
⎥
S = rH⊺ = [0 1 1 0 1 1 1] ⎢ 0 0 0 = [0 0 1] .
⎢ ⎥
⎥
⎢ ⎥
⎢
⎢ 1 0 0 ⎥
⎥
⎢
⎣ 0 1 0 ⎥
⎦
0 0 1
Since the syndrome is not equal to zero, there received word is not a codeword
and we may deduce which single error would produce the syndrome [0 0 1]. The third
row of the parity check matrix asserts that the first and last bits of any codeword
are the same, and hence there should be an error in either position 1 or position 7 as
the bit 1 in position 3 of the syndrome indicates this type of disparity.
If the error were in position 1, then we would have to correct the received word
to c∗ = [1 1 1 0 1 1 1]. This, however, is not a codeword in the code, so we deduce
that the error occurred in position 7 and c∗ = [0 1 1 0 1 1 0] is indeed a codeword.
Specifically, it is a linear combination of the second and third rows of the generator
matrix. Hence, this would be the output of a syndrome decoder with input r.
Definition 8. Let Fq be a finite field and let p denote a polynomial of degree less than
k over Fq . Let α1 , . . . , αn ∈ F denote n ≤ q distinct evaluation points for the polyno-
mial p. Then a Reed-Solomon code is defined as CRS = {(p(α1 ), p(α2 ), . . . , p(αn ))}.
···
⎡ ⎤
1 1 1 1
⎢
⎢ 1 α α2 ··· α(n−1) ⎥
⎥
GRS = ⎢ .. .. .. .. ⎥,
⎢
⎣ . . 1 . .
⎥
⎦
(k−1) 2(k−1)
1 α α ··· α(n−1)(k−1)
18
α2 ··· α(n−1)
⎡ ⎤
1 α
⎢
⎢ 1 α2 α4 ··· α2(n−1) ⎥
⎥
HRS = ⎢ .. .. .. ... .. ⎥.
. . . .
⎢ ⎥
⎣ ⎦
1 α(n−k) α(n−k)2 · · · α(n−k)(n−1)
Messages of the form m = [m0 , m1 , . . . , mk−1 ], mi ∈ Fq can be encoded by
mapping them to a polynomial of degree (k − 1). Here the mapping M : m → p(α)
k−1
is defined by m ↦→ mi α i .
∑
i=0
Note that Reed-Solomon codes comply with the definition for linear codes, since
for a any b ∈ Fq and polynomials f (α), g(α) ∈ Fq [α] of degree ≤ k−1, the polynomials
bf (α) and f (α) + g(α) are also polynomials of degree ≤ k − 1 and the mapping for
message encoding clearly preserves this linearity.
The Singleton bound can also be verified for Reed-Solomon codes by recalling that
a non-zero polynomial of degree x over Fq has at most x roots in Fq , as the Hamming
weight of the difference between two encoded messages, wt(CRS (m2 ) − CRS (m1 ))
is equal to n minus the number of zeroes in CRS (m2 ) − CRS (m1 ). This number of
zeroes is precisely the number of roots the polynomial pm2 (α) − pm1 (α) has among
the evaluation points: k − 1. Thus, the weight of the difference for two encoded
messages is at least n − k + 1, which results in the Singleton bound.
Useful applications for rank codes have been found in areas such as distributed
storage [54] and random linear network coding [55]. In cryptography, extensive study
of rank metric codes is motivated by the large public key sizes inherent to code-based
cryptography. Conventional schemes based on problems such as factorization of
integers or the discrete logarithm problem use much smaller public keys for commu-
nication compared to code-based approaches. Yet, rank codes provide a comparative
advantage with respect to the McEliece type implementations using Hamming metric
codes, such as Goppa codes. This property is due a large family of rank metric codes
being generated from a fixed size public key.
19
The rank distance dr (v, w) for two vectors is defined as rk(v − w).
The definition of rank distance further induces a notion of “minimum rank distance”
to rank metric codes, similar for the minimum Hamming distance. Formally the
minimum distance for a rank metric code C can be expressed as minv,w∈C,v̸=w dr (v, w).
The rank weight can be equivalently defined by extending every coordinate of
a vector v ∈ Fnqm on a basis of the quotient field Fqm /Fq to form an m × n matrix
over Fq . The rank of such a matrix is equal to rk(v). This definition is useful for
computing the rank weight in practice.
Yet another equivalent definition is obtained from the dimension of the support of
a vector v ∈ Fnqm . The support of v is the Fq vector space spanned by its coordinates.
The dimension of the support of v is equal to rk(v).
Example 5. Let v ∈ F523 (α) and fix v = (α, α5 , 0, α, α6 ) = (α, α2 +α+1, 0, α, α2 +1).
Let us compute the rank weight rk(v) of the vector v.
0 1 0 0 1
where for example the second column [1 1 1]T corresponds to the binary vector [1 11],
which corresponds to α5 originating from the second coordinate of v. The first and
third row are clearly linearly dependent, so the rank of this matrix is 2. Therefore
according to the above discussion on equivalent definitions for rank weight, we have
rk(v) = 2.
Definition 10. Let C be a linear code with the rank metric over the vector space
Fnqm . If n ≤ m and k ≤ n, then dr ≤ n − k + 1 and rank codes satisfying equality
with this bound are defined to have Maximum Rank Distance (MRD).
An alternative bound for maximum rank distance was given by Pierre Loidreau in
[31]:
m
dr ≤ (n − k) + 1. (5)
n
This alternative bound is tighter for the case where n > m, whereas for n ≤ m, the
former bound remains the tighter one. This is why the former bound is defined for
n ≤ m. Each maximum rank distance code is also maximum distance separable.
The parameter s is often fixed to be 1, which simplifies the code quite a bit. Also, the
substitution in notation of q i → [i] is often used and makes these types of definitions
easier to read.
Let us construct a simple Gabidulin code in another illustrative example.
Example 6. Set s = 1 and select from the extension field in Example 1 elements
α, α2 and α2 + 1. Following the construction for a generator matrix of a Gabidulin
code gives:
α2 α2 + 1
⎡ ⎤
α
G3 = ⎢⎣ α2 α2 + α α2 + α + 1 ⎥ ⎦.
α2 + α α α+1
We can verify that the maximum rank distance bound of dr = 1 = 3 − 3 + 1 holds
for the example, although it may not be exciting for such a small example.
Note how the columns in the generator matrix of a Gabidulin code follow the structure
for linearized polynomials defined in (1). We can express codewords in terms of
linearized polynomials as (L(g1 ), L(g2 ), . . . , L(gn )), given that the polynomial L(x)
has degree less than k. The set of all such linearized polynomials L(x) with degree
less than k forms the set of codewords C.
The proof to the following proposition makes use of this parallel and shows that
all Gabidulin codes are MRD.
Proposition 4.1. The Gabidulin code defined by Gk in (7) is MRD.
Proof. Let x = (L(g1 ), L(g2 ), . . . , L(gn )) denote a codeword generated by Gk and
associated to the linearized polynomial L(x), with degree less than k. The rank of x is
equivalent to the dimension of the Fq -vector space generated by (L(g1 ), L(g2 ), . . . , L(gn )).
Also, the Fq -vector space generated by (g1 , g2 , . . . , gn ) has dimension n, as gi were
selected to be linearly independent.
Let ker(L) = {a ∈ Fqm |L(a) = 0}. The n-dimensional Fq -vector space generated
by (g1 , g2 , . . . , gn ) contains the dimensions of ker(L), that are precisely not included
in the Fq -vector space generated by (L(g1 ), L(g2 ), . . . , L(gn )).
L(x) having degree up to k − 1 implies that ker(L) must have dimension up to
k − 1 and therefore rk(x) ≥ n − (k − 1) = n − k + 1. Hence, the rank distance dr for
the code is bounded according to the definition of MRD codes.
Definition 13. [14] We then say that a rank error of rank ϵ occurs if rk(e | e ∈
Fnqm ) = ϵ.
22
Rank codes can generally correct error patterns of the following type:
where the total rank error is seen as a sum of entirely random errors, as well as column
and row rank erasures. These error types are described in greater detail in [14]. The
random errors are characterized as vectors of the form erandom = e1 u1 +e2 u2 +. . .+et ut ,
where ei ∈ Fqm and uj ∈ Fq are assumed to be linearly independent over Fq and ui
are assumed to have coordinates in Fq . Any other information is presumed unknown,
including the rank t.
The row and column erasures have similar vector form, except the row and column
components replacing the ui in the random error case are presumed as known to the
decoder.
The following upper bound for the error-correction capacity of Gabidulin codes
was given by Gabidulin and Pilipchuk in [18]:
2ϵ + v + r ≤ dr − 1. (9)
Proof. Consider any n × n square code matrix. Erasing v rows and r columns results
in a (n − v) × (n − r) matrix code with rank distance at least d′r = dr − v − r. Hence,
the code allows for the correction random rank errors of rank ϵ, if ϵ ≤ (dr −v−r−1)
2
or,
equivalently,
2ϵ + v + r ≤ dr − 1.
5 Code-based Cryptography
Public-key cryptography is founded on the idea of having pairs of keys, consisting of
widely distributed public keys as well as private keys, the access to which is restricted
to the owner. The ideal model for secure communication is such that the sender
encrypts a message using the receiver’s public key. This action produces a ciphertext,
which can be easily decoded using the receiver’s private key.
This core idea is illustrated in Figure 1. The difficulty of decoding the ciphertext
without a private key depends on the difficulty of the mathematical problem on
which the cryptographic algorithm is based. Exhaustive searches, known as brute
force attacks are generally inefficient and successful attacks tend to exploit the subtle
structures in the key design.
The focus of this section is to introduce the concept of post-quantum cryptography
and then present some of the cryptographic schemes using linear codes in their key
design.
23
The general idea of the McEliece scheme can be applied to multiple code structures.
The original implementation used binary Goppa codes [22] and although uses of
other codes have been proposed, most of them have had a structural attack proposed
against them, making them insecure. The Goppa code implementation, however,
remains not only secure but also achieves faster encryption and decryption than the
popular RSA cryptosystem based on integer factorization. All the known attacks
against the Goppa code implementation of the McEliece scheme have exponential
complexity in the size of the code.
Unfortunately, the large public key sizes in the Goppa code implementation are
what keep it from being implemented more in practice.
As the name suggests, binary Goppa codes are defined over the binary field F2 .
Moreover, an extension field of degree m is used with an irreducible polynomial f (α)
of degree m used as the modulus for F2 . Note that the field F2m (α) can also be
expressed as F2 [α]/f (α) in this case, since any polynomial mod f (α) has at most
degree m and all the combinations of m bits result in exactly 2m coefficients to give
2m elements. Due to f (α) being irreducible, each polynomial of degree less than m
in F2m (α) is guaranteed to have an inverse — a property necessary for the definition
of the code later on.
Before presenting the definition a binary Goppa code, let us first briefly discuss
two of its properties: the code support and the error correction capacity. Denote by
25
σ a sequence of n distinct elements from the binary extension field F2m (α). We call
this the support and it is a subset of F2m . We can express polynomials in F2m (α)
with binary coefficients and degree at most m − 1 as [34]:
m−1
pj α j .
∑
p(α) = (10)
j=0
Using similar notation, each element in the code support may be expressed as:
m−1
σi,j αj ,
∑
σi (α) = (11)
j=0
Definition 14. [34] Let σ denote a support with elements in F2m and let f (x) denote
an irreducible polynomial of degree t. A binary Goppa code is defined as:
n−1
n
∑ ci
C = c ∈ {0, 1} | ≡ 0 mod g(x). (13)
i=0 x − σi (α)
The definition contains the inverse of an element mod g(x), while the element is itself
a function of both x and α. For the inverse of an element e(x) mod g(x) in a finite
field, the extended Euclidean algorithm is generally applied and yields the following
equation:
Note that x is the main term in the polynomial g(x), which gets its coefficients as
a function of α. So, for example, letting σ0 = α + α2 gives x − σ0 = x + α + α2 =
x0 · (α + α2 ) + x1 · 1.
Contrary to some other code types, the generator matrix for a Goppa code is
usually not constructed directly, but is instead derived through the parity check
26
matrix[22]. An explicit construction for the parity check matrix is as follows [11][34]:
⎡ ⎤⎡ ⎤
1 0 ··· 0 1 1 ··· 1
gt−1 1 ··· 0 ⎥ ⎢ σ0 (α) σ1 (α) · · · σn−1 (α)
⎢ ⎥⎢ ⎥
⎢ ⎥
2
σ12 (α) 2
⎢ ⎥⎢ ⎥
HΓ =
⎢
⎢ gt−2 gt−1 · · · 0 ⎥ ⎢ σ0 (α)
⎥ ⎢ · · · σn−1 (α) ⎥
⎥
⎢ .. .. . . .. ⎥ ⎢
⎥ ⎢ .. .. .. .. ⎥
⎢
⎣ . . . . ⎦⎣ . . . . ⎥
⎦
t−1 t−1 t−1
g1 g2 ··· 1 σ0 (α) σ1 (α) · · · σn−1 (α)
(16)
1
⎡ ⎤
g(σ0 (α))
0 ··· 0
⎢
1 .. ⎥
0 . 0
⎢ ⎥
g(σ1 (α))
⎢ ⎥
·⎢ ..
⎥.
⎢ .. ⎥
⎢
⎣ 0 0 . . ⎥
⎦
1
0 ··· ··· g(σn−1 (α))
Not all parity check matrices constructed as in (16) are convertible to generator
matrices. It is estimated that around 33% of parity check matrices constructed
from random code supports have linearly independent columns in the right-most
(n − k) × (n − k) block, allowing for the derivation of a generator matrix as described
in equations (2) and (3) [34].
• P, an n × n, permutation matrix with exactly one “1” in each row and column
These matrices are used to conceal the structure of the generator matrix by
multiplying them with GΓ as:
Public Private
Vector length n Permutation matrix P (n × n)
Field exponent m Scrambling matrix S (k × k)
Plain text length k Code support σ
Error correction capacity t mod g(x, α)
The (k × (n − k)) redundancy part of ĜΓ Efficient decoding algorithm D
Security
The McEliece cryptosystem with a binary Goppa code implementation is projected
to have a reasonable level of post-quantum security [8]. While Shor’s algorithm is
able to take advantage of certain periodic structures in other cryptography, Goppa
codes in McEliece do not admit such structure. However, information set decoding
based brute force attacks have been around since 1962 and have been improved on
over the years [45]. The quantum-based Grover’s algorithm could further speed up
these brute force attacks [23]. The authors of the Classic McEliece submission for the
National Institute of Standards and Technology (NIST) project for post-quantum
cryptography also point out how careless use of the cryptosystem could open up
attacks such as adaptive chosen ciphertext attacks [8]. Nevertheless, security remains
the prevalent competitive advantage of this approach in post-quantum cryptography,
while the most glaring disadvantage is the large public key size.
n−k−1
• Error-correction parameter t < 2
An efficient decoding algorithm D is identified for the code and the structure of
Gk is concealed by computing Ĝk = S(G + X). Finally, we compute the error rank
weight ϵ = n−k
2
− t.
A plaintext message vector m ∈ Fkqm is converted into ciphertext c by:
c = mĜk + e, (20)
and the message can be retrieved. Since the ciphertext was only at a distance of n−k
2
from the code, and since the rank weight rk(mSX) ≤ t, the decoding should correct
all of the induced errors.
Public Private
Public generator matrix Ĝk (k × n) Efficient decoding algorithm D
Error rank parameter ϵ Distortion matrix X (n × k)
Row scrambling matrix S (k × k)
The volume of the public key is k · n · m · log2 (q) bits and the information rate is
29
k
n
[40]. By comparison these public key sizes, as originally proposed would be up to
50 times smaller than respective public key sizes in the McEliece scheme.
Security
Confidence in Gabidulin code-based implementations has been shaken by effective
structural attacks, first by Gibson [20] and later by Overbeck [43]. Yet, it remains
an open question whether or not a suitable code structure, or some variant of the
cryptoystem itself could provide a reasonable level of security.
The key generation notably lacks an equivalent to the column permutation matrix
P in the McEliece scheme. There has been much optimism for such improvements
or similar to counteract the threat of structural attacks [17][40]. The rank metric
remarkably allows for the use of a column scrambler matrix in place of column
permutation matrix, since the necessary operations do not cause unwanted rank
errors as they would for the Hamming metric [40]. Unfortunately, such variants
among others have recently shown to be insecure [42][26].
Fairly recent improvements to non-structural attacks also pose somewhat of a
concern, as they restricts certain parameter sets as insecure without requiring any
structural weaknesses [19].
It remains to be seen how long other code structures designed to resist general-
izations for attacks by Gibson and Overbeck are able to do so. In the next chapter,
we look to twisted codes for a potential solution.
Definition 15. Let M be a random l × n matrix over Fq and let i ∈ N. Then the
(i+1)l×n
mapping λi : Fl×n
q m ↦→ Fq m is defined as:
⎡ ⎤
M
M[1]
⎢ ⎥
⎢ ⎥
⎢ ⎥
Λi (M) :=
⎢
⎢ M[2] ⎥,
⎥
(22)
⎢ .. ⎥
⎢
⎣ . ⎥
⎦
M[i]
i
where M[i] denotes Mq .
• dim Λi (CG ) = min{n, k + i}, with high probability for a random Gabidulin
code CG
Definition 16. ([[46], Def. 4]) Let n, k, l ∈ N with k < n and l ≤ n − k. Choose
the following:
• η ∈ (Fqm \{0})l .
The definition results in the following generator matrix for a twisted Gabidulin code:
32
α
⎡ ⎤
⎢
⎢ α[1] ⎥
⎥
⎢ .. ⎥
.
⎢ ⎥
⎢ ⎥
α[h1 −1]
⎢ ⎥
⎢ ⎥
⎢ ⎥
[h1 ] [k−1+t1 ] ⎥
⎢
⎢ α + η1 α ⎥
⎢ [h1 +1] ⎥
⎢ α ⎥
GT G = .. ⎥, (25)
⎢ ⎥
⎢
⎢
⎢ . ⎥
⎥
[hl −1]
α
⎢ ⎥
⎢ ⎥
[hl ] [k−1+tl ] ⎥
⎢ ⎥
⎢
⎢ α + ηl α ⎥
⎢
⎢ α[hl +1] ⎥
⎥
⎢
.. ⎥
.
⎢ ⎥
⎣ ⎦
α[k−1]
where h1 < . . . < hl .
α[2]
⎢ ⎥
GT G = ⎢⎢
⎥,
⎥ (26)
⎢ [3] [8] ⎥
⎣ α + η 2 α ⎦
α[4]
where η1 , η2 ∈ Fqm are some fixed parameters.
Intuitively, the hook vector determines which rows are twisted and the twist vector
dictates the q-power from k to n of the added twist element. The parameter η is the
coefficient of the twist element and it is chosen such that it either belongs to or does
not belong to certain sub-fields of Fqm . The choice of η allows the dimension of the
code to be k, while the elements of the linearized polynomial span a Fq subspace of
dimension n.
This construction was shown in [47] to be MRD and in [46] it was shown to resist
Overbeck’s structural attack. This resistance comes from Overbeck’s Λi operation
(q-sum) not distinguishing it from a random code as easily when the parameters for
the twists are chosen carefully.
The parameter set restriction proposed in [[46], Thm. 4]1 ensures that each distinct
element tj in the twist vector tj ∈ {1, . . . , n − k}l from the code CT G generates a
distinct linearly independent basis element in the q-sum Λi (GT G ). Thus, large
dimension for the q-sum can be consistently achieved with this construction, making
twisted Gabidulin codes resilient to that type of structural attacks.
1
The constraints on ti in Thm. 4 contradict the domain for t set in Def. 4
33
Definition 17. ([[5], Def. 1]) Let h, t, η be chosen as in (16), except η ∈ Fnq . The
set of [k, t, h, η]-twisted polynomials is defined as
⎧ ⎫
⎨ k−1 l ⎬
n,k
f i xi + ηj fhj xk−1+tj : fi ∈ Fq .
∑ ∑
Pt,h,η := f= (27)
⎩ ⎭
i=0 j=1
With the help of distinct basis elements α1 , . . . , αn ∈ Fq , we can construct the twisted
Reed-Solomon code as
{ }
n,k
Cα,t,h,η [n, k] = [f (α1 ), f (α2 ), . . . , f (αn )] : f ∈ Pt,h,η , (28)
C1 ⋆ C2 := ⟨c1 ⋆ c2 | c1 ∈ C1 , c2 ∈ C2 ⟩Fq .
Hence, the Schur square is the product C ⋆ C, the dimension of which is the distin-
guishing feature. The two cases for the distinguisher are roughly
34
{ }
• dim C ⋆ C = min n, 12 k(k + 1) with high probability for a random linear code
C
The twisted codes from [5] and their shortenings at up to 2 positions were shown to
always have Schur square dimension n and dimension k > n2 , so this attack fails in
its premise.
In the attack shown in [59], Wieschebrink remarks that applying the Schur square to
random subcodes of Reed-Solomon codes outputs a Reed-Solomon code with high
probability. Thus, the Sidelnikov-Shestakov attack works on the Schur square code
of the subfield subcode with high probability.
Letting ĜT RS denote the public generator matrix of a twisted Reed-Solomon code in
the McEliece cryptosystem, the algorithm detailed in Appendix B shows the step-by-
step process of retrieving an alternative valid secret key (S∗ , α∗ , η ∗ ) from ĜT RS . In
the algorithm pseudocode ([[30], Algorithm 1]), the function names SubfieldSubcode,
Square and SidelShest refer to intersecting for the subfield subcode, taking the Schur
square and applying the Sidelnikov-Shestakov attack, respectively.
35
The interpolation in the algorithm maps (a, b) ∈ Fnq × Fnq0 to g ∈ Fnq with the
condition n
gj aj−1
∑
i = bi
j=1
for i = 1, . . . , n. The last function, GTRS, matches the obtained α∗ and η ∗ with the
generator matrix G∗ of suitable Reed-Solomon code [30]. S∗ can be computed such
that S∗ G∗ = ĜT RS . The algorithm runs in polynomial time with O(n4 ) operations
and asserts that the construction of [5] as insecure for at least most practical parameter
sets.
column permutation matrix of full rank over Fq . For twisted Gabidulin codes, the
restrictions of the twisted Reed-Solomon system for parameters q ≥ n, n and k do not
apply. However, recall that for twisted Gabidulin codes αi are linearly independent
in addition to being distinct.
From this system, the attack aims to recover an alternate private key (S∗ , α∗ , η ∗ , P∗ )
directly from the twisted public generator matrix ĜT G . Overbeck’s attack then gets
applied to CˆT G ∩ Fq . A successful application of Overbeck’s attack yeilds α∗ and
P∗ , with η ∗ then being obtained via interpolation as in Appendix B and S∗ being
computed such that
S∗ G∗ = (ĜT G P∗−1 )[λ+1:n] ,
where G∗ is the generator matrix of an [α∗ , t, h, η ∗ ]-twisted Gabidulin code and only
the final n − λ coordinates are being considered from ĜT G P∗−1 .
Figure 2 illustrates the structures of generator matrices that are relevant to
the attack. It demonstrates how the generator matrix of a twisted Gabidulin code
incorporates higher q-powers of α without increasing the dimension of the code. It
also highlights how a generator matrix for the subfield subcode is void of these higher
q-powers. In the figure, β is some affine transformation of α.
Experimental Approach
The proposed parameter sets from [[46], Table 1] were a natural starting point for
experimentation. The attack failed on each of those sets of parameters in the Sage-
Math implementation. To narrow down the problem, the next idea was to look for
parameter sets for which that attack could directly resolve. Lavauzelle and Renner
37
had discovered that a choice of small λ and an s, such that X has full rank over Fq
were promising research directions [30].
Before fully committing to the analysis of parameters λ and s, some testing was
done to see if the twists, specifically the types of twists to achieve large q-sum
dimension proposed in [[46], Thm. 4], would have some carry over effect into the
subfield subcode. This was done under awareness of the fact that the subfield subcode
structure had already been used to extract adequate structure from the code to
enable Overbeck’s attack for some parameters.
Various choices for the degrees of relative extension fields were also tried out.
These relative extensions are constructed with q m0 replacing the base field degree q
in the code construction phase and q m1 being inserted as the larger extension degree
in place of q m with 1 < m0 < m1 ∈ N. This is still done over the base field Fq and
there is a chain of subfields, i.e. Fq ⊊ Fqm0 ⊊ Fqm1 . The binary field with q = 2 was
used as the base field for all experimentation and the code length was set to n = m0 .
In the search for patterns occurring with λ and s, different parameter choices were
categorized solely on the basis of the attack succeeding. In the successful cases, the
parameters were simply recorded, whereas in the unsuccessful cases the breaking
point of the algorithm and variable values just prior to that point were taken note of.
For parameter sets with large values for n, k, λ only one instance was simulated due
to these simulations being time consuming, while parameter sets with comparatively
small n, k, λ (k ≤ 34) were simulated 10 times each.
The last step was to analyse the patterns in λ and s, especially w.r.t. n and k
and compare the findings to those in the literature.
Experimental Results
As expected, the twists in the code did not prevent or slow down the attack at all.
There was no noticeable change in the running times for the algorithm when number
or structure of twists were varied. Not even when maximal q-sum dimension for
the public code was pursued. Selecting m1 = 2m0 over m1 = 4m0 for the relative
extension fields also had no observable impact.
The feasible choices for λ appeared to range from 1 to some largest value λL
specific to the choice of n and k. Further, the choice of a valid s then depended on
n, k and λ, where an s corresponding to a full Fq rank was always viable. The trend
for suitable s then turned out in consecutive integers down from λ to some minimum
value, which was some function of n, k and λ.
Table 4 shows some sets of parameters, revealed to be broken by experimental
simulation.
38
k n λL set of s for λL
18 26 3 {3}
21 33 5 {4, 5}
32 48 8 {7, 8}
34 52 9 {7, 8, 9}
46 80 14 {11, 12, 13, 14}
82 140 53 {i ∈ N | 32 ≤ i ≤ 53}
The uniting feature for these parameter sets is that they cause the right kernel of the
public generator matrix to have rank 1, where the right kernel is the set of vectors v
for which ĜT G v = 0. Conversely, for almost every parameter set where the attack did
not succeed, the rank of the right kernel was greater than one. The only exception
to this within the tested parameter sets emerged with λ = 3, s = 2. With parameter
sets having λ > max λ, the subfield subcode structure does not expose the structure
of the public code. This however does greatly narrow down the search space for
potential attackers.
For the cases where λ ≤ λL , corresponding parameter selections have been al-
ready discussed in the literature, as P. Loidreau suggested restricting the parameters
of a distortion matrix X in Gabidulin codes for the GPT system [32]. The intent was
to guarantee a sufficiently high dimension for the right kernel of the public generator
matrix and it was proposed as an early countermeasure in 2010 to Overbeck’s attack
on Gabidulin codes.
Loidreau’s design was addressed only fairly recently, as Horlemann-Trautmann
et. al. showed in 2018 a way to extend Overbeck’s attack further and to focus on
retrieving elements of rank one directly from the code, disregarding the dual code
entirely [27].
In any case, these considerations are no longer specific to twisted codes, and the
simulation results support the claim that subfield subcodes may completely negate
any practical cryptographic advantage from twisted codes, when λ ≤ λL . In addition,
the choice of secure parameters seems to be severely restricted in the λ > λL case.
39
7 Conclusion
This thesis has covered a diverse array of topics in code-based cryptography, ulti-
mately leading to the description and assessment of twisted codes. Twisted codes
were the driving aspiration for much of the thesis, with the primary goal of having
some meaningful discussion on them in light of the most recent publications. The
topic can be quite intimidating at first, since the concepts build and expand upon
themselves, as is the case in other areas of mathematics correspondingly. Hence,
one of the main contributions of the thesis is the contextual narrative, which leads
the reader all the way from learning the definition for a linear code, to potentially
grasping the essence of structural vulnerabilities in code-based cryptography and
how these challenges are approached. This write-up makes ample use of existing
literature and serves also as a survey to the state-of-the-art research. The practical
experimentation and simulation make for the second main contribution.
As for further research regarding twisted codes, one worthwhile prospect would
be to look into the possibility of masking the subfield subcode structure. This would
immediately reinstate twisted codes as a potentially viable solution for secure com-
munications in the future. Another research direction would be to further analyse the
numerous subfamilies of twisted codes, since they are a broad, recently discovered and
largely unexplored family of codes overall. The fact that the specific constructions
from [46] and [5] are shown to be mostly insecure does not imply the same for other
subfamilies.
Rank metric codes have yet again been reconfirmed as highly susceptible to structural
attacks, even though the episode with twisted codes has returned to more or less same
situation as where it started — with the construction and near complete dismantling
of another supplementary feature to conceal rank code structure. Nevertheless,
continued interest in rank codes is bound to live on, with pressure on one side from
the ever more imminent threat posed by quantum computers and on the other hand,
the unfeasible public key sized of the secure post-quantum alternatives. Besides, the
field of code-based cryptography is a constant back and forth exchange of ideas and
in time it will be due for a novel countermeasure.
40
References
[1] Gorjan Alagic, Jacob Alperin-Sheriff, Daniel Apon, David Cooper, Quynh Dang,
Yi-Kai Liu, Carl Miller, Dustin Moody, Rene Peralta, et al. Status report on
the first round of the NIST post-quantum cryptography standardization process.
US Department of Commerce, National Institute of Standards and Technology,
2019.
[2] Daniel Augot, Lejla Batina, Daniel J Bernstein, Joppe Bos, Johannes Buchmann,
Wouter Castryck, Orr Dunkelman, Tim Güneysu, Shay Gueron, Andreas Hülsing,
et al. Initial recommendations of long-term secure post-quantum systems.
Available at pqcrypto. eu. org/docs/initial-recommendations. pdf, 2015.
[3] Stephane Beauregard. Circuit for shor’s algorithm using 2n+ 3 qubits. arXiv
preprint quant-ph/0205095, 2002.
[5] Peter Beelen, Martin Bossert, Sven Puchinger, and Johan Rosenkilde. Structural
properties of twisted reed-solomon codes with applications to cryptography. In
2018 IEEE International Symposium on Information Theory (ISIT), pages
946–950. IEEE, 2018.
[6] Elwyn Berlekamp, Robert McEliece, and Henk Van Tilborg. On the inherent
intractability of certain coding problems (corresp.). IEEE Transactions on
Information Theory, 24(3):384–386, 1978.
[8] Daniel J Bernstein, Tung Chou, Tanja Lange, Ingo von Maurich, Rafael Misoczki,
Ruben Niederhagen, Edoardo Persichetti, Christiane Peters, Peter Schwabe,
Nicolas Sendrier, et al. Classic mceliece: conservative code-based cryptography.
NIST submissions, 2019.
[10] Lily Chen, Lily Chen, Stephen Jordan, Yi-Kai Liu, Dustin Moody, Rene Peralta,
Ray Perlner, and Daniel Smith-Tone. Report on post-quantum cryptography.
US Department of Commerce, National Institute of Standards and Technology,
2016.
[12] Ph. Delsarte. Bilinear forms over a finite field, with applications to coding
theory. Journal of Combinatorial Theory, Series A, 25(3):226–241, 1978.
[14] Ernst M. Gabidulin. Theory of codes with maximum rank distance. Problemy
Peredachi Informatsii, 21(1):3–16, 1985.
[16] Ernst M Gabidulin. Attacks and counter-attacks on the gpt public key cryp-
tosystem. Designs, Codes and Cryptography, 48(2):171–177, 2008.
[18] Ernst M. Gabidulin and Nina I. Pilipchuk. Error and erasure correcting
algorithms for rank codes. Designs, codes and Cryptography, 49(1-3):105–122,
2008.
[19] Philippe Gaborit, Olivier Ruatta, and Julien Schrek. On the complexity of the
rank syndrome decoding problem. IEEE Transactions on Information Theory,
62(2):1006–1019, 2015.
[20] J. Keith Gibson. Severely denting the gabidulin version of the mceliece public
key cryptosystem. Des. Codes Cryptography, 6(1):37–45, July 1995.
[21] J. Keith Gibson. The security of the gabidulin public key cryptosystem. In
Eurocrypt, 1996.
[22] Valerii Denisovich Goppa. A new class of linear correcting codes. Problemy
Peredachi Informatsii, 6(3):24–30, 1970.
[23] Lov K Grover. A fast quantum mechanical algorithm for database search. arXiv
preprint quant-ph/9605043, 1996.
[24] Richard W. Hamming. Error detecting and error correcting codes. The Bell
system technical journal, 29(2):147–160, 1950.
[25] Israel N. Herstein. Topics in algebra. John Wiley & Sons, 2006.
[28] Loo-Keng HUA. A theorem on matrices over a sfield and its applications. In
Bulletin of the American Mathematical Society, volume 55, pages 1046–1046.
Amer Mathematical Soc 201 Charles St, Providence, RI 02940-2213, 1949.
[29] Gareth A. Jones and J. Mary Jones. Information and coding theory. Springer
Science & Business Media, 2012.
[30] Julien Lavauzelle and Julian Renner. Cryptanalysis of a system based on twisted
reed-solomon codes. arXiv preprint arXiv:1904.11785, 2019.
[32] Pierre Loidreau. Designing a rank metric based mceliece cryptosystem. In In-
ternational Workshop on Post-Quantum Cryptography, pages 142–152. Springer,
2010.
[34] Marcus Michiel. White paper on mceliece with binary goppa codes. Technical
report, Department of Mathematics and Computer Science, Eindhoven University
of Technology, February 2019.
[35] Stefan M. Moser and Po-Ning Chen. A student’s guide to coding and information
theory. Cambridge University Press, 2012.
[37] Kamil Otal and Ferruh Özbudak. Explicit constructions of some non-gabidulin
linear maximum rank distance codes. Advances in Mathematics of Communica-
tions, 10(3), 2016.
[38] Ayoub Otmani, Hervé Talé Kalachi, and Sélestin Ndjeya. Improved cryptanal-
ysis of rank metric schemes based on gabidulin codes. Designs, Codes and
Cryptography, 86(9):1983–1996, 2018.
[39] Alexei V. Ourivski. Recovering a parent code for subcodes of maximal rank
distance codes. In Proc. of WCC, volume 3, pages 357–363, 2003.
[40] Alexei V. Ourivski and Ernst M. Gabidulin. Column scrambler for the gpt
cryptosystem. Discrete Applied Mathematics, 128(1):207–221, 2003.
43
[41] Raphael Overbeck. A new structural attack for gpt and variants. In Ed Dawson
and Serge Vaudenay, editors, Progress in Cryptology – Mycrypt 2005, pages
50–63, Berlin, Heidelberg, 2005. Springer Berlin Heidelberg.
[43] Raphael Overbeck. Structural attacks for public key cryptosystems based on
gabidulin codes. Journal of cryptology, 21(2):280–301, 2008.
[44] Nicholas Patterson. The algebraic decoding of goppa codes. IEEE Transactions
on Information Theory, 21(2):203–207, 1975.
[45] Eugene Prange. The use of information sets in decoding cyclic codes. IRE
Transactions on Information Theory, 8(5):5–9, 1962.
[46] Sven Puchinger, Julian Renner, and Antonia Wachter-Zeh. Twisted gabidulin
codes in the gpt cryptosystem. arXiv preprint arXiv:1806.10055, 2018.
[47] Sven Puchinger, John Sheekey, et al. Further generalisations of twisted gabidulin
codes. arXiv preprint arXiv:1703.08093, 2017.
[48] Haitham Rashwan, Ernst M Gabidulin, and Bahram Honary. A smart ap-
proach for gpt cryptosystem based on rank codes. In 2010 IEEE International
Symposium on Information Theory, pages 2463–2467. IEEE, 2010.
[49] I. Reed and G. Solomon. Polynomial codes over certain finite fields. Journal of
the Society for Industrial and Applied Mathematics, 8(2):300–304, 1960.
[50] Ron M. Roth and Abraham Lempel. On mds codes via cauchy matrices. IEEE
transactions on information theory, 35(6):1314–1319, 1989.
[51] John Sheekey. A new family of linear maximum rank distance codes. arXiv
preprint arXiv:1504.01581, 2015.
[52] Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete
logarithms on a quantum computer. SIAM Review, 41(2):303–332, 1999.
[54] Natalia Silberstein, Ankit Singh Rawat, and Sriram Vishwanath. Error resilience
in distributed storage via rank-metric codes. In 2012 50th Annual Allerton
Conference on Communication, Control, and Computing (Allerton), pages 1150–
1157. IEEE, 2012.
[55] Danilo Silva, Frank R Kschischang, and Ralf Koetter. A rank-metric approach
to error control in random network coding. IEEE transactions on information
theory, 54(9):3951–3967, 2008.
44
[56] W. A. Stein et al. Sage Mathematics Software (Version 8.9). The Sage
Development Team, 2019. [Link]
A Appendix A
Data: Public generator matrix Ĝk
Result: Private keys S∗ and P∗ (row and column scramblers)
initialization;
while Λi (Ĝk ) has full rank do
i ← i + 1;
compute Λi (Ĝk );
end
if Λi (Ĝk )⊥ has not full rank over Fq then
compute column scrambler P∗ , such that first rows of Λi (Ĝk )⊥ P∗⊤ are zero;
else
attack fails;
end
if The last columns of Ĝk P∗−1 generate a Gabidulin code then
use some existing method (e.g. Ourivski [39]) to compute its generator
vector g ∗ and a row scrambler S∗ ;
end
Verify that S∗ and P∗ are part of a valid secret key
Algorithm 1: Overbeck’s Attack [42]
46
B Appendix B
Data: Public generator matrix ĜT RS
Result: Private key (S∗ , α∗ , η ∗ )
initialization;
Gsub ← SubfieldSubcode(ĜT RS ) ∈ Fq(k−l)×n ;
Gsq ← Square(GSub ) ∈ F(2k−1)×nq ;
′ n
α ← SidelShest(Gsq ) ∈ Fq ;
i ← 1 ∈ N;
while G′ (G⊥ ⊤
sub ) ̸= 0 do
b ←∈ Fq ;
α∗ ← (α1′ − b, . . . , αn′ − b) ∈ Fq ;
G′ ← GenSub(α∗ ) ∈ F(k−l)×n q ;
i ← i + 1;
end
for j ← 1 to l do
i ← 1 ∈ N;
while ghj +1 = 0 do
g ← Interpolate(α′ , (Gpubi,1 , . . . , Gpubi,n )) ∈ Fnq0 ;
i ← i + 1;
end
gk−1+t
ηj∗ ← gh +1j
j
end
G∗T RS ← GTRS(α∗ , η ∗ ) ∈ Fqk×n
0
;
∗ ∗ k×k
S ← GT RS \ĜT RS ∈ Fq0 ;
return (S∗ , α∗ , η ∗ )
Algorithm 2: Attack by Lavauzelle and Renner [[30], Algorithm 1]