Skip to content

Commit a7a0cec

Browse files
committed
Merge branch 'master' of github.com:SystemsApproach/security
2 parents 9ee0628 + f6888b7 commit a7a0cec

File tree

8 files changed

+59
-60
lines changed

8 files changed

+59
-60
lines changed

authentication.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ could be replayed, appearing to the website as though you had ordered
1515
more of the same. Even though it wasn’t the original incarnation of
1616
the message, its authentication code would still be valid; after all,
1717
the message was created by you, and it wasn’t modified. Clearly, we
18-
need a solution that ensures *originality*.
18+
need a solution that ensures *freshness*.
1919

2020
In a variation of this attack called a *suppress-replay attack*, an
2121
adversary might merely delay your message (by intercepting and later
2222
replaying it), so that it is received at a time when it is no longer
2323
appropriate. For example, an adversary could delay your order to buy
2424
stock from an auspicious time to a time when you would not have wanted
25-
to buy. Although this message would in a sense be the original, it
26-
wouldn’t be timely. So we also need to ensure *timeliness*. Originality
25+
to buy. Although this message would in a sense be fresh (it hasn't
26+
been sent before), it
27+
wouldn’t be timely. So we also need to ensure *timeliness*. Freshness
2728
and timeliness may be considered aspects of integrity. Ensuring them
2829
will in most cases require a nontrivial, back-and-forth protocol.
2930

@@ -32,7 +33,7 @@ key. A session key is a secret-key cipher key generated on the fly and
3233
used for just one session. This too involves a nontrivial protocol.
3334

3435
What these two issues have in common is authentication. If a message is
35-
not original and timely, then from a practical standpoint we want to
36+
not fresh and timely, then from a practical standpoint we want to
3637
consider it as not being authentic, i.e., not being from whom it claims to be.
3738
And, obviously, when you are arranging to share a new session key with
3839
someone, you want to know you are sharing it with the right person.
@@ -47,15 +48,15 @@ Diffie-Hellman key exchange in its simplest form does not provide
4748
authentication, but in practical usage it is almost always combined
4849
with an authentication protocol.
4950

50-
There is a core set of techniques used to ensure originality and
51+
There is a core set of techniques used to ensure freshness and
5152
timeliness in authentication protocols. We describe those techniques
5253
before moving on to particular protocols.
5354

54-
5.1 Originality and Timeliness Techniques
55+
5.1 Freshness and Timeliness Techniques
5556
-------------------------------------------
5657

5758
We have seen that authentication codes alone do not enable us to detect
58-
messages that are not original or timely. One approach is to include a
59+
messages that are not fresh or timely. One approach is to include a
5960
timestamp in the message. Obviously the timestamp itself must be
6061
tamperproof, so it must be covered by the message authentication code. The primary
6162
drawback to timestamps is that they require distributed clock

firewall.rst

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ described above with the following command:
154154
Then we can check that our rule was applied correctly:
155155

156156
.. literalinclude:: code/fwsnip2
157-
158157

159158
In the preceding discussion, the firewall forwards everything except
160159
where specifically instructed to filter out certain kinds of packets. A
@@ -423,8 +422,8 @@ we recommend our companion book on software-defined networks.
423422
.. admonition:: Further Reading
424423

425424
L. Peterson, C. Cascone, B. O’Connor, T. Vachuska,
426-
and B. Davie. `Software-Defined Networks: A Systems
427-
Approach <https://sdn.systemsapproach.org>`__.
425+
and B. Davie. `Software-Defined Networks: A Systems
426+
Approach <https://sdn.systemsapproach.org>`__.
428427

429428
9.4 Zero Trust Security
430429
-------------------------
@@ -546,17 +545,13 @@ and authorization” although it's less memorable.
546545
.. admonition:: Further Reading
547546

548547
S. Rose, O. Borchert, S. Mitchell, S. Connelly. `Zero Trust
549-
Architecture
550-
<https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-207.pdf>`__. NIST, 2020.
548+
Architecture <https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-207.pdf>`__. NIST, 2020.
551549

552-
C. Cunningham. `A Look Back At Zero Trust: Never Trust, Always
553-
Verify
554-
<https://www.forrester.com/blogs/a-look-back-at-zero-trust-never-trust-always-verify/>`__. Forrester, 2020.
550+
C. Cunningham. `A Look Back At Zero Trust: Never Trust, Always Verify
551+
<https://www.forrester.com/blogs/a-look-back-at-zero-trust-never-trust-always-verify/>`__. Forrester, 2020.
555552

556553
R. Ward and B. Beyer. `BeyondCorp: A New Approach to Enterprise
557-
Security
558-
<https://www.usenix.org/system/files/login/articles/login_dec14_02_ward.pdf>`__.
559-
;login:, Usenix, 2014.
554+
Security <https://www.usenix.org/system/files/login/articles/login_dec14_02_ward.pdf>`__. ;login:, Usenix, 2014.
560555

561556
9.5. Intrusion Detection and Prevention
562557
--------------------------------------------

infra.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ more difficult to address.
108108
.. _reading_threat:
109109
.. admonition:: Further Reading
110110

111-
G. Huston. `A Survey on Securing Inter-Domain Routing Part 1 –
112-
BGP: Design, Threats and Security Requirements
113-
<https://labs.apnic.net/index.php/2021/08/03/a-survey-on-securing-inter-domain-routing-part-1-bgp-design-threats-and-security-requirements/>`__.
111+
S. Murphy. `BGP Security Vulnerabilitiess
112+
Analysis <https://www.rfc-editor.org/info/rfc4272>`__. RFC 4272, January 2006.
113+
114+
G. Huston. `A Survey on Securing Inter-Domain Routing Part 1.
115+
BGP: Design, Threats and Security Requirements <https://labs.apnic.net/index.php/2021/08/03/a-survey-on-securing-inter-domain-routing-part-1-bgp-design-threats-and-security-requirements/>`__.
114116
APNIC Blog, August 2021.
115117

116-
S. Murphy. `BGP Security Vulnerabilities Analysis <https://www.rfc-editor.org/info/rfc4272>`__. RFC 4272, 2006.
117-
118118
L. Peterson and B. Davie. `Computer Networks: A Systems Approach. Interdomain
119119
Routing <https://book.systemsapproach.org/scaling/global.html#interdomain-routing-bgp>`__.
120120

@@ -317,7 +317,7 @@ additional layers in this hierarchy. A hierarchy of
317317
certificates can be created to follow this hierarchy of address
318318
allocation. The RIRs form trust anchors from which chains of trust
319319
can be built, much the way a modern browser comes with a set of
320-
trusted root certification authorities (CAs) so that the certificates
320+
trusted root certificate authorities (CAs) so that the certificates
321321
issued by web sites, which are signed by CAs, can be checked for validity.
322322

323323
A key distinction between RPKI and the certificates that we are
@@ -519,7 +519,7 @@ or numbers corresponding to the AS in which the router is located.
519519
As with all public key certificates, we need a chain of trust from a
520520
trusted root to the router certificate. For example, an RIR could
521521
provide the root of trust, and sign certificates for ISPs, who
522-
could then act as the certification authorities for their own routers. The
522+
could then act as the certificate authorities for their own routers. The
523523
use of the word "could" in this paragraph reflects the lack of
524524
real-world deployment of BGPsec.
525525

@@ -884,7 +884,7 @@ While there are obvious similarities to the chains of trust used for
884884
TLS, the notable difference here is that the chain of
885885
certificates that must be followed is precisely defined by the
886886
hierarchy of the DNS. Whereas a TLS certificate could be issued by a
887-
range of certification authorities, the certificates for any zone in
887+
range of certificate authorities, the certificates for any zone in
888888
DNSSEC must be issued by the parent zone. This has some advantages,
889889
such as limiting the opportunities for bad behavior by CAs that has
890890
occasionally occurred with TLS certificates. However, it also

intro.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ weaknesses exploited by the Morris worm.
158158

159159
The rise in popularity of the World Wide Web in the 1990s created the
160160
demand for security features at the transport layer to support
161-
applications such as e-commerce. This lead to the creation of *SSL
161+
applications such as e-commerce. This led to the creation of *SSL
162162
(secure sockets layer)* which was superseded by *TLS (transport layer
163163
security)*, both of which provided confidentiality and authentication
164164
at the transport layer. TLS is an important case study for network
@@ -255,8 +255,8 @@ applicable to system security.
255255

256256
.. admonition:: Further Reading
257257

258-
B. Schneier. Beyond Fear: Thinking Sensibly About Security in an
259-
Uncertain World. Copernicus Books, 2003.
258+
B. Schneier. Beyond Fear: Thinking Sensibly About Security in an
259+
Uncertain World. Copernicus Books, 2003.
260260

261261
It is also important to recognize that threats and trust are two sides
262262
of the same coin. A threat is a potential failure scenario that you
@@ -397,8 +397,8 @@ challenge. Security is easiest when the answer is always "no".
397397

398398
.. admonition:: Further Reading
399399

400-
J. Saltzer and F. Kaashoek. `Principles of Computer System Design: An
401-
Introduction. Chapter 11
402-
<https://ocw.mit.edu/courses/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/pages/online-textbook/>`__. Morgan
403-
Kaufmann Publishers, 2009.
400+
J. Saltzer and F. Kaashoek. `Principles of Computer System Design: An
401+
Introduction. Chapter 11
402+
<https://ocw.mit.edu/courses/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/pages/online-textbook/>`__. Morgan
403+
Kaufmann Publishers, 2009.
404404

key-distro.rst

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ perhaps directly from Alice—as long as they trust Bob and know his
9898
public key. You can see how starting from a very small number of keys
9999
(in this case, just Bob’s) you could build up a large set of trusted
100100
keys over time. Bob in this case is playing the role often referred to
101-
as a *certification authority* (CA), and much of today’s Internet
102-
security depends on CAs. VeriSign is one well-known commercial CA.
101+
as a *certificate authority* (CA), and much of today’s Internet
102+
security depends on CAs. There are many commercial and non-profit CAs
103+
in widespread use today. You may also see CA expanded as
104+
*certification authority*—the two expansions are equivalent.
103105

104106
One thing to note about the above example is that we have to know two
105107
things about Bob. First, we need to know his public key so that we can
106108
verify that certain messages were originated by Bob. But we also have
107109
to know that Bob is trustworthy enough to make statements about the
108-
keys of others, which is where certification authorities (rather than
110+
keys of others, which is where certificate authorities (rather than
109111
random individuals) come into play. We return to this topic below.
110112

111113
One of the major standards for certificates is known as X.509. This
@@ -138,7 +140,7 @@ domains.
138140
There are different ways a PKI could formalize the notion of trust. We
139141
discuss the two main approaches.
140142

141-
4.1.1 Certification Authorities
143+
4.1.1 Certificate Authorities
142144
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143145

144146
In the first model, trust is binary; you either trust someone
@@ -152,10 +154,10 @@ In other words, all you need is a chain of certificates, all signed by
152154
entities you trust, as long as it leads back to an entity whose key you
153155
already know.
154156

155-
A *certification authority* or *certificate authority* (CA) is an entity
157+
A *certificate authority* or *certification authority* (CA) is an entity
156158
claimed (by someone) to be trustworthy for verifying identities and
157159
issuing public key certificates. There are commercial CAs, governmental
158-
CAs, and even free CAs. To use a CA, you must know its own key. You can
160+
CAs, and non-profit CAs. To use a CA, you must know its own key. You can
159161
learn that CA’s key, however, if you can obtain a chain of CA-signed
160162
certificates that starts with a CA whose key you already know. Then you
161163
can believe any certificate signed by that new CA.
@@ -172,7 +174,7 @@ trust for that participant.
172174
:width: 600px
173175
:align: center
174176

175-
Tree-structured certification authority hierarchy.
177+
Tree-structured certificate authority hierarchy.
176178

177179
There are some significant issues with building chains of trust. Most
178180
importantly, even if you are certain that you have the public key of the
@@ -296,7 +298,7 @@ distribution of the CRL to prolong the amount of time they can use the
296298
compromised key. A number of proposals have been made to improve the
297299
effectiveness of certificate revocation, such as using bit vectors or
298300
other compact representations of the CRL to reduce its size, and the
299-
development of the Online Certification Status Protocol (OCSP) to
301+
development of the Online Certificate Status Protocol (OCSP) to
300302
enable real-time checks on a certificate's status. At the time of
301303
writing, there are some best practices for handling certificate
302304
revocation but no comprehensive solution. A good discussion of the
@@ -306,9 +308,9 @@ revocation can be found in the blog post below.
306308
.. admonition:: Further Reading
307309

308310
J. Schank. `CRLite: Fast, private, and comprehensive certificate
309-
revocation checking in Firefox
310-
<https://hacks.mozilla.org/2025/08/crlite-fast-private-and-comprehensive-certificate-revocation-checking-in-firefox/>`__. Mozilla
311-
blog, August 2025.
311+
revocation checking in Firefox
312+
<https://hacks.mozilla.org/2025/08/crlite-fast-private-and-comprehensive-certificate-revocation-checking-in-firefox/>`__. Mozilla
313+
blog, August 2025.
312314

313315
4.2 Distribution of Secret Keys
314316
------------------------------------

principles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ whom we wish to communicate? Or how does a banking system know that
5656
the person behind a particular HTTP request is actually the account
5757
holder?
5858

59-
Integrity also requires messages be *original* and *timely*, which is
59+
Integrity also requires messages be *fresh* and *timely*, which is
6060
threatened by the possibility data is captured and then retransmitted
6161
at some later time. This is known as a *replay attack*, where for
6262
example, we want to protect against an attacker repeatedly adding an

systems.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ the need for any prior message exchange (and sidestepping some of the
9898
complexities described in the earlier chapter). Alice’s digital
9999
signature suffices to authenticate her. Although there is no proof
100100
that the message is timely, legitimate email isn’t guaranteed to be
101-
timely either. There is also no proof that the message is original,
101+
timely either. There is also no proof that the message is fresh,
102102
but Bob is an email user and probably a fault-tolerant human who can
103103
recover from duplicate emails (which, again, are not out of the
104104
question under normal operation anyway). Alice can be sure that only
@@ -292,7 +292,7 @@ three degrees of freedom. First, it is highly modular, allowing users
292292
(or more likely, system administrators) to select from a variety of
293293
cryptographic algorithms and specialized security protocols. Second,
294294
IPsec allows users to select from a large menu of security properties,
295-
including access control, integrity, authentication, originality, and
295+
including access control, integrity, authentication, freshness, and
296296
confidentiality. Third, IPsec can be used to protect narrow streams
297297
(e.g., packets belonging to a particular TCP connection being sent
298298
between a pair of hosts) or wide streams (e.g., all packets flowing
@@ -479,8 +479,8 @@ you to the paper.
479479
.. admonition:: Further Reading
480480

481481
J. Donenfeld. `WireGuard: Next Generation Kernel Network Tunnel
482-
<https://www.ndss-symposium.org/ndss2017/ndss-2017-programme/WireGuard-next-generation-kernel-network-tunnel/>`__.
483-
NDSS, 2017.
482+
<https://www.ndss-symposium.org/ndss2017/ndss-2017-programme/WireGuard-next-generation-kernel-network-tunnel/>`__.
483+
NDSS, 2017.
484484

485485
One of these types of tunnels plus a gateway or concentrator to
486486
terminate them is pretty much all that is needed to deliver a remote
@@ -646,7 +646,7 @@ networking, a topic we discuss in chapter 9.
646646
.. admonition:: Further Reading
647647

648648
A. Pennarun. `How Tailscale Works <https://tailscale.com/blog/how-tailscale-works>`__.
649-
Tailscale blog, 2020.
649+
Tailscale blog, 2020.
650650

651651

652652
7.5 Web Authentication and Passkeys
@@ -957,7 +957,7 @@ a companion book.
957957
.. admonition:: Further Reading
958958

959959
L. Peterson, O. Sunay, and B. Davie. `Private 5G: A Systems
960-
Approach. <https://5g.systemsapproach.org>`__.
960+
Approach. <https://5g.systemsapproach.org>`__.
961961

962962
Assuming the AMF recognizes the IMSI, it initiates an authentication
963963
protocol with the device. There are a set of options for

tls.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ between client and server will be encrypted. But we still have to rule
146146
out the MITM attack.
147147

148148
3. The server now sends one or more certificates. In the simplest
149-
case, there is a single certificate signed by a certification
149+
case, there is a single certificate signed by a certificate
150150
authority (CA) that is trusted by the client.
151151

152152
4. The server sends a "certificate verify" message, which proves that
@@ -318,10 +318,11 @@ the binding, and if the HMAC calculation succeeds, then the server and
318318
client now have agreement that they can use a shared secret
319319
established in the prior session. They use a "resumption master
320320
secret" that was calculated and stored in the prior session to derive
321-
a new set of keys for this session. The keys of the new
322-
session are different from those of the prior session to support
323-
forward secrecy (i.e., an attacker who learns the key for session N
324-
doesn't immediately have the keys for session N+1).
321+
a new set of keys for this session. The keys of the new session are
322+
different from those of the prior session to support forward secrecy
323+
(i.e., even if an attacker manages to compromise the key for one
324+
session, they don't gain the ability to decrypt data from other
325+
sessions).
325326

326327
When the server sends its "Finished" message, it calculates the HMAC
327328
over the handshake messages using the agreed-upon new key, and thus
@@ -349,15 +350,15 @@ provided by the socket layer (b) the application must know how to deal
349350
with replays of data sent as 0-RTT, e.g., by only sending 0-RTT
350351
data for operations that are idempotent.
351352

352-
The other drawback of 0-RTT data is that it depends on keys that are
353+
The other drawback of 0-RTT data is that it depends on tickets that are
353354
derived from secrets used in an earlier transaction. If those secrets
354355
were somehow compromised, the attacker would have the necessary
355356
information to compromise the new session. Thus, 0-RTT data lacks
356357
forward secrecy. For this reason, the option exists to generate a new
357358
set of keys as part of the session resumption handshake with a new
358359
Diffie-Hellman exchange. This means that only the data sent in the
359360
first RTT lacks forward secrecy, and the rest of the session is
360-
protected by the new, uncompromised keys.
361+
protected by the new ephemeral keys.
361362

362363

363364
All of this work to reduce the setup time of TLS by a single RTT might
@@ -528,7 +529,7 @@ need to consider how all the parts of a system interact with each
528529
other to form a coherent whole, rather than just looking at single
529530
components in isolation. For example, TLS is a system that includes
530531
both public-key and symmetric-key cryptography, authentication and
531-
privacy mechanisms, certification authorities, and sub-layers such as
532+
privacy mechanisms, certificate authorities, and sub-layers such as
532533
the record protocol and the handshake protocol. But the systems
533534
approach applies recursively too. As we have already seen, it is
534535
important to look at how TLS sits within the overall protocol stack,
@@ -552,7 +553,7 @@ another warning is presented. Users can generally choose to override
552553
these warnings but the overall effect is to reinforce behaviors that
553554
are more secure and discourage those that are insecure.
554555

555-
Certification authorities are a critical part of this overall
556+
Certificate authorities are a critical part of this overall
556557
system. Most users have no way to determine whether any given CA does
557558
its job properly. As discussed in Chapter 4, the way that CA
558559
hierarchies work means that a lot of trust is placed at the top-level

0 commit comments

Comments
 (0)