libxcrypt icon indicating copy to clipboard operation
libxcrypt copied to clipboard

Argon2

Open grinapo opened this issue 4 years ago • 13 comments

I have observed that a search for "argon2" didn't come up with anything relevant in the issue tracker (apart from honourable mentions in a yescrypt discussion), which is pretty much a surprise to me.

Is there any plans to have Argon2 supported? It seems to be one of the most recommended pwhash nowadays, obviously heavily influeced by the PHC.

grinapo avatar May 11 '20 20:05 grinapo

Huh, I thought we already had an open wishlist item for argon2 but I guess we don't.

We would certainly consider a patch or PR to add argon2. The main reasons I haven't done it already are lack of time and the fact that the reference implementation is a fairly bulky library.

zackw avatar May 11 '20 20:05 zackw

We would certainly consider a patch or PR to add argon2. The main reasons I haven't done it already are lack of time and the fact that the reference implementation is a fairly bulky library.

Well, given the circumstance that cryptsetup already interfaces libargon2.so (reference implementation), wouldn't it make sense, when we would do the same instead of bundling?

besser82 avatar May 12 '20 09:05 besser82

2 cents:

  • the argon2 RFC is not finalized yet, I would wait until that's the case.
  • embedding would avoid a dependency, but, as long as libargon2 could be selected via configure flag I guess it i not a big deal to have it as a dep.

simo5 avatar May 12 '20 12:05 simo5

NETBSD added Argon2 algo to its crypt(3) btw: https://netbsd.gw.com/cgi-bin/man-cgi?crypt++NetBSD-current

SomeAB avatar Aug 17 '20 20:08 SomeAB

I'd be fine with libxcrypt growing an optional runtime dependency on libargon2.so, but is there a second independent implementation of Argon2 yet? This is desirable for verifying interoperability.

zackw avatar Aug 18 '20 15:08 zackw

The Argon2 draft RFC is in a late stage of the IRTF process and does not appear to have changed very much in some time. In particular the test vectors have not changed since draft-irtf-cfrg-argon2-02 which was published in March 2017. So I think the risk of implementing something incompatible, if we go ahead before the RFC is published, is quite low.

zackw avatar Aug 18 '20 15:08 zackw

Cryptsetup uses Argon2, KeePassXC uses Argon2, but shadow stores my root password as SHA512 by default. To get Argon2 support started, I have created a branch with it: https://github.com/besser82/libxcrypt/pull/113

Feel free to give me feedback!

ferivoz avatar Oct 10 '20 11:10 ferivoz

The RFC has been published last month.

mgorny avatar Oct 21 '21 06:10 mgorny

Link to the RFC: https://datatracker.ietf.org/doc/rfc9106/ Regarding the default work factors, OWASP also has pretty decent recommendations and might be worth taking a look. Or maybe something could be detected during the runtime like many password managers do.

oittaa avatar Apr 25 '22 04:04 oittaa

Anything new on this or the PR? Argon2 seems like a natural choice, given that it probably receives most scrutiny now.

calestyo avatar Nov 06 '22 03:11 calestyo

I'd be fine with libxcrypt growing an optional runtime dependency on libargon2.so, but is there a second independent implementation of Argon2 yet? This is desirable for verifying interoperability.

#150 seems to support an alternative implementation, although it looks abandoned.

rathann avatar Jun 22 '23 09:06 rathann

I'd be fine with libxcrypt growing an optional runtime dependency on libargon2.so, but is there a second independent implementation of Argon2 yet? This is desirable for verifying interoperability.

#150 seems to support an alternative implementation, although it looks abandoned.

If you are referring to the GitHub repos being archived, they have not been abandoned but have been migrated to https://codeberg.org/maandree.

maandree avatar Jun 22 '23 10:06 maandree

That's great. Thanks for letting us know the projects are still alive. @besser82 any chance of merging either this or #150 any time soon?

rathann avatar Jun 22 '23 10:06 rathann