Kis a 224-bit key.
Cis a 32-bit counter; it is publicly known. the same value is never used twice.
plaintexthas arbitrary length (up to 64kB).
His a cryptographic hash function that returns
^is the bitwise XOR.
+is the concatenation.
ciphertext = plaintext ^ H(K + C)
plaintext = ciphertext ^ H(K + C)
- Are there any fundamental flaws?
- Would it make sense to use a longer key?
- Under what circumstances would doing
H(C + K + C)instead of
H(K + C)make the algorithm more secure?
- I intend to use Skein, which comes in three flavors of internal state sizes: 256, 512 and 1024 bits. How does the internal state size limit the strength of the whole system? Would it make any sense to use the 512/1024 bit variants, even though
len(K+C) = 256?
- Is there anything particular about Skein that would make it unsuitable for the job?
edit: Thinking about it,
len(K) > internal state size seems pointless. To break the encryption, an attacker would just need to find a
K that produces the same internal state as the real