Secure Socket Layer
lastmod 2023-09-22created 2014-01-1230 edits
SSL (Secure Socket Layer) was developed by Netscape for the security of e-commerce and similar uses. It was later standardized under the name TLS (Transport Layer Security). Because SSL is an encryption scheme at the Transport Layer in particular, it has the advantage of being usable regardless of the Application Layer protocol, not only HTTP but also NNTP, FTP, XMPP, etc. It basically guarantees Authentication, Encryption, and Integrity.
Transport Layer Security
Transport Layer Security (TLS), or Secure Socket Layer (Secure Socket Layer, SSL), is a cryptographic protocol. The name 'Transport Layer Security' is the name 'Secure Socket Layer' was changed to when it was standardized. The protocol applies to communication over TCP/IP networks such as the Internet, and ensures transport-layer end-to-end security and data integrity during communication. It is applied to applications such as web browsing, e-mail, instant messaging, and voice-over-IP (VoIP). TLS is an IETF standard protocol. The latest update is RFC 5246, and the latest updated version was based on the SSL standard created by Netscape.
About
TLS is designed to prevent eavesdropping, tampering, and forgery while client/server applications communicate over a network. It also uses encryption to provide endpoint authentication and communication confidentiality.
The 3 basic steps of TLS:
- Exchange of the supported algorithms with each other
- Key exchange, authentication
- Encryption with a symmetric-key cipher and message authentication
In the first step, the server and client exchange cipher suites. In this step, the encryption methods used for key exchange and authentication, and the message authentication code (MAC), are determined. The key exchange and authentication algorithms may use a public-key method or a pre-shared key (TLS-PSK). Message authentication codes are made with the HMAC hash function. SSL uses a non-standard pseudorandom function.
Common algorithms
- Key exchange: RSA, Diffie-Hellman, ECDH, SRP, PSK
- Authentication: RSA, DSA, ECDSA
- Symmetric-key ciphers: RC4, Triple DES, AES, IDEA, DES, Camellia. RC2 was used in old versions of SSL.
- Hash functions: HMAC-MD5 or HMAC-SHA in TLS. MD5 and SHA in SSL. MD2 and MD4 were used in old versions of SSL
How SSL works
The SSL (Secure Socket Layer) protocol was originally created by Netscape for security between web servers and browsers. SSL is used to authenticate servers and clients through a third party called a Certificate Authority (CA). Below is a brief description of how SSL works.
- [Web browser] Requests a page encrypted with SSL. (https:// is usually used)
- [Web server] Sends its Public Key together with its certificate.
- [Web browser] Checks whether the certificate was signed by a CA it considers trustworthy (usually called a trusted root CA). (Translator's note: web browsers such as Internet Explorer and Netscape already have the certificates of well-known root CAs such as Verisign and Thawte installed) It also checks whether the dates are valid and whether the certificate is associated with the site being accessed.
- [Web browser] Uses the Public Key to encrypt and send the data, including a random symmetric encryption key, the URL, and http data.
- [Web server] Uses its Private Key to decrypt the random symmetric encryption key, the URL, and the http data.
- [Web server] Encrypts the response for the requested URL using the random symmetric encryption key received from the web browser and sends it to the browser.
- [Web browser] Decrypts the http data and the html document using the symmetric key and displays the information on the screen.
You should know at least the basic concepts here.
Process_of_the_SSL_certificates.jpg
Documentation
- libuv-tls
- https://github.com/deleisha/libuv-tls
See also
- PKI
- RSA
- OpenSSL
- OpenSSL:Example:TLS
- Public key certificate
- Distinguished Name (DN)
- Common Name (CN)
- Hash
- Certification Authority (CA)
- Public key (Public key infrastructure; PKI)
- Symmetric key
- Certbot
- Lets Encrypt
- Electronic signature
- Server Name Indication (SNI; Encrypted SNI; ESNI)
- DNS over HTTPS (DOH)
- Certificate signing request (CSR)
- PyCrypto (Python)
- PyCryptodome (Python)
- stunnel - Provides secure encrypted connections for clients or servers that do not use TLS/SSL
Favorite site
- [Recommended] Saenghwal Coding: HTTPS and SSL certificates 1
- Configuring SSL in an Apache environment
- SSL Certificates HOWTO
- [Recommended] Minix's little stories: Webtoon 03 What is SSL? 1/2
- [Recommended] Minix's little stories: Webtoon 03 What is SSL? 2/2 2
- [Recommended] Things you need to know to run SSL/TLS securely 3
- IBM Knowledge Center - Cryptographic security protocols: SSL and TLS
- TLS, byte by byte - Examining an HTTPS (TLS) call byte by byte
- Shows the action of fetching the current page itself, from the TLS handshake to the actual HTML body, with byte-by-byte explanations for all data
Certification
- Zetawiki - Creating a self-signed SSL certificate on Linux
- (OpenSSL) Generating certificates (certification) and keys
Encrypt site
- [Recommended] Lets' Encrypt (free certificate site)
References
- Advanced Encryption Standard
- Amazon Route 53
- Cert-manager
- Certbot
- Communication protocol
- ComputerNetwork:Basic
- Coturn
- Data Version Control
- DNS over HTTPS
- Getlocalcert
- HTTPS
- Internet protocol suite
- Lets Encrypt
- Mbed TLS
- Network monitoring
- Network switch
- Nginx
- OpenSSL
- OpenSSL:TLS
- OpenStack:RDO
- OSI Model
- Programming
- Protocol
- Public key infrastructure
- Redis
- RSA
- Server Name Indication
- SolutionStack:FullStackDeveloper:Curriculum
- SPDY
- Stunnel
- Svn:ApacheHttpd
- Virtual Private Network
- Wstunnel