CN-121984663-A - S box generation method and device for resource limited equipment
Abstract
The application provides an S box generating method and device for resource limited equipment, wherein the method comprises the steps of obtaining an initial value of chaotic mapping and parameters of affine transformation; performing chaotic mapping according to the initial value of the chaotic mapping to generate an initial S box, performing power substitution on the initial S box to obtain a power substitution result, and performing multiplication inverse element and affine substitution processing on the power substitution result according to the parameter of the affine transformation to generate a final S box. The application can realize the S-box generation oriented to the resource limited equipment, and improves the S-box generation efficiency on the basis of ensuring the S-box performance.
Inventors
- SU YUYUE
- TANG ZHENGHAN
- HOU CONG
- LI MIN
- TIAN QI
- DONG BIN
- SUN YUE
- XU XIAOTIAN
Assignees
- 国网冀北电力有限公司电力科学研究院
- 国家电网有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251215
Claims (10)
- 1. The S box generation method for the resource limited device is characterized by comprising the following steps of: acquiring an initial value of chaotic mapping and parameters of affine transformation; performing chaotic mapping according to the initial value of the chaotic mapping to generate an initial S box; performing power substitution on the initial S box to obtain a power substitution result; And according to the parameters of the affine transformation, performing multiplication inverse element and affine substitution processing on the power substitution result to generate a final S box.
- 2. The method for generating an S-box for a resource-constrained device according to claim 1, wherein the generating an initial S-box by performing chaotic mapping according to the initial value of the chaotic mapping includes: the initial value is used as an input value, and iterative operation is carried out, wherein the iterative operation comprises the steps of inputting the input value into a preset logic-substance mapping model to obtain the current output value of the preset logic-substance mapping model; And judging whether the number of times of executing the iterative operation is smaller than the preset iterative number, if so, executing the iterative operation again by taking the output value of the time as an input value, otherwise, screening out the output values of preset number from the output values to form the initial S box, wherein the preset number is the same as the number of elements of the finite field corresponding to the parameter.
- 3. The resource constrained device-oriented S-box generating method of claim 1, wherein performing power permutation on the initial S-box to obtain a power permutation result comprises: Determining a plurality of index values through the Euler function and the number of elements of the finite field corresponding to the parameters; selecting a target exponent value from the exponent values, and obtaining an objective power function according to the target exponent value; And performing power substitution on the initial S box through the objective power function to obtain a power substitution result.
- 4. The resource constrained device-oriented S-box generation method of claim 1, wherein the performing multiplicative inverse and affine substitution processing on the power substitution result according to the parameters of the affine transformation, generating a final S-box, comprises: Performing multiplication inverse element processing on the power substitution result to obtain a multiplication inverse element result; and executing affine substitution processing on the multiplication inverse element result according to the parameters of the affine transformation, and determining the affine substitution processing result as the final S box.
- 5. The resource constrained device oriented S-box generation method of claim 1, wherein, The initial value is The parameters are 。
- 6. An S-box generating apparatus for a resource-constrained device, comprising: The acquisition module is used for acquiring the initial value of the chaotic map and the affine transformation parameters; the generation module is used for carrying out chaotic mapping according to the initial value of the chaotic mapping to generate an initial S box; The power replacement module is used for performing power replacement on the initial S box to obtain a power replacement result; And the processing module is used for executing multiplication inverse element and affine substitution processing on the power substitution result according to the parameters of the affine transformation to generate a final S box.
- 7. The S-box generating apparatus for resource-constrained devices according to claim 6, wherein the generating module comprises: The execution module is used for taking the initial value as an input value and executing iterative operation, wherein the iterative operation comprises the steps of inputting the input value into a preset logic-substance mapping model to obtain the current output value of the preset logic-substance mapping model; And the iteration module is used for judging whether the number of times of executing the iteration operation is smaller than the preset iteration number, if so, executing the iteration operation again by taking the output value of the time as an input value, otherwise, screening out the output values of preset number from the output values to form the initial S box, wherein the preset number is the same as the number of elements of the finite field corresponding to the parameter.
- 8. The resource constrained device-oriented S-box generation apparatus of claim 6, wherein the power permutation module comprises: The determining unit is used for determining a plurality of index values through the Euler function and the number of elements of the finite field corresponding to the parameters; a selecting unit, configured to select a target exponent value from the exponent values, and obtain an objective power function according to the target exponent value; and the power substitution unit is used for performing power substitution on the initial S box through the target power function to obtain a power substitution result.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the resource constrained device oriented S-box generation method of any of claims 1 to 5 when the computer program is executed by the processor.
- 10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the resource-constrained device-oriented S-box generation method of any one of claims 1 to 5.
Description
S box generation method and device for resource limited equipment Technical Field The application relates to the technical field of information security, in particular to an S box generation method and device for resource-constrained equipment. Background In an electrical power system, there are a large number of device connections and data interactions, and these device data contain critical information about the operation of the electrical power system, such as real-time data of the voltage, current, power, etc. of the power grid. The data are encrypted through the cryptographic algorithm, so that the data can be prevented from being stolen or tampered in the transmission process, the data safety is ensured, key information of the power system is prevented from being leaked, and the data confidentiality is realized. In the power system, resource-limited equipment such as intelligent sensors, embedded protection terminals, edge communication modules and the like are widely distributed in links of power transmission and transformation, power distribution and user sides. Such devices are limited by hardware cost, physical space and energy supply, and are difficult to bear the high computational complexity and storage overhead of traditional cryptographic algorithms (such as AES and IDEA), so a lightweight cryptographic algorithm is needed to ensure the confidentiality of the power system resource-constrained devices. The S box is widely applied to the cryptographic algorithm, is an important component of the cryptographic algorithm for resisting nonlinear attacks, is designed to directly determine the capability of the algorithm for resisting attacks such as differential analysis, linear analysis and the like, realizes complex mapping relation between plaintext and ciphertext under limited hardware resources, and breaks the linear correlation between input and output. Compared with the 8×8S box in the traditional cryptographic algorithm, the S box of the lightweight algorithm adopts an optimized algebraic structure, so that the occupation of a logic gate circuit (GE) can be reduced. For example, the 4×4S box of the PRESENT algorithm is implemented through a 16-byte lookup table, the hardware area only occupies 15% of the whole circuit, but contributes to the nonlinear confusion capacity of more than 90% of the algorithm, effectively balances the security and the resource overhead, and becomes a core support for realizing data confidentiality in an embedded terminal by a lightweight cryptographic algorithm. In the existing S box generation technology, the static S box has obvious safety defects that a fixed nonlinear transformation relation is easy to be attacked by an attacker to implement targeted attack through pre-computing a differential/linear feature matrix due to the adoption of a one-time design and permanent solidification mode, and hardware storage needs to occupy fixed ROM resources, so that the dynamic safety requirement of resource-limited equipment is difficult to adapt. The existing dynamic S box generation method is mainly divided into three types, namely a parameterized generation method, a chaotic system driving method and an optimization algorithm auxiliary method, wherein the parameterized generation method is used for generating the S box by presetting a plurality of groups of generation parameters (finite field polynomial coefficients and replacement rules) and dynamically selecting target parameters by combining key fragments or counters, so that storage cost can be reduced by more than 80%, the chaotic system driving method is used for generating pseudo-random sequences in an iteration mode by utilizing initial value sensitivity of Logistic, arnold and other chaotic mappings and discretizing the pseudo-random sequences into the S box, the typical scheme is used for eliminating transient effects through 100 iterations and then regenerating the double-shot S box, and the optimization algorithm auxiliary method is used for adjusting the mapping relation of the S box by adopting intelligent algorithms such as genetic algorithm and particle swarm optimization and the like and improving differential uniformity and avalanche effect through iterative optimization, but the problem that calculation complexity is high (Shan Cisheng is generally more than or equal to 1000 times of fitness evaluation is caused). Although the method improves the dynamic performance and the safety, the method still faces the balance problem of the generation efficiency and the hardware cost in the resource limited scene, and a dynamic S box generation mechanism with low complexity and high adaptability is needed to be constructed. This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section. Disclosure of Invention Aiming at least one problem in the prior art, the app