Tag Info

New answers tagged


My code above is a fascinating huge damping pile of... you know. generator.init(password, salt, iterations); Arrays.fill(password, (byte) 0); BC fails to copy the content of the password array, so my security "improvement" of clearing the password after use, clears it before use and leads to a password of all zeros. Btw., the mailing list was no better ...


How do I deal with user changing password (The key will be generated from password.)? Generate a random master key K. Use K to encrypt the files. Use the user's password to generate a second key, K'. Encrypt the master key using K'. Then when the user changes his password, all you need to do is decrypt the master key using the old password and re-encrypt it ...

Top 50 recent answers are included