A digital signature has the same function as that of a handwritten signature.

But, understanding how a digital signature is created and how it achieves the same functionality as that of a handwritten signature is by no means as easy task. This is because the technical concepts involved in creating a digital signature seem far removed from the realm of law, although the objective of affixing digital signature to an electronic record is purely legal!

Digital signatures are an applications of asymmetric key cryptography. Here we will discuss symmetric, asymmetric key cryptography. Also details on how asymmetric key cryptography can be used to create a digital signature.

Cryptography has a long and interesting history. Cryptography is primarily used as a tool to protect national secrets and strategies. It is extensively used by military, the diplomatic services and the banking sector. One of the landmark developments in the history of the cryptography was the introduction of the public key cryptography.

In 1978, Ron Rivest, Adi Shamir and Leonard Adleman discovered the first practical public-key encryption and signature scheme, now very well known as RSA.

RSA algorithm is a block cipher technique in which plain text and cipher text are integers between “0” and “n-1” from some n.

In RSA algorithm encryption and decryption are of following form, for some plain text M and cipher text C:

`C = M^e mod n`

`M = C^d mod n`

Both sender and receiver must know the value of “n”. The sender knows the value of “e” and only receiver knows the value of “d”. Thus, this is a public-key encryption algorithm with a public key of KU={e, n} and private key of KR={d, n}. For the algorithm to be satisfactory for public-key encryption, the following requirement must be met

- It is possible to find values of e, d, n such that M^ed = M mod n for all M<n.
- It is relatively easy to calculate M^e and C^d for all values of M<n.
- It is infeasible to determine d given e and n.