Re-encryption near field communication method and safety door lock
Through the national secret SM4 algorithm and dynamic encryption strategy, combined with signal strength and abnormal operation response, the communication instability and security issues of smart door locks under dynamic security threats and signal interference are solved, and adaptive security protection is achieved to prevent communication interruption and leakage.
Patent Information
- Application Number
- CN202511033956.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing smart door locks lack communication security and stability under dynamic security threats and signal interference scenarios. Traditional encryption algorithms are difficult to deal with man-in-the-middle attacks and replay attacks, resulting in communication interruption or security degradation.
The national secret SM4 algorithm is used for two-way device authentication to generate dynamic session keys, and the AES-256 or DES encryption algorithm is dynamically switched based on signal strength. The SM3 hash algorithm is combined to generate security alarm fingerprints, triggering abnormal operation responses. The multi-mode communication module and security control unit are used to implement encryption algorithm switching and channel switching.
An adaptive security protection system has been built to ensure identity trust, enhance communication reliability in weak signal environments and data confidentiality in strong signal environments, and effectively respond to new threats through a triple security response mechanism to prevent communication interruptions and leaks.
Smart Images

Figure CN120636027A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet of Things security and intelligent access control, and specifically relates to a heavy-encryption near-field communication method and a security door lock. Background Art
[0002] Near-field communication (NFC), such as Bluetooth 5.0 and Bluetooth 5.0, is widely used in smart access control systems due to its low power consumption and convenience. Traditional access control systems use fixed encryption algorithms (such as AES-128) to ensure communication security, relying on one-way authentication or simple key exchange mechanisms. However, with the advancement of attack methods (such as man-in-the-middle attacks and replay attacks), static encryption solutions are no longer able to cope with dynamic security threats.
[0003] However, in existing traditional smart door locks, in signal interference scenarios, the door locks may suffer communication interruption or security degradation because the encryption algorithm is not adapted to the channel conditions. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a re-encrypted near-field communication method to solve the problem that static encryption schemes in the prior art are difficult to cope with dynamic security threats and the communication security and stability are insufficient in signal interference scenarios.
[0005] The method for re-encrypting near field communication includes the following steps:
[0006] S1. During the near-field communication establishment phase, the national secret SM4 algorithm is used for two-way device authentication and a dynamic session key is generated.
[0007] S2. During the data transmission phase, the encryption algorithm AES-256 or DES is dynamically switched based on the signal strength to ensure communication security.
[0008] S3. When an abnormal operation is detected, the SM3 hash algorithm is triggered to generate a security alarm fingerprint and interrupt the current communication link.
[0009] Preferably, the dynamic encryption algorithm switching strategy is:
[0010]
[0011] Among them, P rssi is the received signal strength, N0 is the noise power spectrum density, and B is the communication bandwidth.
[0012] Preferably, the update period T of the dynamic session key is determined by the following formula:
[0013] T=24h·log2(S+1)
[0014] Where S is the current security level of the door lock, ranging from 1 to 5.
[0015] A security door lock adopts a heavy-encryption near-field communication method, comprising:
[0016] Built-in lock structure, including anti-pry lock tongue and emergency charging port;
[0017] National secret security chip, supports SM1-SM9 algorithms and AES / DES hardware acceleration;
[0018] Multi-mode communication module, supporting Bluetooth 5.0, NB-IoT and wired communication protocols;
[0019] Security control unit, used to implement anti-brute force cracking strategies and encryption algorithm switching.
[0020] Preferably, the anti-brute force cracking strategy includes:
[0021] When the number of consecutive authentication failures n≥3, the cooling lock mechanism is activated and the lock time is T cool By exponential growth:
[0022] T cool =30s·2 n-3
[0023] When physical unlocking is detected, the SM2 encrypted emergency communication channel is automatically enabled.
[0024] Preferably, the channel switching decision of the multi-mode communication module is based on a communication quality index Q:
[0025]
[0026] When Q<0.7, it automatically switches to the backup communication channel.
[0027] Preferably, the communication encryption of the emergency charging interface adopts:
[0028] The default state is off and it is activated only when a main power failure is detected;
[0029] After enabling, the SM4 algorithm is used for data encryption, and the validity period of a single session does not exceed 5 minutes.
[0030] An access control management system for managing security door locks, comprising:
[0031] Unified key management module, rotating door lock encryption keys according to dynamic period T;
[0032] Real-time security monitoring dashboard, visually displaying door lock encryption status and alarm events;
[0033] The audit log system uses blockchain evidence storage technology to record all operation logs.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] Through the dynamic combination of national secret algorithms and AES / DES encryption, a security protection system that adapts to the communication environment is established. The SM4 algorithm is used to achieve two-way device authentication during the near-field communication establishment phase to ensure trusted identity. During the data transmission phase, the encryption strength is intelligently switched based on the real-time signal strength, ensuring communication reliability in weak signal environments while enhancing data confidentiality in strong signal environments. This dynamic protection mechanism effectively solves the dilemma of traditional fixed encryption methods in complex electromagnetic environments: "over-encryption leading to communication interruption" or "under-encryption leading to leakage."
[0036] Active defense is achieved through a triple security response mechanism: abnormal operations trigger the generation of SM3 hash alarm fingerprints, brute force attacks activate exponentially growing cooling locks, and physical attacks automatically switch to emergency encryption channels. This layered defense strategy can not only block known attack modes in a timely manner, but also effectively respond to new threats such as zero-day attacks through mechanisms such as algorithm fingerprint retention and channel switching. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of the method of the present invention;
[0038] Figure 2 It is a structural schematic diagram of the safety door lock of the present invention. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0040] Example 1:
[0041] Scenario: In a base station smart access control system, an administrator uses a mobile app to connect to a door lock via Bluetooth 5.0. Within a 10-meter communication range, Wi-Fi signal interference may affect near-field communication. To ensure communication security, the system uses a dynamic encryption algorithm switching strategy.
[0042] The specific steps are as follows:
[0043] 1. Two-way authentication stage
[0044] Certificate Exchange:
[0045] The door lock (device A) and the mobile phone (device B) first exchange certificates encrypted using the SM4 algorithm.
[0046] Device A sends: Cert_A = SM4_Encrypt (SN_A || PubKey_A, K_master)
[0047] Among them, SN_A is the serial number of the door lock, PubKey_A is the public key of the door lock, and K_master is the master key.
[0048] After receiving Cert_A, device B uses the pre-stored K_master to decrypt and verify the validity of SN_A and PubKey_A.
[0049] After verification, device B replies: SM4_MAC(Challenge,SessionKey_AB)
[0050] Challenge is the challenge value generated by device B, and SessionKey_AB is the session key to be generated.
[0051] Generate a session key:
[0052] Both parties use the SM3 algorithm to generate a session key:
[0053] SessionKey_AB=SM3_Hash(Nonce_A⊕Nonce_B)
[0054] Among them, Nonce_A and Nonce_B are random numbers generated by device A and device B respectively.
[0055] 2. Data transmission stage
[0056] Measured environmental parameters:
[0057] Received signal strength P rssi =-65dBm, noise power spectral density N0 = -90dBm / Hz, bandwidth B = 1MHz
[0058] Calculate encryption selection:
[0059] Calculate the encryption algorithm selection threshold according to the formula:
[0060]
[0061] Since the measured received signal strength P rssi =-65dBm>-125dBm, so the AES-256 encryption algorithm is selected for data transmission.
[0062] Data encryption transmission:
[0063] The AES-256 algorithm is used to encrypt the transmitted data to ensure the security of the data during transmission.
[0064] 3. Exception handling
[0065] Simulated attack:
[0066] In order to test the security of the system, the attack behavior of continuously sending forged data packets is simulated.
[0067] Fingerprint that triggers the alarm:
[0068] When the door lock detects abnormal operation, it immediately triggers the SM3 hash algorithm to generate a security alarm fingerprint: AlertHash = SM3 (TimeStamp | | SessionKey_AB)
[0069] Among them, TimeStamp is the current timestamp, which is used to identify the time when the alarm occurs.
[0070] Interrupt communication and upload alarm:
[0071] The door lock interrupts the current communication link with the mobile phone and uploads the generated alarm fingerprint to the access control management system.
[0072] After receiving the alarm information, the access control management system records it and notifies the administrator for further processing.
[0073] Example 2: Anti-brute force cracking strategy
[0074] 1. Test data
[0075] In the test simulating a brute force attack, we recorded the number of consecutive authentication failures and the corresponding cooldown period, as well as the response to physical lock picking. The following is the test data:
[0076] Number of failures n <![CDATA[Calculate the cooling time T cool > Actual effective value 3 30s 30s 4 60s 60s 5 120s 120s
[0077] 2. Physical Picking Response
[0078] When the door lock's vibration sensor detects an impact, the system identifies it as a physical prying attempt and immediately takes the following actions:
[0079] Activate the emergency channel:
[0080] The system immediately activates the emergency communication channel, which uses the SM2 encryption algorithm for data transmission to ensure communication security in emergency situations.
[0081] Generate SM2 temporary key: TempKey = SM2_KeyExchange (EmergencyPin)
[0082] Among them, EmergencyPin is a preset emergency password or key used for key exchange in emergency situations.
[0083] To shut down the main communication module:
[0084] To prevent attackers from continuing to attempt to crack through the main communication module, the system automatically shuts down the main communication module, including Bluetooth 5.0, NB-IoT, and wired communication protocols.
[0085] Only the emergency Bluetooth link is retained to ensure that communication with external devices (such as the administrator's mobile phone) can still be carried out in an emergency.
[0086] Recording and Alarming:
[0087] The system records the time, location and related information of physical lock picking events and uploads this information to the access control management system.
[0088] After receiving the alarm information, the access control management system will immediately notify the administrator and trigger other security mechanisms such as alarm and video recording.
[0089] 3. Specific implementation
[0090] Vibration sensor calibration:
[0091] Before actual deployment, the vibration sensor needs to be calibrated to ensure that it can accurately detect the impact caused by physical prying.
[0092] Regularly check the working status of the sensor to ensure its long-term stable operation.
[0093] Emergency channel encryption:
[0094] The emergency channel uses the SM2 encryption algorithm to ensure communication security in emergency situations.
[0095] The generation and exchange process of the temporary key TempKey must strictly follow the security specifications of the SM2 algorithm to prevent key leakage.
[0096] Cooling Lock Mechanism:
[0097] The time calculation of the cooling lock mechanism is based on the formula T cool =30s·2 n-3 , where n is the number of consecutive authentication failures.
[0098] When n≥3, the cooling lock mechanism is activated and the lock time increases exponentially, effectively preventing brute force cracking.
[0099] System Recovery:
[0100] After the cooling lock mechanism ends, or the administrator successfully resets the door lock through the emergency channel, the system can return to normal working state.
[0101] The administrator needs to conduct a comprehensive inspection of the door lock to ensure that there are no other safety hazards before putting it back into use.
[0102] Example 3: Communication quality switching
[0103] 1. Channel quality assessment
[0104] During the communication process of the smart door lock, to ensure the stability and security of data transmission, the system will evaluate the quality of the current channel in real time. The following are the measured parameters:
[0105]
[0106] Signal-to-noise ratio (SINR) = 12dB
[0107] Delay jitter (σ t )=40ms
[0108] 2. Calculate Q value
[0109] According to the formula Calculate the communication quality index Q;
[0110] Substitute the parameters into the formula:
[0111]
[0112] 3. Channel switching decision
[0113] Because the calculated Q value (0.56) is less than the preset threshold of 0.7, the system determines that the current channel quality is poor, which may affect the stability and security of data transmission. Therefore, the system automatically performs a channel switch operation.
[0114] 4. Channel switching implementation
[0115] Switch to the backup channel:
[0116] The system immediately starts the channel switching process, switching the current communication channel from the main channel Bluetooth 5.0 to the NB-IoT backup channel.
[0117] During the switching process, ensure that all data to be transmitted has been properly saved or successfully sent to the recipient to avoid data loss.
[0118] Channel switch confirmation:
[0119] After the switch is completed, the system sends a channel switch confirmation message to the access control management system, including information such as the switch time, channel types before and after the switch, etc.
[0120] The access control management system updates the communication status records of the door locks to ensure that managers can understand the communication status of the door locks in real time.
[0121] Subsequent monitoring:
[0122] The system continuously monitors the quality of the NB-IoT backup channel to ensure the stability and security of data transmission.
[0123] If the quality of the backup channel also drops below the threshold, the system will consider further switching to other available channels or taking other measures to ensure communication.
[0124] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0125] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A heavy encryption near field communication method, characterized in that: The following steps are involved: S1. During the near-field communication establishment phase, the national secret SM4 algorithm is used for two-way device authentication and a dynamic session key is generated. S2. During the data transmission phase, the encryption algorithm AES-256 or DES is dynamically switched based on the signal strength to ensure communication security. S3. When an abnormal operation is detected, the SM3 hash algorithm is triggered to generate a security alarm fingerprint and interrupt the current communication link.
2. The method for re-encrypting near field communication according to claim 1, wherein: The dynamic encryption algorithm switching strategy is: Among them, P rssi is the received signal strength, N0 is the noise power spectrum density, and B is the communication bandwidth.
3. The method for re-encrypting near field communication according to claim 1, wherein: The update period T of the dynamic session key is determined by the following formula: T=24h·log2(S+1) Where S is the current security level of the door lock, ranging from 1 to 5.
4. A security door lock, using the re-encrypted near field communication method according to any one of claims 1 to 3, characterized in that: include: Built-in lock structure, including anti-pry lock tongue and emergency charging port; National secret security chip, supports SM1-SM9 algorithms and AES / DES hardware acceleration; Multi-mode communication module, supporting Bluetooth 5.0, NB-IoT and wired communication protocols; Security control unit, used to implement anti-brute force cracking strategies and encryption algorithm switching.
5. The safety door lock according to claim 4, characterized in that: The anti-brute force cracking strategy includes: When the number of consecutive authentication failures n≥3, the cooling lock mechanism is activated and the lock time is T cool By exponential growth: T cool =30s·2 n-3 When physical unlocking is detected, the SM2 encrypted emergency communication channel is automatically enabled.
6. The safety door lock according to claim 4, characterized in that: The channel switching decision of the multi-mode communication module is based on the communication quality index Q: When Q<0.7, it automatically switches to the backup communication channel.
7. The safety door lock according to claim 4, characterized in that: The communication encryption of the emergency charging interface adopts: The default state is off and it is activated only when a main power failure is detected; After enabling, the SM4 algorithm is used for data encryption, and the validity period of a single session does not exceed 5 minutes.
8. An access control management system for managing the security door lock according to any one of claims 4 to 7, characterized in that: include: Unified key management module, rotating door lock encryption keys according to dynamic period T; Real-time security monitoring dashboard, visually displaying door lock encryption status and alarm events; The audit log system uses blockchain evidence storage technology to record all operation logs.
Citation Information
Cited By
Privacy protection method based on data on intelligent door lock chain
CN120979810A