0
$\begingroup$

AES needs a key in order to work, hashing-algorithms do not. Suppose we have a fixed key for AES, why don't we simply hash our keys with that?

As with hash functions, AES has arbitrary input size, fixed output size and reasonable computation time. And if the fixed key can be kept safe, it is computationally infeasible to get the original key. So why do we need hash functions at all, then?

$\endgroup$
  • $\begingroup$ With a hash, there's no key that needs to be kept safe... $\endgroup$ – poncho Jun 19 at 19:32
  • 1
    $\begingroup$ Yes, replace the internal block cipher of SHA-2 with AES, done :). Note that AES doesn't have an arbitrary input size. AES is a primitive and one needs a mode of operation to encrypt. $\endgroup$ – kelalaka Jun 19 at 19:49
  • 1
    $\begingroup$ Then someone who got the key could decrypt all the passwords? $\endgroup$ – user253751 Jun 19 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.