I'm new to cryptography, and I'm confused about digital signatures.
How do they work? Please illustrate with an example in a way that a beginner can understand.
I'm new to cryptography, and I'm confused about digital signatures.
How do they work? Please illustrate with an example in a way that a beginner can understand.
While there are other answers on this site that walk through the maths of digital signatures, it can be difficult for people new to the field and to the maths to follow those answers. This is an attempt to bridge the gap in understanding.
There is only so far that a "beginner-level" answer can be provided because we are dealing with complex maths. So, permit a high-level explanation.
Alice writes a message
Alice creates a private and public key pair (this answer cannot go into the explanation of what these are - if you are stuck at this part, then you need to stop and read about these)
Alice creates a hash of the message (this answer also assumes that you know what a hash is)
Alice uses the hash and her private key to create a mathematical value called a signature (and that's as far that a beginner-level answer will go on this step)
Alice sends the message and the signature to Bob
Bob uses a "signature verification" process that includes creating a new hash of the message and Alice's public key as inputs.
"Signature verification" passes if Bob's hash of the message is the same as the hash Alice used when she signed the message, and if the public key matches Alice's private key.
Bob knows that the message was not changed since it was signed and that it was signed using Alice's private key.
This is a very high-level explanation of complex maths and there are a lot of subtleties in the processes that can change depending on the algorithms used.