Cryptography: A Very Short Introduction by Fred Piper & Sean Murphy
Author:Fred Piper & Sean Murphy
Language: eng
Format: epub
Publisher: OUP Oxford
Published: 2002-06-15T04:00:00+00:00
A block cipher in ECB mode
Suppose that an unknown block cipher with an unknown key is used to encrypt the message ‘The price is four thousand pounds’. All that is known is that a message block consists of two letters, that punctuation, spaces, etc., are ignored, and the cryptogram is:
c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14
Suppose that an attacker knows the message. Then they are able to work out that c1 represents Th, c2 represents ep, etc. They can then manipulate the cryptogram so that only c1, c2, c3, c4, c5, c6, c7, c12, c13, c14 is received. The receiver applies the decryption algorithm with the correct key to the received cryptogram to obtain ‘The price is four pounds’. Since the decryption worked and the message makes sense, the receiver has no reason to suspect that the cryptogram has been manipulated and assumes that the price is correct.
Each of these potential dangers of using a block cipher in ECB mode can be removed by arranging for the encryption of each individual block to depend on all the message blocks that precede it in the message. If this is done, then identical message blocks almost certainly give distinct cryptogram blocks, and manipulation of the cryptogram is likely to result in meaningless messages after decryption has been applied. There are two standard ways of effecting this. They are known as Cipher Feedback (CFB) mode and Cipher Block Chaining (CBC) mode and are discussed later.
In order to illustrate how block ciphers are used in ECB mode we include a small example. The algorithm used is, of necessity, weak. In our example, the plaintext blocks, ciphertext blocks and keys are all of size 4 bits, and we use the HEX notation to describe them. For any given key K, the ciphertext block C corresponding to plaintext block M is obtained by XORing M with K and then rotating the bits of M K one position to the left.
We encrypt the plaintext bit string 10100010001110101001, which becomes A23A9 when HEX notation is used with key K = B. The process is as follows:
Remember that we are using the HEX notation, so for the first block M = 1010 and K = 1011. Thus M K = 0001. If we now perform the rotation we see that the ciphertext block is 0010, which is 2 in HEX.
Similarly for the second block if M = 2 and K = B. Thus M = 0010, K = 1011 and so M K = 1001. If we now perform the rotation on 1001 we see that the ciphertext block is 3 in HEX.
Repeating this type of calculation we see that if the message is A23A9 and we use our cipher in ECB mode with K = B then the cryptogram is 23124.
The obvious observation is that the repeated block of the message results in a repeated block in the cryptogram.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Effective Threat Investigation for SOC Analysts by Yahia Mostafa;(6566)
Practical Memory Forensics by Svetlana Ostrovskaya & Oleg Skulkin(6287)
Machine Learning Security Principles by John Paul Mueller(6257)
Attacking and Exploiting Modern Web Applications by Simone Onofri & Donato Onofri(5929)
Operationalizing Threat Intelligence by Kyle Wilhoit & Joseph Opacki(5890)
Solidity Programming Essentials by Ritesh Modi(4032)
Microsoft 365 Security, Compliance, and Identity Administration by Peter Rising(3671)
Operationalizing Threat Intelligence by Joseph Opacki Kyle Wilhoit(3403)
Future Crimes by Marc Goodman(3350)
Mastering Python for Networking and Security by José Manuel Ortega(3346)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3335)
Blockchain Basics by Daniel Drescher(3303)
Learn Computer Forensics - Second Edition by William Oettinger(3167)
Incident Response with Threat Intelligence by Roberto Martínez(2889)
Mobile App Reverse Engineering by Abhinav Mishra(2884)
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2872)
The Code Book by Simon Singh(2830)
From CIA to APT: An Introduction to Cyber Security by Edward G. Amoroso & Matthew E. Amoroso(2782)
Building a Next-Gen SOC with IBM QRadar: Accelerate your security operations and detect cyber threats effectively by Ashish M Kothekar(2746)
