You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

How passwords and logins work: why a website should not know your password

Plain-text passwords: why a website should not keep your password as you typed it

You sign up on a website. Next week, the website must know that it is you again. The simplest way is to keep your password just as you typed it. Then anyone who sees the list sees your password.

  1. 1 Miva runs a small climbing gym, and her website lets members book a time on the wall. You sign up as a new member, with your email and a password: sunflower7.youclimbwall.exampleSign upemailyou@mail.examplepasswordsunflower7Sign up

    Miva runs a small climbing gym, and her website lets members book a time on the wall. You sign up as a new member, with your email and a password: sunflower7.

  2. 2 A week later, you come back to book. You type your password, and the website lets you in only if it matches the one you chose. So it must have kept something on the day you signed up.Log insunflower7the gym's serverThe same oneas last week?

    A week later, you come back to book. You type your password, and the website lets you in only if it matches the one you chose. So it must have kept something on the day you signed up.

  3. 3 The simplest thing to keep is the password itself. Miva's list holds it just as you typed it, in plain text: anyone who opens the list can read it.climbwall.example: membersemailpasswordyou@mail.examplesunflower7lea@mail.example123456sam@mail.exampleilovecatsplain text

    The simplest thing to keep is the password itself. Miva's list holds it just as you typed it, in plain text: anyone who opens the list can read it.

  4. 4 And many people can open a list. The person who fixes the website, an old backup copy, a thief who finds a way in. When a thief gets a copy, it is a data breach, and every password in the list is his at once.passwordssunflower7123456ilovecatsstaffold backupRono, a thief

    And many people can open a list. The person who fixes the website, an old backup copy, a thief who finds a way in. When a thief gets a copy, it is a data breach, and every password in the list is his at once.

  5. 5 It has happened for real, many times. In 2009, a thief copied the list of RockYou, a website of games and apps: 32 million passwords, all in plain text. The most common one was 123456.RockYou, 200932 million passwords12345612345123456789password

    It has happened for real, many times. In 2009, a thief copied the list of RockYou, a website of games and apps: 32 million passwords, all in plain text. The most common one was 123456.

  6. 6 Miva wants none of that for her gym. Yet next week, the website must still check your password. It has to check it without keeping it.Miva,runs the gym?emailpasswordyou@mail.examplesunflower7lea@mail.example123456

    Miva wants none of that for her gym. Yet next week, the website must still check your password. It has to check it without keeping it.

  7. Go further

    One more story worth a look.Facebook, 2019found hundreds of millionsof passwords readable inits own files, where itsstaff could see them

    One more story worth a look.

Next episode Password hashing: how a website checks your password without keeping it

Share this comic

More comics