From: "Arno Wagner" <arno@xxxxxxxxxxx> Date: 06/10/16 12:04 Hi, > the block size is always 512 bytes for cryptsetup. The > tweak is, I think, the block-number as counted from the > offset. > > You can read the key and offset as described in FAQ Item 6.10. I've looked at sections 6.10/11/12 but could not come up with a clear definition. crypsetup loopaes.c has: int LOOPAES_parse_keyfile(struct crypt_device *cd, struct volume_key **vk, const char *hash, unsigned int *keys_count, char *buffer, size_t buffer_len) { [ ... ] return hash_keys(cd, vk, hash, keys, key_index, crypt_get_volume_key_size(cd), key_len); } hash_keys(...) has: hash_name = hash_override ?: get_hash(key_len_output); tweak = get_tweak(keys_count); While get_tweaks(keys_count) is: static unsigned char get_tweak(unsigned int keys_count) { switch (keys_count) { case 64: return 0x55; case 65: return 0xF4; default: break; } return 0x00; } It seems that the tweak value can only be either 0x66 or 0xF4, or 0 ... does that makes sense ? Thanks. _______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx http://www.saout.de/mailman/listinfo/dm-crypt