Digital Signatures - Generation Process
Update on July 07, 2021
In today's article we'll talk about the generation of digital signatures but, isn't about those that are created in the way that you write your signature on a white sheet and then with a smartphone, you take a photograph of the signature then it passes to a computer and saved; the signature can be placed on a contract or any other electronic document.
A digital signature is a cryptographic mechanism that encrypts a document or the content of a message in this way protects the signed documents or content to verify the authenticity of a record and demonstrate to the recipient that:
- The sender of the message is real (authentication).
- He can't deny that he sent the message (not repudiation).
- The message hasn't been altered since its issuance (integrity). Generally, there are three algorithms involved in the digital signature process:
- Key generation: This algorithm provides a private key along with its corresponding public key.
- Signature: This algorithm produces a signature upon receipt of a private key and the message being signed.
- Verification: This algorithm verifies the authenticity of the message by verifying it together with the signature and the public key.
The process of generating a digital signature requires the use of asymmetric keys for non-repudiation, for example:
- The customer writes hello.
- The client encrypts the word with the hash algorithm and they obtain this string of characters: b221d9dbb083a7f33428d7c2a3c3198ae925614d70210e28716ccaa7cd4ddb79
- The client encrypts the hash with his private key and gets this: 4d186321c1a7f0f354b297e8914ab240
- The client sends the word hello and the encrypted hash 4d186321c1a7f0f354b297e8914ab240 to the server as plain text.
- The server takes the public key from the client and decrypts the code 4d186321c1a7f0f354b297e8914ab240
- By decrypting the above code, you get the original hash b221d9dbb083a7f33428d7c2a3c3198ae925614d70210e28716ccaa7cd4ddb79
- The server takes the word hello and encrypts it using the hash algorithm obtaining: b221d9dbb083a7f33428d7c2a3c3198ae925614d70210e28716ccaa7cd4ddb79
- The server compares the hash sent by the client with the hash of the gender and if they match, then the server confirms that the client was the one who sent the message and that it did not change during transmission.