I've seen an example of how to sign using RSA. Besides the signing itself (s = m^d mod n) it also hashes and adds an IV.
Why is that needed?
|
|
|
A second season that a hash is usually present in RSA signature schemes (apart from being able to sign long messages) is to prevent existential forgery attacks. These look like this:
With a hash, the signature checking equation is $H(m) \equiv s^e \mod m$ instead of $m \equiv s^e \mod m$, and this does not allow to create a message $m$ fitting to a signature $s$ (assuming the hash function is preimage-resistant). (The padding scheme normally present in signatures serves the same purpose.) |
|||
|
|
|
Signing a hash is cheaper than signing the whole document. RSA is relatively costly, and, as long as the hash function is not weak, there isn't any practical difference in security between signing the whole plaintext and signing its hash, because the hash uniquely identifies the plaintext. Wikipedia says:
|
|||||
|
|
Salts add an additional level of security. All your passwords are hashed and saved in your database using some algorithm or the other. This hash is generated the way and is uniform for all your users (assuming they all have the same password). By using a salt you will basically be giving different users with the same password different hashes. And that means that if the attacker figures out how to get your plaintext password by creating a rainbow table. He wont just magically have everyone elses password as well. He's goign to have to generate a rainbow table for every user individually. Note: I am no expert. But I did take a class on security once and that's what I remember from it. Hopefully this answers your que |
|||||||
|