You are on page 1of 7

A digital signature (not to be confused with a digital certificate) is an electronic signature that can be used to authenticate the identity

of the sender of a message or the signer of a document, and possibly to ensure that the original content of the message or document that has been sent is unchanged. Digital signatures are easily transportable, cannot be imitated by someone else, and can be automatically timestamped. The ability to ensure that the original signed message arrived means that the sender cannot easily repudiate it later. A digital signature can be used with any kind of message, whether it is encrypted or not, simply so that the receiver can be sure of the sender's identity and that the message arrived intact. A digital certificate contains the digital signature of the certificate-issuing authority so that anyone can verify that the certificate is real.
How It Works

Assume you were going to send the draft of a contract to your lawyer in another town. You want to give your lawyer the assurance that it was unchanged from what you sent and that it is really from you. 1. You copy-and-paste the contract (it's a short one!) into an e-mail note. 2. Using special software, you obtain a message hash (mathematical summary) of the contract. 3. You then use a private key that you have previously obtained from a public-private key authority to encrypt the hash. 4. The encrypted hash becomes your digital signature of the message. (Note that it will be different each time you send a message.) At the other end, your lawyer receives the message. 1. To make sure it's intact and from you, your lawyer makes a hash of the received message.

2. Your lawyer then uses your public key to decrypt the message hash or summary. 3. If the hashes match, the received message is valid. 1.) When are digital signatures and footer stamping incompatible? A digital signature is something stamped onto a message by the sender. The signature is a cryptographic operation, usually a hash, across the message content, which is then locked with the private key of the sender. The recipient can use the sender's public key to compare a hash they compute with the transmitted hash to see if the message has been tampered with, or isn't from the purported sender at all. Injecting a footer into a message after it is signed by the sender will invalidate the digital signature. As a result, all recipients of the message think that the message has been tampered with or was forged. If you want to digitally sign messages and have footers, then you need to put the footer into the message before the sender adds their digital signature.

How do digital signatures prevent duping the system?


I'm a consulting project manager so I have to admit I don't know all the intricacies needed to develope a secure environment. I've read many of the articles that say digital signitures will verify the message came from who the person says he is, and that a hash is used to determine if the message has been tampered with, but none of the articles I have seen

says how that works. What is to keep somebody else from installing somebody else's certificate on their own computer and duping the system? How does a hash tell if the message has been tampered with?

Digital Signatures
Digital signatures facilitate the safe exchange of electronic documents by providing a way to test both the authenticity and the integrity of information exchanged digitally. With the explosion in the number of organizations engaged in electronic data exchange as well as the amount of data changing hands (or computers), the secure transmission of information has become a focus for business users across virtually all industries. A digital signature is created by a series of mathematical processes that transform data (e.g., a Word document, PDF, or XML file) into a uniquely coded message digest. The sender encrypts the message digest (commonly referred to as the digital signature the terms will be used interchangeably throughout this article), attaches it to or embeds it in a file, and sends the package to the intended recipient. Once the package is received and the message digest is decrypted, a determination of authenticity and integrity can be made. If the digital signature matches the identity of the sender one can be reasonably assured that it was sent by the individual associated with the digital signature (at worst the actual sender had access to the digital identity of the supposed sender). If the message digest received matches the message digest as calculated by the recipient the document has not been altered after it was digitally signed.

The Hash Function


A file (or other collection of data) is transformed into a message digest via a mathematical function referred to as a hash. The hash function reduces the file to a smaller one with a fixed number of bits. The smaller file contains some representation of the contents of the actual document Morse Code offers a relevant analogy. The hash function acts as any other mathematical formula the result (message digest/digital signature) will depend on the operand (file) to which the function is applied. Just as the mathematical function multiply by seven will produce 49 when the operand is seven and 35 when the operand is five, the hash function will create a unique message digest based on the contents of the file. Often referred to as a digital fingerprint, the digital signature created by the hash function is wholly unique because individual files have unique contents and characteristics.

There are a number of different hash functions in use including Rivests MD5, which reduces a file to a 128-bit message digest, and NISTs Secure Hash Algorithm (SHA), which creates a 160-bit message digest. In addition to being a collision free algorithm, or one that creates a wholly unique message digest, the digital signature created by the hash function should not be able to be reverse engineered. In other words, given the result of the hash function (i.e., the message digest/digital signature) it is virtually impossible to reconstruct the document or other collection of data from that information.

Encryption
Once the message digest is created by the hash function, it is encrypted. In order to encrypt any message, an individual requires a unique digital identity to which he is bound (almost like a social security number). That unique identifier is issued a pair of keys, one private (known only to the individual) and one public (used by individuals exchanging encrypted messages with the owner of the private key). The keys are actually associated algorithms used to transform data (e.g., message contents) into a format unintelligible to the human eye and then transform it back again. Only the associated key can unlock content encrypted by the other. The process of generating, assigning, and managing unique digital identifiers and issuing keys is carried out by nationally-accredited third parties called Certificate Authorities (e.g., Thawte, Symantec, or Microsoft Certificate Services, which run on Windows server operating systems). These third parties and the policies that dictate the issuing of digital identifiers are a large part of the Public Key Infrastructure (PKI) that makes the use of digital signatures and other security measures feasible. Once the hash function has been applied to the file and the message digest created, the sender uses his unique private key to encrypt it. Once encrypted, the digital signature can be embedded in the file (enveloped) or attached to it as a separate file (detached). The package is then dispatched to the intended recipient.

Upon receipt, the recipient unlocks the message digest via a public key associated with the senders private key (asymmetric cryptography). If the public key successfully decrypts the digital signature, the file has in fact been sent by the individual associated with the digital identifier (or, worst case scenario, someone with access to that identifier).

Please note that there is an alternative encryption process in which a sender and recipient use the same key to encrypt and decrypt a file (symmetric encryption). However this is not supported by digital signatures, which rely on the association between a digital identifier and an individual to enforce the principle of nonrepudiation. In other words, a sender whose digital signature is attached to a file cannot deny having sent it because his digital DNA is associated with it. Once the message digest has been decrypted the authenticity of the digital signature has been established, the integrity of the file can be determined.

Recreating the Message Digest


As noted earlier the message digest/digital signature is created by applying a hash function to the file. Once the recipient gets the file and decrypts the digital signature, the same hash function is applied. If the message digest created on the recipients end is identical to the files message digest, it has not been altered since the digital signature was attached or embedded. If there is a discrepancy between the original and re-created digital signatures, the file has been altered in some way.

For more information about XML digital signatures click to view the XML Digital Signature Technology Overview from our collection of Technology Primers. Altova XMLSpy, Altova MapForce, Altova StyleVision, and Altova Authentic support XML digital signatures. Please click for more information about XML digital signatures in XMLSpy, MapForce, StyleVision, andAuthentic.