| JustinT wrote: |
|
Counter mode, just as OFB, is a mode of stream ciphering, modeled in the likes of the simple Vernam cipher, where plaintext is simply XOR'd with a stream of key material. To quickly define this: Ki := E(K, Nonce || i) (where the counter, i = 1, ..., k and nonce is simply a contraction of a "number used once") Ci := Pi XOR Ki It is an extremely lucid mode of operation. Since the encryption and decryption functions are identical, it only requires the you implement the encryption function of a cipher, and does not require padding, unlike that of traditional CBC mode. When speed is of the essence, arbitrary parallelized computation is possible. Its security is relative to that of the block cipher. If counter mode is secure, then so should be the block cipher; if counter mode is insecure, then, as such, so should be the block cipher. Of course, this is taking into consideration information leakage, which is a general concern of block cipher modes of operation. Provided that you address information leakage, and use a unique nonce, both random and unpredictable, CTR will provide you with a highly efficient and secure mode of operation. If using this mode is a convenient possibility, both implementation-wise and security-wise, then do so, over CBC. It requires specific care in order to achieve this, as it relies on the requisite security of the rest of the system; but, the solid etiquette for good, complete security that you will gain from learning the specific caretaking measures of cryptographic primitives is never a bad habit to fall into. So, here you have a very concise overview of counter mode, which, still, sums up the majority of how this incredibly facile construction works. |
output generated using printer-friendly topic mod, All times are GMT + 2 Hours