Week 8>Passwords at rest>Try it>2-way vs. 1-way

The secret: letters only, change it any time
Key: 3

Toy cipher. Real 2-way algorithms (AES) are far stronger, with the same shape: key in, key out.

Add up the letters?
No way back. The letters are gone.

Toy hash: a = 1 ... z = 26, then add. Real ones (bcrypt) scramble far more, with the same shape.

users table
email: ben@example.com
password:

Hashed once, at sign-up. The real password was never saved.

login form
Password typed:
Stored:
Hash of guess: 

Hashed with SHA-256, a real 1-way algorithm, shortened to fit. One changed letter changes it all.

Your browserhas the secretThe internetanyone can watchtacogram.comkeeps the key
snoop

Simplified: real HTTPS also checks a certificate (a signed hash) proving the padlock is really the site's.