SlideShare a Scribd company logo
DIY Internet with
MinimaLT
Low-latency secure networking
JSConf.EU 2013
Andy Wingo
wingo@igalia.com
Compiler hacker at Igalia
Recently: ES6 generators in V8, SpiderMonkey
(sponsored by Bloomberg)
Not a cryptographer
This talk is for folks that deploy both endpoints,
for cryptonerds, and for early-stage tinkerers
You are here
Context: Militarization of daily life
Generals peeping on your web searches
Read the wrong things and they send the SWAT
team
what’s he building in there?
what’s he building in there?
He has subscriptions to those RSS feeds
And he’s been tweeting about MinimaLT
We’re in his router, and his mobile phone
You won’t believe what we got from the drone
What’s he building in there?
What the hell is he building in there?
We have a right to know
Solution?
Smash the state!
Meanwhile, let’s not make it easy for the NSA
HTTPS vs...
Attack vectors:
❧ Cryptanalysis (RC4)
❧ MITM via rogue certificates (DigiNotar &c)
❧ Use JavaScript! CRIME, BEAST, ...
❧ Backdoors in TLS implementations
(Windows?)
HTTPS vs...
Attack vectors:
❧ Cryptanalysis (RC4)
❧ MITM via rogue certificates (DigiNotar &c)
❧ Use JavaScript! CRIME, BEAST, ...
❧ Backdoors in TLS implementations
(Windows?)
❧ HTTP
HTTPS vs HTTP
“Cryptography that is not actually used can be
viewed as the ultimate disaster” – DJB
competitions.cr.yp.to/disasters.html

How many of you...
HTTPS vs HTTP
“Cryptography that is not actually used can be
viewed as the ultimate disaster” – DJB
competitions.cr.yp.to/disasters.html

How many of you...
❧ use EFF’s “HTTPS everywhere” extension?
HTTPS vs HTTP
“Cryptography that is not actually used can be
viewed as the ultimate disaster” – DJB
competitions.cr.yp.to/disasters.html

How many of you...
❧ use EFF’s “HTTPS everywhere” extension?
❧ never use plain HTTP with Google?
HTTPS vs HTTP
“Cryptography that is not actually used can be
viewed as the ultimate disaster” – DJB
competitions.cr.yp.to/disasters.html

How many of you...
❧ use EFF’s “HTTPS everywhere” extension?
❧ never use plain HTTP with Google?
There is a reason for this
Anatomy of a GET
000.00

→ www.gnu.org

TCP

SYN

Visiting http://www.gnu.org/ over French
wired ADSL.
Anatomy of a GET
000.00
130.50

→ www.gnu.org
← www.gnu.org

TCP
TCP

SYN
SYN/ACK

130 ms RTT, ~65ms latency.
Remote server hosted in Boston, ~4000 miles
away.
4000 miles is 22 light-milliseconds.
Anatomy of a GET
000.00
130.50
130.78

→ www.gnu.org
← www.gnu.org
→ www.gnu.org

TCP
TCP
HTTP

The GET is delayed by 130 ms.

SYN
SYN/ACK
GET /
Anatomy of a GET
000.00
130.50
130.78
278.00

→
←
→
←

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
HTTP
TCP

SYN
SYN/ACK
GET /
[begin]

Begin receiving response. Early parsing.
Anatomy of a GET
000.00
130.50
130.78
278.00
282.00

→
←
→
←
→

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
HTTP
TCP
TCP

SYN
SYN/ACK
GET /
[begin]
SYN x 3

Kick off more connections for parallel fetch.
Anatomy of a GET
000.00
130.50
130.78
278.00
282.00
410.71

→
←
→
←
→
←

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
HTTP
TCP
TCP
HTTP

SYN
SYN/ACK
GET /
[begin]
SYN x 3
200 OK

Total: 7108 bytes over 411 milliseconds.
Anatomy of a GET
000.00
130.50
130.78
278.00
282.00
410.71
414.85

→
←
→
←
→
←
→

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
HTTP
TCP
TCP
HTTP
TCP

SYN
SYN/ACK
GET /
[begin]
SYN x 3
200 OK
SYN/ACK x 3

Initial round-trip kills parallel fetch :-(
HTTPS sadness
000.00

→ www.gnu.org

TCP

SYN
HTTPS sadness
000.00
129.91
130.46

→ www.gnu.org
← www.gnu.org
→ www.gnu.org

TCP
TCP
TLS

SYN
SYN/ACK
Client Hello
HTTPS sadness
000.00
129.91
130.46
266.13
267.08
267.73

→
←
→
←
←
→

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
TLS
TLS
TLS
TLS

SYN
SYN/ACK
Client Hello
Server Hello
Certificate
Key Exchange
HTTPS sadness
000.00
129.91
130.46
266.13
267.08
267.73
449.06
449.10

→
←
→
←
←
→
←
→

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
TLS
TLS
TLS
TLS
TCP
TLS

SYN
SYN/ACK
Client Hello
Server Hello
Certificate
Key Exchange
ACK (???)
Change Cipher
HTTPS sadness
000.00
129.91
130.46
266.13
267.08
267.73
449.06
449.10
580.28
583.72

→
←
→
←
←
→
←
→
←
→

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
TLS
TLS
TLS
TLS
TCP
TLS
TLS
HTTPS

SYN
SYN/ACK
Client Hello
Server Hello
Certificate
Key Exchange
ACK (???)
Change Cipher
Change Cipher
GET /
HTTPS sadness
000.00
129.91
130.46
266.13
267.08
267.73
449.06
449.10
580.28
583.72
764.97

→
←
→
←
←
→
←
→
←
→
←

www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org
www.gnu.org

TCP
TCP
TLS
TLS
TLS
TLS
TCP
TLS
TLS
HTTPS
HTTPS

... and then the CSS, the JS, ...

SYN
SYN/ACK
Client Hello
Server Hello
Certificate
Key Exchange
ACK (???)
Change Cipher
Change Cipher
GET /
200 OK
MinimaLT, a low-latency
networking protocol
“properly implemented, strong crypto”
... that connects faster than TCP
SYN/ACK – Just say no!
Properly implemented, strong
crypto
Uses high-level NaCl library from @hashbreaker
and @hyperelliptic
Avoids many HTTPS/TLS pitfalls
❧ Well-chosen cyphers
❧ Timing-independent implementation
❧ No plaintext (HTTP) mode
MinimaLT adds forward secrecy
Minimal latency
1 round trip if you need “DNS” lookup
0 otherwise
Persistent tunnels
Tunnels can migrate over IP changes – invisible
to applications
A protocol for today’s internet
UDP-based
Reliable: replaces TCP + TLS
Denial-of-Service (DoS) resistance
Low overhead, scales to tens of Gb/s
Tunnels and connections
Tunnels multiplex connections
Connection 0 is the control connection
❧ flow control
❧ connection creation
❧ authentication (client certs)
Multiple connections can proceed concurrently
QUIC more advanced here in some ways
Wire protocol
c
l
e
a
r
c
y
p
h
e
r

+----------------------+
| Ethernet, IP, UDP
|
|----------------------|
| Tunnel ID, Nonce
|
|----------------------|
| Ephemeral public key |
|======================|
| Checksum
|
|----------------------|
| Seq, Ack
|
|----------------------|
| Payload
|
| ...
|

42 bytes
16 bytes
32 bytes (first)
16 bytes
8 bytes
Crypto
NaCl “box”:
+------------+ C'→S'
| Cyphertext |
n
+------------+

Tunnel ID (TID): a random 64-bit number,
provided by client when creating the tunnel
After first packet, TID looks up C'→S': the
shared secret
Protocol to change TID and evolve shared secret
for forward security
How to get server’s public key?
TLS:
❧ Client knows address of DNS provider
❧ DNS gives server address (maybe)
❧ Client connects to server, server provides
certificate
❧ Client verifies cert. using public key
infrastructure (PKI)
How to get server’s public key?
MinimaLT:
❧ Client knows address, long-term key of
Directory Service
❧ Server registers address, port, long-term
public key and ephemeral public key with
DS
❧ Client asks DS for server info, trusts DS
Servers could register info in DNS records with
suitably low TTL (TBD)
Directory server protocol
At first lookup of any name, or at boot:
❧ 1 round-trip to fetch DS’s ephemeral key
To look up a name:
❧ 1 round-trip using fresh ephemeral client
key, DS’s ephemeral key
Authenticated and encrypted
Performance
The “expensive” part: establishing the shared
secret via Curve25519, which happens when
tunnels are created.
❧ 8000 connections/s/core on modern x86
❧ ~750 connections/s/core on modern ARM
(estimate)
Afterwards, MinimaLT can saturate Gb/s links
Denial-of-Service
Why is MinimaLT able to avoid 3-way
handshake?
❧ A server can slow down clients arbitrarily
using puzzles
❧ Clients may have to “mine for bitcoins”
❧ Puzzles can be sent at any point (tunnel GC)
❧ Pre-RT responses should be smaller than
requests (hello DNSSEC)
Amplification vs latency?
In general, response can be larger than the
request (e.g. HTTP GET)
Does the client IP (spoofable cleartext)
correspond to the client request (authenticated,
tamper-proof)?
One round trip seems needed in general :-(
Mitigated by long-term tunnels, multiplexed
connections
No worse than TCP
Faster than TCP
0RT connects faster than TCP at any latency
above 0.5 ms (150 km)
Always faster than OpenSSL
At 64ms latency: 130ms full connection,
request, response vs 516ms for OpenSSL
Compare to 278ms for HTTP
Tor-friendly
Project status
University of Illinois at Chicago research project
(Jon Solworth)
Very 2013
Ethos, new Xen-based OS
❧ Security-focused
❧ Typed filesystem, typed IPC
❧ Written in C and Go
http://ethos-os.org/

W. Michael Petullo doing MinimaLT
MinimaLT: remote IPC for
Ethos
res := <-Ipc("example.com", "http",
"GET", "/")
res := <-Ipc("example.com", "foo",
&Foo{bar:42, baz:"qux"})
And POSIX?
Ongoing work to make a shared library; expect
it out shortly
minimalt_connection*
minimalt_connect_and_write
(char *host, char *service,
uint8_t *data, size_t count);

Probably not RPC-based – type tools are a mess
And JavaScript?? :)
Upcoming: Libuv integration, and from there to
Node
❧ MinimaLT needs an event loop running,
somehow
Pure-JS reliability layer?
❧ Experiments in congestion control
On the front lines
Bandwidth goes up, but latency stays the same.
There is demand for privacy at low latency:
demand for a new protocol.
Go forth and hack!
MinimaLT @ ACM CCS 2013 – Here (Berlin) in
Nov.
SYN/ACK – Just say no!
@andywingo for slides, upcoming lib release

More Related Content

PDF
Cracking Wep And Wpa Wireless Networks
PDF
HTTP/3, QUIC and streaming
PDF
PLNOG 17 - Patryk Wojtachnio - DDoS mitygacja oraz ochrona sieci w środowisku...
PDF
Compression Oracle Attacks on VPN Networks
PDF
Velocity 2011 - Our first DDoS attack
PDF
Строим ханипот и выявляем DDoS-атаки
PDF
HTTP/3 in curl
PDF
Bastion jump hosts with Teleport
Cracking Wep And Wpa Wireless Networks
HTTP/3, QUIC and streaming
PLNOG 17 - Patryk Wojtachnio - DDoS mitygacja oraz ochrona sieci w środowisku...
Compression Oracle Attacks on VPN Networks
Velocity 2011 - Our first DDoS attack
Строим ханипот и выявляем DDoS-атаки
HTTP/3 in curl
Bastion jump hosts with Teleport

What's hot (20)

PDF
DNS как линия защиты/DNS as a Defense Vector
PDF
Derevolutionizing OS Fingerprinting: The cat and mouse game
PPT
WiFi practical hacking "Show me the passwords!"
PDF
HTTP/3 in curl 2020
PDF
Practical Verification of TKIP Vulnerabilities
PPT
securing_syslog_onFreeBSD
PDF
HTTP/3 is next generation HTTP
PDF
CONFidence 2018: Darknet traffic - what can we learn from nooks and crannies ...
PDF
Wi-Foo Ninjitsu Exploitation
PPTX
Ángel Palomo Cisneros - Programming and playing a MITM attack [rooted2018]
PDF
Ddos and mitigation methods.pptx
PPT
Network Security fundamentals
PDF
An introduction to MQTT - Pub / Sub for the masses
DOCX
Product_Engineer_Zscaler
PPTX
Exploiting WiFi Security
PDF
Preventing Traffic with Spoofed Source IP address
PDF
Fundamentals of network hacking
PDF
Layer one 2011-gh0stwood-d-dos-attacks
PPTX
Pursue the Attackers – Identify and Investigate Lateral Movement Based on Beh...
PPTX
Threat hunting != Throwing arrow! Hunting for adversaries in your it environment
DNS как линия защиты/DNS as a Defense Vector
Derevolutionizing OS Fingerprinting: The cat and mouse game
WiFi practical hacking "Show me the passwords!"
HTTP/3 in curl 2020
Practical Verification of TKIP Vulnerabilities
securing_syslog_onFreeBSD
HTTP/3 is next generation HTTP
CONFidence 2018: Darknet traffic - what can we learn from nooks and crannies ...
Wi-Foo Ninjitsu Exploitation
Ángel Palomo Cisneros - Programming and playing a MITM attack [rooted2018]
Ddos and mitigation methods.pptx
Network Security fundamentals
An introduction to MQTT - Pub / Sub for the masses
Product_Engineer_Zscaler
Exploiting WiFi Security
Preventing Traffic with Spoofed Source IP address
Fundamentals of network hacking
Layer one 2011-gh0stwood-d-dos-attacks
Pursue the Attackers – Identify and Investigate Lateral Movement Based on Beh...
Threat hunting != Throwing arrow! Hunting for adversaries in your it environment
Ad

Similar to DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013) (20)

PDF
Computer network (10)
PDF
class12_Networking2
PDF
AINTEC 2023: Networking in the Penumbra!
PPTX
Network tunneling techniques
PPT
Dmk blackops2006
PPTX
Internet .ppt
PDF
Spliced NAT2NAT And Other Packet-Level Misadventures.pdf
PDF
08 tcp-dns
PPTX
CompTIASecPLUS-Part1 Unlimited Edition- Edited.pptx
PDF
CISSP Prep: Ch 5. Communication and Network Security (Part 1)
PDF
Quic illustrated
PDF
Evolving HTTP and making things QUIC
PDF
Networking in the Penumbra presented by Geoff Huston at NZNOG
PPTX
The Network Protocol Stack Revisited
PDF
Computer network (4)
PDF
4. Communication and Network Security
PDF
packet traveling (pre cloud)
PDF
Computer network (7)
PDF
Basic Introduction to Technology (networking).pdf
PDF
4. Communication and Network Security
Computer network (10)
class12_Networking2
AINTEC 2023: Networking in the Penumbra!
Network tunneling techniques
Dmk blackops2006
Internet .ppt
Spliced NAT2NAT And Other Packet-Level Misadventures.pdf
08 tcp-dns
CompTIASecPLUS-Part1 Unlimited Edition- Edited.pptx
CISSP Prep: Ch 5. Communication and Network Security (Part 1)
Quic illustrated
Evolving HTTP and making things QUIC
Networking in the Penumbra presented by Geoff Huston at NZNOG
The Network Protocol Stack Revisited
Computer network (4)
4. Communication and Network Security
packet traveling (pre cloud)
Computer network (7)
Basic Introduction to Technology (networking).pdf
4. Communication and Network Security
Ad

More from Igalia (20)

PDF
Life of a Kernel Bug Fix
PDF
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
PDF
Advancing WebDriver BiDi support in WebKit
PDF
Jumping Over the Garden Wall - WPE WebKit on Android
PDF
Collective Funding, Governance and Prioritiation of Browser Engine Projects
PDF
Don't let your motivation go, save time with kworkflow
PDF
Solving the world’s (localization) problems
PDF
The Whippet Embeddable Garbage Collection Library
PDF
Nobody asks "How is JavaScript?"
PDF
Getting more juice out from your Raspberry Pi GPU
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
PDF
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
PDF
CSS :has() Unlimited Power
PDF
Device-Generated Commands in Vulkan
PDF
Current state of Lavapipe: Mesa's software renderer for Vulkan
PDF
Vulkan Video is Open: Application showcase
PDF
Scheme on WebAssembly: It is happening!
PDF
EBC - A new backend compiler for etnaviv
PDF
RISC-V LLVM State of the Union
PDF
Device-Generated Commands in Vulkan
Life of a Kernel Bug Fix
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Advancing WebDriver BiDi support in WebKit
Jumping Over the Garden Wall - WPE WebKit on Android
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Don't let your motivation go, save time with kworkflow
Solving the world’s (localization) problems
The Whippet Embeddable Garbage Collection Library
Nobody asks "How is JavaScript?"
Getting more juice out from your Raspberry Pi GPU
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
CSS :has() Unlimited Power
Device-Generated Commands in Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Vulkan Video is Open: Application showcase
Scheme on WebAssembly: It is happening!
EBC - A new backend compiler for etnaviv
RISC-V LLVM State of the Union
Device-Generated Commands in Vulkan

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Approach and Philosophy of On baking technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Approach and Philosophy of On baking technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
20250228 LYD VKU AI Blended-Learning.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)