Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786372 - sys-fs/cryptsetup[-argon2] fails to work by default, as the default KDF is still set to argon2
Summary: sys-fs/cryptsetup[-argon2] fails to work by default, as the default KDF is st...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-28 07:57 UTC by Hector Martin
Modified: 2021-04-28 08:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hector Martin 2021-04-28 07:57:55 UTC
When building sys-fs/cryptsetup-2.3.4 (and 2.3.5) with -argon2, the default PBKDF function for LUKS2 is still set to argon2. This means a plain `cryptsetup luksFormat` always fails with an obscure error, as tries and fails to use the missing argon2 support:

# cryptsetup luksFormat /dev/foo

WARNING!
========
This will overwrite data on /dev/foo irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /dev/foo:  
Verify passphrase:  
Not compatible PBKDF options.
Requested maximum PBKDF memory cannot be zero.

The ebuild should pass --with-luks2-pbkdf=pbkdf2 when the argon2 USE flag is disabled, so that it is built with working defaults.

This is related to #641182, but that fix was incomplete. The ebuild should be +argon2 by default indeed, but if disabled by the user, the default algorithm should also be changed to keep things working.
Comment 1 Larry the Git Cow gentoo-dev 2021-04-28 08:22:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6b4747fd6f5917f28a1756a24f9760f49813fbb

commit d6b4747fd6f5917f28a1756a24f9760f49813fbb
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-04-28 08:19:58 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-04-28 08:21:58 +0000

    sys-fs/cryptsetup: Revbump to fix default pw-hashing with USE="-argon2"
    
    Thanks-to: Hector Martin <marcan@marcan.st>
    Closes: https://bugs.gentoo.org/786372
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 .../cryptsetup/{cryptsetup-2.3.4.ebuild => cryptsetup-2.3.4-r1.ebuild}   | 1 +
 .../cryptsetup/{cryptsetup-2.3.5.ebuild => cryptsetup-2.3.5-r1.ebuild}   | 1 +
 2 files changed, 2 insertions(+)