Lightweight hash function construction method, device and equipment based on chaotic sponge structure, storage medium and program product
By constructing a lightweight hash function based on a chaotic sponge structure, the problem of resource constraints in IoT devices is solved, and an efficient and secure hash function design is achieved, which is suitable for resource-constrained IoT devices.
Patent Information
- Application Number
- CN202511043754.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-12-19
AI Technical Summary
Traditional cryptographic hash functions are not suitable for resource-constrained IoT devices, leading to security and efficiency issues.
A lightweight hash function based on a chaotic sponge structure is adopted, including an initialization phase, an absorption phase, and a squeezing phase. It utilizes a variable structure self-coupled 4D chaotic mapping and a dynamic replacement layer of the GFS II structure to construct a lightweight hash function through simple operations such as modular addition and bit shifting, avoiding complex components such as multipliers.
It reduces hardware implementation overhead, ensures security and resistance to collision attacks, supports rigorous cryptographic analysis, and is suitable for resource-constrained IoT environments.
Smart Images

Figure CN121173449A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of encryption algorithm, and particularly relates to a lightweight hash function construction method and device based on a chaotic sponge structure, equipment, a storage medium and a program product. BACKGROUND
[0002] The Internet of Things (IOT) represents a transformative technology that enables seamless connectivity between various smart devices and facilitates the exchange of smart data through the Internet. The exponential growth of device interconnectivity and data volume poses profound security challenges for the Internet of Things, among which data integrity is a basic requirement for secure communication in the Internet of Things. As a basic security primitive, a cryptographic hash function can convert a variable-length input into a fixed-size deterministic hash value. These primitives play a key role in ensuring message integrity, entity authentication, password verification, and protecting blockchain systems, etc.
[0003] Traditional cryptographic hash functions designed for general computing environments (such as SHA-3) may not be suitable for resource-constrained Internet of Things devices. These devices usually exhibit extreme limitations in terms of processing power, memory occupancy, and energy usage. SUMMARY
[0004] The main purpose of the present application is to provide a lightweight hash function construction method and device based on a chaotic sponge structure, equipment, a storage medium and a program product, aiming to solve the technical problem that traditional cryptographic hash functions are not suitable due to the resource constraints of Internet of Things devices.
[0005] To achieve the above purpose, the present application provides a lightweight hash function construction method based on a chaotic sponge structure, the lightweight hash function comprising an initialization phase, an absorption phase and a squeezing phase, the lightweight hash function construction method based on a chaotic sponge structure comprising:
[0006] The initialization phase: the input message is standardized and filled to obtain an initialization input sequence;
[0007] The absorption phase: the initialization input sequence is XORed with the external part of the internal state to obtain the XORed internal state;
[0008] The absorption phase: the initialization input sequence is XORed with the external part of the internal state to obtain the XORed internal state;
[0009] The squeezing phase: based on the absorption of the internal state, the hash output is iteratively extracted.
[0010] In an embodiment, the lightweight hash function comprises a dynamic replacement layer and a permutation layer;
[0011] The dynamic replacement layer is based on a variable-structure self-coupled 4-dimensional chaotic mapping, and is used for enhancing nonlinear diffusion;
[0012] The replacement layer is based on a linear transformation under GFS II, and is used for accelerating the overall diffusion process through structured bit shuffling.
[0013] In an embodiment, the expression of the variable-structure self-coupled 4-dimensional chaotic mapping is as follows:
[0014] x(i+1)=F[x(i)]mod N;
[0015] wherein x(i)=(x1(i),x2(i),……,x n (i)) T is an n-dimensional state vector; F[x(i)]=A*x(i) is a linear mapping, A is an n-order coefficient matrix; (mod N) is a modulo operation, which is used for ensuring that the system trajectory is bounded; and n has the same value as the dimension of the chaotic mapping.
[0016] In an embodiment, the coefficient matrix A adopts a block diagonal structure, and the structure of the coefficient matrix A is as follows:
[0017]
[0018] The variable-structure self-coupled 4-dimensional chaotic mapping ensures that the system has a positive Lyapunov exponent through the eigenvalues of the structured coefficient matrix;
[0019] The positive Lyapunov exponent LE K has a relationship with the eigenvalue λ k of the coefficient matrix as follows:
[0020] LE K =In|λ k |(k=1,2,3,4).
[0021] In an embodiment, the coefficient matrix is composed of a first sub-matrix and a second sub-matrix on the main diagonal, wherein the first sub-matrix is a 2×2 diagonal matrix corresponding to the first two dimensions, and the eigenvalues of the first sub-matrix are determined by diagonal elements;
[0022] The second sub-matrix is a 2×2 non-diagonal matrix corresponding to the last two dimensions, and the eigenvalues of the second sub-matrix are obtained by solving a quadratic equation.
[0023] In an embodiment, the iteration equation of the variable-structure self-coupled 4-dimensional chaotic mapping is as follows:
[0024]
[0025] In addition, to achieve the above object, the application further provides a lightweight hash function construction device based on a chaotic sponge structure.
[0026] An initialization module is configured to fill an input message through standardization to obtain an initialization input sequence.
[0027] An absorption module is configured to perform an exclusive OR operation between the initialization input sequence and an external part of an internal state to obtain an exclusive OR operation result of the internal state.
[0028] The absorption module is further configured to diffuse the exclusive OR operation result of the internal state through a dynamic replacement layer to obtain an absorption result of the internal state.
[0029] A squeezing module is configured to extract a hash output based on the absorption result of the internal state.
[0030] In addition, to achieve the above object, the application further provides a lightweight hash function construction device based on a chaotic sponge structure, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the lightweight hash function construction method based on the chaotic sponge structure.
[0031] In addition, to achieve the above object, the application further provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the lightweight hash function construction method based on the chaotic sponge structure.
[0032] In addition, to achieve the above object, the application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the lightweight hash function construction method based on the chaotic sponge structure.
[0033] The one or more technical solutions provided by the application have at least the following technical effects:
[0034] The lightweight hash function of the application comprises an initialization stage, an absorption stage and a squeezing stage. The initialization stage: the input message is filled by standardization to obtain an initialization input sequence; the absorption stage: the initialization input sequence is XORed with the external part of the internal state to obtain an XORed internal state; the XORed internal state is diffused by a dynamic replacement layer to obtain an absorbed internal state; the squeezing stage: the hash output is iteratively extracted based on the absorbed internal state. Since a lightweight hash function with a dynamic replacement layer is designed for low-resource implementation optimization, the limitation of lightweight hash functions in the Internet of Things environment is solved. By constructing a variable structure self-coupling four-dimensional chaotic mapping and realizing it through simple operations such as modulo addition and bitwise shift, the use of complex components such as multipliers is avoided, and the hardware implementation overhead of the lightweight hash function is reduced. The dynamic replacement layer is developed based on the above chaotic system and GFS II structure, and its security is rooted in the confusion and diffusion principle, which guarantees the security of the replacement layer. At the same time, the hash function is instantiated using a sponge structure framework, which supports strict cryptographic analysis while maintaining the flexibility of the output length and the ability to resist collision attacks. BRIEF DESCRIPTION OF DRAWINGS
[0035] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0037] Figure 1 The flowchart provided by the first embodiment of the lightweight hash function construction method based on the chaotic sponge structure of the application;
[0038] Figure 2 The schematic diagram of the three stages of the lightweight hash function based on the chaotic sponge structure of the application;
[0039] Figure 3 The dynamic replacement layer structure schematic diagram of the lightweight hash function based on the chaotic sponge structure of the application;
[0040] Figure 4 The module structure schematic diagram of the lightweight hash function construction device based on the chaotic sponge structure of the embodiment of the application;
[0041] Figure 5 The device structure schematic diagram of the hardware running environment involved in the lightweight hash function construction method based on the chaotic sponge structure in the embodiment of the application.
[0042] The object, features and advantages of the present application will be further illustrated in conjunction with the embodiments, with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.
[0044] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the drawings and specific embodiments.
[0045] The main solution of the embodiment of the present application is that the lightweight hash function includes an initialization phase, an absorption phase and a squeezing phase. In the initialization phase, the input message is standardized and filled to obtain an initialization input sequence. In the absorption phase, the initialization input sequence is XORed with the external part of the internal state to obtain an XORed internal state. The XORed internal state is diffused by a dynamic replacement layer to obtain an absorbed internal state. In the squeezing phase, the hash output is iteratively extracted based on the absorbed internal state.
[0046] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a computer, a server, etc. encryption device, or an electronic device, a virtual device, etc. capable of realizing the above functions. The following will take a lightweight hash function construction device based on chaotic sponge structure (hereinafter referred to as construction device) as an example to describe the present embodiment and the following embodiments.
[0047] Based on this, the present embodiment provides a lightweight hash function construction method based on chaotic sponge structure, which is described with reference to Figure 1 , Figure 1 The flowchart provided by the first embodiment of the lightweight hash function construction method based on chaotic sponge structure of the present application is shown.
[0048] In the present embodiment, the lightweight hash function includes an initialization phase, an absorption phase and a squeezing phase, and the lightweight hash function construction method based on chaotic sponge structure includes steps S10-S40:
[0049] In the initialization phase, step S10, the input message is standardized and filled to obtain an initialization input sequence.
[0050] It should be noted that sponge design structure is a general framework for constructing cryptographic primitives (such as hash functions, stream ciphers, message authentication codes, etc.). The core idea of the sponge design structure is derived from the process of a sponge absorbing and squeezing liquid, and an iterative substitution-permutation network (SPN) is used to achieve efficient diffusion and low-cost implementation. In the sponge design structure, the substitution layer (usually implemented as an S-box) plays a key role in establishing diffusion and confusion properties as the only nonlinear component. Examples of such hash functions include Ascon-Hash, Xoodyak, Photon-Beetle-Hash, SPARKLE, SPONGENT, and Gimli-Hash.
[0051] In some embodiments of the present application, the substitution layer (S-box) as the only nonlinear component in the cryptographic hash function plays a key role in achieving diffusion and confusion properties (diffusion and confusion properties are the key to realizing algorithm security). Although the static S-box (i.e., static substitution layer) used in standards such as AES and SM4 exhibits high nonlinearity (AES is 112 bits), such static S-boxes have some weaknesses, such as fixed points, inverse fixed points, and short iterative cycle rings. The fundamental limitation of the static substitution layer is the repetition of its fixed structure in each round. This repetition introduces predictable patterns that are vulnerable to cryptographic analysis, which can be exploited using invariant transformations.
[0052] In some embodiments of the present application, a dynamic substitution layer can be used as an alternative to the static substitution layer. In contrast, the dynamic substitution layer dynamically changes its structure in each permutation round, thereby eliminating fixed points and periodicity by constantly reshaping the nonlinear mapping and better resisting various cryptographic analysis attacks.
[0053] In some embodiments of the present application, due to the inherent properties of chaotic systems (including initial state sensitivity, unpredictability, and parameter controllability), which seamlessly fit the requirements of confusion and diffusion in cryptography. Therefore, some embodiments of the present application propose a lightweight hash function with a dynamic substitution layer optimized for low-resource implementation. The lightweight hash function follows three key steps: (1) Construct a variable-structure self-coupled four-dimensional chaotic mapping and implement it through simple operations such as modulo addition and bitwise shifting, avoiding the use of complex components such as multipliers. (2) Develop a dynamic substitution layer based on the above chaotic system and generalized Feistel structure, whose security is rooted in the principles of confusion and diffusion, ensuring the security of the dynamic substitution layer. (3) Use the sponge design structure framework to instantiate the hash function, while maintaining the flexibility of the output length and the ability to resist collision attacks, supporting rigorous cryptographic analysis.
[0054] In the embodiments of the present application, the design (construction) of the lightweight hash function with dynamic permutation layer adopts a sponge-based framework to achieve efficient and verifiable security. The structure can be as shown in Figure 2 , Figure 2 This is a three-stage schematic diagram of the lightweight hash function based on the chaotic sponge structure in the present application.
[0055] In the embodiments of the present application, the dynamic permutation of the hash function is operated on the 256-bit internal state through multiple iteration transformation rounds. The internal state can be divided into (256 / r) r-bit words (the value of r corresponds to the bit rate), wherein the first word is used as the external part (i.e., the bit rate part, b r ), and the remaining (256 / r-1) words constitute the internal capacity part (c p ).
[0056] It should be noted that the above iteration transformation round is the core of the absorption stage and the extrusion stage in the sponge structure, which is used to process the input data and generate secure data, and the data confusion and diffusion are achieved through multiple rounds of operation.
[0057] In the embodiments of the present application, the entire algorithm can include three stages, namely, an initialization stage, an absorption stage and an extrusion stage. In the initialization stage, the input message is standardized and padded, and is divided into consecutive r-bit blocks. The internal state is initialized by connecting the initialization vector with a series of padding bits to achieve a complete 256-bit length. Subsequently, in the absorption stage, each message block can be processed through the iteration application of the permutation function G. This stage continues until all message blocks are completely absorbed into the internal state. In the extrusion stage, the permutation function is executed in an interleaved manner, and r-bit segments are sequentially extracted from the state to form the final hash output.
[0058] It should be noted that in cryptography, the permutation function can be a function that acts on binary bits or bytes and achieves data diffusion through complex permutation operations. Through the permutation function, it can be ensured that the change of each bit of the input data can affect multiple output bits, thereby enhancing the security of the cryptographic system. In the present application, the specific permutation function used and its application are not limited, and can be selected according to actual needs.
[0059] In some embodiments of the present application, in the initialization stage, the input message M is standardized and padded to ensure that its length is a multiple of r bits. The standardized padding scheme widely used in symmetric cryptography is followed: a '1' is appended, followed by a sufficient number of '0' bits to achieve the required length. It is worth noting that the last 16 bits of the padded message are reserved for encoding the original message length, which is a key feature to mitigate length extension attacks. The processed message is then divided into consecutive r-bit blocks {m i} i=1n , the initialization input sequence forms an initialization phase. Wherein the value of n is related to the number of iteration transformation rounds, which is not limited by the embodiments of the present application.
[0060] In the absorption phase: step S20, XOR the initialization input sequence with the external part of the internal state to obtain the XORed internal state;
[0061] Step S30, diffuse the XORed internal state through the dynamic substitution layer to obtain the absorbed internal state.
[0062] It can be understood that in the sponge design structure, the internal state is a binary array of fixed size for storing and processing data. The internal state can be composed of two parts, namely the external part (i.e. the bit rate part) and the internal capacity part. Among them, the external part is used to directly interact with the input / output, store the current processing message block, XOR with the initialization input sequence in the absorption phase, and generate output data in the squeezing phase. The internal capacity part serves as a storage area and does not directly participate in input / output, but can affect state update through the permutation function / dynamic substitution layer. The larger the internal capacity, the stronger the attack resistance.
[0063] It should be noted that in the absorption phase, each incoming message block is first XORed with the r-bit external part of the internal state (controlling the bit rate), and then iteratively applied to the dynamic substitution layer. By XORing the message block with the internal state, the mixing of the initialization input sequence and the internal state can be achieved. Through the dynamic substitution layer, the updated internal state after XOR can be achieved.
[0064] It should be explained that the dynamic substitution layer is the most critical component in the lightweight hash function, as it completes the information compression and maximum diffusion of the input message block. The lightweight hash function in the embodiments of the present application adopts an iterative SPN structure, in order to achieve ideal cryptographic properties through efficient diffusion characteristics, the lightweight hash function in the embodiments of the present application includes two key components: (1) a dynamic substitution layer implemented using a variable structure self-coupled 4-dimensional chaotic mapping to enhance nonlinear diffusion; (2) a permutation layer using linear transformation of GFS II (Generalized Feistel II) to accelerate the overall diffusion process through structured bit shuffling. That is, the lightweight hash function includes a dynamic substitution layer and a permutation layer; the dynamic substitution layer is implemented based on a variable structure self-coupled 4-dimensional chaotic mapping for enhancing nonlinear diffusion; the permutation layer is implemented based on using linear transformation of GFS II for accelerating the overall diffusion process through structured bit shuffling.
[0065] It can be understood that diffusion and confusion are two core principles of building a secure cryptographic system. Among them, diffusion refers to spreading the influence of each bit of the input data as widely as possible to multiple bits of the output data (ciphertext), so as to prevent attackers from inferring the plaintext or key by analyzing the statistical characteristics of the ciphertext, and ensure that a slight change in the plaintext or key will cause a significant change in the ciphertext. Confusion refers to the relationship between the key and the ciphertext being as complex and ambiguous as possible, so that the attacker is difficult to infer the key from the ciphertext, thereby preventing the attacker from deducing the key by analyzing the relationship between the ciphertext and the plaintext, and through a nonlinear transformation, the relationship between the key and the key is difficult to describe with a simple mathematical expression.
[0066] In the embodiments of the present application, the dynamic replacement layer structure is as shown in Figure 3 Figure 3 The dynamic replacement layer structure based on the chaotic sponge structure lightweight hash function of the present application is a schematic diagram.
[0067] Referring to Figure 3 , the first step of the dynamic replacement layer in the embodiments of the present application is to divide the exclusive-ored internal state into eight 32-bit subblocks {s0, s1,..., s7}. Among them, the even subblocks are input to the dynamic replacement layer as the initial state of the four 1-dimensional chaotic mapping of the variable-structure self-coupled 4-dimensional chaotic system. The result state of each 1-dimensional chaotic mapping is used as the even temporary internal substate s i ', where i = {0, 2, 4, 6}. The variable-structure self-coupled 4-dimensional chaotic system exhibits extreme sensitivity to initial conditions, making the state unpredictable even under slight perturbations.
[0068] In the embodiments of the present application, the chaotic mapping also plays a dual role: (1) introducing a complex nonlinear transformation to resist linear cryptanalysis; (2) specially serving as an integrated diffusion mechanism between odd subblocks during data processing. Through this dual function, not only the overall confusion characteristics of the password are enhanced, but also the structured information dispersion is realized. As shown in Figure 3 , the temporary internal state of the odd subblock {s1', s3', s5', s7'} is generated through a two-stage transformation process: (1) 32-bit modulo addition operation with the previous temporary state s (i-1)mod 8 in a circular manner; (2) bit exclusive-OR with the next temporary state s (i+1)mod 8. This dual operation structure ensures that the input information undergoes linear (modulo addition) and nonlinear (exclusive-OR) transformation, effectively propagating the initial entropy into the odd-indexed substate. Subsequently, a shuffling operation based on the eight-group GFS II type is adopted to generate the final internal state.
[0069] In the squeezing phase: step S40, the hash output is iteratively extracted based on the absorbed internal state.
[0070] It should be noted that in the initialization phase, the internal state can be initialized to a fixed value, thereby eliminating potential security risks and ensuring that each run starts from a known state, providing a basis for data mixing in the absorption phase. In the absorption phase, by dividing the input data into r-bit blocks, each input data message block is XORed with the external part of the internal state, and the XORed state updates the entire internal state through the dynamic replacement layer, thereby mixing the input data into the internal state and providing a basis for subsequent diffusion. In the squeezing phase, r-bit blocks can be extracted from the updated internal state as output, and by continuously updating the internal state, the randomness and unpredictability of the hash output are ensured.
[0071] In the embodiments of the present application, the construction device can generate a hash output by iteratively extracting the outermost r-bit segment from the current internal state until the required output length n is obtained through one processing block. After each extraction phase, the internal state undergoes a 12-phase permutation process, which can be represented as P 12 .
[0072] The lightweight hash function of the embodiments of the present application includes an initialization phase, an absorption phase, and a squeezing phase. In the initialization phase, the input message is standardized and filled to obtain an initialization input sequence; in the absorption phase, the initialization input sequence is XORed with the external part of the internal state to obtain the XORed internal state; the XORed internal state is diffused through the dynamic replacement layer to obtain the absorbed internal state; in the squeezing phase, the hash output is iteratively extracted based on the absorbed internal state. Since a lightweight hash function with a dynamic replacement layer is designed for low-resource implementation optimization, it is used to solve the limitations of lightweight hash functions in the Internet of Things environment. By constructing a variable-structure self-coupled four-dimensional chaotic mapping and implementing it through simple operations such as modulo addition and bitwise shifting, the use of complex components such as multipliers is avoided, reducing the hardware implementation overhead of the lightweight hash function. Based on the above chaotic system and GFS II structure, a dynamic replacement layer is developed, and its security is rooted in the principles of confusion and diffusion, ensuring the security of the replacement layer. At the same time, the hash function is instantiated using a sponge structure framework, which maintains the flexibility of the output length and the ability to resist collision attacks while supporting rigorous cryptographic analysis.
[0073] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and the following will not be repeated. On this basis, in the embodiments of the present application, the expression of the variable-structure self-coupled four-dimensional chaotic mapping is:
[0074] x(i+1)=F[x(i)]mod N;
[0075] where x(i)=(x1(i),x2(i),……,xn (i)) T is an n-dimensional state vector; F[x(i)] = A*x(i) is a linear mapping, A is an n-order coefficient matrix; (mod N) is a modulo operation, used to ensure that the system trajectory is bounded; the value of n is the same as the dimension of the chaotic mapping.
[0076] It should be noted that due to the inherent unpredictability and sensitivity to initial conditions of chaotic mappings, they have become key components of cryptographic primitives. The security level of chaotic mappings depends strongly on chaotic performance, and one-dimensional (1D) chaotic mappings have many disadvantages such as low complexity and susceptibility to dynamic degradation, so more excellent chaotic performance and more complex structure can be achieved by high-dimensional (HD) chaotic mappings.
[0077] It should be explained that the practical application of high-dimensional chaotic mappings in lightweight cryptography (LWC) faces key challenges: traditional high-dimensional chaotic mappings usually rely on floating-point operations and multiplication operations, which will significantly increase hardware resources and energy consumption in resource-constrained environments such as the Internet of Things. In the embodiments of the present application, a lightweight hash function easy to implement is designed, which uses a method based on an n-dimensional non-degenerate chaotic system (nD-NDCS) to design a variable structure self-mapping 4-dimensional chaotic system.
[0078] It should be noted that an n-dimensional chaotic system is a dynamic system with an n-dimensional state space, and its motion trajectory exhibits an n-dimensional non-degenerate chaotic system (nD-NDCS). Non-degenerate means that the system is not degenerated into a low-dimensional subsystem due to parameter or structural simplification, each dimension substantially contributes to chaotic behavior, and there is no invariant subspace or redundant dimension.
[0079] It should be explained that the nD-NDCS can flexibly generate high-dimensional chaotic systems with specified Lyapunov exponents by controlling the eigenvalues of the coefficient matrix, and has simple structure, few control parameters, and no need for complex operations, which is very suitable for resource-constrained scenarios. By structured design of the coefficient matrix, the system dimension is adjustable and the chaotic characteristics are controllable.
[0080] In some embodiments of the present application, the general iterative equation of the n-dimensional non-degenerate chaotic system is represented by formula (1):
[0081] x(i+1) = F[x(i)] mod N (1)
[0082] where x(i) = (x1(i), x2(i), …, xn(i)) is an n-dimensional state vector; F[x(i)] = A*x(i) is a linear mapping, A is an n-order coefficient matrix; (mod N) is a modulo operation, used to ensure that the system trajectory is bounded; the value of n is the same as the dimension of the chaotic mapping. n (i)) Tis an n-dimensional state vector; F[x(i)] = A*x(i) is a linear mapping, A is an n-order coefficient matrix; (mod N) is a modulo operation, which is used to ensure that the system trajectory is bounded; the value of n is the same as the dimension of the chaotic mapping. For this application, a variable structure self-mapping 4-dimensional chaotic system (4D-NDCS) is designed, that is, n = 4, so the state vector is (x1(i), x2(i), x3(i), x4(i)) T , and the system realizes four-dimensional chaotic behavior through the design of the coefficient matrix A.
[0083] In some embodiments of the application, the coefficient matrix A of the 4D-NDCS can adopt a block diagonal structure to ensure that the eigenvalues are controllable, thereby controlling the Lyapunov exponent. Specifically, the structure of the coefficient matrix A can be as shown in the following formula (2):
[0084]
[0085] It should be noted that the coefficient matrix A is composed of two submatrices on the main diagonal (which can be respectively set as the first submatrix A1 and the second submatrix A4). Among them, A1 is a 2x2 diagonal matrix (corresponding to the first 2 dimensions), the diagonal elements of which can be directly used as the eigenvalues of the system, that is, the eigenvalues of the first submatrix are determined by the diagonal elements; A4 is a 2x2 non-diagonal matrix (corresponding to the last 2 dimensions), and the eigenvalues of the second submatrix can be obtained by solving a quadratic equation.
[0086] It should be explained that in the coefficient matrix A, the off-diagonal elements include: 1,4 , a 2,4 , a 3,4 , a 4,3 . The off-diagonal elements are used to realize the coupling between dimensions and enhance the complexity of the system. The 4D-NDCS ensures that the system has a positive Lyapunov exponent (LE) through the eigenvalues of the structured coefficient matrix A. In the application, the Lyapunov exponent LE k of the coefficient matrix satisfies the following relationship with the eigenvalue λ k :
[0087] LE K = In|λ k |(k = 1, 2, 3, 4);
[0088] where λ k is the eigenvalue of the coefficient matrix A. When and only when all eigenvalues satisfy |λ k | > 1, the system presents a "non-degenerate hyperchaos" state, that is, the four dimensions all have positive Lyapunov exponents.
[0089] In the embodiments of the application, a variable structure self-coupling four-dimensional chaotic mapping is constructed, and is realized through simple operations such as modulo addition and bit shifting, thereby avoiding the use of complex components such as multipliers and reducing the hardware implementation overhead of the lightweight hash function.
[0090] Based on the first embodiment and / or the second embodiment of the application, in the third embodiment of the application, the same or similar content as the above embodiment one and / or embodiment two can be referred to the above introduction, and the following will not be described in detail.
[0091] In the embodiments of the application, the following constraints exist for the block structure of the coefficient matrix A:
[0092] 1. The eigenvalue constraint of the first sub-matrix A1, since A1 is a diagonal matrix, its eigenvalue λ1 is directly determined by the diagonal element: λ1=a 1,1 , λ2=a 2,2 , which needs to satisfy the condition: |a 1,1 |>1, and |a 2,2 |>1.
[0093] 2. The eigenvalue constraint of the second sub-matrix A4, A4 is a 2×2 non-diagonal matrix, and its eigenvalue is obtained by solving a quadratic equation:
[0094] λ 2 -(a 3,3 +a 4,4 )λ+(a 3,3 a 4,4 -a 3,4 a 4,3 )=0;
[0095] The roots of the quadratic equation need to satisfy |λ3|>1 and |λ4|>1, and the equivalent condition is as follows:
[0096]
[0097] This eigenvalue constraint design ensures that the system has 4 positive LE while maintaining low parameter complexity. The specific 4D-NDCS iterative equation is shown in equation 3, which realizes all-positive Lyapunov exponents (LE) by fixing the coefficient matrix: (3) In some embodiments of the embodiments of the application, due to the fixed coupling relationship between the dimensions in the original equation (such as x1, x2, x3 are coupled with x4), the sequence regularity may be enhanced. In order to break this limitation, the variable structure self-mapping mechanism of the embodiments of the application also introduces a cyclic permutation matrix to dynamically adjust the coupling order of the state dimensions. The expression of the cyclic permutation matrix can be shown as follows (4): (4) The core features of the variable structure self-mapping mechanism include: 1. Circular permutation operation: a single permutation maps the state vector T to T , realizing the circular left shift between dimensions. 2. Dynamic power generation: the power t can be calculated in real time through the state variable, and the specific steps are as follows: (1) Feature bit extraction: extract the 7th and 15th binary values from x4(i), k8=x4(i)[7], k9=x4(i)
[15] x4(i)(m) represents the mth binary value (0 or 1) of x4(i). (2) Logical operation synthesis: generate the power t through the existing combination, t=2k8+k9 This design makes the behavior of the circular permutation matrix B change dynamically with the system state, effectively breaking the fixed iteration mode. 3. Chaos enhancement effect: 3. By dynamically adjusting the dimension coupling order, while keeping the system core parameters (such as Lyapunov exponent) and hardware resource consumption unchanged, the unpredictability of the chaotic sequence is significantly improved.
[0102] The embodiment of the application realizes the circular left shift between dimensions through the variable structure self-mapping mechanism, and significantly improves the unpredictability of the chaotic sequence by dynamically adjusting the dimension coupling order while keeping the system core parameters and hardware resource consumption unchanged.
[0103] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the present application based on the construction method of the lightweight hash function based on the chaotic sponge structure. More forms of simple transformation based on this technical concept are within the protection scope of the present application.
[0104] The present application also provides a lightweight hash function construction device based on a chaotic sponge structure. Please refer to Figure 4 , Figure 4 is a module structure schematic diagram of the lightweight hash function construction device based on the chaotic sponge structure of the embodiment of the present application. The lightweight hash function includes an initialization stage, an absorption stage and a squeezing stage. The lightweight hash function construction device based on the chaotic sponge structure includes:
[0105] The initialization module 10 is used to fill the input message through standardization to obtain an initialization input sequence;
[0106] The absorption module 20 is used to perform XOR operation between the initialization input sequence and the external part of the internal state to obtain the XORed internal state;
[0107] The absorption module 20 is further configured to diffuse the internal state after the XOR operation by dynamically replacing layers to obtain an absorbed internal state.
[0108] The extrusion module 30 is configured to iteratively extract a hash output based on the absorbed internal state.
[0109] The lightweight hash function construction device based on the chaotic sponge structure provided in the application adopts the lightweight hash function construction method based on the chaotic sponge structure in the above embodiment, and can solve the technical problem that the traditional cryptographic hash function is not applicable due to the resource limitation of the Internet of Things device. Compared with the prior art, the lightweight hash function construction device based on the chaotic sponge structure provided in the application has the same beneficial effects as the lightweight hash function construction method based on the chaotic sponge structure provided in the above embodiment, and other technical features in the lightweight hash function construction device based on the chaotic sponge structure are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0110] The application provides a lightweight hash function construction device based on a chaotic sponge structure. The lightweight hash function construction device based on the chaotic sponge structure comprises at least one processor and a memory in communication connection with the at least one processor. The memory stores instructions executable by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the lightweight hash function construction method based on the chaotic sponge structure in the above embodiment one.
[0111] Reference will be made to the following description Figure 5 which shows a structure diagram of the lightweight hash function construction device based on the chaotic sponge structure suitable for implementing the embodiments of the application. The lightweight hash function construction device based on the chaotic sponge structure in the embodiments of the application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The lightweight hash function construction device based on the chaotic sponge structure shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the application.
[0112] As Figure 5As shown, the chaos sponge structure based lightweight hash function construction device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a Read Only Memory (ROM) 1002 or loaded from a storage apparatus 1003 into a Random Access Memory (RAM) 1004. Various programs and data required for the chaos sponge structure based lightweight hash function construction device to operate are also stored in the RAM 1004. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An Input / Output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the chaos sponge structure based lightweight hash function construction device to communicate with other devices wirelessly or by wire to exchange data. Although the chaos sponge structure based lightweight hash function construction device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.
[0113] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carrying computer program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication apparatus, or installed from the storage apparatus 1003, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.
[0114] The lightweight hash function construction device based on the chaotic sponge structure provided by the application adopts the lightweight hash function construction method based on the chaotic sponge structure in the above embodiment, and can solve the technical problem that the traditional cryptographic hash function is not applicable due to the resource limitation of the Internet of Things device. Compared with the prior art, the lightweight hash function construction device based on the chaotic sponge structure provided by the application has the same beneficial effects as the lightweight hash function construction method based on the chaotic sponge structure provided by the above embodiment, and other technical features in the lightweight hash function construction device based on the chaotic sponge structure are the same as the features disclosed in the previous embodiment method, and will not be repeated here.
[0115] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0116] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0117] The present application provides a computer readable storage medium having computer readable program instructions (i.e. computer programs) stored thereon, the computer readable program instructions being used to execute the lightweight hash function construction method based on the chaotic sponge structure in the above embodiment.
[0118] The computer readable storage medium provided in the application may be, for example, a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electrical connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM) or a flash memory, an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electrical wire, an optical cable, an RF (Radio Frequency, RF) cable, etc., or any suitable combination of the above.
[0119] The computer readable storage medium described above may be contained in a chaos sponge structure-based lightweight hash function construction device, or may exist separately and not be assembled into the chaos sponge structure-based lightweight hash function construction device.
[0120] The computer readable storage medium described above carries one or more programs, which, when executed by the chaos sponge structure-based lightweight hash function construction device, cause the chaos sponge structure-based lightweight hash function construction device to:
[0121] The initialization stage: the input message is filled by standardization to obtain an initialization input sequence;
[0122] The absorption stage: the initialization input sequence is XORed with the external part of the internal state to obtain an XORed internal state;
[0123] The XORed internal state is diffused by a dynamic replacement layer to obtain an absorbed internal state;
[0124] The extrusion stage: the absorbed internal state is iteratively extracted to obtain a hash output.
[0125] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0126] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0127] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0128] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., computer programs) for executing the above-mentioned method for constructing a lightweight hash function based on a chaotic sponge structure. The computer readable program instructions can solve the technical problem that the traditional cryptographic hash function is not applicable due to the resource constraints of the Internet of Things device. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the method for constructing a lightweight hash function based on a chaotic sponge structure provided by the above-mentioned embodiments, and will not be described here.
[0129] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method for constructing a lightweight hash function based on a chaotic sponge structure as described above.
[0130] The computer program product provided by the application can solve the technical problem that the traditional cryptographic hash function is not applicable due to the resource limitation of the Internet of Things device. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the method for constructing a lightweight hash function based on a chaotic sponge structure provided by the above-mentioned embodiments, and are not described here.
[0131] The above only describes some embodiments of the application, and does not limit the protection scope of the application, and any equivalent structure transformation made by using the content of the application specification and drawings, or direct / indirect application in other related technical fields is included in the protection scope of the application.
Claims
1. A lightweight hash function construction method based on a chaotic sponge structure, characterized in that, The lightweight hash function includes an initialization phase, an absorption phase, and a squeezing phase; the method includes: Initialization phase: The input message is standardized and padded to obtain the initial input sequence; Absorption phase: The initial input sequence is XORed with the external part of the internal state to obtain the XORed internal state; The internal state after XOR is diffused through a dynamic replacement layer to obtain the internal state after absorption. Squeezing phase: Iteratively extract hash output based on the internal state after absorption.
2. The lightweight hash function construction method based on chaotic sponge structure as described in claim 1, characterized in that, The lightweight hash function includes a dynamic replacement layer and a permutation layer; The dynamic replacement layer is implemented based on a variable structure self-coupled 4D chaotic mapping, which is used to enhance nonlinear diffusion; The substitution layer is based on a linear transformation of GFS II, used to accelerate the overall diffusion process through structured bit shuffling.
3. The lightweight hash function construction method based on chaotic sponge structure as described in claim 2, characterized in that, The expression for the variable structure self-coupling 4D chaotic mapping is: x(i+1) = F[x(i)] mod N; Where, x(i)=(x1(i),x2(i),……,x n (i)) T It is an n-dimensional state vector; F[x(i)]=A*x(i) is a linear mapping, where A is an n-order coefficient matrix; (mod N) is the modulo operation, used to ensure that the system trajectory is bounded; the value of n is the same as the dimension of the chaotic mapping.
4. The lightweight hash function construction method based on chaotic sponge structure as described in claim 3, characterized in that, The coefficient matrix A adopts a block diagonal structure, and the structural formula of the coefficient matrix A is as follows: The variable structure self-coupled 4D chaotic mapping ensures that the system has a positive Lyapunov exponent through the eigenvalues of the structured coefficient matrix. The positive Lyapunov index LE K With the eigenvalues λ of the coefficient matrix k The relation is: LE K =In|λ k |(k=1,2,3,4).
5. The lightweight hash function construction method based on chaotic sponge structure as described in claim 4, characterized in that, The coefficient matrix consists of a first submatrix and a second submatrix on the main diagonal, wherein the first submatrix is a 2×2 diagonal matrix corresponding to the first two dimensions, and the eigenvalues of the first submatrix are determined by the diagonal elements. The second submatrix is a 2×2 off-diagonal matrix corresponding to the last two dimensions, and the eigenvalues of the second submatrix are obtained by solving a quadratic equation.
6. The lightweight hash function construction method based on chaotic sponge structure as described in claim 5, characterized in that, The iterative equation for the variable structure self-coupled 4D chaotic mapping is:
7. A lightweight hash function construction device based on a chaotic sponge structure, characterized in that, The lightweight hash function includes an initialization phase, an absorption phase, and a squeezing phase. The lightweight hash function construction device based on the chaotic sponge structure includes: The initialization module is used to normalize and pad the input message to obtain an initial input sequence; An absorption module is used to XOR the initialization input sequence with the external part of the internal state to obtain the XORed internal state. The absorption module is also used to diffuse the XORed internal state through a dynamic replacement layer to obtain the absorbed internal state. The squeezing module is used to iteratively extract the hash output based on the absorbed internal state.
8. A lightweight hash function construction device based on a chaotic sponge structure, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the lightweight hash function construction method based on the chaotic sponge structure as described in any one of claims 1 to 7.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the lightweight hash function construction method based on the chaotic sponge structure as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the lightweight hash function construction method based on a chaotic sponge structure as described in any one of claims 1 to 7.