You are not logged in.

#1 2014-03-10 05:55:00

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 55
Website

How can one use an encrypted root with a cipher containing a colon?

How can one use an encrypted root where the cipher name contains a colon? For example, I am using plain dm-crypt with --cipher cipher:cipher_hash (where cipher_hash is the cipher's hash function), but using this in the kernel command line results in a fatal error because it uses ":" as a delimiter, as well, and expects only 5 arguments:

Verify parameter format: crypto=hash:cipher:keysize:offset:skip
Non-LUKS decryption not attempted...

Kernel command line:

rw root=/dev/mapper/root cryptdevice=/dev/by-id/foo:root crypto=hash:cipher:cipher_hash:keysize:offset:skip

It seems the initramfs code just checks if there are 5 arguments, which does not allow for cipher options that have a colon in them to name the hash function.

Is this a bug? If not, how should I do this?

Offline

#2 2014-03-10 06:40:49

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: How can one use an encrypted root with a cipher containing a colon?

'mkinitcpio -H encrypt' does not say anything about a kernel command line parameter 'crypto='.

Offline

#3 2014-03-10 08:49:59

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 55
Website

Re: How can one use an encrypted root with a cipher containing a colon?

It is undocumented there, as far as I can tell. I only found it on the wiki here and in the source code.

It does work for ciphers without colons in the name.

Last edited by cdown (2014-03-10 08:50:26)

Offline

#4 2014-03-10 09:33:42

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: How can one use an encrypted root with a cipher containing a colon?

Someone recently said you could escape it with \:, but I am not sure if that's correct.

Offline

Board footer

Powered by FluxBB