# [SOLVED] TrueCrypt 6.1 mount fails with device-mapper error

## aryaniae

I installed TrueCrypt 6.1 from the deb file available at truecrypt.org. TrueCrypt can create volumes apparently successfully, but when I try to mount a volume TrueCrypt gives me the errors below.

```
device-mapper: reload ioctl failed: Invalid argument

Command failed
```

```
device-mapper: table: 253:0: crypt: Error allocating crypto tfm

device-mapper: ioctl: error adding target to table
```

The TrueCrypt volume is a file container using AES-Twofish cipher and Whirlpool hash. Using AES cipher and SHA-512 hash the errors remain the same. According to [SOLVED] - crypt: Error allocating crypto tfm at RTFM, the "Error allocating crypto tfm" error indicates that the kernel doesn't support one of the ciphers, but AES, Twofish, Whirlpool, and SHA-512 are all built in to my kernel.

```
CONFIG_CRYPTO=y

CONFIG_CRYPTO_SHA512=y

CONFIG_CRYPTO_WP512=y

CONFIG_CRYPTO_TWOFISH=y

CONFIG_CRYPTO_TWOFISH_COMMON=y

CONFIG_CRYPTO_TWOFISH_X86_64=y

CONFIG_CRYPTO_AES=y

CONFIG_CRYPTO_AES_X86_64=y
```

```
name         : aes

driver       : aes-generic

module       : kernel

priority     : 100

refcnt       : 1

type         : cipher

blocksize    : 16

min keysize  : 16

max keysize  : 32

name         : twofish

driver       : twofish-asm

module       : kernel

priority     : 200

refcnt       : 1

type         : cipher

blocksize    : 16

min keysize  : 16

max keysize  : 32

name         : wp512

driver       : wp512-generic

module       : kernel

priority     : 0

refcnt       : 1

type         : digest

blocksize    : 64

digestsize   : 64

name         : sha512

driver       : sha512-generic

module       : kernel

priority     : 0

refcnt       : 1

type         : digest

blocksize    : 128

digestsize   : 64
```

What could cause the "Error allocating crypto tfm" error other than missing algos in the kernel? Could this problem be caused by the fact I used a Debian package on a Gentoo system? As soon as I post this I'll install TrueCrypt 6.0a from Portage and see if that works better.Last edited by aryaniae on Mon Dec 01, 2008 10:15 am; edited 1 time in total

----------

## treysis

i think you're missing xts algorithm. this is used as the block-cipher-mode, so i assume you need to have this one compiled, too.

----------

## aryaniae

Adding the XTS cipher (CONFIG_CRYPTO_XTS) to the kernel solved the problem.

Thank you.

----------

## bgm_weber

i confirm that this works.

to get XTS shown in CRYPTOGRAPHIC_API you must enable GENERAL_SETUP -> "prompt for development and/or incomplete code/drivers"

6.1a now working like a charme here.

marko from hamburg

----------

