Commit 9d7cc152 authored by Ondrej Kozina's avatar Ondrej Kozina Committed by Milan Broz

Do not enforce iv_tweak alignment in LUKS2 validation.

1) iv_tweak is not in 'bytes'
2) it may be arbitrary number
3) there's no reason to enforce alignment to encryption sector size

Fixes #406.
parent 3f73d448
......@@ -544,11 +544,6 @@ static int hdr_validate_crypt_segment(json_object *jobj, const char *key, json_o
!json_str_to_uint64(jobj_ivoffset, &ivoffset))
return 1;
if (ivoffset % sector_size) {
log_dbg("IV offset field has to be aligned to sector size: %" PRIu32, sector_size);
return 1;
}
if (size % sector_size) {
log_dbg("Size field has to be aligned to sector size: %" PRIu32, sector_size);
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment