t-d-k / LibreCrypt

LibreCrypt: Transparent on-the-fly disk encryption for Windows. LUKS compatible.
https://LibreCrypt.tdksoft.co.uk
740 stars 71 forks source link

Update crypto libs for AES-NI support #4

Open fr3aker opened 10 years ago

fr3aker commented 10 years ago

Currently libtomcrypt is used for AES encryption. However, it is very old and does not support the AES-NI instruction set. An alternative library is eg the Gladman AES implementation (some implementations by Gladman seem to be already used for something): http://www.gladman.me.uk/AES

Alternatively it might be worth considering using a widely-spread crypto library like gcrypt or openssl that is well reviewed and can be expected to be updated/maintained in the future.

t-d-k commented 10 years ago

The Gladman library is an option for several ciphers including AES and twocrypt. To use a Gladman implementation, use the 'load driver' dialog to uninstall the 'lts'(libtomcypt) driver, then install the Gladman one found under 'alternate_drivers'. In the next release I'll make the Gladman ones the default. The issue with replacing all the ciphers with Gladman ones is that the cipher code needs to be wrapped in a windows driver using an interface derived from the tomcrypt library, this can be done but obviously takes time. Libtomcrypt still has no known bugs, so while I agree the other drivers should be replaced with the Gladman implementations, it's not urgent. AFAICT the OpenSSL library doesn't support the xts cipher mode; I'll look into gcrypt.

fr3aker commented 9 years ago

It seems the gladman libraries currently used are quite old versions that need updating before AES-NI will work.

t-d-k commented 9 years ago

Thanks for letting me know. I'll leave this issue open until they have been updated.

t-d-k commented 9 years ago

Hi @linux-modder, I'm not sure why you closed this, since this enhancement clearly isn't done yet? I'd rather leave issues open till they're resolved as a reminder they need to be done.