<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-cryptsetup does not allow a hash type of "plain""
href="https://bugs.freedesktop.org/show_bug.cgi?id=56593">56593</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemd-cryptsetup does not allow a hash type of "plain"
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>a08198uym0921c0981@mailinator.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>Running systemd-cryptsetup with "hash=plain" in the fifth (comma-delimited)
parameter for a plain dm-crypted disk yields the error message "Failed to
activate: Invalid argument."
Replacing "plain" with "ripemd160" or another supported hash function works as
expected. Removing the hash open from the list entirely just causes the default
hash type to be used (in my case, ripemd160).
This contradicts the crypttab and cryptsetup man pages. crypttab defers to the
cryptsetup page for supported values of "hash," and cryptsetup mentions (albeit
closer to the bottom of the page, under "NOTES ON PASSPHRASE PROCESSING FOR
PLAIN MODE") that "if 'plain' is used as argument to --hash, the input data
will not be hashed," which implies that plain is a valid option.
Indeed, without supporting plain as an option, any disks or partitions set up
initially with cryptsetup using --key-file=/myfile.key (for plain dm-crypt and
not LUKS) do not seem to be decrypt-able, as cryptsetup will not apply a hash
to the key in this instance, but systemd-cryptsetup must apply the hash.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>