Chapter 3 Traditional Encryption Technology

1 Symmetric encryption model

Five basic components of symmetric encryption defense:

  1. Plaintext: The original message or data, which is the input to the algorithm
  2. Encryption algorithm: The encryption algorithm performs various substitutions and changes for the plaintext
  3. Key: The input to the encryption algorithm, the key is independent of the plaintext and the algorithm, and the algorithm produces different outputs depending on the specific key used
  4. Ciphertext: the input to the algorithm
  5. Decryption algorithm: It is the inverse operation of the encryption algorithm. Enter the ciphertext and key, and output the original plaintext.

The secure use of traditional passwords meets the following two requirements:

  1. The secret algorithm must be strong enough: even if the other party has a certain amount of ciphertext and the plaintext that produced them, he cannot decipher the ciphertext or discover the key
  2. The sender and receiver must obtain the key in some security mode and must keep the key safe.

The algorithm of symmetric encryption can be made public.

Therefore, with symmetric encryption, the primary security issue is the confidentiality of the key.

A separate feature of cryptography:

  1. The type of operation that converts plaintext to ciphertext: All encryption algorithms are given two principles: substitution and permutation.

The big picture is that each element in the plaintext seal becomes another element. Permutation is the rearrangement of elements in the plaintext.

  1. Number of keys used: If the sender and receiver use the same key, this cipher is called a symmetric cipher, single-key cipher, or traditional cipher. If the sender and receiver use different keys, this type of cipher is called asymmetric cipher, dual key or public key cipher

  2. The way of processing inscriptions: The block cipher processes a set of elements of the input at a time, and outputs a corresponding set of elements. Stream ciphers process the input elements successively, outputting one element at a time.

Cryptanalysis and Exhaustive Attacks

The typical goal of attacking a cryptosystem is to recover the key in use (get the key) instead of just paying the plaintext corresponding to a single ciphertext. Two common methods of attacking cryptosystems are:

  1. Cryptanalysis: Cryptanalysis attacks rely on the properties of the algorithm, general characteristics of the plaintext, or some pair of plaintext and ciphertext. This attack attempts to use algorithmic features to derive a specific plaintext or key used
  2. Exhaustive attack: The attacker tries all possible keys on a ciphertext to convert it into readable and meaningful plaintext.

Attack Type:

type of attack Attacker known information
Ciphertext Only Attack encryption algorithm, ciphertext
known plaintext attack Encryption algorithm, ciphertext, one or more plain-ciphertext pairs encrypted with the same key
Chosen-Plaintext Attack Encryption algorithm, ciphertext, analyst-chosen plaintext, and corresponding ciphertext
Chosen-ciphertext attack Encryption algorithm, ciphertext, ciphertext chosen by the analyst, and corresponding plaintext
Select text accumulation Encryption Algorithm, Ciphertext, Analyst's Selected Plaintext and Corresponding Ciphertext, , Selected Ciphertext and Corresponding Plaintext

2 Alternative technology

2.1 caesar password

The earliest cipher was invented by Caesar. It's simply a sequential replacement of each letter in the subtarget.

Therefore, the exhaustive attack is easy to achieve cracking. There are only 25 sets of cracked ciphertexts.

  1. Known encryption and decryption algorithms
  2. There are only 25 keys
  3. The language of the plaintext is known. The meaning is easy to identify

2.2 Single table instead of password

The replacement of caesar can only be replaced by 26 letters in sequence, and the replacement of the password with a single table is to first perform random replacement of $a \dots z$, so that there are $26!$ possibilities. Then make a replacement.

Crack method:

Count the order in which the letters in the word are used, and compare it with the distribution of the city's Yongping rate of English letters, if the new school is long enough. Then it can be broken.

At the same time, it is also a very effective tool to count the frequency of double-letter combinations. In English, $th$ and other double-letters appear very frequently. Therefore, in the ciphertext, the two-letter self-combination with high frequency is very likely to be $th$

2.3 playfair password

Multi-letter replaces the password playfair surface, and converts the two-letter syllables in the plaintext into two-letter syllables in the ciphertext as a unit. ,

The process is: first select a word as the key, then take a table of $5 \times 5$ to store 26 letters ($I$ and $J$ are placed in the same cell), then first fill the word in the cell In the first few squares of the grid, if there are repeated words in the key word, remove the repeated words. Then the remaining letters that do not appear in the word are filled in the remaining cells in turn.

Then, the plaintext is processed, and the words of the plaintext are grouped into two groups. If two letters in a group are the same, the original word is changed, and $x$ is added between the same letters. For example: $balloon$ is split into $ba,ll,oo,n$, then the second group of $ll$ is the same letter, so the word is processed $balxloon$ and then split (it seems that it needs to be an even number of letters, So at the end, it will be filled with a letter to make up an even length, right?)

Then get two pairs of letters to the table of $5 \times 5$ and replace:

  1. If a pair of letters falls on the same line, each letter is replaced by the letter to its right. (Same line rotation)

  2. If letters fall in the same column, each letter is replaced with the letter above it (same column rotation)

  3. If the row and column are different, then a matrix composed of these two letters, take the other two vertices, and replace the same row.

That is to say, for example, $A, B$, then the letter replaced by $A$ is in the key table: the row where $A$ is located, and the letter in the column where $B$ is located.

The playfair cipher was heavily used during World War II.

But still crackable.

2.4 hill password

The hill cipher utilizes knowledge of the matrix: $APA^{-1} = P$
so the two keys are $A^{-1}$ and $A$

2.5 Multiple tables instead of encryption

An improved method of replacing a password with a simple single table is to replace it with a different single table in the clear text message. This method is called multi-table instead of password. Features are:

  1. Use a related single table instead of a ruleset
  2. The specific rules for key decisions to give top changes

The most famous and simplest of the multi-table replacement ciphers is the Vigenere cipher:

The substitution rule set is the 26Caesar cipher, and then each substitution representation is obtained by shifting $0~25$ times to $a \dots z$. For example, $a$ corresponds to 0 times.
Then when encrypting, starting with the plaintext sequence, use one for each letter instead of one in the rule set. The key is a string of letters, indicating the starting letter of each rule in the rule set
. The strength of this password is that each plaintext letter corresponds to multiple ciphertext letters (because different rule sets are used), and each ciphertext letter corresponds to multiple ciphertext letters (because different rule sets are used), and each password Text letters use shifted key letters, so the frequency information of the letters is concealed.
In addition, when the length of the plaintext is an integer multiple of the key length, and the corresponding plaintext is also the same, then the generated ciphertext will be the same.

So the solution is to use a circular key with a large period. But if there are enough plaintext pairs, the key can still be cracked.

2.6 Primary Cs.

is an improvement on Vernam ciphers: messages are encrypted with a random key that is as long as the message and has no repetitions. The key value encrypts and decrypts a message and then discards it.
But the delivery of the key is problematic.

3 Replacement technology

Instead of replacing letters in plaintext with other letters.
The replacement technique is to rearrange and combine the plaintext.
The simplest is the fence technique, where each letter in a word is written in turn on the first and second lines, and then each line forms a new word.
Simple permutation techniques are easily identified, so multiple permutations are used.

4 rotary machines

5 Steganography

A simple but good form of steganography can be the rearrangement of words in a piece of text. Then hide the real information in it. For example, the first letter of a word, or something else.
Also the same:

  1. Character mark: special mark for meaningful characters
  2. invisible ink
  3. acupuncture
  4. special color

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325149155&siteId=291194637