Re: encryption question
- From: Brian Evans <NOSPAM@xxxxxxxxxx>
- Date: Wed, 30 Jan 2008 02:16:17 -0500
Henrick Hellström wrote:
Ivan wrote:My understanding is that the usual solution is to create one-way hash of the password (using MD5 or similar algorithms) and store that. Then you can run the same hash on the entered password and see if it matches the saved value. Properly done it should be very hard to get the password from the hashed value.
If you do that, where do you store the actual encryption key?
You don't. Checking the hash is just to check if the entered key is
likely valid and give feedback. Faster and easier than using the
entered key to decrypt the real data and then trying to tell if its
valid (proper key) or gibberish (wrong key). Security relies on the hash being one way so it would need to be salted.
For encryption we take the entered key and generate:
salt;hash;encrypted data
For decryption the key is entered and we decrypt the data.
We can also use the salt and hash the key entered for
decryption and compare it to the hash from encryption.
If they match then mostly likely decryption will produce
a valid data file.
Brian
.
- Follow-Ups:
- Re: encryption question
- From: Henrick Hellström
- Re: encryption question
- References:
- encryption question
- From: Rael
- Re: encryption question
- From: Ivan
- Re: encryption question
- From: Henrick Hellström
- encryption question
- Prev by Date: Re: Making flash displays
- Next by Date: Re: encryption question
- Previous by thread: Re: encryption question
- Next by thread: Re: encryption question
- Index(es):
Relevant Pages
|