原文地址:http://www.youdzone.com/signature.html
中文翻译:http://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.html
Bob |
(Bob's public key) |
Bob has been given two keys. One of Bob's keys is called a Public Key, the other is called a Private Key.
Bob's Co-workers: | ||||
Anyone can get Bob's Public Key, but Bob keeps his Private Key to himself |
||||
Pat | Doug | Susan |
Bob's Public key is available to anyone who needs it, but he keeps his Private Keyto himself. Keys are used to encrypt information. Encrypting information means"scrambling it up", so that only a person with the appropriate key can make itreadable again. Either one of Bob's two keys can encrypt data, and the other key can decrypt that data.
Susan (shown below) can encrypt a message using Bob's Public Key. Bob uses hisPrivate Key to decrypt the message. Any of Bob's coworkers might have accessto the message Susan encrypted, but without Bob's Private Key, the data isworthless.
"Hey Bob, how about lunch at Taco Bell. I hear they have free refills!" | HNFmsEm6UnBejhhyCGKOKJUxhiygSBCEiC0QYIh/Hn3xgiKBcyLK1UcYiYlxx2lCFHDC/A |
HNFmsEm6UnBejhhyCGKOKJUxhiygSBCEiC0QYIh/Hn3xgiKBcyLK1UcYiYlxx2lCFHDC/A | "Hey Bob, how about lunch at Taco Bell. I hear they have free refills!" |
With his private key and the right software, Bob can put digital signatures ondocuments and other data. A digital signature is a "stamp" Bob places on thedata which is unique to Bob, and is very difficult to forge. In addition, thesignature assures that any changes made to the data that has been signed cannot go undetected.
Bob's software then encrypts the message digest with his private key. The result is the digital signature.
Finally, Bob's software appends the digital signature to document. All of thedata that was hashed has been signed.
Bob now passes the document on to Pat.
It just so happens that Susan works at the company's certificateauthority center. Susan can create a digital certificate for Bob simplyby signing Bob's public key as well as some information about Bob.
|
Now Bob's co-workers can check Bob's trusted certificate to make surethat his public key truly belongs to him. In fact, no one at Bob'scompany accepts a signature for which there does not exist a certificategenerated by Susan. This gives Susan the power to revoke signatures ifprivate keys are compromised, or no longer needed. There are even morewidely accepted certificate authorities that certify Susan.
Let's say that Bob sends a signed document to Pat. To verify the signatureon the document, Pat's software first uses Susan's (the certificateauthority's) public key to check the signature on Bob's certificate.Successful de-encryption of the certificate proves that Susan created it.After the certificate is de-encrypted, Pat's software can check ifBob is in good standingwith the certificate authority and that all of the certificate informationconcerning Bob's identity has not been altered.
Pat's software then takes Bob's public key from the certificate and uses itto check Bob's signature. If Bob's public key de-encrypts the signaturesuccessfully, then Pat is assured that the signature was created using Bob'sprivate key, for Susan has certified the matching public key. And of course,if the signature is valid, then we know that Doug didn't try to change thesigned content.