Suppose Alice wishes to send a signed message to Bob. She produces a hash value of the message, raises it to the power of "d" mod "n" (just like when decrypting a message), and attaches it as a "signature" to the message. When Bob receives the signed message, he raises the signature to the power of "e" mod "n" (just like encrypting a message), and compares the resulting hash value with the message's actual hash value. If the two agree, he knows that the author of the message was in possession of Alice's secret key, and that the message has not been tampered with since.