@@ -80,12 +80,12 @@ there are plenty of people who will try to break ciphers and who will
8080let it be widely known when they have succeeded.
8181
8282Parameterizing a cipher with keys provides us with what is in effect a
83- very large family of ciphers; by switching keys, we are
83+ very large family of ciphers; by switching keys, we are
8484switching to another cipher in the family. It is common to limit the amount
8585of data that a *cryptanalyst * (code-breaker) can access before the key
8686changes. This provides the attacker with less ability to break the cipher
8787(for reasons discussed below) and limits the damage done if the code is
88- broken.
88+ broken.
8989
9090The basic requirement for an encryption algorithm is that it turns
9191plaintext into ciphertext in such a way that only the intended
@@ -109,7 +109,7 @@ session. Common headers appear at the start of HTTP messages. This may
109109enable a *known plaintext * attack, which has a much higher chance of
110110success than a *ciphertext only * attack. Even better is a *chosen
111111plaintext * attack, which may be enabled by feeding some information to
112- the sender that you know the sender is likely to transmit.
112+ the sender that you know the sender is likely to transmit.
113113
114114The best cryptographic algorithms, therefore, can prevent the attacker
115115from deducing the key even when the individual knows both the
@@ -135,7 +135,7 @@ It turns out that it is not trivial to create cryptographic ciphers
135135that can be broken only by brute force. For example, the original DES
136136(data encryption standard) algorithm had a key of only 56 bits; when
137137it became clear that 56 bits was too small, triple DES was introduced, using three
138- rounds of DES each with its own key. It might seem that this
138+ rounds of DES each with its own key. It might seem that this
139139increased the key size to 168 bits (:math: `3 \times 56 `) but because
140140of the 3-round structure of triple DES, the attacker only has to
141141search a key space of 112 bits. This depends on something called a
@@ -212,7 +212,7 @@ to be an issue is available at the "Sweet32" website.
212212.. admonition :: Further Reading
213213
214214 Sweet32. `Birthday attacks on 64-bit block ciphers in TLS and OpenVPN
215- <https://sweet32.info> `__.
215+ <https://sweet32.info> `__.
216216
217217
218218
@@ -237,11 +237,11 @@ two participants use different keys.)
237237 secure communication since that is a common networking term to
238238 identify the two endpoints of a communication channel. In the
239239 security world, the parties are often called *principals *.
240-
240+
241241 The U.S. National Institute of Standards and Technology (NIST) has
242242issued standards for a series of secret-key ciphers. *Data Encryption
243243Standard * (DES) was the first, and it survived for several decades
244- before being deprecated.
244+ before being deprecated.
245245
246246DES keys have 56 independent bits (although they have 64 bits
247247in total; the last bit of every byte is a parity bit). As noted above,
@@ -284,7 +284,7 @@ Bruce Schneier puts it this way:
284284 hard. What is hard is creating an algorithm that no one else can
285285 break, even after years of analysis. And the only way to prove that
286286 is to subject the algorithm to years of analysis by the best
287- cryptographers around.
287+ cryptographers around.
288288
2892893.3 Public-Key Ciphers
290290------------------------
@@ -355,7 +355,7 @@ confidentiality to secret-key ciphers. The symmetric key sent over
355355this confidential channel is called a *session key *. The reasons for this two-step
356356approach include the higher efficiency of secret-key ciphers, and the need
357357for reasonably frequent changing of encryption keys as described
358- above.
358+ above.
359359
360360.. _fig-pksign :
361361.. figure :: figures/f08-04-9780123850591.png
@@ -396,6 +396,56 @@ slower than secret-key ciphers. Consequently, secret-key ciphers are
396396used for the vast majority of encryption, while public-key ciphers are
397397reserved for use in authentication and session key establishment.
398398
399+ .. admonition :: Post-Quantum Cryptography
400+
401+ As we have seen, a lot of cryptography depends on the difficulty of
402+ solving certain mathematical problems, such as factoring prime
403+ numbers or computing discrete logarithms. When the efforts of
404+ mathematicians over decades to solve a problem have proven
405+ fruitless, it is tempting to declare these problems sufficiently
406+ hard for our purposes. However, there is a potential weakness
407+ lurking on the horizon, which is that many of these problems are
408+ known to have efficient solutions using quantum computers. Or more
409+ accurately, they could be efficiently solved on quantum computers
410+ that are much larger than any that have been built to date. As
411+ progress is made towards ever larger quantum computers, measured by
412+ the number of quantum bits (qubits), there is a real
413+ risk that many current cryptographic algorithms will at some point
414+ become breakable.
415+
416+ There is plenty of debate about whether quantum computing will ever
417+ progress to the point that the risks to conventional cryptography
418+ materialize. Current quantum computers are much too small and lack
419+ the error-correcting capabilities necessary to solve the
420+ mathematical problems at sufficient scale, and it is not guaranteed
421+ that some version of Moore's law will apply to quantum
422+ computing. Building quantum computers that are large enough (in
423+ number of qubits) and sufficiently fault-tolerant to actually
424+ present a threat to cryptography remains an engineering
425+ challenge. That said, the risk is viewed as being sufficiently
426+ large that steps need to be taken to prepare for the day when
427+ quantum computers *can * break most existing algorithms. It is worth
428+ considering the possibility that some data that is well protected
429+ today could be stored for a decade or two and then decrypted by a
430+ future quantum computer, so even data produced today could be at
431+ risk.
432+
433+ The response to this uncertain threat has been to develop suites of
434+ cryptographic algorithms for which no quantum solution is
435+ known. This is the field of "Post-Quantum Cryptography". Note the
436+ use of the phrase "no solution is known". It is hard to prove that
437+ no algorithm exists—once again we are in the territory of trying to
438+ prove a negative. But NIST is running a process to evaluate and
439+ standardize a set of quantum-resistant algorithms, and there is
440+ plenty of focus on the candidate algorithms to establish their
441+ suitability over the long term.
442+
443+ There is a general, if not universal, sense that at some point
444+ post-quantum cryptographic algorithms will be needed. While the
445+ timeframe is uncertain and the exact algorithms to be used may
446+ change, the requirement for *crypto-agility *—the ability to swap
447+ out one set of algorithms for another—is now well established.
448+
3994493.4 Message Authentication
400450---------------------------------
401451
@@ -470,7 +520,7 @@ Suppose that an adversary intercepts the message on its way to the
470520receiver and tries to modify the transmitted message in
471521some way. The message digest for this corrupted message would (with
472522very high likelihood) differ from that of the original message. And
473- the adversary lacks the necessary key to
523+ the adversary lacks the necessary key to
474524encrypt the digest of the corrupted message. An adversary could,
475525however, obtain the plaintext original message and its encrypted digest
476526by eavesdropping. The adversary could then (since the hash function is
@@ -511,7 +561,7 @@ cipher is used, the digest is encrypted using the sender’s private
511561key, and the
512562receiver—or anyone else—could decrypt the digest using the sender’s
513563public key. If a secret-key cipher is used, the sender and receiver
514- have to agree on the secret key ahead of time using some other means.
564+ have to agree on the secret key ahead of time using some other means.
515565
516566A digest encrypted with a public-key algorithm using the private
517567key of the sender
@@ -527,7 +577,7 @@ message herself. Any public-key cipher can be used for digital
527577signatures. NIST has produced a series of *Digital Signature
528578Standards * (DSS). The most recent standard at the time of writing
529579allows for the use of three public-key ciphers, one based on RSA,
530- another based on elliptic curves, and
580+ another based on elliptic curves, and
531581and a third called the *Edwards-Curve Digital Signature Algorithm *.
532582
533583.. should check the above for updates
@@ -580,8 +630,7 @@ associated data—while the rest
580630of the message is encrypted, and the whole thing, headers included, is
581631authenticated. We won't go into details here, but there is now a set of
582632integrated algorithms that produce both ciphertext and authentication
583- codes using a combination of ciphers and hash functions.
584-
633+ codes using a combination of ciphers and hash functions.
585634
586635Now that we have seen some of the building blocks for encryption and
587636authentication, we have the foundations for building some complete security
0 commit comments