Cryptography - Sage
Cryptography - Sage
Cryptography - Sage
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
1. Malicious substitution of a ciphertext block C j results in substitution of message blockM j .2. Blocks C j do not hide patterns – the same block M j is enciphered in the same way.Conclusion. Although commonly used, electronic codebook mode is not recommendedfor use if t > 1 with the same key. Security can be improved by inclusion of randompadding bits in each block.5.4.2 Cipher Block Chaining Mode (CBC)Cipher block chaining mode involves a vector bit sum operation of the message block withthe previous ciphertext block prior to enciphering. The ciphertext blocks are initializedwith a randomly chosen message which may be transmitted openly, i.e. the security of thecryptosystem is based on the secrecy of the key, not on the secrecy of initialization vector.Enciphering.Input:k-bit key Kn-bit initialization vector C 0n-bit plaintext blocks M = M 1 M 2 . . . M t .Algorithm:Output:n-bit ciphertext blocks C = C 0 C 1 . . . C t .Deciphering.Input:k-bit key Kn-bit ciphertext blocks C = C 0 C 1 . . . C t .Algorithm:Output:n-bit plaintext blocks M = M 1 M 2 . . . M t .C j = E K (C j−1 ⊕ M j ).M j = C j−1 ⊕ D K (C j ).Properties:1. Identical plaintext. The same sequence of ciphertext blocks result when the samekey and the same initialization vector are used.2. Chaining dependencies. The chaining mechanism causes C j to depend on C j−1 andM j , so enciphering is not independent of reordering.3. Error propagation. An error in a ciphertext block C j affects decipherment of C j andC j+1 . For a reasonable enciphering algorithm, a single bit error affects 50% of the bits inModes of Operation 43