A lightweight secure session method and system based on dual chaotic systems
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-08-14
AI Technical Summary
对前向安全性、高频重密钥及密钥泄露后安全等场景考虑不足
[0024](1)轻量化开销与高工程可实现性:本发明不依赖椭圆曲线点乘、双线性对等重型公钥运算,核心计算过程主要由轻量级的混沌迭代与哈希运算构成,有效避免了复杂数学运算带来的高计算延迟。相较于基于国密SM2及主流TLS 1.3等传统安全方案,本发明在保障同等级安全强度的前提下,大幅缩减了单次身份认证的时间开销与峰值内存占用,并显著降低了通信交互过程中的数据传输量。其极低的状态空间要求使其能够轻易部署于静态随机存取存储器SRAM及计算资源严重受限的低功耗物联网节点,具有极佳的工程可实现性与大规模部署潜力。
Smart Images

Figure CN122437645B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security and cryptography technology, specifically relating to a lightweight identity authentication and secure session establishment method based on a dual chaotic system and national cryptographic algorithms for resource-constrained environments. It is applicable to secure communication scenarios of the Internet of Things, embedded terminals, and low-power devices. Background Technology
[0002] With the rapid development of the Internet of Things (IoT) and ubiquitous computing technologies, a large number of resource-constrained terminal devices are being widely deployed in applications such as sensing, control, and data acquisition. These devices typically have limited computing power, limited storage resources, and are energy-sensitive, but at the same time, they face increasingly severe cyberattack threats, placing higher demands on identity authentication and communication security.
[0003] Most current mainstream secure communication protocols are based on public-key cryptography. For example, the Transport Layer Security (TLS) 1.3 protocol widely employs Elliptic Curve Diffie-Hellman (ECDHE) key exchange and the Hash-based Message Authentication Code (HKDF) key derivation function key scheduling mechanism. While providing forward security, these protocols also require computational processes such as elliptic curve multiplication, large integer modulo arithmetic, and multiple rounds of hash derivation. These computational processes place high demands on the computing power, storage resources, and energy consumption of terminal devices. In resource-constrained IoT terminal environments, this can easily lead to increased computational latency, memory consumption, and power consumption during the authentication and key negotiation phases, thus affecting the system's deployment scale and operational efficiency to some extent. In the Chinese national cryptographic system, public-key cryptography algorithms such as SM2 and SM9 also rely on complex operations such as elliptic curve scalar multiplication and bilinear pairing. Their implementation costs in embedded terminals and low-power devices are high, limiting their practical application in lightweight scenarios.
[0004] In recent years, chaotic systems, due to their initial value sensitivity, stochasticity, and complex dynamics, have been incorporated into cryptographic protocols and authentication schemes. Existing research has shown that key negotiation mechanisms similar to ECDHE can be constructed based on Chebyshev chaotic maps or Logistic maps, and computational complexity can be reduced to some extent. However, most existing chaotic authentication schemes suffer from the following shortcomings:
[0005] Using only a single chaotic map can easily lead to chaotic degradation in environments with limited precision. Directly using chaotic maps as cryptographic primitives lacks effective integration with standard cryptographic algorithms. Furthermore, it fails to adequately consider scenarios such as forward security, high-frequency key duplication, and security after key leakage.
[0006] Therefore, there is an urgent need for a lightweight authentication and secure session method that does not rely on heavy public key computation, is compatible with the national cryptographic system, and is suitable for resource-constrained devices. This method should balance computational and communication efficiency while meeting certain security requirements, so as to meet the secure access and communication needs of resource-constrained devices. Summary of the Invention
[0007] The purpose of this invention is to propose a lightweight secure session method based on a dual-chaotic system. By combining a dual-chaotic coupling mechanism with a national cryptographic algorithm, it significantly reduces authentication latency, storage overhead, and communication overhead while ensuring randomness and security, thus making it suitable for secure access and communication of resource-constrained terminal devices.
[0008] To achieve the above objectives, this invention proposes a lightweight secure session method based on a dual chaotic system. This method establishes a secure transmission channel by performing identity authentication and key negotiation based on a dual chaotic system at the initial stage of session establishment. Specifically, it includes a parameter initialization stage, a device registration stage, an identity authentication stage, and a secure session stage.
[0009] S1. In the parameter initialization phase, parameter initialization is performed for the dual chaotic system.
[0010] A dual-chaotic system is introduced as the core entropy source, which consists of at least two chaotic mappings with different dynamic characteristics (Chebyshev mapping and Logistic mapping); the national cryptographic hash algorithm (SM3) is selected as the system hash function. Based on the dual-chaotic system and the national cryptographic hash algorithm, the authentication center configures the initial state space and publicly available system parameters.
[0011] S2. During the device registration phase, in the secure channel, based on the parameter-initialized dual-chaotic system, the client device completes registration with the authentication center.
[0012] The authentication center receives the identity information and password information of the client device; generates a pre-shared key (PSK) based on the password information and the national cryptographic hash algorithm (SM3); the authentication center establishes and stores the binding mapping relationship between the device's identity information and the pre-shared key (PSK) locally, and completes the establishment of the initial trust relationship between the devices.
[0013] S3. During the identity authentication phase, after the client completes registration with the authentication center, the client and the authentication center complete identity authentication through a three-way handshake, realizing two-way identity confirmation and session root key negotiation between the client and the authentication center.
[0014] The device and the authentication center complete identity authentication and key negotiation through bidirectional interaction. The device generates a device-side random number using the dual-chaotic system and calculates an identity authentication request using the pre-shared key (PSK), which is then sent to the authentication center. Upon receiving the authentication request, the authentication center first compares the device-side random number with historical records in its local anti-replay cache window. If the record has not been found before, authentication is allowed to continue, and the device-side random number is stored in the cache window. The authentication center then verifies the authentication request using the pre-shared key (PSK) bound to it. If the verification passes, a server-side random number is generated. Based on the pre-shared key (PSK), the device-side random number, and the server-side random number, the device and the authentication center jointly drive the dual-chaotic system to perform iteration and hash compression, synchronously generating a consistent initial chaotic state. Based on the initial chaotic state, the exchanged random numbers, and the pre-shared key (PSK), both parties complete bidirectional identity verification using a Message Authentication Code (MAC). After successful bidirectional identity authentication, both parties calculate and negotiate a consistent session root key based on the initial chaotic state.
[0015] S4. During the secure session phase, after the client and the authentication center complete identity authentication, they conduct a secure session.
[0016] Based on the session root key and initial chaotic state negotiated during the authentication phase, a business encryption key, a message authentication key, and an initialization vector are derived using a hash-based message authentication code (HKDF) key derivation function. Using the business encryption key and the initialization vector, the Zu Chongzhi Stream Cipher Algorithm (ZUC) or the Chinese Standard Block Cipher Algorithm (SM4) is invoked to encrypt the plaintext business data, generating ciphertext. The message authentication code is then calculated using the message authentication key. Finally, the ciphertext and the message authentication code are sent to the peer, who uses the same derived key to perform decryption and integrity verification.
[0017] During the secure session phase, the system supports a periodic rekey mechanism. When the set update conditions are met, both parties take the current session root key and the current chaotic state as input, and calculate the new session root key and the new chaotic state through double chaotic evolution and hash derivation. The old session key and related intermediate states are destroyed immediately, and the new key is used to establish subsequent communication.
[0018] In another aspect, the present invention provides a lightweight secure session system based on a dual-chaotic system for implementing the aforementioned lightweight secure session method, comprising the following modules:
[0019] The parameter initialization module is used to initialize parameters for a dual chaotic system.
[0020] The registration module is used to enable client devices to register with the authentication center in a dual-chaotic system based on parameter initialization within a secure channel.
[0021] The identity authentication module is used to complete identity authentication between the client and the authentication center through a three-way handshake after the client completes registration with the authentication center.
[0022] The session module is used for secure sessions between the client and the authentication center after identity authentication is completed, and for key updates at the same time.
[0023] Compared with the prior art, the present invention has at least the following beneficial effects:
[0024] (1) Lightweight overhead and high engineering feasibility: This invention does not rely on heavy public-key operations such as elliptic curve multiplication and bilinear pairwise operations. The core calculation process mainly consists of lightweight chaotic iteration and hash operations, effectively avoiding the high computational latency caused by complex mathematical operations. Compared with traditional security schemes based on national cryptographic SM2 and mainstream TLS 1.3, this invention significantly reduces the time overhead and peak memory usage of a single identity authentication while ensuring the same level of security, and significantly reduces the amount of data transmitted during communication. Its extremely low state space requirements enable it to be easily deployed on static random access memory (SRAM) and low-power IoT nodes with severely limited computing resources, exhibiting excellent engineering feasibility and large-scale deployment potential.
[0025] (2) Combining high-entropy randomness with the ability to suppress chaotic degradation: This invention employs a dual-chaotic coupling structure composed of Chebyshev mapping and Logistic mapping, combined with the SM3 hash extraction mechanism. This mechanism effectively breaks the orbital periodic locking phenomenon caused by limited computational precision, and the phase orbit diagram exhibits a high-dimensional scattering state with an information entropy close to 8 bits. The random sequences generated by this mechanism can meet the stringent testing requirements of the national commercial cryptography standard for random number quality, overcoming the degradation defects of a single chaotic mapping.
[0026] (3) Forward Security and Multiple Key Support: This invention innovatively introduces a multiple key mechanism based on the dual-entropy evolution of chaotic states during the session phase. The update of the session key in each round not only depends on the key of the previous round, but is also more strongly coupled to the externally unobservable dynamic chaotic internal state. Under this structure, even if an extreme single-round session root key leakage occurs, the attacker will not be able to reverse-engineer the history or predict subsequent keys due to the lack of chaotic branch information. Experimental verification shows that the bit Hamming distance between the subsequent derived key and the real key remains stable at around 50%, cutting off the deterministic derivation path in the traditional chain derivation structure, strictly isolating the leakage impact within a single round, and achieving strong forward security.
[0027] (4) Bounded Anti-Replay Mechanism for Constrained Storage: This invention introduces a random number cache window combined with freshness detection during the authentication phase. Addressing the limited storage characteristics of embedded devices, this mechanism employs a joint constraint strategy of lifetime and capacity limit. While ensuring 100% interception of replay attacks within the window period, a periodic cache cleanup mechanism completely prevents the unbounded growth of the device's memory state table, ensuring long-term stability and robust operation of the system under extremely resource-constrained environments.
[0028] (5) Deep Adaptation to the National Cryptographic System and Independent Controllability: This invention uses the SM3 cryptographic hash algorithm as the core cryptographic primitive to construct a chaotic state compression and key derivation mechanism, and supports the use of ZUC stream ciphers or SM4 block ciphers to perform data encryption operations during the secure session phase. The overall protocol architecture does not rely on traditional foreign asymmetric cryptographic systems, and achieves a high degree of compatibility with my country's commercial cryptographic standards from the underlying logic. This feature ensures the independent controllability of the cryptographic system while possessing excellent interface compatibility, making it easy to achieve hardware-level integration with domestic physical hardware random number generators (TRNGs) and commercial cryptographic security modules (SEs). It has significant compliance and engineering deployment advantages in the secure access scenarios of domestic IoT and restricted terminals. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the overall identity authentication and secure session process of the present invention;
[0030] Figure 2 This is a schematic diagram of the equipment registration process;
[0031] Figure 3 This is a flowchart illustrating the identity authentication process.
[0032] Figure 4 This is a schematic diagram of the process of a dual chaotic entropy source system;
[0033] Figure 5 This is a flowchart illustrating the secure session and key update phase. Detailed Implementation
[0034] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings and specific examples. (Refer to...) Figure 1 As shown, the method of the present invention is generally divided into four stages: parameter initialization, device registration, identity authentication, and secure session.
[0035] System parameter initialization is performed by the certification center, generating all the basic parameters required for protocol operation. The steps are as follows:
[0036] S1. Initialize the parameters for the dual chaotic system;
[0037] S11. The certification center pre-sets system-level security parameters, including the order parameter of the Chebyshev chaotic map. Coupling coefficient of a dual chaotic system The system loads the SM3 cryptographic hash algorithm and the HKDF session key derivation function. These parameters are used to limit the operating range of the chaotic system, ensuring that the system remains in a chaotic state.
[0038] S12. The authentication center configures the initial state space of the chaotic system for subsequent random number-driven dynamic initialization. The same initial state is not reused directly in different sessions. During initial deployment, the client pre-configures necessary publicly available system parameters for subsequent authentication processes.
[0039] Before joining the network, client devices must register with the authentication authority. The entire process takes place in a secure channel. The specific steps are as follows:
[0040] S2, Equipment Registration Stage. (Reference) Figure 2 As shown, the specific interaction process is as follows:
[0041] S21. The client sends a registration request to the authentication center. The registration request contains at least a unique client identifier. User-set password information (password).
[0042] S22, The authentication center, based on the received password information Generate random salt values , receive the password information With random salt value The pre-shared key is generated using the national cryptographic SM3 hash algorithm: The pre-shared key With client identifier Perform binding storage.
[0043] S23. The authentication center returns registration completion information to the client, including a random salt value. The order parameter of the Chebyshev chaotic map and pre-shared keys The client securely stores its unique identifier in local non-volatile memory. and the pre-shared key The client then deletes the plaintext password information. At this point, the client and the authentication authority establish an initial trust relationship.
[0044] The authentication phase employs a three-way handshake interactive authentication mechanism to achieve two-way identity verification and session root key negotiation between the client and the authentication authority. The specific steps are as follows:
[0045] S3, Identity Authentication Stage. (See reference) Figure 3 As shown, the specific process is as follows:
[0046] S31. The client sends the first handshake message to the authentication center. When initiating authentication, the client first generates a client-side random number. The client random number The key is generated by a dual chaotic system combined with the national cryptographic SM3 hash algorithm to ensure the freshness of this authentication; simultaneously, the client calls the HMAC function to pre-share the key. As a key, the client identity identifier Client-side random numbers The authentication parameters are protected for integrity, and the first authentication message is calculated: After completing the calculation, the client sends the first authentication request message to the authentication authority, including the client's identity identifier. Client-side random number generation Authentication message .
[0047] S32. After receiving the client request, the authentication center first checks the random number. Does it already exist in the used random number cache library? If the request falls under the category of a replay attack, the current authentication request is rejected; otherwise, the subsequent authentication process continues. The cache employs a limited capacity plus periodic clearing mechanism to adapt to resource-constrained devices.
[0048] S33, the authentication center identifies the client. Call the corresponding pre-shared key Combined with client-side random numbers Call the HAMC function to calculate the local authentication value: ,like If the client identity is invalid, the authentication process is terminated; if the two match, the client identity is confirmed as valid and the authentication process proceeds to step S34.
[0049] S34, Authentication Center generates random numbers on the server. And combined with client-side random numbers , Initialize the initial state of the dual chaotic system . refer to Figure 4 As shown, the initial state of the dual chaotic system The specific generation steps are as follows:
[0050] S341. Transfer the pre-shared key Client-side random number generation With server random numbers The initial seed is calculated by splicing and using the national cryptographic SM3 algorithm. Meanwhile, to avoid the chaotic degradation and precision differences caused by floating-point arithmetic in computers, the double chaotic system is restricted to operate within a finite field of integers, and a large prime modulus is set. , here .
[0051] S342, Initial seed Modulus of large prime numbers The input variable is obtained by performing a modulo operation. Based on variables Perform Chebyshev polynomial recursive computation over a finite field: ,go through After the order recursion, output the first chaotic state value. .
[0052] S343, Initial seed With the first chaotic state Perform a bitwise XOR operation, then modulo the large prime number. Perform a modulo operation to obtain the initial perturbation value for the Logistic mapping. The initial seed is then subjected to a bitwise right shift operation with a preset number of bits, and then modulo the result with a large prime number. Perform modulo operation to obtain control parameters. , Based on control parameters With input variables Perform discrete Logistic iteration over a finite field: , Indicates the first The input variables of the next iteration, after a preset number of iterations, output the second chaotic state value. .
[0053] S344, Hash Compression and Chaotic Entropy Source Extraction: Extracting the initial seed First chaotic state and the second chaotic state The data is concatenated byte by byte and then input into the SM3 hash algorithm for compression and obfuscation to extract the initial chaotic state of 256 bits. .
[0054] S345, Certification Center based on pre-shared keys Random numbers and and the initial state of chaos Call the HMAC function to calculate the second authentication message: .
[0055] S35. The authentication center sends a second handshake message to the client, the message including a server random number. Authentication message .
[0056] S36. The client receives the authentication message sent by the authentication center. Then, based on the locally stored system parameters, combined with the client's random number... With the received random number from the server Reconstructing the initial state of a dual chaotic system The client is based on random numbers. and and the initial state of the dual chaotic system Calculate the local authentication value using the HMAC function: ,like If the identities are not identical, the certification center's identity is deemed invalid, and certification is terminated; if they are identical, the certification center's identity is confirmed as valid, and the S37 certification process begins.
[0057] S37. The client sends the third handshake message to the authentication center, and the client sends a random number. and and the initial state of the dual chaotic system Concatenate the data and call the HMAC function to calculate the authentication confirmation message. : and will It is sent to the authentication center to complete two-way identity authentication.
[0058] S38, the certification center further uses random numbers and and the initial state of the dual chaotic system Concatenate and call the HMAC function to calculate the local authentication confirmation value: ,when At that time, the client's identity is confirmed to be legitimate, the three-way handshake authentication is completed, and the client's random number is generated. Store in random number cache library If the client's identity is deemed invalid, the authentication process will be terminated.
[0059] S39. The client and the authentication center respectively calculate the initial session root key. The client then performs a key derivation process, during which it shares the pre-key. Random numbers and and the initial state of chaos Concatenate and call the HMAC function to calculate: The authentication authority and the client negotiate a mechanism, with the authentication authority obtaining the same session root key. The following session parameters are derived using the key derivation function (HKDF-SM3) built based on the national cryptographic SM3 hash algorithm:
[0060] Zu Chongzhi's stream cipher algorithm encryption key: the session root key Key identifier of Zu Chongzhi's stream cipher algorithm Through the key derivation function HKDF-SM3, the following is derived: , It is used as a business encryption key, with a length of 32 bytes (256 bits), and is dedicated to the subsequent initialization of the Zu Chongzhi Stream Cipher Algorithm (ZUC-256).
[0061] Message authentication key: Session root key With message authentication key identifier Through the key derivation function HKDF-SM3, the following is derived: , It is used as a message authentication key, with a length of 32 bytes (256 bits), and is dedicated to calculating the message authentication code (MAC) of data packets in conjunction with the SM3 algorithm to verify data integrity.
[0062] Initialization vector for Zu Chongzhi's series of cryptographic algorithms: the session root key Initial Vector Identifier of Zu Chongzhi's Stream Cipher Algorithm Through the key derivation function HKDF-SM3, the following is derived: , It is 16 bytes (128 bits) long and is used as a non-repeating initialization parameter to ensure randomization of ciphertext during stream cipher encryption.
[0063] The character identifier is used to separate the domains of keys for different purposes, avoiding the security risks associated with key reuse. At this point, the device and the authentication center have completed two-way authentication and successfully established shared secure session key materials.
[0064] S4, Secure Session Phase, see reference Figure 5 As shown.
[0065] S41. During the client-authentication center session, the sender uses the ZUC-256 stream cipher algorithm, with the aforementioned... As the encryption key, the The plaintext data to be sent is used as the initial vector to generate a key stream; the plaintext data is then XORed with the key stream to obtain the ciphertext. ; Message authentication key Session message sequence number ciphertext and additional authentication data encapsulation And call the HMAC function based on the national cryptographic SM3 hash algorithm ( Calculate the message authentication code: And send it to the recipient.
[0066] S42. After receiving the data packet, the receiver first checks the sequence number in the data packet. The system performs checks to determine if there are any duplicates or out-of-order messages to prevent replay attacks; the receiver uses the aforementioned message authentication key. Verification message authentication code The correctness of the data is ensured, and the integrity and legitimacy of the source are guaranteed. The receiver uses the same Zu Chongzhi sequence cipher algorithm parameters as the sender to generate a key stream, decrypt the ciphertext, recover the plaintext data, and perform subsequent business processing on the decrypted plaintext data.
[0067] To enhance forward security and long-term communication security, the secure session phase of this invention also includes a dynamic key update mechanism.
[0068] (1) Key update triggering conditions
[0069] Key updates can be triggered by any of the following conditions:
[0070] Time-triggered: When the session duration reaches a preset time threshold. Triggered at any time.
[0071] Data volume trigger: Triggered when the amount of data transmitted reaches a preset threshold.
[0072] Active triggering: Either party in the communication can proactively initiate a key update request according to the security policy.
[0073] (2) Key update process
[0074] Once a key update is triggered, both parties shall perform a key re-key operation according to the following steps:
[0075] The client or authentication authority sends a key update request to the peer.
[0076] Both parties are based on the current session root key With chaotic state Key update count After concatenation, a new session root key is calculated based on the national cryptographic standard SM3. :
[0077]
[0078] Synchronize and update the chaotic state: Add the new session root key With the current chaotic state After splicing, a new chaotic state is obtained by calculation based on the national cryptographic standard SM3. :
[0079]
[0080] The key derivation process is re-executed based on the new session root key to generate a new session encryption key, authentication key, and initialization vector.
[0081] Once both parties have confirmed that they have completed the key update, the old session key and related intermediate state should be destroyed immediately.
[0082] Through the aforementioned key update mechanism, each round of session key is tightly coupled with the previous round key and the chaotic state. Even if the current session key is leaked, it is difficult for attackers to deduce the historical communication key or the subsequent session key, thereby achieving strong forward security.
[0083] S5. System Security and Performance Verification Examples
[0084] To further verify the effectiveness and technical advantages of this invention in resource-constrained environments, a comparative test environment was built using Python (including underlying C acceleration libraries) and a multi-core computing platform to verify various core performance indicators:
[0085] Example 1: Lightweight Overhead Analysis
[0086] Resource consumption was compared between the authentication phase of this invention (Dual-chaos + SM3), the national cryptographic standard SM2, SM9, and the mainstream TLS 1.3 protocol. On the same computing platform, the single authentication time of this invention is only 0.055ms, while TLS 1.3 is 0.519ms and SM2 is as high as 24.93ms. The peak memory usage of this invention is only 0.74KB, compared with SM2's 13.21KB and TLS 1.3's 11.09KB, representing a memory consumption reduction of over 93%. In a typical handshake interaction, the total communication overhead of this invention is approximately 1760 bytes, and the handshake latency is approximately 1.5-RTT, significantly better than traditional asymmetric cryptographic schemes, making it extremely suitable for deployment in low-end microcontrollers (MCUs) with less than tens of KB of SRAM resources.
[0087] Example 2: Random Sequence and Chaotic Feature Detection
[0088] To verify the randomness of the dual-chaotic hash entropy source of this invention, samples of random keystreams generated during the authentication and session phases were extracted and subjected to standardized testing. NIST SP800-22 test results showed that both sets of 1,000,000-bit random sequences passed all 15 tests with 100% pass rate. Under the stringent national cryptographic standard GM / T 0005-2021, 1000 datasets of 125KB each were tested, and the p-values of all tests met the significance level threshold, with the lowest-level general statistical test pass rate reaching 98.4%. Simultaneously, three-dimensional phase trajectory analysis showed that the dual-chaotic coupling state exhibits a uniform high-dimensional dispersion, and the average autocorrelation function (ACF) rapidly decays to 0 within a lag of 10-20 orders, successfully overcoming the periodic degradation and trajectory clustering effects caused by the limited precision of single Logistic or Chebyshev mappings.
[0089] Example 3: Forward Security Verification under Extreme Single-Round Key Leakage
[0090] Regarding the key rekeying mechanism during the session phase, a physical leak of the session root key is set to occur during the 50th round of key rekeying. Tests show that in the standard TLS 1.3 chained HKDF structure, after an attacker obtains the root key in the 50th round, the bit Hamming distance for key predictions in rounds 51-100 drops to 0%, completely negating the forward security of the record layer. However, in the dual-entropy evolution mechanism of this invention, because each subsequent update strongly depends on and the hidden update does not leak internal information... In this state, the attacker's bit Hamming distance between the predicted key and the actual key in subsequent rounds remains consistently around 50.03% (equivalent to random guessing). This scheme successfully isolates the risk of key leakage within a single round of session through a lightweight SM3 operation cost of approximately 6.21 ms per key re-encoding.
[0091] Example 4: Verification of a replay prevention mechanism for limited storage
[0092] In the anti-replay mechanism test, the maximum capacity of the random number cache on the authentication center side was set to 8 records, and a time-to-live (TTL) constraint was introduced. Eighty consecutive authentication interactions were initiated with the server, during which historical random numbers were frequently replayed. Test records confirm that: The cache capacity was not exceeded and During the validity period, all replay requests are accurately intercepted by the server's cache retrieval logic; and when a valid new random number is received and the cache is full, the system can automatically refresh the cache window. This mechanism achieves unbounded replay defense with a very low state overhead of no more than 1 KB under limited storage space.
[0093] In another aspect, the present invention provides a lightweight secure session system based on a dual-chaotic system for implementing the aforementioned lightweight secure session method, comprising the following modules:
[0094] The parameter initialization module is used to initialize parameters for a dual chaotic system.
[0095] The registration module is used to enable client devices to register with the authentication center in a dual-chaotic system based on parameter initialization within a secure channel.
[0096] The identity authentication module is used to complete identity authentication between the client and the authentication center through a three-way handshake after the client completes registration with the authentication center.
[0097] The session module is used for secure sessions between the client and the authentication center after identity authentication is completed, and for key updates at the same time.
[0098] System and hardware architecture description:
[0099] Those skilled in the art will understand that the authentication and secure session method described in this invention can be executed by a physical electronic device that includes computing, storage and communication modules.
[0100] Specifically, the "client" or "device" in this invention can be an IoT sensing node or embedded terminal that includes a microprocessor (MCU), internal static random access memory (SRAM), a national cryptographic hardware acceleration module (or a physically unclonable function PUF, a hardware true random number generator TRNG), and a wireless communication interface (such as Wi-Fi, BLE, or LoRa RF chips); its memory space can be limited to tens to hundreds of KB. The "authentication center" or "server" in this invention can be an edge gateway, control host, or cloud server with high computing power, including a processor, large-capacity memory, database, and network communication interface, used to maintain the device registry, pre-shared key (PSK), and nonce cache.
[0101] The above-described method flow of the present invention can be implemented by embedding software code in the non-volatile memory (such as Flash or EEPROM) of a microcontroller and executing it by the processor, or by implementing it in a purely hardware logic manner through a field-programmable gate array (FPGA) or application-specific integrated circuit (ASIC). The present invention does not impose any specific limitations on this.
Claims
1. A lightweight secure session method based on a dual-chaotic system, characterized in that, Includes the following steps: S1. Initialize the parameters for the dual chaotic system; S2. In a secure channel, based on a parameter-initialized dual-chaotic system, the client device completes registration with the authentication center. S3. After the client completes registration with the certification center, the client and the certification center complete identity authentication through a three-way handshake, realizing two-way identity confirmation and session root key negotiation between the client and the certification center. During the three-way handshake process, the first handshake includes initializing the initial state of the dual chaotic system. The specific process is as follows: pre-shared key Client-side random number generation With server random numbers The initial seed is calculated by splicing and using the national cryptographic SM3 algorithm. Simultaneously, the bi-chaotic system is confined to operate within a finite field of integers, and a large prime modulus is set. ; Through the initial seed Modulus of large prime numbers Perform a modulo operation to map the initial seed to a finite field to obtain the input variable. ; Based on variables Perform Chebyshev polynomial recursive calculations over finite fields, after After the order recursion, output the first chaotic state value. ; Initial seed With the first chaotic state Perform a bitwise XOR operation, then modulo the large prime number. Perform a modulo operation to obtain the initial perturbation value for the Logistic mapping. The initial seed is then subjected to a bitwise right shift operation with a preset number of bits, and then modulo the result with a large prime number. Perform modulo operation to obtain control parameters. Based on control parameters With input variables Perform a discrete logistic iteration over a finite field, after After the second iteration, output the second chaotic state value. ; Initial seed First chaotic state and the second chaotic state The data is concatenated byte by byte and then input into the SM3 hash algorithm for compression and obfuscation to extract the initial chaotic state. ; Certification centers based on pre-shared keys Random numbers and and the initial state of chaos Call the HMAC function to calculate the second authentication message. ; The specific implementation process of the third handshake in the three-way handshake process is as follows: The client sends a third handshake message to the authentication center, during which the client will generate a random number. and and the initial state of the dual chaotic system Concatenate the data and call the HMAC function to calculate the authentication confirmation message. and will Send to the certification center; The certification center will use random numbers and and the initial state of the dual chaotic system Concatenate the data and call the HMAC function to calculate the local authentication confirmation value. ,when Upon verification of the client's identity, the three-way handshake authentication is completed, and the client's random number Nc is stored in the random number cache. If the client's identity is invalid, the authentication process will be terminated. The client and the authentication authority each calculate the initial session root key. The client will then perform the key derivation process and share the pre-shared key. Random numbers and and the initial state of chaos Concatenate and call the HMAC function to calculate The authentication center and the client negotiate a mechanism, with the authentication center obtaining the same session root key. The following session parameters are derived using the key derivation function HKDF-SM3, which is based on the national cryptographic SM3 hash algorithm: Zu Chongzhi's stream cipher algorithm encryption key: the session root key Key identifier of Zu Chongzhi's stream cipher algorithm Through the key derivation function HKDF-SM3, the following is derived: Used for business encryption keys; Message authentication key: Session root key With message authentication key identifier Through the key derivation function HKDF-SM3, the following is derived: , used as a message authentication key; Zu Chongzhi's Stream Cipher Algorithm Initialization Vector: The session root key Initial Vector Identifier of Zu Chongzhi's Stream Cipher Algorithm Through the key derivation function HKDF-SM3, the following is derived: , used as a non-repeating initialization parameter to ensure randomization of ciphertext during stream cipher encryption; S4. After the client and the authentication center complete identity authentication, they will have a secure session.
2. The lightweight secure session method based on a dual-chaotic system according to claim 1, characterized in that, In step S1, the certification center pre-sets system-level security parameters, including the order parameter of the Chebyshev chaotic map. Coupling coefficient of a dual chaotic system The system loads the SM3 cryptographic hash algorithm and the HKDF session key derivation function.
3. The lightweight secure session method based on a dual-chaotic system according to claim 2, characterized in that, The specific implementation process of step S2 is as follows: S21. The client sends a registration request to the authentication center, the registration request containing the client's unique identifier. User-set password information ; S22, The authentication center, based on the received password information Generate random salt values The received password information With random salt value The pre-shared key is generated using the national cryptographic SM3 hash algorithm. and the pre-shared key With client identifier Perform binding storage; S23. The authentication center returns registration completion information to the client, including a random salt value. The order parameter of the Chebyshev chaotic map and pre-shared keys The client securely stores its unique identifier in local non-volatile memory. and pre-shared keys And delete the plaintext password information.
4. The lightweight secure session method based on a dual-chaotic system according to claim 3, characterized in that, The first handshake in the three-way handshake process is implemented as follows: The client sends the first handshake message to the authentication center. When initiating authentication, the client first generates a client-side random number. The client-side random number is generated by a dual-chaotic system combined with the national cryptographic SM3 hash algorithm; simultaneously, the client calls the HMAC function to pre-share the key. As a key, the client identity identifier Client-side random numbers The authentication parameters are protected for integrity, and the first authentication message is calculated. ; The client sends a first authentication request message to the authentication authority, including the client's identity identifier. Client-side random number generation Authentication message ; After receiving a client request, the authentication authority checks the random number. Does it already exist in the used random number cache library? If the request is found to be a replay attack, the current authentication request will be rejected. If it does not belong to the category, continue with the subsequent certification process; The authentication center uses the client's identity identifier. Call the corresponding pre-shared key Combined with client-side random numbers Call the HMAC function to calculate the local authentication value. ,like If the client's identity is deemed invalid, the authentication process will be terminated. If the two match, the client's identity is confirmed to be legitimate, and the authentication center generates a random number for the server. And combined with client-side random numbers , Initialize the initial state of the dual chaotic system .
5. The lightweight secure session method based on a dual-chaotic system according to claim 4, characterized in that, The second handshake in the three-way handshake process is implemented as follows: The authentication authority sends a second handshake message to the client, which includes a server random number. Authentication message ; The client receives the authentication message sent by the authentication center. Then, combined with client-side random numbers With the received random number from the server Reconstructing the initial state of a dual chaotic system The client is based on random numbers. and and the initial state of the dual chaotic system Call the HMAC function to calculate the local authentication value ,like If the authentication center's identity is not found to be valid, the authentication process is terminated; if the identity is found to be valid, the authentication center's identity is confirmed to be valid, and the third handshake authentication process begins.
6. The lightweight secure session method based on a dual-chaotic system according to claim 5, characterized in that, The specific implementation process of step S4 is as follows: S41. During the client-authentication center session, the sender uses the Zu Chongzhi stream cipher algorithm. As an encryption key The plaintext data to be sent is used as the initial vector to generate the key stream; the plaintext data is then XORed with the key stream bitwise to obtain the ciphertext. ; Message authentication key Session message sequence number and ciphertext The message authentication code is calculated by calling the HMAC function based on the national cryptographic SM3 hash algorithm. And send it to the recipient; S42. After receiving the data packet, the receiver first checks the sequence number in the data packet. The system performs checks to determine if there are any duplicates or out-of-order messages; the receiver uses the message authentication key. Verification message authentication code The correctness of the ciphertext is ensured; the receiver uses the same Zu Chongzhi stream cipher algorithm parameters as the sender to generate a key stream, and decrypts the ciphertext to recover the plaintext data.
7. The lightweight secure session method based on a dual-chaotic system according to claim 6, characterized in that, In step S4, the secure session process also includes a dynamic key update mechanism: Key updates are triggered by any of the following conditions: Time-triggered: When the session duration reaches a preset time threshold. Triggered at time; Data volume trigger: Triggered when the amount of data transmitted reaches a preset threshold; Active triggering: Either party in the communication initiates a key update request according to the security policy; Once a key update is triggered, both parties shall perform a key re-key operation according to the following steps: Both parties calculate a new session root key based on the current session root key and the chaotic state, and then use the current session root key... Current chaotic state and key update count After concatenation, a new session root key is calculated based on the national cryptographic standard SM3. ; Synchronize and update the chaotic state: Add the new session root key With the current chaotic state After splicing, a new chaotic state is obtained by calculation based on the national cryptographic standard SM3. ; Based on the new session root key, the key derivation process is re-executed to generate a new session encryption key, authentication key, and initialization vector; Once both parties have confirmed that they have completed the key update, the old session key and related intermediate state should be destroyed immediately.
8. A lightweight secure session system based on a dual-chaotic system, used to implement the lightweight secure session method according to any one of claims 1 to 7, characterized in that, Includes the following modules: The parameter initialization module is used for parameter initialization of a dual-chaotic system. The registration module is used in a secure channel to enable client devices to register with the authentication center in a dual-chaotic system based on parameter initialization. The identity authentication module is used to complete identity authentication between the client and the authentication center through a three-way handshake after the client completes registration with the authentication center. The session module is used for secure sessions between the client and the authentication center after identity authentication is completed, and for key updates at the same time.
Citation Information
Patent Citations
Internet of Things three-party authentication key agreement protocol based on chaotic mapping
CN113364578A
Method and device for dynamic secure communication between micro-services based on chaos cryptography
CN121356826A