In the last lecture, we talked about the digital signatures.
Now let us have a practical look at how digital signatures work.
The reason I have used graphics here and animations is for you to understand because I'm a man of practicality
and pragmatism and I believe in using practical things to demonstrate I'm not just going to write out
BOYENS and that you read them.
So again, this is our dear friend Bob.
He has a document and now he wants to send this document over email to Alice, obviously his friend,
and now he wants Alice to believe that Bob has signed the document.
Let's see, this is a contract and Bob has signed the contract.
So Bob has to attach his digital signature.
So how is the process?
So this is the original document.
OK, you're on the same page, everyone.
Now, what Bob does is Bob hashes this original document.
And even though the document is of five pages, 11 pages, 200 pages on one page, output of S.A.G.
256 is going to be of a fixed length.
So this is the hash of this document.
And now what Bob does is Bob and Grip's this hash with his own private key.
All right.
He's not going to encrypt it.
Alice's public key, because this time Alice wants to check if the document I have received is from
Bob's and if Bob has signed.
So if Alice is able to unlock this document or unlock this hash value with the help of Bob's public
key, then only she'll believe that this document has been sent over by Bob.
So, Bob, Bob does is Bob and this hash of this document.
So Bob and groups this hash of this original document here.
And what he does is he gets encrypted hash value, so and this is the digitally signed document, so
digitally signed a document is a combination of the original document and the encrypted hash.
So when you attach the original document, along with the encrypted hash and then send it over to someone
that is known as a digitally signed document.
OK.
Now, let's have a look at this scenario.
So now Alice has received the digitally signed document from Bob, and now Alice wants to know if Bob
is the one who has sent and signed the document.
So along with the digital sign document, she knows that it's a combination of original document and
it's a combination of encrypted hash.
As I told you a couple of minutes ago, that if not, this encrypted hash is this is an encrypted hatch.
So if she wants to get the original hash, she has to decrypt the hash.
Since Bob has encrypted this hash with his private key and we know that asymmetric encryption works
if something is encrypted with private key and decrypted it publicly or vice versa of the same person.
So now, since this hash is encrypted with Bob's private key, Alice has to find out his public key,
which is publicly available.
So what she does first is she has got the original document.
So she again uses the same as a 256 algorithm to generate a hash value.
OK, so now, Steve, she has this hash value over here.
And again, she uses Bob's public key to get the hash, which was sent by both of the original document.
So if these two hashes match.
OK, so if these two hashes match, then Alice can see that the document has been digitally signed by
document, obviously, because, see, this is the hash value of the document, which was first sent
by the Bob.
Let's go down to the back previous slide over here so we can see Bob has hash, the original document
over here, and this is the hash value, which he has encrypted.
So Alice is just following the reverse process of this.
She's just following the reverse process of what Bob had done earlier.
So this is very this is the way in which digital signatures work.
And if these two hash values are exactly the same, we can see that Bob is the one who has signed the
document digitally.
I hope my explanation with graphics was pretty clear, if you if you have any doubts, please feel free
to ask.
I will be happy to answer your questions.
And if not, I don't think will get a pretty clear explanation out there about digital signatures.
But this is the best possible explanation that I've given to you.
All right.
So in the next lecture, we'll talk about SSL.
That is secure sockets layer.
I will see you in the next lecture.