Secure Networking
As discussed in Basic Networking, the networking proxies work on the TCP or IP layer with some components on the host. This makes them untrusted. Hence, another protocol is needed on top to secure the connection.
Fortunately, this is not a problem unique to enclaves. The entire internet relies on untrusted routers operating at the IP or sometimes TCP layers in order to route traffic to the right destination. The host of an enclave is no different from a router or an ISP from this perspective. Therefore, all security measures usually applied to the Internet carry over to enclaves as well. But what exactly are these?
Transport layer security
Conceptually, transport layer security refers to a protocol that is used to "secure" the transport layer of the networking stack, most commonly TCP. Security is intentionally vague, but the most important properties that are commonly desired are:
- Privacy, intermediaries should not be able to peek into connections.
- Integrity, intermediaries should not be able to successfully add or remove data from the connection stream without being noticed.
Some use-case specific properties include server authentication, client authentication, etc.
On the internet, it takes the form of the aptly named Transport Layer Security (TLS) protocol. It is used to secure a wide range of applications from emails to messaging to VoIP. However, the most common and recognizable use case is HTTPS, securing your connections to websites and ensuring intermediaries cannot tamper with the website or steal your passwords or credit cards.
TLS from the enclave
Initiating TLS connections from the enclave requires no additional setup and just work! Enclaves commonly include a set of root certificates matching Web PKI. TLS connections made from within the enclave work as usual and automatically inherit all the desired security properties, including server authentication.