Skip to content

Commit d3fdda2

Browse files
authored
Merge branch 'master' into keydist
2 parents c1ef959 + 4e6fa46 commit d3fdda2

File tree

8 files changed

+175
-58
lines changed

8 files changed

+175
-58
lines changed

.github/workflows/publish-docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Docs Workflow
2+
run-name: ${{ github.actor }} is publishing document artifacts 🚀
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
# Single deploy job since we're just deploying
23+
deploy:
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v4
33+
- name: Build html
34+
run: make html
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
# Upload build repository
39+
path: './_build/html'
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4
43+
44+
45+
46+
- run: echo "🍏 This job's status is ${{ job.status }}."
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Validate Docs Workflow
2+
run-name: ${{ github.actor }} is validating document source
3+
on: [pull_request, workflow_dispatch]
4+
jobs:
5+
Validate_Docs:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
9+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
10+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
11+
- name: Check out repo
12+
uses: actions/checkout@v4
13+
- name: Validate source
14+
run: make test
15+
- name: Build html
16+
run: make html
17+
- name: List built files
18+
run: |
19+
ls ${{ github.workspace }}/_build/html
20+
21+
- run: echo "🍏 This job's status is ${{ job.status }}."
22+

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ $(VIRTUALENV):
2626
source ./$@/bin/activate ;\
2727
pip install -r requirements.txt
2828

29-
# lint and link verification. linkcheck is built into sphinx
30-
test: lint spelling linkcheck
29+
# lint and spelling verification. linkcheck is skipped to avoid warnings during development
30+
test: lint spelling
3131

3232
# lint all .rst files
3333
lint: $(VIRTUALENV)

crypto.rst

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ there are plenty of people who will try to break ciphers and who will
8080
let it be widely known when they have succeeded.
8181

8282
Parameterizing 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
8484
switching to another cipher in the family. It is common to limit the amount
8585
of data that a *cryptanalyst* (code-breaker) can access before the key
8686
changes. 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

9090
The basic requirement for an encryption algorithm is that it turns
9191
plaintext 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
109109
enable a *known plaintext* attack, which has a much higher chance of
110110
success than a *ciphertext only* attack. Even better is a *chosen
111111
plaintext* 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

114114
The best cryptographic algorithms, therefore, can prevent the attacker
115115
from 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
135135
that 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
137137
it 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
139139
increased the key size to 168 bits (:math:`3 \times 56`) but because
140140
of the 3-round structure of triple DES, the attacker only has to
141141
search 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
242242
issued standards for a series of secret-key ciphers. *Data Encryption
243243
Standard* (DES) was the first, and it survived for several decades
244-
before being deprecated.
244+
before being deprecated.
245245

246246
DES keys have 56 independent bits (although they have 64 bits
247247
in 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

289289
3.3 Public-Key Ciphers
290290
------------------------
@@ -355,7 +355,7 @@ confidentiality to secret-key ciphers. The symmetric key sent over
355355
this confidential channel is called a *session key*. The reasons for this two-step
356356
approach include the higher efficiency of secret-key ciphers, and the need
357357
for 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
396396
used for the vast majority of encryption, while public-key ciphers are
397397
reserved 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+
399449
3.4 Message Authentication
400450
---------------------------------
401451

@@ -470,7 +520,7 @@ Suppose that an adversary intercepts the message on its way to the
470520
receiver and tries to modify the transmitted message in
471521
some way. The message digest for this corrupted message would (with
472522
very 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
474524
encrypt the digest of the corrupted message. An adversary could,
475525
however, obtain the plaintext original message and its encrypted digest
476526
by 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
511561
key, and the
512562
receiver—or anyone else—could decrypt the digest using the sender’s
513563
public 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

516566
A digest encrypted with a public-key algorithm using the private
517567
key of the sender
@@ -527,7 +577,7 @@ message herself. Any public-key cipher can be used for digital
527577
signatures. NIST has produced a series of *Digital Signature
528578
Standards* (DSS). The most recent standard at the time of writing
529579
allows 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
531581
and 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
580630
of the message is encrypted, and the whole thing, headers included, is
581631
authenticated. We won't go into details here, but there is now a set of
582632
integrated 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

586635
Now that we have seen some of the building blocks for encryption and
587636
authentication, we have the foundations for building some complete security

intro.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ they run code on the same system. At the same time, when one user
1414
*wants* to share data with another, the operating system needs to
1515
support that in a controlled way. Similarly, multi-user systems ensure
1616
that malicious or poorly written code from one user cannot interfere
17-
with the operation of another user's programs.
17+
with the operation of another user's programs.
1818

1919
Computer networks are, like multi-user computers, shared
2020
resources, and similar requirements apply. One network user should not
@@ -94,7 +94,7 @@ that meet certain security objectives, such as protection against
9494
eavesdropping and modification of data in transit. The systems
9595
approach requires us to look at the entire system: the network
9696
components and the end systems connected by the network, both hardware
97-
and software.
97+
and software.
9898

9999
1.1 A Short History of Internet Security
100100
----------------------------------------
@@ -180,7 +180,7 @@ similarly lacked any security provisions in its original design. Not
180180
only do we need to be concerned about modification of routing messages
181181
in transit, but it has historically been all too easy to simply send
182182
incorrect routing updates in BGP. For example, a router might advertise a good route to
183-
some prefix from an autonomous system that has no such route.
183+
some prefix from an autonomous system that has no such route.
184184
Securing BGP has likewise proven to be a multi-decade, incremental task.
185185

186186
This is by no means a complete history of Internet security but it
@@ -195,7 +195,7 @@ pioneers are interviewed.
195195

196196
C. Timberg. `A Net of Insecurity
197197
<https://www.washingtonpost.com/sf/business/2015/05/30/net-of-insecurity-part-1/>`__.
198-
The Washington Post, May 30, 2015.
198+
The Washington Post, May 30, 2015.
199199

200200
1.2 Trust and Threats
201201
----------------------
@@ -244,14 +244,14 @@ security strategy:
244244
* Step 2: What are the risks to these assets?
245245
* Step 3: How well does the security solution mitigate those risks?
246246
* Step 4: What other risks does the security solution cause?
247-
* Step 5: What costs and trade-offs does the security solution impose?
247+
* Step 5: What costs and trade-offs does the security solution impose?
248248

249249
Schneier's book is targeted at a general audience, addressing
250250
security in a broad context (e.g., airports), not just computing systems and
251251
networks. Nevertheless it provides some useful guidelines that are
252252
applicable to system security.
253253

254-
254+
255255
.. admonition:: Further Reading
256256

257257
B. Schneier. Beyond Fear: Thinking Sensibly About Security in an
@@ -343,7 +343,7 @@ In addition to these issues, the Internet has notably been used as a
343343
means for deploying malicious code, generally called *malware*, that
344344
exploits vulnerabilities in end systems. *Worms*, of which the Morris
345345
worm is a famous example, are pieces of
346-
self-replicating code that spread over networks.
346+
self-replicating code that spread over networks.
347347
*Viruses* differ slightly from worms, in that they are spread by the transmission of infected files.
348348
Once infected, machines can then be arranged into *botnets*, in which
349349
a set of compromised machines are harnessed together

0 commit comments

Comments
 (0)