This adds functions which call the mbedtls_aes_crypt_xex function. This
function isn't available yet in mbedTLS, so this is of no use for common
users.
The bright side is, when it's available, it will be supported in
dislocker. A future commit will test for the maybe-existing function and
use our own implementation if it's not existing.
When decrypting keys (VMK or FVEK mainly), we gave 256 as of the key
size. This worked until now but I suspect that was mainly by the chance
that the current keys always are 256 bits long.
With the XTS mode, it seems the keys sizes have to be doubled, so that
would also prepare for the AES-XTS-256 mode, where keys could be 512
(I'm not sure yet).
AES-XTS is the new encryption scheme available on Windows 10 (from the
1511 version).
Moreover, this commit remove a branching case which often happens, which
should give beter performances (not tested though).
The crypt structure, representing an encryption object is now private.
We use the .priv.h convention for a private header. This private header
is thus named encommon.priv.h and can be used only by the encryption/
directory units.
The io_data structure, as stated in the previous commit, shouldn't be
known to the encryption unit. This structure is mainly used by
dislocker.c and sectors.c, so it make sense to put it in the sectors.h
file.
This adds an include/ directory from which includes files will be. Each
header is now moved to this directory, in the same sub-directory it was
in.
Each #include has been changed accordingly in order not to break
compilation.