Encryption in transit and at rest, and storing passwords
"Everything is encrypted" is the answer interviewers hear most and trust least. Encryption in transit protects the wire, encryption at rest protects disks and backups, and passwords aren't encrypted at all: they're hashed. The strong answer names each layer and the attacker it stops.
A jeweller with three branches
A jeweller moves stock between branches in a locked van. At night it goes into the safe, which stops a burglar who carries off the whole cabinet, but not a manager who knows the combination. So the most valuable pieces sit in individually locked boxes, and only head office holds those keys. The alarm panel doesn't store staff codes at all. It keeps a scrambled imprint of each, enough to check a typed code, and takes a moment over each check so nobody can try thousands.
- the locked van → TLS for data in transit
- the safe → disk and storage encryption at rest
- the manager who knows the combination → anyone who can query the database: it decrypts for them
- boxes keyed by head office → application-level encryption with keys in a key management service
- the scrambled imprint, checked slowly → a slow, salted password hash