Low-delay permutation method
By constructing a new nonlinear permutation structure and using circular shifts and XOR operations, the problem of high delay in permutation methods in the existing technology is solved, achieving both low delay and security, and is suitable for future communications and other fields.
Patent Information
- Application Number
- CN202410343159.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2024-09-24
AI Technical Summary
Existing replacement methods cannot meet the low-latency requirements in fields such as future communications. In particular, nonlinear replacement has high implementation costs and high delays, and cannot meet the requirements of rapid diffusion and security.
By constructing a new nonlinear structure, the specific steps include performing right circular shift, bitwise NOT operation, AND operation, and XOR operation on the original image data to achieve low-latency nonlinear replacement, involving only n multiplication operations. And combined with circular shift and XOR operations, the algorithm delay is reduced.
It achieves low-latency nonlinear replacement while ensuring security, reduces algorithm delay, and follows the principle of fast nonlinear diffusion to ensure both security and low latency.
Smart Images

Figure CN118694512A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security, and in particular relates to a low-delay replacement method. Background Art
[0002] Permutation refers to a bijection (i.e. one-to-one correspondence) from a finite set S to itself. Compared with general mapping, permutation has the characteristic of unique original image, that is, there are no more than two original images that correspond to the same value. Permutation is widely used in communication coding, cryptography and other fields.
[0003] In the field of cryptography, permutations are usually divided into two categories: the first category is affine permutation, which is in the form of Y=M X+b, where M is a matrix and b is a vector. When b is a zero vector, it is usually called a linear permutation. Affine permutations are usually implemented by some linear operations and non-operations, among which common linear operations include XOR, shift, circular shift, etc. Affine permutations have the characteristics of low implementation cost and high speed, and mainly play a diffusion role in cryptographic design. The second category involves nonlinear operations, called nonlinear permutations. Common nonlinear operations include S-boxes, bit multiplication, modular addition, etc. The construction of nonlinear permutations plays a core role in the security of symmetric cryptography, but its implementation cost is generally high and the delay is high. For example, the 8-input and 8-output S-box of AES, the basic logic gate circuit depth of the current hardware implementation is more than 10.
[0004] With the development and application of technologies such as virtual reality, telemedicine, and autonomous driving, future communications will put forward new and higher requirements for the low latency of cryptographic algorithms, and the current replacement can no longer meet this demand. Summary of the invention
[0005] In view of the problems existing in the prior art, the purpose of the present invention is to provide a low-delay replacement method. The present invention implements a low-delay nonlinear replacement method by constructing a new nonlinear structure while ensuring security.
[0006] The technical solution of the present invention is:
[0007] A low-delay replacement method, characterized in that for the original image data to be replaced X=(x0, x1, ..., x n-1 ) i Execute steps a) to h) to obtain the image Y corresponding to the original image data X = (y0, y1, ..., y n-1 ); where i = 0, 1, ..., n-1; n ≥ 3 and n is not a power of 2;
[0008] a) Select a word x from the original image data X (i+v)mod n And do a right circular shift l iOperation;
[0009] b) Select a word x from the original image data X i+w = x (i+w)mod n and perform a bitwise NOT operation on it;
[0010] c) Perform a bitwise AND operation on the results of steps a) and b);
[0011] d) Select a word x from the original image data X (i+u)mod n and perform a right circular shift s i operation;
[0012] e) Perform a bitwise XOR operation on the results of steps c) and d);
[0013] f) Perform a bitwise XOR operation on the result of step e) and c i ;
[0014] h) Assign the result of the operation in step f) to y i ; where 0 ≤ u, v, w < n, 0 ≤ s i , l i < m; x i , y i , is a word consisting of m bits.
[0015] Furthermore, k1, k2 are non - negative integers, n0, m0 are odd numbers.
[0016] Furthermore, c i is any value in; parameters u, v, w, s i , l i , a i satisfy the following conditions:
[0017] 1) v′ = (v - w) mod n, u′ = (u - w) mod n;
[0018] 2) and C i = {(i + kv′) mod n | k = 0, 1,.., n - 1},
[0019] 0 ≤ i < gcd(n, v′); where gcd(a, b) is the greatest common divisor of a and b; a|b means a divides b;
[0020] 3) u′ = 2v′ and s i = l i + li+v′ Or u′=nv′ and s i =ml i-v′ ;
[0021] 4)a i =2 m -1.
[0022] Compared with the prior art, the present invention has the following positive effects:
[0023] The entire permutation process involves only n times The rest are cyclic shifts and XORs with extremely low costs, which greatly reduces the delay of the algorithm. At the same time, it also follows the principles of nonlinearity and fast diffusion, ensuring a balance between security and low latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.
[0026] The specific scheme of the implementation method of the present invention is as follows:
[0027] make k1, k2 are non-negative integers, n0, m0 are odd numbers, Y = P(X) is a system with the following form arrive The mapping on:
[0028] y i =(x u+i >>>s i )+(x v+i >>>l i )·(x i+w +a i )+c i ,i=0,1,...,n-1,
[0029] Here x u+i 、x v+i 、x i+w are all components of X, and all components in X belong to n≥3 and n is not a power of 2, 0≤u,v,w <n,0≤s i , x u+i >>>s i It means x u+i Perform circular right shift s iThe present invention obtains the corresponding image Y by performing the permutation process of steps a to h on the original image X. The symbols and operators involved in the present invention are defined as follows:
[0030]
[0031] like Figure 1 As shown, the operation steps of the nonlinear permutation constructed by the present invention are as follows: for i=0, 1, ..., n-1, the following operations are performed in sequence:
[0032] a) Select the component x i+v , do a right circular shift l i Operation;
[0033] b) Select the component x i+w , perform a bitwise NOT operation on it;
[0034] c) performing a bitwise AND operation on the results of steps a) and b);
[0035] d) Select component x i+u , do a right circular shift s i Operation;
[0036] e) performing a bitwise XOR operation on the results of steps c) and d);
[0037] f) The result of step e) and c) i Do a bitwise XOR operation;
[0038] h) Assign the result of step f) to y i .
[0039] In the above steps, select the component x i+v , x i+w , x i+u The subscripts represent the modulo n operation, that is, x i+v =x (i+v)mod n , x i+w =x (i+w)mod n , x i+u =x (i+u)mod n .
[0040] Under the above structure, c i Can be taken Any value in parameters u,v,w,s i ,l i ,a i The following conditions are met:
[0041] 1. Let v′=(vw)mod n, u′=(uw)mod n;
[0042] 2. and C i ={(i+kv′)mod n|k=0,1,..,n-1}, 0≤i <gcd(n,v′);
[0043] 3.u′=2v′ and s i = l i +l i+v′ Or u′=nv′ and s i =ml i-v′ , 0≤i <n;
[0044] 4.a i =2 m -1, 0≤i <n。
[0045] Example Demonstration
[0046] When n=15,m=64,X=(x0,x1,...,x 14 ),Y=(y0,y1,...,y 14 ),structure The permutation on is as follows:
[0047]
[0048] Here, the addition in the subscript is modulo 15, and the rest of the addition is defined as in the table above, s i ,l i The values are as follows:
[0049] i 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 <![CDATA[s i ]]> 1 11 36 16 0 0 0 0 0 0 0 0 0 0 0 <![CDATA[l i ]]> 0 0 63 53 28 48 0 0 0 0 0 0 0 0 0
[0050] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.
Claims
1. A low-latency replacement method, characterized in that: For the original image data to be replaced X=(x0,x1,…,x n-1 ) i Execute steps a) to h) to obtain the image Y corresponding to the original image data X = (y0, y1, ..., y n-1 ); where i = 0, 1, ..., n-1; n ≥ 3 and n is not a power of 2; a) Select a word x from the original image data X (i+v)modn And do a right circular shift l i Operation; b) Select a word x from the original image data X i+w =x (i+w)modn And do a bitwise NOT operation on it; c) Perform a bitwise AND operation on the results of the operations in steps a) and b); d) Select a word x from the original image data X (i+u)modn And do a right circular shift s i Operation; e) Perform a bitwise exclusive OR operation on the results of steps c) and d); f) The result of step e) and c) i Do a bitwise XOR operation; h) Assign the result of step f) to y i ; where 0≤u,v,w <n,0≤s i ,l i <m; is a word consisting of m bits.
2. The method according to claim 1, characterized in that k1, k2 are non-negative integers, n0, m0 are odd numbers.
3. The method according to claim 2, characterized in that c i for Any value in; parameters u,v,w,s i ,l i ,a i The following conditions are met: 1)v ′ =(v-w)mod n,u ′ =(u-w)mod n; 2) and C i = {(i + kv′) mod n | k = 0, 1,.., n - 1}, 0 ≤ i < gcd(n, v′); where gcd(a, b) is the greatest common divisor of a and b; a|b means a divides b; 3)u ′ =2v′ and s i = l i +l i+v′ Or u′=nv′ and s i =ml i-v′ ; 4)a i =2 m -1。
