Salt Generation and open source software

后端 未结 6 1890
孤独总比滥情好
孤独总比滥情好 2020-11-22 07:37

As I understand it, the best practice for generating salts is to use some cryptic formula (or even magic constant) stored in your source code.

I\'m working on a proj

6条回答
  •  无人及你
    2020-11-22 08:35

    In the case of a desktop application that encrypts data and send it on a remote server, how do you consider using a different salt each time?

    Using PKCS#5 with the user's password, it needs a salt to generate an encryption key, to encrypt the data. I know that keep the salt hardcoded (obfuscated) in the desktop application is not a good idea.

    If the remote server must NEVER know the user's password, is it possible to user different salt each time? If the user use the desktop application on another computer, how will it be able to decrypt the data on the remote server if he does not have the key (it is not hardcoded in the software) ?

提交回复
热议问题