CN108964876B - Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit - Google Patents
Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit Download PDFInfo
- Publication number
- CN108964876B CN108964876B CN201810597109.6A CN201810597109A CN108964876B CN 108964876 B CN108964876 B CN 108964876B CN 201810597109 A CN201810597109 A CN 201810597109A CN 108964876 B CN108964876 B CN 108964876B
- Authority
- CN
- China
- Prior art keywords
- matrix
- round
- common
- register
- constant
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000006243 chemical reaction Methods 0.000 title claims description 189
- 230000009466 transformation Effects 0.000 claims abstract description 50
- 239000011159 matrix material Substances 0.000 claims description 133
- 239000002131 composite material Substances 0.000 claims description 35
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 11
- 238000013507 mapping Methods 0.000 claims description 10
- 125000004122 cyclic group Chemical group 0.000 claims 1
- 238000000844 transformation Methods 0.000 claims 1
- 230000015572 biosynthetic process Effects 0.000 description 19
- 238000003786 synthesis reaction Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 10
- 238000000034 method Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 7
- 239000000203 mixture Substances 0.000 description 5
- 238000005457 optimization Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000013478 data encryption standard Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/14—Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Algebra (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Complex Calculations (AREA)
Abstract
The invention is suitable for the technical field of encryption, and provides a common round transformation operation unit, a common round transformation circuit and an AES encryption circuit.
Description
Technical Field
The invention belongs to the technical field of encryption, and provides a common round conversion operation unit, a common round conversion circuit and an AES encryption circuit.
Background
AES (Advanced Encryption Standard) is a new generation of block symmetric cipher algorithm established by the national institute of standards and technology 2001, and is used to replace the original DES (Data Encryption Standard).
At present, the AES cipher algorithm is adopted by a plurality of international standards organizations, and is the most widely used block cipher algorithm at present, the data block length of the AES cipher algorithm is 128 bits, the key length is 128 bits, 192 bits and 256 bits, which are respectively called AES-128, AES-192 and AES-256, the AES algorithm is an iterative algorithm, each iteration can be called round conversion, the key length is different, the number of round conversion is also different, and the number of round conversion Nr of the AES-128, AES-192 and AES-256 is respectively 10, 12 and 14.
The AES encryption process is as shown in fig. 1, the input plaintext data sequentially performs a first round of transformation, Nr-1 round of normal round of transformation, and last round of transformation, the normal round of transformation operation is a main operation in the AES encryption process, each time the normal round of transformation needs to sequentially perform four operations of byte replacement, row shift, column mixing, and key addition, four operation units corresponding to the four operations sequentially and individually operate, the normal round of transformation circuit based on the four operation units individually operates not only wastes circuit resources, but also has a long key path, and therefore, several adjacent operation units are combined into one operation unit through a synthesis matrix to be implemented.
The T box realizes that the operation results of operations such as S box, row shift, column mixing and the like are prestored in a storage operation unit in a precalculation mode, and the functions of S box, row shift, column mixing and merging operations are realized in a look-up table mode. The T box implementation reduces the critical path of the whole round conversion circuit, so the T box implementation mode is mainly applied to the high-speed AES circuit design, although the T box implementation mode can accelerate the data processing speed, the circuit area is greatly increased, for example, Rach et al will be based on the last GF (2) in the composite domain S box/inverse S box4) The method comprises the steps that five operations such as a multiplier, a mapping matrix/inverse mapping operation, an affine/inverse affine operation, a column mixing/inverse column mixing operation and a key addition operation are combined into an operation unit, the combined operation unit shortens a circuit critical path, but greatly increases the circuit area, and in the existing published documents, the proposed operation unit combination optimizes the length of the critical path at the cost of increasing the circuit area.
Disclosure of Invention
The embodiment of the invention provides an AES encrypted common round conversion circuit, aiming at solving the problem that the lengths of key paths are optimized at the cost of increasing the circuit area in the combination of operation units of the existing common round conversion circuit.
The present invention is achieved as described above, in a general round conversion operation unit for AES encryption, the general round conversion operation unit including:
a synthetic matrix multiplication unit 1 having an input terminal connected to the data input port; the input end of the composite domain multiplication inverse operation unit is connected with the output end of the synthetic matrix multiplication operation unit 1; a synthetic matrix multiplication unit 2 with an input end connected with the output end of the composite domain multiplication inverse operation unit and the key input port; a constant addition operation unit with an input end connected with the output end of the synthetic matrix multiplication operation unit 2, and an output end connected with the data output port, wherein,
the composite matrix multiplication unit 1 inputs a four-byte column vector D from a data input portv=[d0,d1,d2,d3]TCombining the matrix delta with the column vector DvPerforming multiplication to obtain a matrix Lv=[l0,l1,l2,l3]TAnd outputting the data to a composite domain multiplication inverse operation unit, wherein the expression of the synthesis matrix delta is as follows:
a complex domain inverse multiplication unit for multiplying Lv=[l0,l1,l2,l3]TEach byte in the array is subjected to complex domain multiplication inverse operation, and a matrix I after the complex domain multiplication inverse operation is performedv=[i0,i1,i2,i3]TOutput to the synthesis matrix multiplication unit 2;
a composite matrix multiplication unit 2 for combining the matrix Iv=[i0,i1,i2,i3]TAnd a key vector K input from the key input portv=[k0,k1,k2,k3]TAre combined into a column vector pv=[i0,i1,i3,k0,k1,k2,k3]TSynthesizing the matrix Lambda with the column vector pvPerforming multiplication to obtain a matrix Qv=[q0,q1,q2,q3]TAnd outputting to a constant addition operation unit, wherein the synthetic matrix lambda is expressed as follows:
a constant addition unit for adding the matrix Qv=[q0,q1,q2,q3]TAnd constant vector omegav=[ω,ω,ω,ω]TAddition operation, matrix R after addition operationv=[r0,r1,r2,r3]TOutputting from a data output port, wherein the constant ω is a byte constant specified by an affine operation in the AES S box;
the data bit widths of the data input end and the data output end of the synthesis matrix multiplication arithmetic unit 1, the composite domain multiplication inverse arithmetic unit, the synthesis matrix multiplication arithmetic unit 2 and the constant addition arithmetic unit are all 4 bytes, and the data bit width of the key input port is all 4 bytes.
The invention also provides a common wheel conversion circuit which consists of 4 x (N)r-1) a common round transform arithmetic unit,
wherein, every 4 ordinary round conversion arithmetic units are connected in parallel to form an ordinary round conversion module for finishing an ordinary round conversion operation, (N)r-1) a common wheel conversion module is connected in series to form a common wheel conversion circuit.
The present invention also provides a common wheel converting circuit, including: an ordinary round conversion operation unit, and a method for circulating 4 × (N)r-1) a loop feedback circuit of said ordinary round transform arithmetic unit;
the circular feedback circuit consists of a selector, a register 1 and a register 2, wherein the input end of the register 1 is connected with the output end of the selector, the output end of the register 1 is connected with the input end of the register 2, the output end of the register 2 is connected with the input end of the ordinary round transformation operation unit, the output end of the ordinary round transformation operation unit is connected with one input end of the selector, the other input end of the selector is connected with the output end of the first round transformation circuit, and the output end of the ordinary round transformation operation unit is also connected with the input end of the last round transformation circuit;
the data bit width of the register 1 and the register 2 is 16 bytes.
The present invention also provides a common wheel conversion circuit, including: a common wheel transformation module formed by connecting two common wheel transformation operation units in parallel, and a circular feedback circuit for carrying out 2 (N) on the common wheel transformation moduler-1) a cycle;
the circular feedback circuit consists of a selector, a register 1 and a register 2, wherein the input end of the register 1 is connected with the output end of the selector, the output end of the register 1 is connected with the input end of the register 2, the output end of the register 2 is connected with the input end of the common wheel conversion module, the output end of the first wheel conversion circuit is connected with one input end of the selector, the other input end of the selector is connected with the output end of the common wheel conversion module, and the output end of the common wheel conversion module is also connected with the input end of the last wheel conversion circuit;
the data bit width of the register 1 and the register 2 is 16 bytes.
The present invention also provides a common wheel conversion circuit, including: a common wheel transformation module formed by four common wheel transformation operation units connected in parallel, and a circular feedback circuit for carrying out (N) on the common wheel transformation moduler-1) a cycle;
the circular feedback circuit consists of a selector and a register, the output end of the register is connected with the input end of the common wheel conversion module, the input end of the register is connected with the output end of the selector, one input end of the selector is connected with the output end of the first wheel conversion circuit, the other input end of the selector is connected with the output end of the corresponding common wheel conversion module, and the output end of the common wheel conversion operation module is also connected with the input end of the last wheel conversion circuit;
the data bit width of the register is 16 bytes.
The present invention also provides an AES encryption circuit, including:
a first-wheel conversion circuit, a common-wheel encryption circuit and a last-wheel conversion circuit which are connected in series in sequence.
The common round transformation operation unit for AES encryption combines all linear transformation operations of the common round transformation operation into two synthetic matrixes through the combination and synthesis operation of constant matrixes, and synthesizes the matrix delta and the synthetic matrix lambda, so that the key path of a common round transformation circuit is shortened, and the realization area of the common round transformation circuit is reduced.
Drawings
Fig. 1 is a flowchart of a standard AES encryption provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a conventional round conversion unit according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a general wheel conversion circuit according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a general wheel conversion circuit according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a general wheel conversion circuit according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of a general wheel conversion circuit according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The conventional arithmetic unit includes: a byte replacement operation unit, a row shift operation unit, a column mixing operation unit and a key addition operation unit, wherein the operation formula of the operation unit is as follows
1. Byte replacement arithmetic unit
The byte replacement operation unit performs byte replacement operation, generally called S-box operation, where each byte in the state matrix is replaced according to a byte replacement table, and it is assumed that the input state matrix of the ordinary round transform operation is:
the state matrix after the S-box operation is:
the S-box operation can be expressed as:
where S () is an S-box arithmetic function. The S-box operation is the only nonlinear operation in the four round conversion operations and is also the operation with the highest operation complexity, so that the S-box circuit occupies most of the area and power consumption of the whole AES circuit.
In AES S-Box operation, the input byte is first subjected to a finite field GF (2)8) The inverse operation of multiplication on the domain is carried out, and then an affine operation is carried out, wherein the expression is as follows:
where x is the input byte, ()A -1Is GF (2)8) The multiplication inverse operation on the domain, τ is an 8 × 8bit constant matrix, ω is a byte constant, and τ and ω are used to complete affine operations in the S-box.
GF (2) according to the present invention8) The field is GF (2) specified in AES cipher algorithm8) Field, irreducible polynomial of
f(x)=x8+x4+x3+x+1
The constant matrix τ and the byte constant ω are:
among many S-box implementations, the composite domain based S-box implementation has the smallest circuit area. Composite domain S-box transforms the principal arithmetic unit-GF (2) in the S-box by mathematical transformation8) The inverse domain multiplication unit maps to the complex domain implementation. The computational complexity of the complex domain multiplicative inverse is much less than GF (2)8) The computational complexity of the inverse of the domain multiplication can be reduced significantly, thus the hardware complexity of the S-box circuit implementation can be reduced significantly.
The AES S box operation expression based on the composite domain is as follows:
wherein ()C -1For multiplicative inverse operations on complex fields, the complex field being an arbitrary and GF (2)8) Composite domain of domain isomorphism, delta is 8 x 8bit mapping matrix, whose function is to convert input byte x from GF (2)8) The field is mapped to the complex field, δ' is the δ inverse matrix, which acts to map the complex field multiplicative inverse result from the complex field back to GF (2)8) A domain.
In the finite field, the addition operation is a bit exclusive or logic operation. According toTherefore, when the constant addition operation + ω is implemented in hardware, the addition 0 operation can be directly omitted, and the addition 1 operation can replace the exclusive or logic operation by two methods: 1. the exclusive or logic of any two variables is replaced by the exclusive or logic; 2. the two variables are realized by using exclusive-OR logic and inverting logic. Because the circuit area and the time delay of the exclusive-OR gate and the exclusive-OR gate are almost the same, and compared with the exclusive-OR gate, the circuit area and the time delay of the reverse logic gate can be ignored, therefore, when the S box is realized by hardwareThe area and the time delay of the constant plus operation + omega circuit can be ignored.
2. Line shift arithmetic unit
The line shift operation unit performs a line shift operation, which is a simple operation in which the first line of the state matrix is not transformed, and the second, third, and fourth lines are shifted to the left by one byte, two bytes, and three bytes, respectively. Assume that the state matrix after the row shift operation is:
the state matrix after row shifting can be expressed as:
in the hardware implementation, the line shift operation does not need to consume any logic circuit resource, and the line shift operation can be realized only by adjusting the bus position.
3. Column mix arithmetic unit
The column mix operation unit performs a mixed column operation in which each column of the state matrix can be regarded as a cubic polynomial on the ring R, and the column mix operation is defined as a product of each column polynomial of the state matrix and a constant polynomial on the ring R. Assume that the state matrix after column mixing operation is:
the expression for the column mix operation is:
wherein the matrix phi is a column mixing constant matrix ofAre each GF (2)8) Domain multiplication by the constant x {03}16、×{02}16、×{01}16In matrix form, in the present invention { }16Representing a hexadecimal form of the constant.
4. Key addition unit
The key addition unit performs a key addition operation, which is also a very simple operation, and is defined as a state matrix plus a sub-key matrix, where the addition operation is GF (2) -field addition, i.e., a bit exclusive or operation. Assume that the state matrix after the key addition operation is:
the key addition operation expression is:
the matrix K is a sub-key matrix, the sub-key matrix is generated by an input original key through a key expansion algorithm, and the sub-key matrix is also a 4 x 4 byte matrix.
The four arithmetic units in the round conversion can be realized independently, or several adjacent arithmetic units can be combined into one arithmetic unit for realization. The round conversion circuit realized by the arithmetic unit independently wastes circuit resources and has a long critical path. The invention combines linear operations in wheel transformation through combination and synthesis operation of constant matrixes according to a wheel transformation formula. According to the sub-operation formulas in the middle-wheel transformation, the common wheel transformation formula in the wheel transformation can be obtained as follows:
output variable r having the same input in the above formulax,yDividing into one group, each column of output variables can form one group, and the above formula can be divided into four groups. These four groups have the same arithmetic operation and have the same circuit arithmetic unit when implemented in hardware. Each packet output variable can be expressed in the form of a linear equation:
the corresponding variables in each group of input variables and output variables in the above equation are:
in order to reduce the circuit implementation area, the invention further uses GF (2) in the S box8) The multiplication is inversely mapped to a composite domain, and the general round transformation grouping formula after mapping is as follows:
the common round transformation operation unit for AES encryption combines all linear transformation operations of the common round transformation operation into two synthetic matrixes through the combination and synthesis operation of constant matrixes, and synthesizes the matrix delta and the synthetic matrix lambda, so that the key path of a common round transformation circuit is shortened, and the realization area of the common round transformation circuit is reduced.
Fig. 2 is a schematic structural diagram of a general round conversion operation unit according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown.
The ordinary round conversion arithmetic unit is a minimum unit for forming an ordinary round conversion circuit, and comprises:
a synthetic matrix multiplication unit 1 having an input terminal connected to the data input port; the input end of the composite domain multiplication inverse operation unit is connected with the output end of the synthetic matrix multiplication operation unit 1; a synthetic matrix multiplication unit 2 with an input end connected with the output end of the composite domain multiplication inverse operation unit and the key input port; a constant addition operation unit with input end connected with output end of the synthetic matrix multiplication operation unit 2 and output end connected with data output port, wherein
The synthetic matrix multiplication unit 1 has 4-byte data bit widths at the input and output ends, and inputs four-byte column vector D from the data input portv=[d0,d1,d2,d3]TCombining the matrix delta with the column vector DvMultiplication is carried out, the composite matrix delta is formed by combining four constant matrixes delta, the constant matrixes delta are mapping matrixes, and GF (2) is used8) Elements on the field map to the composite field, GF (2) in embodiments of the present invention8) The field is GF (2) specified in AES cipher algorithm8) The expression of the domain, composition matrix Δ is as follows:
the multiplication expression by the synthesis matrix multiplication unit 1 is as follows:
operation result Lv=[l0,l1,l2,l3]TFurther output to the complex domain inverse multiplication unit;
the data bit width of the input end and the output end of the composite domain multiplication inverse operation unit is 4 bytes, and the column vector L output by the composite matrix multiplication operation unit 1 is subjected to column vector Lv=[l0,l1,l2,l3]TEach byte in (a) performs the inverse multiplication operation on the composite domain, whereThe complex domain of (A) is optionally conjugated with GF (2)8) Complex domains with homogeneous domains, i.e. complex domain multiplication inverse unit for multiplying Lv=[l0,l1,l2,l3]TEach byte in the complex domain multiplication inverse operation unit performs complex domain multiplication inverse operation, and the complex domain multiplication inverse operation expression performed by the complex domain multiplication inverse operation unit is as follows:
operation result Iv=[i0,i1,i2,i3]TFurther output to the synthesis matrix multiplication unit 2;
the data bit width of the input end and the output end of the synthetic matrix multiplication unit 2 is 4 bytes, the data bit width of the key input port is 4 bytes, and the data vector I is processedv=[i0,i1,i2,i3]TAnd inputting a key vector K from a key input portv=[k0,k1,k2,k3]TAre combined into a column vector pv=[i0,i1,i2,i3,k1,k2,k3,k4]TAnd synthesizing the matrix Lambda with the column vector pvPerforming multiplication operation to synthesize matrix Lambda from constant matrix Lambda3、λ2、λ1、In combination, wherein the constant matrix λ3Is a constant matrixThe product of the constant matrix τ and the constant matrix δ', i.e.Constant matrix lambda2Is a constant matrixThe product of the constant matrix τ and the constant matrix δ', i.e.Constant matrix lambda1Is a constant matrixThe product of the constant matrix τ and the constant matrix δ', i.e.Constant matrixAre each GF (2)8) Domain multiplication by the constant x {03}16、×{02}16、×{01}16In the form of a matrix; the constant matrix tau is a constant matrix specified by affine operation in the AES S box; the constant matrix delta' is a mapping matrix whose role is to map elements on the complex field to GF (2)8) On the domain, the expression of the synthetic matrix Λ is specifically as follows:
the expression of the multiplication by the synthetic matrix multiplication unit 2 is as follows:
operation result Qv=[q0,q1,q2,q3,]TFurther output to a constant addition operation unit,
a constant addition operation unit, the data bit width of the input end and the output end of which are both 4 bytes, synthesizes the vector Q output by the matrix multiplication operation unit 2v=[q0,q1,q2,q3,]TAnd constant vector omegav=[ω,ω,ω,ω]TAddition operation of, whereinThe number ω is a byte constant specified by affine operation in the AES S box, and the constant addition unit performs addition by the expression:
operation result Rv=[r0,r1,r2,r3]TAnd output from the data output port.
The common round conversion operation unit provided by the invention combines byte replacement, row shift and column mixing and key addition operation in common round conversion operation through the synthesis matrix delta and the synthesis matrix lambda, and greatly reduces the length of a key path for realizing a common round conversion operation circuit in terms of hardware realization. In addition, the invention combines a plurality of small-scale linear operation units into large-scale linear operation through matrix combination and synthesis, thereby being beneficial to improving the optimization efficiency and reducing the realization area of realizing a common round conversion operation circuit.
The serial structure and the cycle structure are two basic structures realized by a common round conversion circuit, the common round conversion circuit with the serial structure is formed by adopting a parallel processing mode based on the common round conversion operation unit, and the common round conversion circuit with the cycle structure is formed by adopting a time-sharing multiplexing processing mode or a mode of combining time-sharing multiplexing and parallel processing.
Fig. 3 is a schematic structural diagram of a general wheel conversion circuit according to a first embodiment of the present invention, and for convenience of description, only the parts related to the first embodiment of the present invention are shown.
The ordinary round conversion circuit is used for realizing ordinary round conversion in AES encryption and comprises the following components:
4×(Nr-1) ordinary round conversion arithmetic units, wherein every 4 ordinary round conversion arithmetic units are connected in parallel to form an ordinary round conversion module, (N)r-1) the ordinary round conversion modules are connected in series to form an ordinary round conversion circuit, and each ordinary round conversion module is used for completing one ordinary round conversion operation, namely completing one encryption operation of 128-bit (16-byte) data.
Fig. 4 is a schematic structural diagram of a general wheel conversion circuit according to a second embodiment of the present invention, and only the parts related to the second embodiment of the present invention are shown for convenience of description.
The ordinary round conversion circuit is used for realizing ordinary round conversion in AES encryption and comprises the following components:
an ordinary round conversion operation unit, and a method for circulating 4 × (N)r-1) a loop feedback circuit of said ordinary round transform arithmetic unit;
the circular feedback circuit consists of an alternative selector, a register 1 and a register 2, the data bit widths of the register 1 and the register 2 are both 16 bytes, the input end of the register 1 is connected with the output end of the selector, the output end of the register 1 is connected with the input end of the register 2, the output end of the register 2 is connected with the data input end of a common round conversion operation unit, the data output end of the common round conversion operation unit is connected with one input end of the selector, the other input end of the selector is connected with the output end of a first round conversion circuit, and the output end of the common round conversion operation unit is connected with the input end of a last round conversion circuit;
the data output end of the common round conversion arithmetic unit respectively outputs the operation result after each cycle to a selector and a last round conversion circuit, and the selector outputs the first 4 (N)r-2) feeding back the operation result to the register 1, the normal round conversion unit completes 4 bytes of normal round conversion operation each time, the normal round conversion unit completes one round of complete AES normal round conversion operation through four cycles of the cycle feedback circuit, the data of the register 1 after one round of AES normal round conversion operation is input to the register 2, the register 2 outputs four bytes each time to be used as the input data of the normal round conversion operation unit for the next normal round conversion operation, and 4 (N) times of normal round conversion operation are carried out in totalr-1) the second ordinary round of transformation operation, the last round of transformation circuit will be the (4N) th roundr-7)~(4Nr-4) operation result, i.e. (N) thrAnd-1) performing last round conversion by using the result of the round ordinary round conversion operation as input data of a last round conversion circuit.
Fig. 5 is a schematic structural diagram of a general wheel conversion circuit according to a third embodiment of the present invention, and for convenience of description, only relevant portions of the third embodiment of the present invention are shown.
The ordinary round conversion circuit is used for realizing ordinary round conversion in AES encryption and comprises the following components:
a common wheel conversion module formed by two common wheel conversion operation units connected in parallel, and a circulation feedback circuit for carrying out 2 (N) on the common wheel conversion moduler-1) a cycle;
the circular feedback circuit consists of a selector, a register 1 and a register 2, the data bit widths of the register 1 and the register 2 are both 16 bytes, wherein the input end of the register 1 is connected with the output end of the selector, the output end of the register 1 is connected with the input end of the register 2, the output end of the register 2 is connected with the data input end of the common wheel conversion module, one input end of the selector is connected with the output end of the first wheel conversion circuit, the other input end of the selector is connected with the output end of the common wheel conversion module, and the output end of the common wheel conversion module is also connected with the input end of the last wheel conversion circuit;
the output end of the common round conversion operation module respectively outputs the operation results of the two common round conversion operation units to a selector and a last round conversion circuit, and the selector outputs the first 2 (N)r-2) the result of the sub-operation is fed back to the register 1. The common round conversion module finishes 8-byte common round conversion operation each time, the common round conversion module finishes one round of complete AES common round conversion operation through two cycles of the cycle feedback circuit, after one round of AES common round conversion operation is finished, the data of the register 1 is input into the register 2, the register 2 outputs two groups of 4-byte data each time, the two groups of 4-byte data serve as input data of the common round conversion operation module and are respectively input into the data input ends of the two common round conversion operation units, the next common round conversion operation is carried out, and 2 (N) is carried out in totalr-1) cycle, last round of conversion circuit will (2N)r-3)~(2Nr-2) the result of the operation of the (N) th timerAnd-1) performing last round conversion by using the result of the round ordinary round conversion operation as input data of a last round conversion circuit.
Fig. 6 is a schematic structural diagram of a general wheel conversion circuit according to a fourth embodiment of the present invention, and for convenience of description, only relevant portions of the fourth embodiment of the present invention are shown.
The ordinary round conversion circuit is used for realizing the ordinary round conversion of AES encryption and comprises the following components:
a common wheel conversion module formed by four common wheel conversion operation units connected in parallel, and a circulation feedback circuit for carrying out (N) on the common wheel conversion moduler-1) a cycle;
the circular feedback circuit is composed of a selector and a register, the data bit width of the register is 16 bytes, the output end of the register is connected with the input end of the common round conversion module, the input end of the register is connected with the output end of the selector, one input end of the selector is connected with the output end of the first round conversion circuit, the other input end of the selector is connected with the output end of the common round conversion module, and the output end of the common round conversion operation module is further connected with the input end of the last round conversion circuit.
The common round conversion module completes 16 bytes of common round conversion operation each time, and completes one round of complete common round conversion operation through one cycle of the cycle feedback circuit;
the output end of the common wheel conversion module respectively outputs the operation results of the four common wheel conversion operation units to a selector and a last wheel conversion circuit, and the selector outputs the result of the previous (N)r-2) result of sub-operation RvFeeding back to the input end of the ordinary round conversion module, inputting the data input ends of the four ordinary round conversion operation units respectively, and performing the next round of ordinary round conversion operation (N)r-1) normal round conversion, the last round conversion circuit will be the (N) th roundr-1) result of sub-operation RvThe last round conversion operation is performed as input data of the last round conversion circuit.
Compared with the common wheel conversion circuit with the serial structure, the common wheel conversion circuit with the circulating structure has the advantages that the circuit area is greatly reduced, so that the common wheel conversion circuit is suitable for a data processing circuit with limited area; however, the common wheel conversion circuit with the serial structure adopts the pipeline technology, so that the circuit processing speed can be greatly improved, and the circuit is suitable for a high-speed data processing circuit, so that the structure of the common wheel conversion circuit can be designed according to actual requirements;
in addition, based on the ordinary round conversion circuit formed by the ordinary round conversion operation unit, the ordinary round conversion operation unit combines the complex domain mapping operation, the affine operation, the column mixing operation and the key addition operation in the AES cryptographic algorithm through the synthesis matrix delta and the synthesis matrix lambda, and the key path length of the circuit can be greatly reduced based on the ordinary round conversion circuit formed by the ordinary round conversion operation unit in terms of hardware implementation. The public item eliminating algorithm is the most effective circuit optimization method of the linear operation unit, and researches show that the larger the circuit scale is, the higher the circuit efficiency is, so that the invention combines a plurality of small-scale linear operation units into large-scale linear operation through matrix combination and synthesis, is beneficial to improving the circuit optimization efficiency, and reduces the realization area of a common round conversion circuit.
In an embodiment of the present invention, there is further provided an AES encryption circuit, including: the first round conversion circuit, the common round encryption circuit and the last round conversion circuit are sequentially connected in series, the common round conversion circuit adopts the common round conversion circuits provided by the first embodiment, the second embodiment, the third embodiment and the fourth embodiment, and the first round conversion circuit and the last round conversion circuit both adopt the existing structures.
The AES encryption circuit provided by the embodiment of the invention is formed based on the common round conversion circuit, the common round conversion circuit is formed based on the common round conversion operation unit, and the common round conversion operation unit combines the composite domain mapping operation, the affine operation, the column mixing operation and the key addition operation in the AES cipher algorithm through the synthesis matrix delta and the synthesis matrix lambda, so that the AES encryption circuit greatly reduces the length of a key path of the circuit in terms of hardware realization. The public item eliminating algorithm is the most effective circuit optimization method of the linear operation unit, and researches show that the larger the circuit scale is, the higher the circuit efficiency is, so that the invention combines a plurality of small-scale linear operation units into large-scale linear operation through matrix combination and synthesis, thereby being beneficial to improving the circuit optimization efficiency and reducing the realization area of the AES encryption circuit.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810597109.6A CN108964876B (en) | 2018-06-11 | 2018-06-11 | Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810597109.6A CN108964876B (en) | 2018-06-11 | 2018-06-11 | Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108964876A CN108964876A (en) | 2018-12-07 |
CN108964876B true CN108964876B (en) | 2021-02-12 |
Family
ID=64488136
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810597109.6A Active CN108964876B (en) | 2018-06-11 | 2018-06-11 | Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108964876B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102484581A (en) * | 2009-06-19 | 2012-05-30 | 耶德托公司 | White-box Cryptographic System With Configurable Key Using Intermediate Data Modification |
EP3099002A1 (en) * | 2015-05-29 | 2016-11-30 | Nxp B.V. | Diversifying control flow of white-box implementation |
CN106953723A (en) * | 2015-11-13 | 2017-07-14 | 恩智浦有限公司 | Prevent fractionation and merging method that DFA is attacked |
CN107181586A (en) * | 2017-05-22 | 2017-09-19 | 芜湖职业技术学院 | reconfigurable S-box circuit structure |
CN207184503U (en) * | 2017-05-22 | 2018-04-03 | 芜湖职业技术学院 | Reconfigurable S-box circuit structure |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7801299B2 (en) * | 2006-09-22 | 2010-09-21 | Intel Corporation | Techniques for merging tables |
US9910792B2 (en) * | 2016-04-11 | 2018-03-06 | Intel Corporation | Composite field scaled affine transforms-based hardware accelerator |
-
2018
- 2018-06-11 CN CN201810597109.6A patent/CN108964876B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102484581A (en) * | 2009-06-19 | 2012-05-30 | 耶德托公司 | White-box Cryptographic System With Configurable Key Using Intermediate Data Modification |
EP3099002A1 (en) * | 2015-05-29 | 2016-11-30 | Nxp B.V. | Diversifying control flow of white-box implementation |
CN106953723A (en) * | 2015-11-13 | 2017-07-14 | 恩智浦有限公司 | Prevent fractionation and merging method that DFA is attacked |
CN107181586A (en) * | 2017-05-22 | 2017-09-19 | 芜湖职业技术学院 | reconfigurable S-box circuit structure |
CN207184503U (en) * | 2017-05-22 | 2018-04-03 | 芜湖职业技术学院 | Reconfigurable S-box circuit structure |
Non-Patent Citations (2)
Title |
---|
《A High Throughput Implementation of AES with》;Yongcheng;《2017 International Conference on Electron Devices and Solid-State Circuits》;20171020;全文 * |
《基于轮内流水线技术的高性能AES硬件实现设计》;郑行;《中国集成电路》;20140605;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN108964876A (en) | 2018-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107070630B (en) | A Fast and Safe Hardware Structure of AES Algorithm | |
CN104639314A (en) | Device based on AES (advanced encryption standard) encryption/decryption algorithm and pipelining control method | |
CN109033892B (en) | Rotation Multiplexing Circuit and AES Decryption Circuit Based on Synthesis Matrix | |
Shahbazi et al. | Design and implementation of an ASIP-based cryptography processor for AES, IDEA, and MD5 | |
CN105959107A (en) | Novel and highly secure lightweight SFN block cipher implementation method | |
CN108933652B (en) | Ordinary round of transform arithmetic element, ordinary round of transform circuit and AES decryption circuit | |
CN109039583B (en) | Multiplexing rotation circuit, AES encryption circuit and encryption method | |
Akin et al. | Efficient hardware implementations of high throughput SHA-3 candidates keccak, luffa and blue midnight wish for single-and multi-message hashing | |
CN109150495B (en) | Round conversion multiplexing circuit and AES decryption circuit thereof | |
CN112134691A (en) | Method, device and medium for realizing NLCS block cipher with repeatable components | |
CN109033847B (en) | AES encryption operation unit, AES encryption circuit and encryption method thereof | |
CN108809627B (en) | Round conversion multiplexing circuit and AES decryption circuit | |
CN109033893B (en) | AES encryption unit, AES encryption circuit and encryption method based on synthetic matrix | |
Fu et al. | Low-cost hardware implementation of SM4 based on composite field | |
CN108566271B (en) | Multiplexing rotation circuit, AES encryption circuit and encryption method thereof | |
CN108964875B (en) | Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES decryption circuit | |
CN109033023B (en) | Ordinary round conversion operation unit, ordinary round conversion circuit and AES encryption circuit | |
CN108964876B (en) | Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit | |
CN108989018B (en) | AES encryption unit, AES encryption circuit and encryption method | |
CN109033894B (en) | Ordinary round conversion arithmetic unit, ordinary round conversion circuit and AES encryption circuit thereof | |
CN109660333A (en) | AES decryption multiplexing round transformation arithmetic element structure | |
CN109743156A (en) | A kind of grouping encipher-decipher method and device | |
CN109150496B (en) | AES encryption operation unit, AES encryption circuit and encryption method | |
CN109936440B (en) | Multiplexing Round Transformation Operation Unit and Construction Method in AES Decryption Circuit | |
CN109639408A (en) | A kind of AES decryption multiplexing round transformation circuit structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |