LAB: Digital Signatures
Suppose you have:
- a cryptographic hash function
H(let's say for today that it's SHA-256) - your own public/secret RSA key pair
P = (n,e)andS = (n,d) - the public-key encryption function
Edefined byE(P,M) = E((n,e),M) = M^e mod nand similarly,E(S,M) = E((n,d),M) = M^d mod n
You have a document (i.e., a sequence of bytes) named D and you want
to send it to Alice with your stamp of approval. So you compute the following:
Sig = E(S,H(D))
and then send D || Sig to Alice. Assume Alice already knows to expect a signed
message from you, and that you are using E and H to compute your signature.