Digital signature: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Sandy Harris
No edit summary
imported>Sandy Harris
(add some detail)
Line 7: Line 7:
The steps for the sender are as follows:
The steps for the sender are as follows:
* calculate a hash or [[message digest]] from the message
* calculate a hash or [[message digest]] from the message
* encrypt that hash with the sender's private key (which only he should know)
* encrypt that hash with the sender's private key
* append the encrypted hash to the message as a signature
* append the encrypted hash to the message as a signature
Steps for the receiver are:
Steps for the receiver are:
Line 14: Line 14:
* hash the message body yourself to get another hash value, H<sub>2</sub>
* hash the message body yourself to get another hash value, H<sub>2</sub>
* compare  H<sub>1</sub> and  H<sub>2</sub>
* compare  H<sub>1</sub> and  H<sub>2</sub>
* if they are identical, accept the signature as valid
* if they are identical, then you know with overwhelming probability:
** the two documents hashed to get H1 and H2 were identical (from properties of [[cryptographic hash]] functions)
** whoever encrypted H1 knew the signer's private key  (which only he should know in a [[public key]] system)
* so you can accept the signature as valid
If both the [[hash (cryptography) | hash]] and the [[public key]] system used are secure, and no-one except the sender knows his private key, then the signatures are trustworthy.
If both the [[hash (cryptography) | hash]] and the [[public key]] system used are secure, and no-one except the sender knows his private key, then the signatures are trustworthy.

Revision as of 05:50, 11 November 2008

This article is a stub and thus not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

Template:TOC-right Digital signatures provide source authentication for online documents, messages or records, in a manner analogous to what a signature provides for a paper document.

Two cryptographic techniques are used together to produce a digital signature, a cryptographic hash and a public key cryptosystem.

The steps for the sender are as follows:

  • calculate a hash or message digest from the message
  • encrypt that hash with the sender's private key
  • append the encrypted hash to the message as a signature

Steps for the receiver are:

  • obtain the sender's public key and verify its validity
  • decrypt the signature, using the sender's public key, to get the hash value; call it H1
  • hash the message body yourself to get another hash value, H2
  • compare H1 and H2
  • if they are identical, then you know with overwhelming probability:
    • the two documents hashed to get H1 and H2 were identical (from properties of cryptographic hash functions)
    • whoever encrypted H1 knew the signer's private key (which only he should know in a public key system)
  • so you can accept the signature as valid

If both the hash and the public key system used are secure, and no-one except the sender knows his private key, then the signatures are trustworthy.