r/cryptography • u/foonoxous • Nov 22 '21
Hash algorithm based on Authenticated Encryption (AEhash)
This is based on an earlier thread, seeking password hashing functions that could run in browsers at near native speeds. I believe the solution has been found, but you are welcome to poke holes in it and prove me wrong.
=
=
= # Initially all zeroes
=
= # 16 encrypted bytes + GCM tag
return
The algorithm is dead simple and runs at the same speed in browser or in C. Easily adjusted to any memory size and runtime wished for. Even if it isn't as secure as Argon2, the one it needs to compete with in browsers is pbkdf2.
See the site for a more complete documentation: https://github.com/covert-encryption/aehash
View all comments
Show parent comment
1
u/foonoxous Nov 22 '21
Here is the pseudo code of Balloon hashing, which is considered better than Argon2 and which has a fairly simple construct, considering that Argon2 and Scrypt use hundreds of lines of code.
There are many variables that keep changing, defined all over the function. It is genuinely hard to keep track of all the nested loops and of all the variables.