Better HN
topnewbestaskshowjobs
Log inSign up

UnicycleSkewer

4 karma · joined Sep 4, 2020 (6y ago) · 2 submissions

Submissions

comment 6y ago · link · parent

I guess that is true, but if you store the encryption key in a secret store on Azure or AWS, I wouldn't really worry about that.

Maybe the real question is why use a pepper over encryption?

They have the same downside (as you mentioned) but at least you can change the encryption key without having all the users change passwords. I don't see any advantage in using a pepper over encryption, except maybe implementation complexity.

comment 6y ago · link · parent

I wonder why it isn't best practice to hash with a salt and then encrypt the passwords using something like AES. The encryption key can be stored in the secrets manager and be injected via environment variables.

Unlike a pepper it is possible to change the encryption key if it is leaked. I don't think changing a pepper for existing hashes is possible, but if they are encrypted you can just reencrypt them with the new key.

So is there an obvious downside I'm not seeing to hash with a salt and then encrypt?