Skip to content

Commit a5452d1

Browse files
committed
whitespace
1 parent bba21f5 commit a5452d1

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

crypto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ recomputed code to the code received in the message.
598598

599599
Computing a hashed message authentication code (HMAC).
600600

601-
.. this appears to be out of date, see https://en.wikipedia.org/wiki/HMAC#Design_principles
601+
.. this appears to be out of date, see https://en.wikipedia.org/wiki/HMAC#Design_principles
602602
603603
One way to implement the approach just described is to apply a cryptographic hash (such as
604604
SHA-3) to the concatenation of the plaintext message and the

tls.rst

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ The handshake protocol needs to be resistant to man-in-the-middle
9999
(MITM) attacks, which we discussed in Chapter 4. At one point in its
100100
history, TLS version negotiation could be subverted by a MITM in such
101101
a way that the client and server settled on a lower version than
102-
necessary, opening up the risk that old vulnerabilities in the lower
103-
version could be exploited.
102+
necessary. Such a "downgrade attack" opens up the risk that old
103+
vulnerabilities in the lower version, such as weak cryptographic
104+
protocols, could be exploited.
104105

105106
TLS takes multiple precautions to increase its resistance against MITM
106107
attacks. TLS 1.3 encrypts most of the handshake protocol, as early in
@@ -171,22 +172,17 @@ does not know who the client is because there has been no client
171172
authentication. TLS does support client authentication using client
172173
certificates, but it is not the norm in today's Internet for clients
173174
to authenticate in this way.
174-
175175

176-
.. 0RTT needs coverage somewhere
177-
Something about compatibility with 1.2 middleboxes
176+
.. Something about compatibility with 1.2 middleboxes
178177
179178
Recall that public key cryptography is computationally more expensive
180179
than symmetric key cryptography, so we limit the use of public key
181180
operations to the handshake protocol. And when we said above that all
182181
the messages after the first two are encrypted, this is done using
183-
symmetric keys. The role of public keys in TLS are (a) the
182+
symmetric keys. The roles of public keys in TLS are (a) the
184183
Diffie-Hellman key exchange (b) the use of certificates to
185184
authenticate servers and, optionally, clients. All of that is limited
186185
to the handshake protocol.
187-
188-
189-
190186

191187
:numref:`Figure %s <fig-tls-hand>` shows the handshake protocol at a
192188
high level. When the client and server have each received a
@@ -209,10 +205,8 @@ application data. We discuss the details of the record protocol below.
209205
6.2 Record Protocol
210206
--------------------
211207

212-
.. WIP
213-
214208
The task of the record protocol is to protect the data that is sent
215-
over a TLS connection with both encryption and authentication.
209+
over a TLS connection with both encryption and authentication.
216210
While TLS supports a wide range of encryption and authentication
217211
methods, the set of options has actually become narrower in version
218212
1.3 as weaknesses of older methods became clear and new cryptographic
@@ -258,7 +252,7 @@ When all the keys and IVs are available to client and server, the record
258252
layer can now protect the underlying data with encryption and
259253
authentication. The record layer also handles fragmentation and
260254
reassembly–breaking the incoming stream of plaintext into chunks of up
261-
to 2\ :sup:`14` bytes.
255+
to 2\ :sup:`14` bytes.
262256

263257
To encrypt one block for transmission, the record layer takes as input
264258
the encryption key, a nonce (which we explain below), the plaintext to
@@ -276,8 +270,7 @@ the appropriate key, nonce, ciphertext and additional data (headers)
276270
being passed to the AEAD decryption function. If authentication is
277271
successful, the plaintext is recovered and can be passed up to the
278272
application. If authentication does not succeed, the connection is
279-
terminated and an alert is generated.
280-
273+
terminated and an alert is generated.
281274

282275

283276
6.3 Session Resumption and Zero RTT Operation
@@ -296,7 +289,7 @@ is referred to as "0-RTT Data" because it is possible to start sending
296289
application data along with the handshake material without waiting for
297290
the round trip time of the handshake to elapse. This is an important
298291
step in improving the latency of HTTPS connection establishment and
299-
thus the user experience when browsing the Web.
292+
thus the user experience when browsing the Web.
300293

301294
The idea of session resumption predates TLS 1.3 but it has evolved
302295
somewhat to become more secure. In TLS 1.3, the server may create a
@@ -377,9 +370,7 @@ efforts to reduce the latency since the most simple approaches just
377370
layered one handshake on top of another. The next step in the process
378371
of reducing the latency of TLS session establishment involves
379372
rethinking the choice of TCP as the underlying transport, as we
380-
discuss below.
381-
382-
373+
discuss below.
383374

384375
6.4 QUIC, HTTP/3 and TLS
385376
------------------------

0 commit comments

Comments
 (0)