Java implementation of Threefish ver 1.3 encryption algorithm for Bouncycastle
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
All sourcecode you can find on GitHub
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 |
84da2a1f8beaee947066ae3e3103f1ad536db1f4a1192495116b9f3ce6133fd8 |
b.
key |
101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f |
---|---|
tweak |
000102030405060708090a0b0c0d0e0f |
m |
FFFEFDFCFBFAF9F8F7F6F5F4F3F2F1F0EFEEEDECEBEAE9E8E7E6E5E4E3E2E1E0 |
c |
e0d091ff0eea8fdfc98192e62ed80ad59d865d08588df476657056b5955e97df |
Block size: 512 bits
a.
key |
0000000000000000000000000000000000000000000000000000000000000000 |
---|---|
tweak |
00000000000000000000000000000000 |
m |
0000000000000000000000000000000000000000000000000000000000000000 |
c |
b1a2bbc6ef6025bc40eb3822161f36e375d1bb0aee3186fbd19e47c5d479947b |
b.
key |
101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f |
---|---|
tweak |
000102030405060708090a0b0c0d0e0f |
m |
fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0 |
c |
e304439626d45a2cb401cad8d636249a6338330eb06d45dd8b36b90e97254779 |
Block size: 1024 bits
a.
key |
0000000000000000000000000000000000000000000000000000000000000000 |
---|---|
tweak |
00000000000000000000000000000000 |
m |
0000000000000000000000000000000000000000000000000000000000000000 |
c |
f05c3d0a3d05b304f785ddc7d1e036015c8aa76e2f217b06c6e1544c0bc1a90d |
b.
key |
101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f |
---|---|
tweak |
000102030405060708090a0b0c0d0e0f |
m |
fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0efeeedecebeae9e8e7e6e5e4e3e2e1e0 |
c |
a6654ddbd73cc3b05dd777105aa849bce49372eaaffc5568d254771bab85531c |