Java – the difference between salt and key encryption
OK, so I'm trying to learn a little about encrypting messages in my java application I just found that salt is different from key
Can someone help me understand the difference between the two?
Solution
The key is that it is roughly equivalent to a password; You use it to encrypt the message and then decrypt it back to the original plaintext using the same key Well, it's a little complicated once you have a public key and a private key, and so on
Salt is most commonly used in cryptographic hash functions, not cryptographic functions The idea is not to hash data (such as passwords), not hash data salt, where salt is usually a randomly generated string They have at least two purposes:
In order to enable attackers to identify the hash data of collision using rainbow table Slow down the attacker and attempt a violent attack