I understand the NIST hash function competition candidate Skein comes with a built-in block cipher, Threefish, that is turned into a stream cipher by using Unique Block Iteration chaining (is that right?).
The pyskein implementation makes this particulary easy to use:
import os
import skein
data = b'Hello World!'
key = b'thisisasecret'
nonce = os.urandom(32)
c1 = skein.StreamCipher(key, nonce=nonce, hasher=skein.skein1024)
c2 = skein.StreamCipher(key, nonce=nonce, hasher=skein.skein1024)
print(c2.decrypt(c1.encrypt(data)))
But, as the algorithm is comparatively new, I have a whole load of question that culminate in "How do I use it properly?"
- How long should the nonce be?
- Do I still need to use PBKDF2? (i.e. does this thing do any key stretching of its own?)
- Do I still have to authenticate the message?
- What happens if I don't give it a nonce?
- How do I use all of the optional arguments?
- Why should / shouldn't I use it?
I'm not a cryptographer, and there doesn't seem to be any easy to understand documentation on the Threefish part of Skein. Yet the algorithm seems really nice. So I'm hoping you can help me out. :-)