P-H-C / phc-winner-argon2

The password hash Argon2, winner of PHC
Other
4.74k stars 405 forks source link

Invalid Hash generated on Raspberry Pi 4 with latest 64 bit Linux deb 11 #329

Closed guil-g closed 2 years ago

guil-g commented 2 years ago

Hash generated does not match with argon2.online. Pls. help.

ufukty commented 2 years ago

I think if you share parameters you used for argon2.online and Linux, it would make it easier to people for helping you

guil-g commented 2 years ago

$ echo '123456789012345678901234567890' | argon2 salzwasser Type: Argon2i Iterations: 3 Memory: 4096 KiB Parallelism: 1 Hash: 2e38a5c031c9c5d2c55b11f2ef35724e8f9bca28a111f834196374ee210d398c Encoded: $argon2i$v=19$m=4096,t=3,p=1$c2Fsendhc3Nlcg$LjilwDHJxdLFWxHy7zVyTo+byiihEfg0GWN07iENOYw

$ uname -a Linux ras 5.10.63-v8+ #1459 SMP PREEMPT Wed Oct 6 16:42:49 BST 2021 aarch64 GNU/Linux

$ apt list argon2 Listing... Done argon2/stable,now 0~20171227-0.2 arm64 [installed] argon2/stable 0~20171227-0.2 armhf

Compiling from sources makes no difference.

ufukty commented 2 years ago

echo command appends a newline character at the end of string. Try with echo -n to disable that behaviour.

ufukty commented 2 years ago

Bash:

$ echo -n "123456789012345678901234567890" | argon2 "salzwasser" -i -t 3 -m 12 -p 1

Website:

Parallelism factor:1
Memory cost: 4096
Iterations: 3
Hash length: 32

Output is same:

$argon2i$v=19$m=4096,t=3,p=1$c2Fsendhc3Nlcg$VFoCUnJ9BRisFg0SLR2tBPoijHBvkNYL9WGlwPWstS0
guil-g commented 2 years ago

Thank you very much. This solved the issue.