SSL vs TLS vs STARTTLS

There's often quite a bit of confusion around the different terms SSL, TLS and STARTTLS.

SSL and TLS both provide a way to encrypt a communication channel between two computers (e.g. your computer and our server). TLS is the successor to SSL and the terms SSL and TLS are used interchangeably unless you're referring to a specific version of the protocol.

STARTTLS is a way to take an existing insecure connection and upgrade it to a secure connection using SSL/TLS. Note that despite having TLS in the name, STARTTLS doesn't mean you have to use TLS, you can use SSL.

SSL/TLS version numbers

Version numbering is inconsistent between SSL and TLS versions. When TLS took over from SSL as the preferred protocol name, it began a new version number, and also began using sub-versions. So the ordering of protocols in terms of oldest to newest is: SSL v2, SSL v3, TLS v1.0, TLS v1.1, TLS v1.2.

When you connect to an SSL/TLS encrypted port, or use STARTTLS to upgrade an existing connection, both sides will negotiate which protocol and which version to use based on what has been configured in the software and what each side supports.

Support for SSL/TLS is virtually universal these days, however which versions are supported is variable. Pretty much everything supports SSL v3 (except a few very old Palm Treo devices as we discovered). Most things support TLS v1.0. As at May 2012, support for TLS v1.1 and TLS v1.2 is more limited.

TLS vs STARTTLS naming problem

One significant complicating factor is that some email software incorrectly uses the term TLS when they should have used STARTTLS. Older versions of Thunderbird in particular used "TLS" to mean "enforce use of STARTTLS to upgrade the connection, and fail if STARTTLS is not supported" and "TLS, if available" to mean "use STARTTLS to upgrade the connection if the server advertises support for it, otherwise just use an insecure connection".

SSL/TLS vs plaintext/STARTTLS port numbers

The above is particularly problematic when combined with having to configure a port number for each protocol.

To add security to some existing protocols (e.g. IMAP, POP, etc.), it was decided to just add SSL/TLS encryption as a layer underneath the existing protocol. However, to distinguish that software should talk the SSL/TLS encrypted version of the protocol rather than the plaintext one, a different port number was used for each protocol. So you have:

  • IMAP uses port 143, but SSL/TLS encrypted IMAP uses port 993.
  • POP uses port 110, but SSL/TLS encrypted POP uses port 995.
  • SMTP uses port 25, but SSL/TLS encrypted SMTP uses port 465.

At some point, it was decided that having 2 ports for every protocol was wasteful, and instead you should have 1 port that starts off as plaintext, but the client can upgrade the connection to an SSL/TLS encrypted one. This is what STARTTLS was created to do.

There were a few problems with this though. There was already existing software that used the alternate port numbers with pure SSL/TLS connections. Client software can be very long lived, so you can't just disable the encrypted ports until all software has been upgraded.

Mechanisms were added to each protocol to tell clients that the plaintext protocol supported upgrading to SSL/TLS (i.e. STARTTLS), and that they should not attempt to log in without doing the STARTTLS upgrade. This created two unfortunate situations:

  1. Some software just ignored the "login disabled until upgraded"announcement and just tried to log in anyway, sending the username and password over plaintext. Even if the server then rejected the login, the details had already been sent over the Internet in plaintext.
  2. Other software saw the "login disabled until upgraded" announcement, but then wouldn't upgrade the connection automatically, and thus reported login errors back to the user, which caused confusion about what was wrong.

Both of these problems resulted in significant compatibility issues with existing clients, and so most system administrators continued to just use plaintext connections on one port number, and encrypted connections on a separate port number.

This has now basically become the de facto standard that everyone uses. IMAP SSL/TLS encrypted over port 993 or POP SSL/TLS encrypted over port 995. Many sites (including FastMail) now disable plain IMAP (port 143) and plain POP (port 110) altogether so people must use an SSL/TLS encrypted connection. By disabling ports 143 and 110, this removes completely STARTTLS as even an option for IMAP/POP connections.

SMTP STARTTLS as an exception

The one real exception to the above is SMTP. However that's for a different reason again. Most email software used SMTP on port 25 to submit messages to the email server for onward transmission to the destination. However, SMTP was originally designed for transfer, not submission. So yet another port (587) was defined for message submission. Although port 587 doesn't mandate requiring STARTTLS, the use of port 587 became popular around the same time as the realisation that SSL/TLS encryption of communications between clients and servers was an important security and privacy issue.

The result is that in most cases, systems that offer message submission over port 587 require clients to use STARTLS to upgrade the connection and also require a username and password to authenticate. There has been an added benefit to this approach as well. By moving users away from using port 25 for email submission, ISPs are now able to block outgoing port 25 connections from users' computers, which were a significant source of spam due to infection with spam-sending viruses.

Currently, things seem relatively randomly split between people using SMTP SSL/TLS encrypted over port 465, and people using SMTP with STARTTLS upgrading over port 587.

  • 26 användare blev hjälpta av detta svar
Hjälpte svaret er?

Relaterade artiklar

Varför kan jag inte vidarebefodra e-post till Gmail?

När ni vidarbefodrar e-post från er domän till ett gmailkonto så vidarebefodras också all skräp...

Hur skapar jag en WordPress sida med Installatron

Viktig Kontrollera först att https fungerar för er hemsida. Skapa inte er hemsida innan det...

SiteLock Vs CodeGuard

Sitelock och CodeGuard är viktiga verktyg för att hålla er webbplats säker och skydda besökare...

Stödjer ni Microsoft FrontPage?

Går det att få Frontpage server extensions installerade? Eller måste det ske...


WebbMotell - Det prisvärda alternativet för era hemsidor

Grymt Koncept! Vårt Premium webbhotellkonto är något utöver det vanliga. Ni får en helt egen server för er själv. Ni konkurrerar inte med någon annan om CPU och minne, allt är ert! Och detta till ett pris som motsvarar ett vanligt webbhotell.

Vi erbjuder också två instegskonton, Start och Standard från 99 kr per ÅR!. Dessa är vanliga webbhotellkonton där ni delar resurser som CPU och minne/RAM med andra kunder.

Beställ WebbMotell Här.

Lättanvänd och kraftfull

Vi har utvecklat en egen kontrollpanel för våra WebbMotellplaner. Med den går det att skapa och ta bort webbplatser, e-postkonton, administrera DNS, installera programvara med Installatron, ansluta sig med FTP till webbplatsen och en del till.

Den är så enkel att använda att i stort sett vem som helst klarar av att hantera sitt webbmotellkonto. För det absolut mesta ni behöver göra räcker det med vår Enkla kontrollpanel.

För de mer avancerade planerna ingår utöver den enkla kontrollpanelen den mer avancerade kontrollpanelen ISPConfig. Detta är en kontrollpanel som har sina rötter i Tyskland och utvecklingen av denna drivs också främst från Tyskland. Det innebär att den i mångt och mycket är utvecklad med europeiska ögon, vilket inte minst är viktigt ur ett GDPR perspektiv.

ISPConfig är en avancerad kontrollpanel med vilken man kan utföra komplexa inställningar, ofta inställningar som kräver lite kännedom om teknik. För den tekniskt bevandrade är ISPConfig ett grymt bra verktyg.

Även den mindre tekniskt insatte kan självklart använda ISPConfig. Inte allt är komplext och svårt, snarare så att det mesta är enkelt och det finns möjligheter till att göra mer komplexa inställningar. Vi har skapat en Supportportal som innehåller artiklar och hjälp. Det går också att ställa frågor i denna portal, frågor som vår supportpersonal då kommer att besvara

Utvecklarvänlig

Våra avancerade webbmotellplaner är perfekt för webbutvecklare. Ni har tillgång till ssh, ni kan installera ramverk, Laravel, CakePHP, Symfony, Zend Framework, Smarty osv osv. Composer finns också.

Vidare kan ni lägga in egna Apache- och PHP-direktiv för varje enskild webbplats.

Vi erbjuder också staging för WordPress utveckling. Ni kan ändra er WordPress, t.ex. ändra teman, installera moduler, utan att era besökare ser det. Era besökare ser bara er ursprungliga webbplats. När ni är nöjd med alla ändringar, då släpper ni enkelt era förändringar till produktionssidan och då är det det som er besökare ser.

Alla applikationer som ni installerar med installatron kan ni närsomhelst ta en ögonblicksbild av. Det kan vara bra om någon förändring ni gjort inte fungerade och ni behöver backa.

Väljer ni en plan med egen server då får ni också tillgång till redis cache. Ni kan själv använda det i er egen programutveckling, eller ni kan använda färdiga plugins till t.ex. WordPress. Ni kan då bygga ultrasnabba webbsidor som hämtar sitt innehåll från minnet istället för disk. För WordPress kan detta få en oerhörd betydelse.

Våra servrar är optimerade för hemsidor byggda med php, vi använder Apache med event-mpm och php-fpm. Vi erbjuder emellertid Nginx (Engine X) till våra Premium planer, för hemsidor som har oerhört många besökare och då behöver extra prestanda.

Beställ WebbMotell Här.