Open YellowOnion opened 6 years ago
The way Argon2 uses BLAKE2 (or rather BlaMka, a revision of BLAKE2b round function), the 64-bit variant is efficient even on 32-bit (and besides BlaMka is inherently 64-bit). BLAKE2s vs. BLAKE2b hashing speeds alone don't apply: here it's not so much about the speed of hashing data, but also about the speed of producing large hash outputs (so a round function taken from a larger-output hash wins).
You're comparing very different things and seeing a 50x performance difference, yet ask for something that, even if it were right, would be at most a 2x performance difference (it actually wouldn't be, for the reasons stated above). You need to look elsewhere. First native code for each platform. Then maybe NEON support.
looking at the BLAKE2 docs, it's designed for 64bit CPUs, Argon2 uses BLAKE2 internally, perhaps switching it out for BLAKE2s would make it more friendly on mobile devices that don't support 64bit properly.
I did some tests on my Krait 400 / Snapdragon 800 Phone, using KeePass & KeePass2Android (same code base), though it being in C#/Mono vs dotNET might effect performance, I'm getting about 50x slowdown over my i5 3570.