2
$\begingroup$

I want to do block level encrypton on my ext4 image file system with aes-cbc-essiv

How can I find/calculate the the ESSIV needed for encryption?

$\endgroup$
1
$\begingroup$

Wikipedia has this documented.

Essentially: Let $\text{SN}$ by the current sector number encoded as a 128-bit integer. Let $K$ be the key used for encryption. Let $\operatorname{hash}(\cdot)$ be a hash function, which is specified in the cipher name.

Now the $\text{IV}$ is computed as $\operatorname{IV}(\text{SN})=E_{\operatorname{hash}(K)}(\text{SN})$.

The relevant code can be found for the key-calculation and for the actual IV.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.