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

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

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

Password cracking: why a stolen list of hashes still gives passwords away

A thief copies the password list of a website. The list holds no passwords. It holds only hashes, and a hash cannot be turned back into a password. Yet many of the passwords will still be found.

  1. 1 On Rono's laptop, the stolen list shows nothing but hashes. He cannot run the grinder backwards, any more than Miva can.Rono81580afc7bfc8d969eef6eca81a103d766de8d969eef6eca

    On Rono's laptop, the stolen list shows nothing but hashes. He cannot run the grinder backwards, any more than Miva can.

  2. 2 But he can run it forwards. The hash function is no secret: it is the same one the website uses, free for anyone. He feeds it a guess, 123456, and gets its hash.Rono123456hash functionthe same oneas the website's8d969eef6eca

    But he can run it forwards. The hash function is no secret: it is the same one the website uses, free for anyone. He feeds it a guess, 123456, and gets its hash.

  3. 3 Then he looks for that hash in the list. It is there, 40 times over: every member who picked 123456 got the same hash. One guess, and 40 passwords are found.8d969eef6ecaemailhashlea@mail.example8d969eef6ecayou@mail.example81580afc7bfctom@mail.example8d969eef6ecasam@mail.example81a103d766dekim@mail.example8d969eef6ecafound on 40 rowsexample numbers

    Then he looks for that hash in the list. It is there, 40 times over: every member who picked 123456 got the same hash. One guess, and 40 passwords are found.

  4. 4 So he does not guess at random. He takes millions of real passwords from older breaches, like the RockYou list, and grinds them all. Finding passwords this way is called cracking, and guessing from a list like this is a dictionary attack.RockYou list123456passwordiloveyousunflower78d969eef6eca5e884898da28e4ad93ca07ac

    So he does not guess at random. He takes millions of real passwords from older breaches, like the RockYou list, and grinds them all. Finding passwords this way is called cracking, and guessing from a list like this is a dictionary attack.

  5. 5 Your sunflower7 is on that list too. A few minutes later, it sits next to your email on Rono's laptop.Rono's copyyou@mail.example81580afc7bfcsunflower7

    Your sunflower7 is on that list too. A few minutes later, it sits next to your email on Rono's laptop.

  6. 6 He does not even need to grind. Ready-made tables of millions of common passwords and their hashes already exist, because a password has the same hash in every list in the world.passwordhash1234568d969eef6ecapassword5e884898da28sunflower781580afc7bfca ready-made table

    He does not even need to grind. Ready-made tables of millions of common passwords and their hashes already exist, because a password has the same hash in every list in the world.

  7. Quick check

    Quick check.Rono grinds the guessletmein, and its hashis on no row of thegym's list. What doesthat tell him?

    Quick check.

    Show the answer

    That no member of the gym uses letmein. The same password always gives the same hash, so a hash that is on no row means no member picked it.

Next episode Password salt: why two people with the same password get different hashes

Share this comic

More comics