The case for ubiquitous transport level encryption Andrea Bittau, - - PowerPoint PPT Presentation

the case for ubiquitous transport level encryption
SMART_READER_LITE
LIVE PREVIEW

The case for ubiquitous transport level encryption Andrea Bittau, - - PowerPoint PPT Presentation

The case for ubiquitous transport level encryption Andrea Bittau, Mike Hamburg, Mark Handley, David Mazieres, Dan Boneh. UCL and Stanford. What would it take to encrypt all the traffic on the Internet, by default, all the time? Crypto 101


slide-1
SLIDE 1

The case for ubiquitous transport level encryption

UCL and Stanford. Andrea Bittau, Mike Hamburg, Mark Handley, David Mazieres, Dan Boneh.

slide-2
SLIDE 2

What would it take to encrypt all the traffic on the Internet, by default, all the time?

slide-3
SLIDE 3

Crypto 101 Encryption without authentication is useless.

slide-4
SLIDE 4

Encryption without authentication is like meeting a stranger in a dark alley.

Whatever happens, there will be no witnesses.

slide-5
SLIDE 5

Crypto 101 Encryption without authentication is useless.

True, if you need military-grade security False, in many practical situations.

slide-6
SLIDE 6
slide-7
SLIDE 7

Crypto 101 Encryption without authentication is useless.

True, if you need military-grade security False, in many practical situations. As dogma, leads to flawed security architectures. The perfect is the enemy of the good

slide-8
SLIDE 8

What would it take to encrypt the vast majority

  • f TCP traffic?

Performance

  • Fast enough to enable by default on almost all servers.

Authentication

  • Leverage certificates, cookies, passwords, etc., to give best

possible security for any given setting. Compatibility

  • Works in existing networks
  • Works with unmodified legacy applications
slide-9
SLIDE 9

Performance is still pretty poor today, unless expensive crypto hardware is used.

 Main cost is public key cryptography on the server

during session establishment.

 SSL ~80x slower than a regular TCP session.

slide-10
SLIDE 10

Performance is still pretty poor today, unless expensive crypto hardware is used.

 Main cost is public key cryptography on the server

during session establishment.

 SSL ~80x slower than a regular TCP session.

Worst case: Tcpcrypt is 3x slower than TCP

slide-11
SLIDE 11

Step 1. Authenticate server using certificates SSL

Authentication at the application level is divorced from authentication at the transport level.

Step 2. SSL

Username: mjh Passwd: abc123

Authenticate user using password If Step 1. fails, Step 2. doesn’t help - in fact it harms.

slide-12
SLIDE 12

In pretty much all cases, it’s possible to provide better security than we do today.

No passive eavesdropping None None Possible security Today’s security Use case Preconfiguration

slide-13
SLIDE 13

In pretty much all cases, it’s possible to provide better security than we do today.

Server auth Server auth Server certificate No passive eavesdropping None None Possible security Today’s security Use case Preconfiguration

slide-14
SLIDE 14

In pretty much all cases, it’s possible to provide better security than we do today.

Mutual auth None Shared secret (cookie), no SSL Server auth Server auth Server certificate No passive eavesdropping None None Possible security Today’s security Use case Preconfiguration

slide-15
SLIDE 15

In pretty much all cases, it’s possible to provide better security than we do today.

Mutual auth if password OK Mutual auth if cert and pwd OK Shared secret and SSL Mutual auth None Shared secret (cookie), no SSL Server auth Server auth Server certificate No passive eavesdropping None None Possible security Today’s security Use case Preconfiguration

Today’s Security Our goals

slide-16
SLIDE 16

An observation on layering of crypto

 Encryption is a generic function.

 Independent of the semantics of the application.

 Integrity Protection is a generic function.

 What arrives should be what is sent.

 Authentication is strongly application-specific.

 Depends on the semantics of the application.

slide-17
SLIDE 17

An observation on layering of crypto

Observation: Encryption and Integrity Protection are lower-layer functions than Authentication.

 Encryption and Integrity Protection are transport-layer functions.

 Cannot integrity-protect transport protocol from above it.  Different transport sessions have different security

requirements so cannot share encryption keys.

 Authentication is application-layer.

slide-18
SLIDE 18

Tcpcrypt

slide-19
SLIDE 19

Tcpcrypt uses TCP options to provide deployable transport-level encryption.

 High server performance - push complexity to clients  Allow applications to authenticate endpoints.  Backwards compatibility: all TCP apps, all networks, all

authentication settings.

slide-20
SLIDE 20

Tcpcrypt overview

 Extend TCP in a compatible way using TCP options.  Existing applications use standard socket API, just like

regular TCP.

 Encryption automatically enabled if both end points

support Tcpcrypt.

 Extended applications can use a new getsockopt() for

authentication.

slide-21
SLIDE 21

Push expensive operations to the client

Public-key operations can be quite assymetric. RSA-exp3-2048 performance:

10.42ms Decrypt 0.26ms Encrypt Latency Operation Perform decrypt on the client:

Generate emphemeral key pair: Generate random master key

p u b l i c k e y e n cpub_k ( m a s t e r _ k e y )

client server Initial handshake: No authentication. Client decrypts. Lets servers accept connections 36x faster than SSL

slide-22
SLIDE 22

After initial handshake, tcpcrypt’s Session ID provides the hook to link application authentication to the session.

 New getsockopt() returns non-secret Session ID value.  Unique for every connection.  If same on both ends, guaranteed there’s no man-in-the-middle.

slide-23
SLIDE 23

How to check the Session ID?

 Out-of-band: e.g., phone call, other secure protocol.  PKI: server signs Session ID.  Pre-shared secret: send CMAC of Session ID, keyed

with Pre-shared secret.

slide-24
SLIDE 24
slide-25
SLIDE 25

session ID session ID

tcpcrypt

Authentication Example 1: Password-based Mutual Authentication

 Whenever a user knows a password, mutual authentication

should be used.

 Does not rely on user to spot spurious URLs.

Authenticating the session ID authenticates the endpoint

password-based auth of user and session ID

slide-26
SLIDE 26

Authentication Example 1: Password-based Mutual Authentication

slide-27
SLIDE 27

tcpcrypt session

Authentication Example 2:

Equivalent security to SSL using a PKI

session ID: A “A”, signed by amazon.com RSA op session ID: B “B”, signed by amazon.com RSA op

Problem: no faster than SSL because signing is expensive

slide-28
SLIDE 28

Authentication Example:

Signing a batch of session IDs to amortize RSA costs

session ID: A session ID: B session ID: D session ID: C “A,B,C,D” signed by amazon.com “ A , B , C , D ” s i g n e d b y a m a z

  • n

. c

  • m

“A,B,C,D” signed by amazon.com “A,B,C,D” signed by amazon.com RSA op

slide-29
SLIDE 29

SSL servers must RSA decrypt each client’s secret:

session ID: A session ID: B session ID: D session ID: C “A,B,C,D” signed by amazon.com “ A , B , C , D ” s i g n e d b y a m a z

  • n

. c

  • m

“A,B,C,D” signed by amazon.com “A,B,C,D” signed by amazon.com RSA op

enc(Secret A) enc(Secret C) enc(Secret D) enc(Secret B) RSA op RSA op RSA op RSA op

slide-30
SLIDE 30

Tcpcrypt

in detail

slide-31
SLIDE 31

Outline of Tcpcrypt key exchange

slide-32
SLIDE 32

Key exchange is performed in the TCP connection setup handshake.

slide-33
SLIDE 33

Key Scheduling

slide-34
SLIDE 34

Tcpcrypt in TCP Packets

slide-35
SLIDE 35

Crypto state can be cached.

Subsequent connections between the same endpoints get similar latency to regular TCP.

slide-36
SLIDE 36

Key Scheduling 2

slide-37
SLIDE 37

Tcpcrypt

Performance

slide-38
SLIDE 38

Tcpcrypt implementations

 Linux kernel implementation: 4,500 lines of code  Portable divert-socket implementation: 7000 LoC

 Tested on Windows, MacOS, Linux, FreeBSD

 Binary compatible OpenSSL library that attempts

tcpcrypt with batch-signing or falls back to SSL.

kernel tcpcryptd application Network

slide-39
SLIDE 39

Performance Questions

 Does enabling encryption reduce the request rate a

server can handle?

 Is request latency increased?  Is data throughput high?

Hardware: 8-core, 2.66GHz Xeon (2008-era). Software: Linux kernel implementation.

slide-40
SLIDE 40

Tcpcrypt supports high rates of connection setup

slide-41
SLIDE 41

Apache using tcpcrypt performs well.

slide-42
SLIDE 42

Authentication over Tcpcrypt is fast.

slide-43
SLIDE 43

Connection setup latency is slightly increased due to client-side RSA decrypt.

15.2 tcpcrypt PAKE 11.4 tcpcrypt CMAC 11.2 tcpcrypt batch sign 11.6 SSL not cached 0.7 SSL cached 11.3 tcpcrypt not cached 0.3 tcpcrypt cached 0.2 TCP LAN connect time (ms) Protocol

slide-44
SLIDE 44

Most authentication can be done very cheaply,

  • nce the Tcpcrypt session is established.

15.2 tcpcrypt PAKE 11.4 tcpcrypt CMAC 11.2 tcpcrypt batch sign 11.6 SSL not cached 0.7 SSL cached 11.3 tcpcrypt not cached 0.3 tcpcrypt cached 0.2 TCP LAN connect time (ms) Protocol

slide-45
SLIDE 45

Batch signing does not add additional latency

slide-46
SLIDE 46

Data encryption is very fast on today’s CPUs

slide-47
SLIDE 47

Tcpcrypt

Deployability

slide-48
SLIDE 48

Can you actually deploy changes to TCP in today’s Internet?

 Forget what you learned about ISO reference models

and layered stacks - it’s a jungle out there.

 Many middleboxes that play with TCP.

 If you want to extend TCP, need to know what

precisely will get through today’s Internet?

slide-49
SLIDE 49

Can you actually deploy changes to TCP in today’s Internet?

 We studied 142 access networks in 24 countries.  Ran tests to measure what actually happened to TCP.

 Are new options actually permitted?  Does resegmentation occur in the network?  Are sequence numbers modified?  Do middleboxes proactively ack?

slide-50
SLIDE 50

Middleboxes and new TCP Options in SYN

 Middleboxes that remove unknown options are not so rare,

especially on port 80

slide-51
SLIDE 51

Does other bizarre middlebox behaviour break Tcpcrypt?

 Rewrote sequence numbers: 10% of paths (18% on port 80)

 Tcpcrypt can MAC sequence offsets from start of connection.

 Resegmented data: 3% of paths (13% on port 80)  Proxy Ack: 3% of paths (7% on port 80)

 But all of these paths also removed new options from the

SYN, so Tcpcrypt would not have negotiated.

 Aside: 26% of paths (33% on port 80) do strange things if you

send an ack for data not yet sent.

slide-52
SLIDE 52

What would it take to encrypt all the traffic on the Internet, by default, all the time?

slide-53
SLIDE 53

Split Encryption from Authentication. Do each at the appropriate layer.

slide-54
SLIDE 54

Devise appropriate user interfaces for authentication in web browsers

slide-55
SLIDE 55

Summary: the case for ubiquitous transport level encryption

 High server performance makes encryption a realistic

default.

 Applications can leverage Tcpcrypt to maximize

communication security in every setting.

 Incrementally deployable, compatible with legacy apps,

TCP and NATs. http://tcpcrypt.org