6
$\begingroup$

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?

$\endgroup$
3
  • 1
    $\begingroup$ Can you provide some source for that claim? I've never heard of asymmetric hash functions. Hashes like SHA-x are unkeyed and symmetric. $\endgroup$ Dec 30, 2012 at 18:00
  • 1
    $\begingroup$ 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. $\endgroup$ Dec 30, 2012 at 18:01
  • 1
    $\begingroup$ 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. $\endgroup$ Dec 30, 2012 at 18:45

2 Answers 2

6
$\begingroup$

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.

$\endgroup$
11
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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