[dm-crypt] Variable data offset for a LUKS volume that uses a detached header.

Milan Broz gmazyland at gmail.com
Wed Dec 23 11:50:30 CET 2015

On 12/23/2015 09:39 AM, .. ink .. wrote:
>> Hmm. What about actually shifting the partition contents physically?
> The current problem is not on the data offset,but it is on IV offset.
> LUKS API allows setting of data offset and i got it to accept 256
> sector offset by removing the
> current restriction that forces the offset to be either zero or larger
> that header
> size.

Yes but LUKS header does not have attribute for storing IV offset.
New format will allow it, so we can think about using the new header
as "a generic key storage".
(In fact if there is enough space on device we can convert the device metadata
in-place. But that's future...)
> Currently,LUKS API does not have an option to set IV offset and my problem would
> be solved if the API is introduced.

I really do not want to workaround problems in other software by introducing
hacks in current version of LUKS.

If you really want this, you can use existing API (open LUKS device/header,
get volume key, open device again in PLAIN mode and use the parameters).
Should be few lines of code.


More information about the dm-crypt mailing list