Encryption2 Flashcards
Approaches to breaking a cipher
1) Brute attack
2) Linguistic analysis
Linguistic analysis
To attempt to exploit any linguistic patterns inherited from the plaintext (for textual contexts only)
To combat brute force attack, we need:
A very large key space
To combat linguistic analysis benefits, we need:
A weak association between the linguistic patterns in the plaintext and ciphertext
How to decouple from the linguistic patterns of the plaintext?
One way to do so is to encrypt with a cipher that uses a succession of different keys, which can be achieved using the Vigenere cipher
Vigenere cipher
Uses a key known as a**
running key**, which is generated by a keyword
Weakness of a Vigenere cipher
Where similar letters appear at distances corresponding to the keyword length, their ciphertext letters will match each other.
Given a large enough sample of ciphertext, the probability of such an issue to appear increases.
* A cryptanalyst can hence determine the length of the running key ‘n’
* Every nth symbol can then be treated and analyzed as one strand
* The cipher can then be easily solved
An unbreakable cipher
As a solution to the Vigenere cipher, the unbreakable cipher uses a key that is identical to the plaintext’s length, and only use it once, and such a method is known as one-time pad encryption.
A one-time pad encryption:
- A random key – the pad – is generated that is at least as long as the plaintext message
* Two copies of the pad are required
* one is used by the sender to encrypt the message.
* one is used by the recipient to decrypt the message. - Once it has been used, both copies must be destroyed
The random nature of the pad (key) means that:
- The ciphertext has no linguistic association with the original plaintext
- The ciphertext cannot be broken by analysis or brute force.
Note: all previous ciphers are text-based and later used in wireless telegraph, but they’re unpractical for today’s use
A block cipher
Breaks the plaintext into equal-sized blocks,
usually of 64 or 128 bits, and encrypts each block separately to produce a ciphertext output exactly equal in length to the input.
There are two basic approaches to block encryption
1) to encrypt each block independently of any other
2) to encrypt each block so that its output ciphertext is dependent on the output of the previous block
Electronic Codebook (ECB)
An independent encryption approach. It will:
- use the same key for each block
- encryption of each block is completely independent from other blocks
Drawbacks of ECB:
-Two similar blocks of plaintexts will result in similar blocks of ciphertext
-Since the position of the ciphertext blocks remains fixed relative to the plaintext blocks, it introduces vulnerability
-ECB is not practical when it comes to repeated strings of 1s and 0s, such as in a picture data