Bob has a document that Alice agrees to sign. They do the following:
Alice generates two large primes , , and computes . She chooses such that with and calculates such that . Alice publishes and keeps private , , .
Alice’s signature is
The pair is then made public.
Bob can then verify that Alice really signed the message by doing the following:
Download Alice’s .
Calculate . If , then Bob accepts the signature as valid; otherwise the signature is not valid.
Suppose Eve wants to attach Alice’s signature to another message . She cannot simply use the pair , since . Therefore, she needs with . This is the same problem as decrypting an RSA “ciphertext” to obtain the “plaintext” . This is believed to be hard to do.
Another possibility is that Eve chooses first, then lets the message be . It does not appear that Alice can deny having signed the message under the present scheme. However, it is very unlikely that will be a meaningful message. It will probably be a random sequence of characters, and not a message committing her to give Eve millions of dollars. Therefore, Alice’s claim that it has been forged will be believable.
There is a variation on this procedure that allows Alice to sign a document without knowing its contents. Suppose Bob has made an important discovery. He wants to record publicly what he has done (so he will have priority when it comes time to award Nobel prizes), but he does not want anyone else to know the details (so he can make a lot of money from his invention). Bob and Alice do the following. The message to be signed is .
Alice chooses an RSA modulus (, the product of two large primes), an encryption exponent , and decryption exponent . She makes and public while keeping private. In fact, she can erase from her computer’s memory at the end of the signing procedure.
Bob chooses a random integer with and computes . He sends to Alice.
Alice signs by computing . She returns to Bob.
Bob computes . This is the signed message .
Let’s show that is the signed message: Note that , since this is simply the encryption, then decryption, of in the RSA scheme. Therefore,
which is the signed message.
The choice of is random, so is the RSA encryption of a random number, and hence random. Therefore, gives essentially no information about (however, it would not hide a message such as ). In this way, Alice knows nothing about the message she is signing.
Once the signing procedure is finished, Bob has the same signed message as he would have obtained via the standard signing procedure.
There are several potential dangers with this protocol. For example, Bob could have Alice sign a promise to pay him a million dollars. Safeguards are needed to prevent such problems. We will not discuss these here.
Schemes such as these, called blind signatures, have been developed by David Chaum, who has several patents on them.