Threefish is tweakable block encryption algorithm designed by Bruce Schneier, Niels Ferguson, Stefan Lucks, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas, and Jesse Walker.
Currently Threefish is part of Skein hash function.
Specification
Specification of Threefish is available only as part of Skein specification: skein.pdf
Download
To compile and run You need Bouncycastle Provider and Test Classes packages.
MD5: 9c8a94c78661e77e7828830c7b22ec13 threefish.tar.gz
Warning! Threefish algorithm is not sufficiently well controlled by the community.
Do not use it in production.
Contact
Contact with author of implementation:
- email address: bartosz.malkowski@gmail.com
- Jabber ID: bmalkow@malkowscy.net
Test vectors
Extracted from NIST submission package
Block size: 256 bits
a.
| key | 0000000000000000000000000000000000000000000000000000000000000000 |
|---|---|
| tweak | 00000000000000000000000000000000 |
| m | 0000000000000000000000000000000000000000000000000000000000000000 |
| c | e39756f9f3b6cf3ff91d2bc3d324ce618574ea1623b2367f88382e2a93afa858 |
b.
| key | 101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f |
|---|---|
| tweak | 000102030405060708090a0b0c0d0e0f |
| m | FFFEFDFCFBFAF9F8F7F6F5F4F3F2F1F0EFEEEDECEBEAE9E8E7E6E5E4E3E2E1E0 |
| c | 1e9b8f641bed9511be4f40df57c3d7a1bc42718edd7af7139b3d4c52b2a920f8 |
Block size: 512 bits
a.
| key | 0000000000000000000000000000000000000000000000000000000000000000 |
|---|---|
| tweak | 00000000000000000000000000000000 |
| m | 0000000000000000000000000000000000000000000000000000000000000000 |
| c | 408be942494492eab19daa3e96ad19aedfc41f4e55f8a2626c1e46d54547a713 |
b.
| key | 101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f |
|---|---|
| tweak | 000102030405060708090a0b0c0d0e0f |
| m | fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0 |
| c | 869ae12210e51d3b0736399f2acb400de230600b13e62f1df7596a146232d281 |
Block size: 1024 bits
a.
| key | 0000000000000000000000000000000000000000000000000000000000000000 |
|---|---|
| tweak | 00000000000000000000000000000000 |
| m | 0000000000000000000000000000000000000000000000000000000000000000 |
| c | 43cf2a34cb1668e38c2e19ea1757d6b31ac6dead02fea99459d8a0331bdc7273 |
b.
| key | 101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f |
|---|---|
| tweak | 000102030405060708090a0b0c0d0e0f |
| m | fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0 |
| c | 44e66b3125aa434261adbef4c310101cef1d185272b43132d6e67e75692b2851 |