Transport Layer Protection Cheat Sheet
Transport Layer Protection Cheat Sheet
Transport Layer Protection Cheat Sheet
SSL vs TLS
Server Configuration
Only Support Strong Protocols
General purpose web applications should default to TLS 1.3 (support TLS 1.2 if
necessary) with all other protocols disabled.
Null ciphers
Anonymous ciphers
EXPORT ciphers
Certificates
Use Strong Keys and Protect Them
The private key used to generate the cipher key must be sufficiently strong for the
anticipated lifetime of the private key and corresponding certificate. The current best
practice is to select a key size of at least 2048 bits.
The private key should also be protected from unauthorized access using filesystem
permissions and other technical and administrative controls.
Application
Use TLS For All Pages
Client certificates are rarely used on public systems due to a number of issues:
The encryption subsystem works better when integrated with others to form
defense-in-depth: with access control, logging, intrusion detection, request
authentication, and data leakage prevention.
ALE protects from more risks than transport and at-rest encryption, but at the
cost of tradeoffs. Some of them (for example, searching encrypted data) have
been addressed with understandable tradeoffs, some are unique and need to be
considered separately.
Store passwords using strong adaptive and salted hashing functions with a work
factor (delay factor), such as Argon2, scrypt, bcrypt or PBKDF2.
For complex data flows, end-to-end encryption is quite hard, as a lot of parties access
sensitive data differently, while integrating encryption with other tooling. Obvious
choices would be to package encryption into:
2. API service: adding a component that has access to the keys and can perform
encryption, decryption, and other security functions.
3. Proxy service: adding a proxy between application and datastore, which will
detect and encrypt/decrypt the data. It can be a straight reverse proxy, or a DAO-
like service, which owns and simplifies access while performing security
operations.
In cases 2 and 3, sensitive computations and keys are separate from the application.
Segregating them from the main codebase has several benefits—it’s easier to monitor,
update, and maintain the encryption subsystem. There is a vast set of choices of tools
for application-level encryption—you can use Hashicorp’s Vault in Encryption API
mode, Cossack Labs’ Acra in API, and Proxy modes among open-source tools available.