Re: encryption question



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
.



Relevant Pages

  • Re: Database Encryption
    ... The encrypted data stores the IV, the encryption algorithm, and the encrypted data, and usually uses a Base-64 encoding to ensure that the data is printable. ... You'd still run into problems with less than and greater than on an encrypted column. ... Indeed, IDS is not really aware that the data is stored encrypted, and you can - if you are careless - store unencrypted data in a column in some rows and encrypted data in other rows. ... CRYPTOGRAPHIC HASH FUNCTIONS ...
    (comp.databases.informix)
  • Re: help in secutrity features
    ... But I do not need decryption for a verifier that uses a cryptographic hash ... Nor do you use encryption. ... Using another hash algorithm, ...
    (comp.lang.javascript)
  • Re: Help needed with encryption algorithm
    ... >Well I need this encryption for 2 applications I am developing. ... The standard technique for passwords is NOT to encrypt them but to hash ... That gets rid of the need to store an extra password-- the password ... >store data like number of files, files names, unpacking options, run ...
    (sci.crypt)
  • Re: security system
    ... >>C1...CN are not trusted and therefore they cannot have the decryption ... If a file is encrypted you can't use a hash of the decrypted ... >>of hashes and encryption where the hash of the encrypted file is the ... > Public key encryption is slower than non-public key encryption, ...
    (sci.crypt)
  • Re: Choosing encryption method?
    ... Verifying whether decryption was successful does not come out-of-the-box, ... For example, before encrypting data, hash it using MD5 or SHA-1 algorithm ... and append the resulting hash bytes at the end of the plain text. ...
    (microsoft.public.dotnet.security)