Hi,
Has anyone managed to get truecrypt (v6.2a) to work on the plug?
I get this error at the end of the compilation:
Linking truecrypt
Error: TestFailed at TrueCrypt::EncryptionTest::TestXtsAES:440
I tried recompiling with optimisation and got the same error.
The exception is raised in at the end of TestXtsAES() in ./Volume/EncryptionTest.cpp by a failed memcmp() test:
412 void EncryptionTest::TestXtsAES ()
413 {
414 unsigned __int8 p[ENCRYPTION_DATA_UNIT_SIZE];
415 uint64 dataUnitNo;
416 int i;
417
418 for (i = 0; i < array_capacity (XtsTestVectors); i++)
419 {
420 AES aes;
421 shared_ptr <EncryptionMode> xts (new EncryptionModeXTS);
422
423 aes.SetKey (ConstBufferPtr (XtsTestVectors[i].key1, sizeof (XtsTestVectors[i].key1)));
424 xts->SetKey (ConstBufferPtr (XtsTestVectors[i].key2, sizeof (XtsTestVectors[i].key2)));
425 aes.SetMode (xts);
426
427 memcpy (p, XtsTestVectors[i].plaintext, sizeof (p));
428
429 dataUnitNo = Endian::Big (*((uint64 *) XtsTestVectors[i].dataUnitNo));
430
431 aes.EncryptSectors (p, dataUnitNo, sizeof (p) / ENCRYPTION_DATA_UNIT_SIZE, ENCRYPTION_DATA_UNIT_SI 431 ZE);
432
433 aes.DecryptSectors (p, dataUnitNo, sizeof (p) / ENCRYPTION_DATA_UNIT_SIZE, ENCRYPTION_DATA_UNIT_SI 433 ZE);
434 if (memcmp (XtsTestVectors[i].ciphertext, p, sizeof (p)) == 0)
435 throw TestFailed (SRC_POS);
436
437 aes.EncryptSectors (p, dataUnitNo, sizeof (p) / ENCRYPTION_DATA_UNIT_SIZE, ENCRYPTION_DATA_UNIT_SI 437 ZE);
438
>>> 439 if (memcmp (XtsTestVectors[i].ciphertext, p, sizeof (p)) != 0)
>>> 440 throw TestFailed (SRC_POS);
441 }
442 }
I commented out all the encryption tests and recompiled, this removes the error and I even get truecrypt to generate an encrypted volume file but it can't decrypt it so I guess these failed tests can't really be ignored

I'm using gcc 4.3.2 on debian with the 2.6.29-2-kirkwood kernel.
- theblop