INVITATION TO CYBERSECURITY 162 possible plaintexts because no one is more likely than any other—this is the same situation as with the one-time pad. Therefore, confidentiality is preserved for as long as the keystream remains secret. 7.2.1.2 Block Ciphers “You see, we are like blocks of stone out of which the Sculptor carves the forms of men. The blows of his chisel, which hurt us so much are what make us perfect.” - The Problem of Pain by C.S. Lewis Whereas stream ciphers are an implementation of a polyalphabetic substitution cipher, block ciphers are like codebooks. Block ciphers operate on a fixed size set, or block, of plaintext bits at a time known as a plaintext block. Via substitution and transposition, they produce a new set of encrypted bits of the same size known as a ciphertext block. Plaintext blocks can be thought of as plaintext words and ciphertext blocks as codewords. Unlike classic crypto, however, there is no need to actually compile and keep codebooks to map plaintext words to codewords and vice versa. In computer cryptography, the “codewords” are produced algorithmically on the fly, just like stream ciphers produce “one-time pads” on the fly. Unique codewords are produced based on the cryptosystem and the key shared by the communicating parties. The encryption algorithm produces the plaintext word-to-codeword mapping, and the decryption algorithm produces the codeword-to-plaintext word mapping. No lookups are necessary—the process is entirely algorithmic. Block cipher algorithms transpose and substitute the plaintext bits into a completely different and unrecognizable set of ciphertext bits. If two plaintext blocks are encrypted with the same algorithm and the same key and differ by only a single bit, the resulting ciphertext blocks will be completely different. The relationship between two ciphertext blocks should reveal no information about the relationship between the corresponding plaintext blocks—such is the degree of scrambling that must be performed. Because the decryption process must recover the original plaintext bits, the encryption process is lossless. This means that none of the original information is lost—it is all there but in an unrecognizable form. This is a crucial property of a cryptographic algorithm because the plaintext must be 100% recoverable by the decryption algorithm. The standard cipher recommended in the United States since the early 2000s is called AES (Advanced Encryption Standard). AES is a block cipher that uses either a 128, 192, or 256 bit key. Figure 7.8 shows the string attack at dawn being encrypted and decrypted with AES 256 using the password SECRET.
RkJQdWJsaXNoZXIy MTM4ODY=