cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
481
Views
0
Helpful
4
Replies

what is the defference between hashing and encryption

hanyawad
Level 1
Level 1

dear expers,

i'd like to know the defference between the hashing functions and encryption functions, which one performed first on the data, because i've read some of the protocols that perform hashing and others that perform encryption and very confused by them, thanks alot for your reply and help, i appreciate your urgent reply. thanks...

4 Replies 4

Collin Clark
VIP Alumni
VIP Alumni

The wording can make things confusing. See if the explaination at the link below helps.

http://en.wikipedia.org/wiki/Cryptographic_hash_function

dear collin clark,

thanks alot for your reply, but when i'm reading the topic ( Understanding How RSA Works) i've encountered some math i didn't understood like this paragraph: We begin by selecting two distinct large random prime numbers p and q. Next we compute

n=pq, where n is used as a modulus for both the public and private keys. Then we compute

the totient using the formula φ(n)=(p-1)(q-1).

Next we choose an integer e such that 1<φ(n), and e and φ(n) share no factors other than

1 (coprime). The public key exponent that is released is e. You compute d to satisfy the

congruence relation as de=1(mod φ(n)). The private key exponent is d.

The public key consists of the modulus n and the public (or encryption) exponent e. The

private key consists of the modules n and the private (or decryption) exponent d that must

always remain secret. would you mind please recommending me some materials explain to me these formulas or math principals of these calculations, thanks alot for you help

I'm not a math major so I can't walk you though the formula :-), however I think some of the following links may help.

http://fringe.davesource.com/Fringe/Crypt/RSA/Algorithm.html

http://en.wikipedia.org/wiki/RSA

http://www.cacr.math.uwaterloo.ca/hac/ (specifically Ch. 8)

Panos Kampanakis
Cisco Employee
Cisco Employee

You can think hashing as a digest of the message. It is a short digest using a key. More than one messages can potentially give out the same hash output.

Encryption on the other hand (publick key or shared key) is a complete coding of the message. It completely hides and obfuscates the messages and only knowing the keys can get you back the original one.

Encryption is used to hide the mesaage whereas hashing is used to summarize and prove that the guy the claims to have sent it indeed had it and knows the hash.

I hope it is a little more intuitive now.

PK