ctr_add: replace dead with working code.
[tfcrypt.git] / README
1 tfcrypt -- high security Threefish encryption tool.
2
3 tfcrypt is a modern, dd(1)-like raw data manipulation tool with embedded strong encryption.
4 It has precise IO layer inside which can be used to encrypt files, disks and other media,
5 as well as to manipulate raw data directly, dd(1) style.
6
7 tfcrypt uses Skein and Threefish - public domain SHA3 candidate from famous,
8 well recognised cryptographer Bruce Schneier, author of famous, still uncracked
9 Blowfish and Twofish ciphers, which are in use still up to today.
10
11 tfcrypt is actually a frontend for Threefish with (by default) XTS mode of operation.
12 As a key it uses either password or keyfile, which is then hashed many times
13 with Skein hash function. Default key length is 1280 bits (160 bytes).
14
15 This program is incompatible with older, "tf1024" tfcrypt version. This version aims to
16 provide a portable encryption tool to encrypt fixed media such as disks and archive files,
17 as well as to provide decades long privacy for encrypted data. That's why it uses 1024 bit
18 encryption and, unlike older version, extends key size to 1280 bits, eliminates tweak feature
19 from Threefish and uses either XTS (by default) or OCB modes of operation instead,
20 to encrypt fixed media in a secure undetectable way.
21
22 Supported modes of operation: CTR, ECB, CBC, XTS, OCB and arbitrary long keystream.
23 OCB mode does not use Skein hash function to hash and verify message, instead, it does
24 a single pass crypt and verify, thus, it is faster than other modes when both crypt and verify.
25
26 THREEFISH NOTES
27
28 Please note that this encryption software includes Threefish cipher, which is terribly
29 slow on 32 bit systems. This way, it cannot be efficiently used on pure 32 bit machines.
30
31 Threefish contained here is stripped off of it's tweak property, thus, it is turned into a
32 regular block cipher. To add tweakability, either XTS or OCB modes of operation are used.
33 Default wide block size is 4096 bytes. Author strongly believes that Threefish _may_ be subject
34 to related key attacks when used in a tweaked mode, so this property is easy to remove.
35 Because tweak occupied another 192 bits of key material, these 192 bits are added to effective
36 key length. Another key word is extracted from the sum of all the user key words, thus,
37 another 64 bits. Total +256 additional bits of key = 1280 key bits.
38
39 SKEIN NOTES
40
41 Unlike "tf1024" implementation, this Skein's MAC feature simply copies user rawkey into
42 Skein structure context without preprocessing as defined by official Skein implementation.
43 If you never used MAC feature, then you will get the same hashes as the official Skein.
44 If you did, then possibly you used it together with encryption. Since this implementation
45 employs longer key lengths, it's anyway time to move.
46
47 Author believes that there is no problem with just copying raw MAC key versus preprocessing.
48 A preprocessing is already done by separate Skein sequential invocations on the user long
49 key material. The code becomes simpler and easier to understand.
50
51 Apart from that, the Skein implementation here is fully conformant to the official one.
52
53 TODO
54
55 Add test vectors from older version, as well as test data for all modes of operation there.
56
57 LICENSE
58
59 This tfcrypt, unlike it's previous version, is copyrighted:
60
61         Copyright (C) Andrey Rys <rys@lynxlynx.ru>, 2012-2018.
62
63 It maybe freely used by anyone who agrees to the terms and conditions of the MIT license.
64
65 tfcipher code parts used are public domain, and maybe reused freely without license.