One is bound to come across this term if they read up on cryptocurrency security or how it works. This is an essential part of cryptography which makes up one of the building blocks of cryptocurrencies.
A digital signature using public-key cryptography is considered a vital and useful tool to achieve information security. Additionally, it also provides message authentication and data integrity while reducing the risk of duplication or alteration of the document itself. Digital signatures ensure that signatures are verified, authentic, and legitimate.
To best explain it, digital signature is a process that guarantees that the contents of a message have not been altered in transit. When you, the server, digitally sign a document, you add a one-way hash (encryption) of the message content using your public and private key pair. The process below carefully narrates how digital signature fits into the cryptography equation.
|– Each person adopting this scheme has a public-private key pair.|
|– Generally, the key pairs used for encryption/ decryption and signing/ verifying are different. The private key used for signing is referred to as the signature key and the public key as the verification key.|
|– Signer inputs data to the hash function and generates a hash of data. A cryptographic hash function is basically a mathematical equation. In other words, it’s a formula with a set of specific properties that make it extremely useful for encryption, especially one-way hash functions that cannot be reverse-engineered.|
|– Hash value and signature key are then fed to the signature algorithm which produces the digital signature on the given hash. Signature is appended to the data and then both are sent to the verifier.|
|– The verifier feeds the digital signature and the verification key into the verification algorithm. The verification algorithm gives some value as output.|
|– Verifier also runs the same hash function on received data to generate a hash value.|
|– For verification, this hash value and output of the verification algorithm are compared. Based on the comparison result, the verifier decides whether the digital signature is valid.|
|– Since the digital signature is created by the ‘private’ key of the signer and no one else can have this key; the signer cannot repudiate signing the data in the future.|
Ultimately, by adding public-key encryption to the digital signature scheme, we can have a cryptosystem that offers the four essential elements of security which are − privacy, authentication, integrity, and non-repudiation.