Code-Based_Cryptography_State_of_the_Art_and_Perspectives
Code-Based_Cryptography_State_of_the_Art_and_Perspectives
Code-Based Cryptography:
State of the Art and Perspectives
Code-based cryptography is one of the few mathematical techniques that enables the construction of
public-key cryptosystems that are secure against an adversary equipped with a quantum computer. The
McEliece public-key encryption scheme and its variants are candidates for a postquantum public-key
encryption standard.
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
44 July/August 2017 Copublished by the IEEE Computer and Reliability Societies 1540-7993/17/$33.00 © 2017 IEEE
Linear expansion Add errors
Encryption
Public, reversible Public, one-way
Cleartext Code word Ciphertext
Public Trapdoor
Decryption
Invert expansion Remove errors
Figure 1. Code-based public-key encryption. The ciphertext is a noisy code word that only the legitimate user can correct to recover the
cleartext.
point, by choosing appropriately large sizes, those Parameters: A family ℱ of binary linear t-error correcting [n,k] codes
problems are intractable and thus, under these assump- Key generation: → (G, Φ) a key pair where
tions, the system is secure against any computationally public key: G ∈{0,1}k×n is a matrix which spans a code 〈G〉 ∈ ℱ
bounded adversary. private key: Φ is a t-bounded decoder for 〈G〉
Encryption: {0,1}k → {0,1}n
The twofold security proof has been implicitly x ↦ xG + e with e ∈ {0,1}n random of Hamming weight t
understood since the origin of the scheme but was first Decryption: {0,1}n → {0,1}k
stated in Nicolas Courtois and his colleagues’ “How to y ↦ Φ(y)G∗ with G∗ a right inverse of G
Achieve a McEliece-Based Digital Signature Scheme”3
and formally proven in my paper “On the Use of Struc- Figure 2. McEliece public-key encryption scheme.
tured Codes in Code Based Cryptography.”4 The first
problem, generic decoding, is nondeterministic poly-
nomial time (NP)-complete2 and is also believed to be Zero-knowledge authentication protocol. The first such
hard on average.5 Progress is possible and would then protocol was proposed by Jacques Stern in 1993.8 Some
require an increase in system parameters, but a signifi- variants have followed, and all amount to the same
cant breakthrough is unlikely. Much like factoring and idea: one party picks a code word x, keeps it secret, and
discrete logarithms for number theory–based crypto- publishes a noisy version of it, say y = x + e, with e of
systems, research on this topic must be maintained at small weight. Then, this party can prove interactively
the highest level to ensure enough confidence in the sys- to another party that it knows a code word close to the
tem and adjust its parameters when needed. public word y without ever revealing any information
The second problem, public-key indistinguishability, about x.
is much more open. To state it properly, the system must
be instantiated. For instance, McEliece proposed using Digital signature. There’s a generic way to produce
the family of binary Goppa codes, for which the indis- digital-signature schemes from zero-knowledge pro-
tinguishability assumption holds so far (except when tocols using the Fiat-Shamir paradigm.9 This can be
the code rate tends to 1,6 which is an irrelevant case for achieved using the Stern protocol. Note that, against
encryption). For some other families, Reed-Solomon quantum adversaries, the construction requires some
codes, concatenated codes, low-density parity check modifications.10 The resulting digital signature scheme
codes, and so on, the assumption doesn’t hold and the is easy to implement and enjoys relatively small key
corresponding instances of McEliece are unsafe. Pro- sizes (a few hundred bytes) but produces rather large
viding families of codes for which the indistinguish- signatures (one or a few hundred kilobytes).
ability assumption holds is a key issue in code-based Another method to build digital signatures is the
cryptography. “hash and sign” paradigm in which users consider the
Figure 2 gives a general description of the McEliece digest of the message to be signed as a ciphertext and
encryption scheme. Terminology refers to the coding produce the corresponding cleartext as the signature.
theory glossary in the sidebar. In this scenario, the public key can be used to check
the signature’s validity. Unfortunately, the McEliece
Other Cryptographic Primitives from Codes encryption primitive isn’t surjective and the para
Public-key encryption can also be achieved with meters used for encrypting aren’t suitable for signing.
the Niederreiter scheme,7 which is equivalent to the Digital signature is nevertheless possible but requires
McEliece scheme in terms of security. In addition, families of binary Goppa codes of a rate close to 1,3 pre-
two other important functionalities can be achieved cisely the subclass of Goppa codes that is distinguish-
from codes: zero-knowledge authentication and digi- able from random.6 Even though this distinguisher
tal signatures. doesn’t lead to an effective attack, it invalidates the
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
www.computer.org/security 45
POSTQUANTUM CRYPTOGRAPHY, PART 1
I consider here only linear codes over the binary field F2 = {0,1} of
integers modulo 2. Codes over larger alphabets, any finite field
Fq with q elements, can be defined likewise and are sometimes
Code family: Among the issues and successes of coding theory,
one was to design “good” families of codes. Typically, the problem
was to find, for given but arbitrary large values of n and k, families
used in cryptography. Most statements and claims are valid in gen- of [n,k] codes for which an efficient (that is, polynomial time)
eral. Nonlinear codes also exist but are beyond this survey’s scope. t-bounded decoder could be devised, where t is a function of n and
k. The larger t, the better the code family.
Hamming distance: The distance between two words x and y of For cryptographic purposes, a family F of t-error correcting linear
same length is the number of coordinates in which they differ, [n,k] codes is chosen to provide the desired security level. Choosing
denoted dist(x,y). a code C in the family will naturally provide a pair (G,Φ) where G is a
generator matrix of C and Φ is a t-bounded decoder for C.
Hamming weight: The weight of a word x determined by its num-
ber of nonzero coordinates, denoted wt(x). Generic decoding: A generic decoder for binary linear [n,k] codes
is a mapping Ψ: {0,1}n × {0,1}k×n → {0,1}k. For a given instance x =
Linear code: A binary linear [n,k] code C of dimension k and Ψ(y,G), a measure of success is the Hamming distance between xG
length n ≥ k is a k-dimensional subspace of the vector space {0,1}n. and y, which must be as small as possible. In particular, a t-bounded
An element of a code is a code word. The code rate is the ratio k/n. generic decoder for [n,k] codes will be such that for all x ∈ {0,1}k, for
all G ∈{0,1}k×n, and all e ∈ {0,1}n of Hamming weight t or less, we
Generator matrix: A full-rank k × n matrix G ∈ {0,1}k×n whose have Ψ(xG + e,G) = x. Generic decoding is nondeterministic poly-
rows form a basis of C. C = {xG | x ∈ {0,1}k }. The mapping x ↦ xG nomial time (NP)-hard1 and difficult on average;2 the best known
expands any k-bit word into an n-bit code word. solution’s complexity grows exponentially with error weight t.3
security proof. Moreover, the scheme uses large pub- becomes harmless, whereas this was inadvisable in the
lic keys, has significant signing complexity, and doesn’t original scheme. A systematic public key reduces the
scale very well. public key size.
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
46 IEEE Security & Privacy July/August 2017
using binary Goppa codes, codes must be of dimension
k = 3,376 probably and length n = 4,096 correcting t =
60 errors. The public key size is 303,840 bytes (with a Circulant block: G=
matrix in systematic form), and the expansion between
the cleartext and the ciphertext is approximately 20 per-
cent. For the same security against quantum adversar-
ies, the block size must increase by a factor of 2, and the
key size by a factor of 4. G= G=
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
www.computer.org/security 47
POSTQUANTUM CRYPTOGRAPHY, PART 1
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
48 IEEE Security & Privacy July/August 2017
Parameters: block size p, row weight w, error weight t, ℛp = F2[x]/(xp − 1)
(p a prime, w even, w/2 odd, w and t are close to √2p)
Alice Bob
g=hh −1
1 0
picks h0, h1 randomly in ℛp
with wt(h0) = wt(h1) = w/2
recovers e0, e1 by solving s = e0 + e1g
picks e0, e1 randomly in ℛp with wt(e0) + wt(e1) = t
sh0 = e0h0 + e1h1
(as in Problem 1, QC-MDPC decoding)
At the end of the protocol, Alice and Bob share the session key K = hash (e0, e1)
Figure 5. QC-MDPC key exchange protocol. The two parties involved, Alice and Bob, share a secret K, valid for one session, to be used as the key
of a symmetric encryption scheme like the Advanced Encryption Standard.
probability is low enough be a benign nuisance in nor- Code-based cryptography has a thorn on its side with
mal usage of the scheme. However, very recently Qian the absence of a satisfying digital-signature scheme. The
Guo and his colleagues demonstrated that error pat- most credible possibility at this time would be a non-
terns leading to decoding failures are correlated with interactive variant of Jacques Stern’s zero-knowledge
the secret key.16 If adversaries have the ability to collect authentication scheme,8 but this would mean rela-
many error patterns leading an MDPC decoding failure, tively large signature sizes (one or a few hundred kilo-
they can recover the secret. We can counter this attack bytes). Finding other, more convenient digital signature
by reducing the probability of a decoding failure to a primitives is certainly one of the major challenges in
small enough quantity. This can be achieved by increas- code-based cryptography today.
ing the block size (and thus the key size). The precise
amount by which to increase the block size is an open References
research question. 1. R.J. McEliece, A Public-Key Cryptosystem Based on Alge-
Finally, note that the forward secrecy key exchange braic Coding Theory, Deep Space Network progress
protocol presented here isn’t vulnerable to this attack report, Jet Propulsion Lab., California Inst. Technology,
because each public key is used only once. In the case of Jan. 1978, pp. 114–116.
a decoding failure, the protocol restarts from the begin- 2. E.R. Berlekamp et al., “On the Inherent Intractability of
ning with a fresh public key g. Certain Coding Problems,” IEEE Trans. Information The-
ory, vol. 24, no. 3, 1978, pp. 384–386.
3. N. Courtois, M. Finiasz, and N. Sendrier, “How to Achieve
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
www.computer.org/security 49
POSTQUANTUM CRYPTOGRAPHY, PART 1
Syndrome Decoding,” Advances in Cryptology (CRYPTO 15. R. Misoczki et al., “MDPC-McEliece: New McEliece
93), LNCS 773, Springer, 1993, pp. 13–21. Variants from Moderate Density Parity-Check Codes,”
9. A. Fiat and A. Shamir, “How to Prove Yourself: Practical Solu- Proc. IEEE Int’l Symp. Information Theory (ISIT 13), 2013,
tions to Identification and Signature Problems,” Advances in pp. 2069–2073.
Cryptography (CRYPTO 86), LNCS 263, Springer, 1982, 16. Q. Guo, T. Johansson, and P. Stankovski, “A Key Recov-
pp. 186–194. ery Attack on MDPC with CCA Security Using Decoding
10. D. Unruh, “Non-interactive Zero-Knowledge Proofs in the Errors,” Advances in Cryptology (ASIACRYPT 16), LNCS
Quantum Random Oracle Model,” Advances in Cryptogra- 10031, Springer, 2016, pp. 789–815.
phy (EUROCRYPT 15), LNCS 9057, Springer, 2015, pp.
755–784. Nicolas Sendrier is a senior research scientist at INRIA.
11. K. Kobara and H. Imai, “Semantically Secure McEliece His main research interests include the design and
Public-Key Cryptosystems—Conversions for McEliece analysis of code-based cryptographic primitives.
PKC,” Public Key Cryptography, LNCS 1992, Springer, 2001, Sendrier received a PhD in computer science from
pp. 19–35. University Paris 6. He’s a steering committee member
12. D.J. Bernstein et al., “McBits: Fast Constant-Time of the Postquantum Cryptography conference series.
Code-Based Cryptography,” Proc. Int’l Workshop Crypto Contact him at [email protected].
graphic Hardware and Embedded Systems (CHES 13), LNCS
8086, Springer, 2013, pp. 250–272.
13. P. Gaborit, “Shorter Keys for Code Based Cryptography,”
Proc. Int’l Workshop Coding and Cryptography (WCC 05),
2005, pp. 81–90.
14. J.-C. Faugère et al., “Algebraic Cryptanalysis of McEliece Vari- Read your subscriptions through
the myCS publications portal at
ants with Compact Keys,” Advances in Cryptology (EURO-
http://mycs.computer.org
CRYPT 10), LNCS 6110, Springer, 2010, pp. 279–298.
• Requires 3 endorsements.
• Self-nominations are not accepted.
• Do not need IEEE or IEEE Computer Society membership to apply.
Authorized licensed use limited to: Technische Universitaet Muenchen. Downloaded on December 09,2024 at 14:03:21 UTC from IEEE Xplore. Restrictions apply.
50 IEEE Security & Privacy July/August 2017