Python implementation of KCipher2 stream cipher