FS#20412 - [truecrypt] does not detect HW acc. AES support

Attached to Project: Arch Linux
Opened by Peter Kerwien (pkerwien) - Sunday, 08 August 2010, 21:13 GMT
Last edited by Paul Mattal (paul) - Wednesday, 06 July 2011, 11:21 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I installed truecrypt-7.0-1 on a i5-520M laptop, and TC's benchmark test showed that HW acc. AES was not used. I then downloaded the truecrypt-7.0-linux-x64.tar.gz from their website and unpacked it. When I execute their binary I have HW acc. AES crypto. No other change made.

I then tried to build my own truecrypt package via ABS, but that fails with the error:

$ makepkg -s
==> Making package: truecrypt 7.0-1 (Sun Aug 8 23:08:39 CEST 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==> ERROR: truecrypt_7.tar.gz was not found in the build directory and is not a URL.

Do I have to manually download truecrypt_7.tar.gz? If yes, from where?

Additional info:
* truecrypt-7.0-1 (x86_64)

Steps to reproduce:

- Install truecrypt on a Intel i5-520M or any other HW acc. AES CPU. Run the TC benchmarks. The AES performance should be approx. 6 times faster than Twofish.
This task depends upon

Closed by  Paul Mattal (paul)
Wednesday, 06 July 2011, 11:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 7.0a-3.
Comment by Alphazo (alphazo) - Thursday, 19 August 2010, 20:36 GMT
Confirmed on i5 M540 as well. Just to make sure I uninstalled Truecrypt 7.0 and installed Truecrypt 6.3 which doesn't support hardware AES. Results were similar and time to copy a 2.2GB file to an encryted EXT3 volume was identical on both versions, around 90 seconds.

As a side note, when formating the encrypted volume with EXT4 (only available on TC7.0) I get much better performance, 57s (cp + sync) vs 54s (no encryption) and thus with using AES-NI instruction!
Comment by Paul Mattal (paul) - Sunday, 09 January 2011, 17:18 GMT
Is this still an issue in 7.0a-2?
Comment by Peter Kerwien (pkerwien) - Sunday, 09 January 2011, 17:57 GMT
I built 7.0a-2 from PKGBUILD in trunk and installed it. Sorry, but I still ses the same result: It says N/A on AES HW acc. And when running the benchmarks (5MB data) with potential HW acc. enabled, I get ~220MB/s on AES with this package. The binary install from Truecrypt's website, is getting me ~1.5GB/s. So AES is not HW acc.
Comment by Peter Kerwien (pkerwien) - Sunday, 06 March 2011, 09:29 GMT
I think the problem relies in the CPU detection. The lines in the Makefile:

ARCH = $(shell uname -p)
ifeq "$(ARCH)" "unknown"
ARCH = $(shell uname -m)
endif

ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH)))
CPU_ARCH = x86
ASM_OBJ_FORMAT = elf32
else ifneq (,$(filter x86_64 x86-64 amd64 x64,$(ARCH)))
CPU_ARCH = x64
ASM_OBJ_FORMAT = elf64
endif

will not detect my CPU as a amd64 CPU due to the result from uname -p, which in my case is: "Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz"

Modifying the Makefile, forcing it to set CPU_ARCH = x64 will produce a binary which supports HW acc. AES coding.
Comment by Alphazo (alphazo) - Sunday, 06 March 2011, 15:15 GMT
Great... I hope the maintainer can update the package.
Comment by Paul Mattal (paul) - Wednesday, 06 July 2011, 02:02 GMT
Thanks, Peter.

A patch for this is in 7.0a-3. Can someone confirm it is working for them? Seems to be working for me on x86_64.
Comment by Peter Kerwien (pkerwien) - Wednesday, 06 July 2011, 05:36 GMT
Works for me too on x86_64.

Loading...