TLS is a cryptographic protocol that establishes a secure, encrypted connection between two communicating applications. It is designed to provide privacy and integrity between the applications and is commonly used to secure communication over the internet.
STARTTLS is a command that upgrades an existing plaintext connection to a secure, encrypted (TLS) connection. It is used with SMTP (Simple Mail Transfer Protocol) protocols that do not natively support encryption.
When a client wants to establish a secure connection using STARTTLS, it sends a STARTTLS command to the server. If the server supports STARTTLS, it will respond with a message indicating that it will upgrade the connection to a secure, encrypted TLS connection. The client will initiate the TLS handshake process to establish the encrypted connection.
So, in summary, TLS is a cryptographic protocol used to establish a secure, encrypted connection between two applications. At the same time, STARTTLS is a command to upgrade an existing plaintext connection to a secure, encrypted TLS connection.