I want to derive a key from a password in a client application that will be used as a master key that decrypts a data key. As far as I understand the salt should be private knowledge. Would it be enough to use the hash (e.g. SHA-1) from a password as the salt parameter for PBKDF2?
Again, as far as I understand, when the attacker would gain knowledge of this algorithm the salt should be worthless. But wouldn’t it be easier for an attacker to retrieve a generated, but stored, salt? I have to store it somewhere, because the key won’t be used only once.