From Wikipedia, the free encyclopedia - View original article

Jump to: navigation, search
Not to be confused with StartSSL.

STARTTLS is an extension to plain text communication protocols, which offers a way to upgrade a plain text connection to an encrypted (TLS or SSL) connection instead of using a separate port for encrypted communication.

STARTTLS for IMAP and POP3 is defined in RFC 2595, for SMTP in RFC 3207, for FTP in RFC 4217, for XMPP in RFC 6120, for LDAP in RFC 2830, and for NNTP in RFC 4642.


TLS is application-neutral; in the words of RFC 5246

One advantage of TLS is that it is application protocol independent. Higher-level protocols can layer on top of the TLS protocol transparently. The TLS standard, however, does not specify how protocols add security with TLS; the decisions on how to initiate TLS handshaking and how to interpret the authentication certificates exchanged are left to the judgment of the designers and implementors of protocols that run on top of TLS.[1]

The style used to specify how to use TLS matches the same layer distinction that is also conveniently supported by several library implementations of TLS. E.g., the RFC 3207 SMTP extension illustrates with the following dialog how a client and server can start a secure session:[2]

   S: <waits for connection on TCP port 25>   C: <opens connection>   S: 220 ESMTP service ready   C: EHLO   S: offers a warm hug of welcome   S: 250 STARTTLS   C: STARTTLS   S: 220 Go ahead   C: <starts TLS negotiation>   C & S: <negotiate a TLS session>   C & S: <check result of negotiation>   C: EHLO[3]   . . . 

The last EHLO command above is issued over a secure channel. Note that authentication is optional in SMTP, and the omitted server reply may now safely advertise an AUTH PLAIN SMTP extension, which is not present in the plain-text reply.

SSL ports[edit]

Before STARTTLS was well established, a number of TCP ports were defined for SSL-secured versions of well-known servers. These establish secure communications and then present a communication stream identical to the old un-encrypted protocol. These are no longer recommended, since STARTTLS makes more efficient use of scarce port numbers and allows simpler device configuration.[citation needed] On the other hand, SSL ports have the advantage of fewer round-trips; also less meta-data is transmitted in unencrypted form.[4] Some examples include:

ProtocolPurposeNormal portSSL variantSSL port
SMTPSend email25/587SMTPS465 (legacy)[5]
POP3Retrieve email110POP3S995
IMAPRead email143IMAPS993
NNTPNews reader119/433NNTPS563


Following the revelations made by Edward Snowden in light of the global, mass surveillance scandal, popular email providers have bettered their email security by enabling STARTTLS.[6] Facebook reported that after enabling STARTTLS and encouraging other providers to do the same, 95% of Facebook's outbound email is encrypted with both Perfect Forward Secrecy and strict certificate validation.[7]

Mainstream providers that employ STARTTLS[edit]


  1. ^ Tim Dierks; Eric Rescorla (August 2008). "The Transport Layer Security (TLS) Protocol". RFC Editor. Retrieved 2009-10-08. 
  2. ^ Paul Hoffman (February 2002). "SMTP Service Extension for Secure SMTP over Transport Layer Security". RFC Editor. Retrieved 2009-10-08. 
  3. ^ The last line in the example added for clarity. See e.g. the thread started by Paul Smith (26 January 2009). "STARTTLS & EHLO". ietf-smtp mailing list. Internet Mail Consortium. Retrieved 2009-10-08. 
  4. ^ Dovecot SSL documentation:
  5. ^ Port assignment has been revoked. Paul Hoffman (1998-11-12). "Revoking the smtps TCP port". Internet Mail Consortium. Retrieved 2013-10-09. 
  6. ^ Peterson, Andrea. "Facebook’s security chief on the Snowden effect, the Messenger app backlash and staying optimistic". Washington Post. Retrieved 2 November 2014. 
  7. ^ Cohen, David. "Facebook: 95% of Notification Emails Encrypted Thanks to Providers’ STARTTLS Deployment". All Facebook. Retrieved 2 November 2014. 
  8. ^ a b c d e f g h "EFF's Encrypt The Web Report". Electronic Frontier Foundation. Retrieved 2 November 2014. 
  9. ^ "Google STARTTLS Stats". Google. Retrieved 5 March 2015. 

External links[edit]