10 Commits

Author SHA1 Message Date
Aorimn 72a9280550 Add AES-XTS enc/decryption implementation
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.
2016-01-31 16:04:52 +01:00
Robert Scheck eddf520ddb Avoid "error: expected declaration specifiers or '...' before 'off_t'" build failure on RHEL 5 2016-01-06 03:27:24 +01:00
Aorimn 909f4b7592 Give the real size to decrypt the keys
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).
2015-11-25 23:20:06 +01:00
Aorimn 455653e55f Begin to prepare for AES-XTS encryption
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).
2015-11-19 00:07:38 +01:00
Aorimn 1633b3d444 Trailing whitespaces cleaning, again
It seems like header files missed the whitespace cleaning, so fix it.
2015-04-25 18:26:14 +02:00
Aorimn b3754e80aa Move the crypt structure to a private header
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.
2015-03-14 17:05:07 +01:00
Aorimn 249fa2831e Remove metadata dependency in the decrypt.c unit
This seems to make no sense to put datums specific stuff into the
decrypt.c file.
2015-03-07 01:48:45 +01:00
Aorimn 2e2ae837e8 Move the io_data structure to the sectors.c unit
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.
2015-03-07 00:56:01 +01:00
Aorimn 0715a3693b Begin to create an encryption object
The decrypt.c unit file shouldn't know the io_data structure, it doesn't
really make sense for it to need it.
2015-03-07 00:41:01 +01:00
Aorimn a5d85f6264 Move includes into separate directory
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.
2015-03-04 23:35:25 +01:00