Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

The Linux kernel supports symmetric and asymmetric hash functions. E.g. sha1, sha256, ...

See tcrypt.c and search for test_hash_speed and test_ahash_speed.

I know what the difference is between symmetric and asymmetric ciphers, where the encryption and decryption key is not the same.

Question

What is the difference between symmetric and asymmetric hash functions?

share|improve this question
1  
Can you provide some source for that claim? I've never heard of asymmetric hash functions. Hashes like SHA-x are unkeyed and symmetric. –  CodesInChaos Dec 30 '12 at 18:00
1  
There is symmetric(AES) and asymmetric(RSA) encryption. And there is symmetric authentication(MAC) and asymmetric authentication(RSA signatures). Many authentication schemes use hashes, but they aren't hashes. –  CodesInChaos Dec 30 '12 at 18:01
1  
That isn't about asymmetric hashes, but about asynchronous implementations of symmetric hashes. The code doesn't contain the word asymmetric anywhere. | Async in that context means that you order some computation, then do something else, and once the computation is finished(probably on another thread) you receive the result. –  CodesInChaos Dec 30 '12 at 18:45
add comment

2 Answers

up vote 6 down vote accepted

Hashes like SHA-x are symmetric and unkeyed. I have never heard of asymmetric hashes.

Your question is based on a misunderstanding. You can implement computations in an asynchronous fashion, where you request some computation, then your thread is free to do something else, and at some later point when the computation is finished you do something with the result. The code file you link implements hash functions in an asynchronous fashion.

Async/asynchronous and asymmetric are not related in any way.

share|improve this answer
add comment

It is probably not the case of your example, but in some sense "asymmetric hash functions" do exists: they are called trapdoor hash functions (or also chameleon hash functions).

Very briefly, they are collision resistant only if you don't know their trapdoor secret key. Such functions take 2 arguments (instead of the usual one), and the second argument is used as randomness.

So, without the trapdoor secret key it is infeasible to find 2 "messages" $m_1,m_2$ and 2 randomness values $r_1,r_2$ such that $H(m_1,r_1)=H(m_2,r_2)$; while, with the trapdoor key, you can efficiently compute (for any given triple $m_1,m_2,r_1$) a value $r_2$ such that $H(m_1,r_1)=H(m_2,r_2)$.

Hope this is clear enough. If you want, you can also see this article by Shamir and Tauman or this one by Krawczyk and T Rabin

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.