Said the front of those, think of a thing, this series based on the content mainly from the "Modern Cryptography" Ma Chunguang authoring. I am the one who studies this book.
Well, the classical password is the ancient code, haha, tease you to play, Shannon of the secrecy system of communication theory before the publication is the classical password, will be introduced in a brief history of cryptography, The Ox man.
Learning the meaning of classical cryptography: Learning design principles and analytical methods
The classical password is also, two gate faction: substitution and substitution, as the name implies, one is changed a original has, one is changed a originally did not. Academic point is that the former plaintext and ciphertext space, the latter is not the same. If you ask me what is clear space and ciphertext space Ah, I will hehe. is M and C. M a set of plaintext, a set of C cipher. The clear text sometimes uses p to indicate oh, plaintext.
Replacement password is the column substitution and periodic replacement of the two brothers, the reverse of the count to pick it up.
Column substitution: As the name implies, the operation and output are listed as units. The plaintext is formed as a matrix of key length columns, selected in the order of the keys, and then the output of a column.
Column replacement password (from array replacement password)
PlainText: Ming Chen Jiu dian fa Dong Fan gong
Key: Yu Lan Hua
Remove the key repeat letter: Yulanh, the number of the array is 6; the clear text fills the array with rows.
Get key alphabetical order: 653142;
Write out the letters from the array in columns (in order).
Ciphertext: GIFFG hddn0 njngn cuaa0 Inano Meiog
Decryption: The inverse process of encryption;
Periodic substitution: In fact, on the basis of the column substitution, the row output.
Periodic replacement password
Clear text: Mingchen Jiu dian FA Dong Fan gong
Encryption key: 3421 (a permutation of i=1,2,3,4 f (i) =3,4,2,1)
Encrypt: Group Clear text (4 letters in a group) and then transform according to the specified order
Ming Chen Jiud ianf adon Gfan Gong
Ngim enhc udij Nfai onda anfg Ngog
Ciphertext: Ngimenhcudijnfaiondaanfgngog
Decryption key: 4312 (inverse replacement of 3412)
Nothing to say, directly to replace the password:
Also two genres, single table replacement and multi-table replacement.
Single-table substitution password: a secret text master table. The addition password (the famous Caesar password is the) multiplication password and affine password.
Mainly under the affine password
F (MI) =ci=mj,j=k1i+k2 mod n, i,ki,k2{0,1,..., n-1}
Multi-table substitution password: multiple ciphertext master tables. Vigenere Password, playfair password and hill password
The main vigenere password
Vigenere password is the period instead of the password
When the period is 1 o'clock, it is a single table instead of the password (addition password).
user key: finite sequence k = (k1,k2,..., kd)
Work key: Infinite sequence k= (k1,k2,..., Ki,...), which is the user key
The periodic (d) expansion, i.e.
Ki=ki MoD D, i =1,2,3,...
plaintext: m=m1m2...mi...ml
Ciphertext: c=c1c2...ci...cl
Working key: K=k1k2 ... Ki ... Kl
Encryption: Ci=mi+kimod N, where n is the length of the Clear letter table
Example: The user key is cat and the plaintext "Vigenere cipher" is encrypted
k: c a t c a t c a t c a t c a
This example n=26;c:2,a:0,t:19
Algebraic Password: vernam password
Modulo 2 plus operation, why mention this password, because he has a feature, is the same encryption and decryption transformation, called the alignment operation. Encryption is modulo 2 plus, decryption is also with the key modulo 2 plus. The well-known des is also an alignment operation.
Statistical analysis of classical codes:
The statistical characteristics of plaintext in the single-table substitution cipher are still embodied in the ciphertext and are easily deciphered. Addition and multiplication know a ciphertext corresponding to the clear text will be finished, affine strong, two.
The frequency of statistical letters is a statistical analysis method. According to the normal letter frequency table control.
Fundamentals of Cryptography (iii) classical codes