Monday, February 7, 2011

Digital Signature - A Monograph

Digital Signature – Introduction:


A digital signature is an electronic identification of a person or entity created by using a public key algorithm and intended to verify to a recipient the integrity of the data and the identity of the sender. To verify the integrity of the data, a cryptographic hashing algorithm is computed against the entire message, which generates a small fixed string message usually about 128 bits in length. This process, also referred to as a digital signature algorithm, creates a message digest (i.e. smaller extrapolated version of the original message).

Encryption:


Encryption is the process of converting a plaintext message into a secure-coded form of text, called cipher text, which decryption (the reverse process), to plaintext. This is done via a mathematical function and a special encryption / decryption password called the key. In many countries, encryption is subject to governmental laws and regulations.

Encryption generally is used to:

1. Protect data in transit over networks from unauthorized interception and manipulation (confidentiality)

2. Protect information stored on computers from unauthorized viewing and manipulation (integrity)

3. Deter and detect accidental or intention alterations of data

4. Verify genuineness of a transaction or document (authentication)

Encryption is limited in that it cannot prevent the loss of data and its programs can be compromised. Therefore, encryption should be regarded as an essential, but incomplete, form of access control that should be incorporated into an organisation’s overall computer security program.

Key elements of encryption systems include:

1. Encryption algorithm: A mathematically based function or calculation that encrypts / decrypts data

2. Encryption Keys: A piece of information that is used within an encryption algorithm (calculation) to make the encryption or decryption

3. Key length: A predetermined length for the key. The longer the key, the more difficult it is to compromise in a brute-force attack (an intruder launches an attack, using many of the password cracking tools available at little or no cost, on encrypted passwords to gain unauthorized access on an organisation’s network systems) where all possible key combinations are tried.

Effective encryption systems depend upon algorithm strength, secrecy and the difficulty of compromising a key, the existence of back doors by which an encrypted file can be decrypted without knowing the key, the ability to decrypt an entire cipher text message if the way a portion of it decrypts is known (called a known-text attack), and the properties of the plaintext known by a perpetrator.

Most encrypted transactions over the Internet use a combination of private / public keys, secret keys, hash functions (fixed values derived mathematically from a text message) and digital certificates to achieve confidentiality, message integrity, authentication and non-repudiation by either sender or recipient (also known as Public Key Infrastructure). This encryption process allows data to be stored and transported with reduced exposure, so a company’s corporate data are secure as they move across the Internet or other networks. There are two types of cryptographic systems: symmetric or private key, and asymmetric or public key cryptographic systems.

Private Key Encryption (Symmetric Cryptosystem):


Private Key cryptographic systems are based on a symmetric encryption algorithm, which uses a secret (private) key to encrypt the plaintext to the cipher text and the same key to decrypt the ciphertext to the corresponding plaintext. In this case the key is symmetric because the encryption key is the same as the decryption key.

The most common private key cryptographic system is the Data Encryption Standard (DES). DES is a standard encryption / decryption technique published by the US National Bureau of Standards (NBS) in 1977 (the predecessor of the US National Institute of Standards and Technology). DES is based on a public algorithm that operates on plaintext in blocks (strings or groups) of bits. This type of algorithm is known as a block cipher. DES uses blocks of 64 bits. A key of 56 bits is used for the encryption and decryption of plaintext. An additional 8 bits are used for parity checking. Any 56-bit number can be used as a key and there are 72,057,594,037,927,936 (i.e. 256) possible keys in the key space.

There are two main advantages to private key cryptosystems. The first is that the user has to use only one key for both encryption and decryption. The second is that private key cryptosystems are generally less complicated and therefore use up less processing power than asymmetric techniques. This makes private key cryptosystems ideally suited for bulk data encryption. The major disadvantage of this approach is how to get the keys into the hands of those with whom you want to exchange data, particularly in e-commerce environments, where customers are unknown, untrusted entities. Also, a symmetric key cannot be used to sign electronic documents or messages due to the fact that the mechanism is based on a shared secret.

Public Key Encryption (Asymmetric cryptosystem):


Public key cryptographic systems developed for key distributions solve the problem of getting symmetric keys into the hands of two people, who do not know each other, but who want to exchange information in a secure manner. Based on an asymmetric encryption process, two keys work together as a pair. One key is used to encrypt data; the other is used to decrypt data. Either key can be used to encrypt or decrypt, but once the key has been used to encrypt data, only its partner can be used to decrypt the data (even the key that used to encrypt the data cannot be used to decrypt it).

The keys are asymmetric in that they are inversely related to each other. Based on mathematical integer factorization, the idea is to generate a single product from two large prime numbers (viz. 100 digit prime numbers), where it is impracticable to factor and recover the two factors. This integer factorization process forms the basis for public key cryptography (i.e. function easy to compute in one direction, but very difficult or impractical in the other direction). The system involves modular arithmetic, exponentiation, and large prime numbers thousands of bits long. Since the keys are large numbers (e.g. 1024 bits), they are used for short messages such as encrypting symmetric keys or creating digital signatures.

A common form of asymmetric encryption is RSA. RSA is a public key cryptosystem for both encryption and authentication; it was invented in 1977 by Ron Rivest, Adi Shamir and Leonard Adleman (RSA stands for the initials of their last names). It works as follows: take two large primes, p and q, and find their product n = p x q; n is called the modulus. Choose a number, e, less than n and relatively prime to (p-1) x (q-1), which means that e and (p-1) x (q-1) have no common factors except 1. Find another number d, such that (ed–1) is divisible by (p-1) x (q-1). The values e and d are called the public and private exponents, respectively. The public key is the pair (n, e); and the private key is (n, d). The factors p and q may be kept with the private key, or destroyed.


It is extremely unlikely that one could obtain the private key d from the public key (n, e). if one could factor n into p and q, however, then one could obtain the private key d. Thus, the security of RSA is related to the assumption that factoring is difficult.

Generally, with asymmetric encryption, one key p the secret or private key – is known only to one person; the other key – the public key – is known by many people. In other words, a message that as been sent enciphered by the secret key of the sender can be deciphered by anyone with the public key, but could only have come from the sender. This forms the basis of authentication and nonrepudiation (i.e. the sender cannot later claim that he/she did not generate the message). A message that has been enciphered using the public key of the receiver can be generated by anyone, but can only be read by the receiver. This is the basis of confidentiality. A message that has been encrypted twice, first by the sender’s secret key and secondly by the receiver’s public key achieves both authentication and confidentiality objectives.

Data Integrity (Hash Algorithm):

A digital signature is an electronic identification of a person or entity by using a public key algorithm and intended to verify to a recipient the integrity of the data and the identity of the sender. To verify the integrity of the data, a cryptographic hashing algorithm is computed against the entire message, which generates a small fixed string message usually about 128 bits in length. This process, also referred to as a digital signature algorithm, creates a message digest (i.e. smaller extrapolated version of the original message).



This algorithm is a one-way function unlike private and public key encryption algorithms. The process of creating message digests cannot be reversed. They are meant for digital signature applications where a large electronic document or string of characters, such as a word processor text, a spreadsheet, a database record, the content of a hard disk or a jpg image, has to be compressed in a secure manner before being signed with the private key. The digest algorithm takes a message of arbitrary length and produces a 128-bit message digest.


Sender’s Authentication (Digital Signature):



The next step, which verifies the identity of the sender, is to encipher the message digest using the sender’s private key, which “signs” the document with the sender’s digital signature for message authenticity. To decipher, the receiver would use the sender’s public key, proving that the message could only have come from the sender. This process of sender authentication is known as nonrepudiation, because the sender cannot later claim that they did not generate the message.

Once decrypted, the receiver will recompute the hash using the same hashing algorithm on the electronic document and compare the results with what was sent to ensure the integrity of the message. Therefore, digital signature is a cryptographic method that ensures:



Data integrity – Any change to the plaintext message would result in the recipient failing to compute the same message hash.
Authentication – The recipient can ensure that the message has been sent by the claimed sender has the secret key.
Nonrepudiation – The claimed sender cannot deny generating and sending the message.


5 comments:

petewilliam said...

Very... Nicee... Blog.. I really appreciate it... Thanks..:-)

digital signature certificate said...

Really detailed enough blog but i personally feel that Digital signatures are mostly used for authentication purpose and we need to get digital signature certificate to create a digital signature and only authorised companies can issue this certificate

digital signature certificate said...

Really detailed enough blog but i personally feel that Digital signatures are mostly used for authentication purpose and we need to get digital signature certificate to create a digital signature and only authorized companies can issue this certificate

pranav teja said...

<gud morning sir.
In ISCA are the amended parts 4th and 8th chapters applicable for CA Final Nov 11

pranav teja said...

Pranav:::
sir are the amended parts of 4th and 8th chapters in ISCA are applicable for CA Final Nov 11