Substitution, S-box, diffusion and confusion, these concepts form the basis of group cryptography.
if the packet length of plaintext and cipher is n-bit, then each packet of clear text has 2n possible value ;
Substitution:
In order for the cryptographic operation to be reversible (that is, the decryption operation is feasible), each packet of clear text should produce a unique ciphertext grouping (many-to-one), so
The transformation is reversible, and the reversible transformation, which is called the plaintext grouping to the ciphertext group, is substituted.
S Box:
Generally, the substitution structure of n-bits, the size of the key is n*2n bit. For a 64-bit grouping, the key size should be 64*264 bit,
Difficult to handle. In practice, n is often divided into smaller segments, such as an optional N==rn0, where r,n0 are integer positive, and the substitution of the design n variables becomes
Design r smaller descendants to swap, and each descendant only n0 input variables. The general N0 are not too big, say each offspring change for substitution box, abbreviation
S box. For example, in Des, the input is 48 bits, the output is 32 bits of substitution with 8 s box to achieve, each s box input is only 6-bit
, the output is only 4-bit.
Extensions and obfuscation:
Is the two basic methods of designing the cipher system, which is to resist the statistical analysis of the password system by the opponent.
Diffusion is the dissemination of the statistical characteristics of the plaintext into the ciphertext, the implementation is to make every bit of the ciphertext in the clear text in the generation of multiple bits. In the two-tuple password
, a permutation can be performed repeatedly on the data, and then the displacement is applied to a function to gain diffusion. The purpose of diffusion is to make clear and ciphertext
The statistical relationship becomes as complex as possible;
Confusion is to make the statistical relationship between ciphertext and key as complex as possible so that the opponent cannot get the key. Using complex substitution algorithms to get the expected confusion
effect, and the simple linear substitution function results in less than ideal obfuscation.
Diffusion and confusion have successfully realized the essential attribute of block cipher, and thus become the basis of designing modern block cipher.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Block cipher algorithm