0% found this document useful (0 votes)
12 views

Hashing Digital Signature

Uploaded by

ksab03677
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Hashing Digital Signature

Uploaded by

ksab03677
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Hashing & Digital Signature

Hashing and Digital Signatures:

1. What is Hashing?

Hashing is a process where you convert data (like a file or message) into a fixed-
size string of characters, which usually looks like random letters and numbers.
This string is called a hash or hash value.

Why is hashing used?

It's used to ensure data integrity, meaning it helps check if the data has been
changed or tampered with. Even a small change in the input data will result in a
completely different hash.

Hashing is used in various security systems, such as storing passwords securely.

How hashing works:

You take any data (like a file, message, or password) and run it through a hashing
algorithm (e.g., SHA-256, MD5).

The algorithm generates a hash value of fixed length (e.g., SHA-256 gives a 64-
character output).
This hash value is like a fingerprint of the data. If you change the data slightly, the
hash changes completely.

Example of Hashing:
Let's say we have the word "hello".
Hashing with SHA-256 could result in something like:
"hello" →
"2cf24dba5fb0a30e26e83b2ac5b9e29e1b1698b68d4f201aa17d1b19799fbc63"
If you change the word to "Hello" (note the capital 'H'), the hash will be
completely different:
"Hello" →
"8b1a9953c4611296a827abf8c47804d7d4f2e61c7f3f7f8b65e7cf9c29c4fd99"

Hashing & Digital Signature 1


Important Point:
Hashing is a one-way process. You cannot take a hash and convert it back to the
original data.

1. What is a Digital Signature?

A digital signature is like a handwritten signature, but it uses encryption and


hashing to verify the identity of the sender and the integrity of the message. It
ensures that the message has not been altered and comes from the stated
sender.

How Digital Signatures Work:

When someone wants to send a secure message, they first hash the message
using a hashing algorithm (like SHA-256).
They then encrypt the hash using their private key. This encrypted hash is the
digital signature.
The recipient can use the sender's public key to decrypt the signature and obtain
the hash.
The recipient then hashes the received message and compares it to the
decrypted hash. If they match, it confirms that the message is intact and came
from the sender.

Why are Digital Signatures Important?


Authentication: Verifies that the sender is who they say they are.

Integrity: Ensures that the message hasn’t been changed during transmission.
Non-repudiation: The sender cannot deny sending the message because only
they could have created the signature using their private key.

Example of a Digital Signature Process:

1. Sender's Side:

Message: "Hello, this is a secure message."


Hash the message: Using SHA-256, we get a hash value like:

2cf24dba5fb0a30e26e83b2ac5b9e29e1b1698b68d4f201aa17d1b19799fbc63

Hashing & Digital Signature 2


Encrypt the hash with private key: The sender uses their private key to encrypt
the hash and create the digital signature.

1. Receiver's Side:

The receiver gets the message and the digital signature.

They hash the received message and decrypt the digital signature using the
sender's public key.
If the decrypted hash matches the hash of the received message, the receiver
knows the message is authentic and hasn’t been altered.

Summary of Differences:
Hashing: A one-way function that produces a fixed-size output from any input. It's
used to ensure data integrity.
Digital Signature: A combination of hashing and encryption, used to verify the
authenticity and integrity of a message.

Key Takeaways:
Hashing is used to create a fingerprint of data, ensuring it hasn’t been altered.
Digital signatures provide a secure way to verify both the identity of the sender
and the integrity of the message.

The combination of hashing and encryption in digital signatures makes them


highly secure and trusted for data verification.

Visual Representation:

1. Hashing:

Input Data (Message/File) → Hashing Algorithm → Hash Value

1. Digital Signature:

Input Message → Hashing Algorithm → Hash Value


Hash Value → Encrypt with Private Key → Digital Signature

Receiver: Decrypt with Public Key → Compare with Hash of Received Message

Hashing & Digital Signature 3


By breaking down these processes into simple steps, you can see that both
hashing and digital signatures are vital components of modern-day security
systems!

Hashing & Digital Signature 4

You might also like