Skip to content

Commit cae6c90

Browse files
committed
whitespace fix
1 parent 8360e60 commit cae6c90

File tree

5 files changed

+54
-54
lines changed

5 files changed

+54
-54
lines changed

crypto.rst

Lines changed: 13 additions & 13 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
@@ -470,7 +470,7 @@ Suppose that an adversary intercepts the message on its way to the
470470
receiver and tries to modify the transmitted message in
471471
some way. The message digest for this corrupted message would (with
472472
very high likelihood) differ from that of the original message. And
473-
the adversary lacks the necessary key to
473+
the adversary lacks the necessary key to
474474
encrypt the digest of the corrupted message. An adversary could,
475475
however, obtain the plaintext original message and its encrypted digest
476476
by eavesdropping. The adversary could then (since the hash function is
@@ -511,7 +511,7 @@ cipher is used, the digest is encrypted using the sender’s private
511511
key, and the
512512
receiver—or anyone else—could decrypt the digest using the sender’s
513513
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.
514+
have to agree on the secret key ahead of time using some other means.
515515

516516
A digest encrypted with a public-key algorithm using the private
517517
key of the sender
@@ -527,7 +527,7 @@ message herself. Any public-key cipher can be used for digital
527527
signatures. NIST has produced a series of *Digital Signature
528528
Standards* (DSS). The most recent standard at the time of writing
529529
allows for the use of three public-key ciphers, one based on RSA,
530-
another based on elliptic curves, and
530+
another based on elliptic curves, and
531531
and a third called the *Edwards-Curve Digital Signature Algorithm*.
532532

533533
.. should check the above for updates
@@ -580,7 +580,7 @@ associated data—while the rest
580580
of the message is encrypted, and the whole thing, headers included, is
581581
authenticated. We won't go into details here, but there is now a set of
582582
integrated algorithms that produce both ciphertext and authentication
583-
codes using a combination of ciphers and hash functions.
583+
codes using a combination of ciphers and hash functions.
584584

585585

586586
Now that we have seen some of the building blocks for encryption and

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

key-distro.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,20 @@ much larger number), then we might choose 2 to be the generator *g*
323323
since:
324324

325325
.. math::
326-
327-
1 = 2^0 \bmod p
326+
327+
1 = 2^0 \bmod p
328328
329329
.. math::
330-
331-
2 = 2^1 \bmod p
330+
331+
2 = 2^1 \bmod p
332332
333333
.. math::
334-
335-
3 = 2^3 \bmod p
334+
335+
3 = 2^3 \bmod p
336336
337337
.. math::
338-
339-
4 = 2^2 \bmod p
338+
339+
4 = 2^2 \bmod p
340340
341341
Suppose Alice and Bob want to agree on a shared secret key. Alice and
342342
Bob, and everyone else, already know the values of *p* and *g*. Alice
@@ -347,65 +347,65 @@ corresponding public values—the values they will send to each other
347347
unencrypted—as follows. Alice’s public value is
348348

349349
.. math::
350-
351-
g^a \bmod p
350+
351+
g^a \bmod p
352352
353353
and Bob’s public value is
354354

355355
.. math::
356-
357-
g^b \bmod p
356+
357+
g^b \bmod p
358358
359359
They then exchange their public values. Finally, Alice computes
360360

361361
.. math::
362-
363-
g^{ab} \bmod p = (g^b \bmod p)^a \bmod p
362+
363+
g^{ab} \bmod p = (g^b \bmod p)^a \bmod p
364364
365365
and Bob computes
366366

367367
.. math::
368-
369-
g^{ba} \bmod p = (g^a \bmod p)^b \bmod p.
370368
371-
Alice and Bob now have :math:`g^{ab} \bmod p` (which is equal to
369+
g^{ba} \bmod p = (g^a \bmod p)^b \bmod p.
370+
371+
Alice and Bob now have :math:`g^{ab} \bmod p` (which is equal to
372372
:math:`g^{ba} \bmod p)` as their shared secret key.
373373

374-
Any eavesdropper would know *p, g*, and the two public values
375-
:math:`g^a \bmod p` and :math:`g^b \bmod p`.
374+
Any eavesdropper would know *p, g*, and the two public values
375+
:math:`g^a \bmod p` and :math:`g^b \bmod p`.
376376
If only the eavesdropper could determine *a* or *b*, she could easily
377377
compute the resulting key. Determining *a* or *b* from that information
378378
is, however, computationally infeasible for suitably large *p,a,* and
379379
*b*; it is known as the *discrete logarithm problem*.
380380

381381
For example, using *p = 5* and *g = 2* from above, suppose Alice picks
382-
the random number *a = 3* and Bob picks the random number *b = 4*.
382+
the random number *a = 3* and Bob picks the random number *b = 4*.
383383
Then Alice sends Bob the public value
384384

385385
.. math::
386-
387-
2^3 \bmod 5 = 3
386+
387+
2^3 \bmod 5 = 3
388388
389389
and Bob sends Alice the public value
390390

391391
.. math::
392-
393-
2^4 \bmod 5 = 1
392+
393+
2^4 \bmod 5 = 1
394394
395395
Alice is then able to compute
396396

397397
.. math::
398-
398+
399399
g^{ab} \bmod p = (2^b \bmod 5)^3 \bmod 5 = (1)^3 \bmod 5 = 1
400400
401-
by substituting Bob’s public value for :math:`(2^b \bmod 5)`. Similarly,
401+
by substituting Bob’s public value for :math:`(2^b \bmod 5)`. Similarly,
402402
Bob is able to compute
403403

404404
.. math::
405-
406-
g^{ba} \bmod p = (g^a \bmod 5)^4 \bmod 5 = (3)^4 \bmod 5 = 1.
407405
408-
by substituting Alice’s public value for :math:`(2^a \bmod 5)`.
406+
g^{ba} \bmod p = (g^a \bmod 5)^4 \bmod 5 = (3)^4 \bmod 5 = 1.
407+
408+
by substituting Alice’s public value for :math:`(2^a \bmod 5)`.
409409
Both Alice and Bob now agree that the secret key is :math:`1`.
410410

411411
There is the problem of Diffie-Hellman’s lack of authentication. One
@@ -431,7 +431,7 @@ supports authentication of one or both participants. It relies on
431431
certificates that are similar to public key certificates but instead
432432
certify the Diffie-Hellman public parameters of an entity. For example,
433433
such a certificate would state that Alice’s Diffie-Hellman parameters
434-
are *p, g*, and :math:`g^a \bmod p`
434+
are *p, g*, and :math:`g^a \bmod p`
435435
(note that the value of *a* would still be known only to Alice). Such
436436
a certificate would assure Bob that the other participant in
437437
Diffie-Hellman is Alice—or else the other participant won’t be able to

principles.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ what quantity. This presents some distinct challenges from data
3232
confidentiality; there is no need for network devices to see our data,
3333
but they generally must look at packet headers, which contain
3434
destination information, to determine where to
35-
send traffic.
35+
send traffic.
3636

3737
An equally important requirement in many cases is
3838
*authentication*. This is the ability to verify that an item of data
@@ -204,7 +204,7 @@ The idea behind this principle is the default settings of a system are
204204
the ones most likely to be used, so by default, undesired access
205205
should be disabled. It then takes an explicit action to enable
206206
access. This is a principle that dates back at least to 1965 according to
207-
the Saltzer and Schroeder paper.
207+
the Saltzer and Schroeder paper.
208208

209209
It turns out that the design of the Internet really doesn't follow
210210
this approach. The datagram delivery model of the Internet, by
@@ -298,7 +298,7 @@ Saltzer whose book (with Kaashoek) we referred to in Chapter 1. The
298298
fact that many of the principles from the 1975 paper reappear in the
299299
2009 is probably a sign that Saltzer had some confidence that these
300300
principles have stood the test of time. We recommend reading the
301-
entire paper.
301+
entire paper.
302302

303303
.. admonition:: Further Reading
304304

systems.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Chapter 6: Example Systems
55
for ways to highlight the underlying open source software (and the
66
general role open source plays in helping secure the Internet --
77
lots of eyes on the code).
8-
8+
99
We have now seen many of the components required to provide one or two
1010
aspects of security. These components include cryptographic algorithms,
1111
key predistribution mechanisms, and authentication protocols. In this

0 commit comments

Comments
 (0)