TLS (Transport Layer Security) is a cryptographic protocol that provides secure communications on computer networks, being the evolution of SSL (Secure Sockets Layer).
What is TLS/SSL?
TLS is a protocol that operates at the transport layer of the OSI model, providing encryption, authentication, and integrity for network communications.
History and Versions
SSL (Secure Sockets Layer)
- SSL 1.0: Never published (vulnerabilities)
- SSL 2.0: 1995, obsolete
- SSL 3.0: 1996, obsolete (POODLE)
TLS (Transport Layer Security)
- TLS 1.0: 1999, obsolete
- TLS 1.1: 2006, obsolete
- TLS 1.2: 2008, widely used ✅
- TLS 1.3: 2018, most recent ✅ Recommended
Main Characteristics
Security
- Encryption: Data encrypted in transit
- Authentication: Verify server identity
- Integrity: Detect modifications
- Non-repudiation: Communication proof
Performance
- Handshake: Connection establishment
- Symmetric encryption: Data encrypted efficiently
- Compression: Optional compression
- Session resumption: Session reuse
Protocol Architecture
TLS Layers
TLS 1.2 Handshake
- Client Hello: Client initiates connection
- Server Hello: Server responds
- Certificate: Server sends certificate
- Server Key Exchange: Key exchange
- Server Hello Done: Server finishes
- Client Key Exchange: Client sends key
- Change Cipher Spec: Change to encryption
- Finished: Mutual verification
TLS 1.3 Handshake (Simplified)
- Client Hello: Client initiates with keys
- Server Hello: Server responds with keys
- Certificate: Server sends certificate
- Finished: Mutual verification
Cryptographic Algorithms
Symmetric Encryption
- AES: Advanced Encryption Standard
- ChaCha20: Stream cipher
- Camellia: AES alternative
- 3DES: Triple DES (obsolete)
Asymmetric Encryption
- RSA: Rivest-Shamir-Adleman
- ECDHE: Elliptic Curve Diffie-Hellman
- DHE: Diffie-Hellman Ephemeral
- ECDSA: Elliptic Curve Digital Signature
Hash Functions
- SHA-256: Secure Hash Algorithm
- SHA-384: SHA with 384 bits
- SHA-512: SHA with 512 bits
- MD5: Obsolete, not secure
Encryption Modes
- CBC: Cipher Block Chaining
- GCM: Galois/Counter Mode ✅ Recommended
- CCM: Counter with CBC-MAC
- Poly1305: Authentication with ChaCha20
Server Configuration
Apache
Nginx
OpenSSL
Digital Certificates
Certificate Types
- DV (Domain Validated): Domain validation
- OV (Organization Validated): Organization validation
- EV (Extended Validated): Extended validation
- Wildcard: For subdomains
- Multi-Domain: Multiple domains
Certificate Authorities
- Let’s Encrypt: Free, automated
- DigiCert: Commercial, wide acceptance
- Sectigo: Commercial, multiple options
- GlobalSign: Commercial, international
Automatic Renewal
Security and Best Practices
Secure Configuration
- Protocols: Use only TLS 1.2 and 1.3
- Ciphers: Prefer strong ciphers
- Perfect Forward Secrecy: Use DHE/ECDHE
- HSTS: HTTP Strict Transport Security
Monitoring
- Expiration: Monitor certificates
- Renewal: Automate renewal
- Vulnerabilities: Scan vulnerabilities
- Compliance: Verify compliance
Analysis Tools
- SSL Labs: Configuration analysis
- Mozilla SSL Config: Recommended configurations
- OWASP: Security guides
- NIST: Security standards
Applications
Web Security
- HTTPS: Secure websites
- E-commerce: Secure transactions
- Banking: Online banking
- Government: Government services
Email Security
- SMTPS: SMTP over TLS
- IMAPS: IMAP over TLS
- POP3S: POP3 over TLS
- S/MIME: Secure email
VPN and Tunnel
- OpenVPN: Open source VPN
- IPsec: Network-level security
- WireGuard: Modern VPN
- Tunneling: Secure tunnels
API Security
- REST APIs: Secure REST APIs
- GraphQL: GraphQL over TLS
- WebSockets: Secure WebSockets
- gRPC: gRPC over TLS
Common Vulnerabilities
Known Attacks
- POODLE: Padding Oracle On Downgraded Legacy Encryption
- BEAST: Browser Exploit Against SSL/TLS
- CRIME: Compression Ratio Info-leak Made Easy
- BREACH: Browser Reconnaissance and Exfiltration via Adaptive Compression
Protections
- Update: Keep versions updated
- Configuration: Secure configuration
- Monitoring: Continuous monitoring
- Testing: Penetration testing
Testing Tools
Configuration Analysis
Certificate Verification
Related Concepts
- AES - Symmetric encryption algorithm used in TLS
- RSA - Public key algorithm used in TLS
- PKI - Infrastructure that manages TLS certificates
- Hash Functions - Integrity algorithms in TLS
- CISO - Role that oversees TLS implementation
- General Cybersecurity - Discipline that includes TLS
- Security Breaches - Incidents that affect TLS
- Attack Vectors - Attacks against TLS
- Incident Response - Process that includes TLS
- SIEM - System that monitors TLS
- SOAR - Automation that manages TLS
- EDR - Tool that protects TLS
- Firewall - Device that inspects TLS
- VPN - Connection that uses TLS
- Dashboards - Visualization of TLS metrics
- Logs - TLS connection logs