A security authentication and encryption method for a credential reader

CN123034944APending Publication Date: 2026-11-03HAINAN CIVIL AVIATION CARES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611358238.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies for the security authentication and encryption methods of certificate readers in offshore duty-free scenarios suffer from low security, low algorithm efficiency, inability to adapt to high concurrency requirements, limited device resources, vulnerability to attacks and privacy leaks, poor compatibility, and difficulty in meeting customs supervision and compliance requirements.

Method used

It adopts a three-in-one lightweight encryption architecture, which generates hardware binding keys and dynamic session keys through the unique hardware identifier of the certificate reader, dynamic parameters and preset key SK. Combined with ECC and PUF, it realizes third-party security authentication and performs three-layer encryption processing, including hash obfuscation, overall substitution and XOR diffusion, to generate encrypted ciphertext in TLV format.

Benefits of technology

It achieves low computational overhead and low energy consumption encryption under high concurrency conditions in the offshore duty-free scenario, provides hardware-level protection against device theft, is compatible with multiple systems, supports transaction compliance traceability, protects passenger privacy and data security, and improves customs clearance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123034944A_ABST
    Figure CN123034944A_ABST
Patent Text Reader

Abstract

The application provides a security authentication and encryption method of a license reader, which comprises the following steps: extracting the ID of a security chip of the license reader, the MAC address of a radio frequency communication module and the mainboard serial number to generate a hardware identification string HID; collecting a time stamp, the unique serial number UID of a card, the communication signal strength RSSI of the license reader and the card, the device voltage and the cumulative card reading frequency to generate a dynamic factor string DF'; obtaining a symmetric key SK, combining the SK with the HID to generate a hardware binding key K1, combining the K1 with the DF' to generate a dynamic session key K2; preprocessing the read identity information M to obtain a byte stream M' containing a length identifier, executing an encryption process and encapsulating the ciphertext. The method can improve the security of encryption and authentication of the license reader in an island duty-free scenario and realize the lightweight of encryption and authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of information security, specifically a lightweight security authentication and encryption method for certificate readers applied in offshore duty-free scenarios. Background Technology

[0002] Offshore duty-free shopping is an important business model in special areas such as the Hainan Free Trade Port in my country. It provides duty-free shopping services to departing passengers through departure points such as airports, ports, and railway stations. In this scenario, document readers are the core identity verification devices. They need to quickly read passengers' ID cards, passports, and other document information (including sensitive data such as name, document number, date of birth, nationality, and entry / exit records), and link with the customs supervision system and the duty-free shop sales system to complete the entire process of "identity verification - quota verification - transaction release." Therefore, the security authentication and encryption of document readers are particularly important in offshore duty-free scenarios.

[0003] The encryption of document information in offshore duty-free scenarios has unique characteristics, and existing encryption technologies have significant adaptation deficiencies: 1) During peak departure periods (such as holidays and return peaks), a single port duty-free shop's document reader needs to process 5-10 verification requests per second, and the total time (including reading, encryption, and transmission) must be ≤300ms, otherwise it will lead to queuing congestion and affect the passenger experience; 2) The scenario simultaneously includes desktop fixed readers (such as cash registers) and portable mobile readers (such as inspection and temporary verification). Portable devices are limited by battery capacity and mostly use low-power MCUs, which are difficult to support complex encryption algorithms; 3) Passenger document information contains sensitive data such as cross-border travel records, which must comply with the "Personal Information Protection Law of the People's Republic of China," the "Data Security Law of the People's Republic of China," and customs supervision requirements (such as local data storage, encrypted transmission, and traceability). Leakage may lead to privacy risks or regulatory penalties; 4) Devices may be exposed in public areas (such as the duty-free shop lobby), posing a risk of physical contact, and it is necessary to prevent data extraction after the device is stolen; at the same time, in a high-concurrency environment, they are susceptible to replay attacks (such as attackers repeatedly submitting historical encrypted information to bypass quota verification).

[0004] In addition, existing authentication schemes for document readers in offshore duty-free scenarios also have some shortcomings and vulnerabilities: 1) In offshore duty-free scenarios, document readers need to transmit sensitive data such as passenger identification and consumption records across networks (in-store LAN and customs dedicated network). Some existing schemes lack a strong two-way authentication mechanism, which makes them vulnerable to data interception, tampering, and identity forgery attacks. This may lead to problems such as theft of duty-free quotas, false transaction filings, and distortion of regulatory data, affecting the order of customs supervision; 2) Document readers in offshore duty-free scenarios are mostly portable or embedded devices, which are limited by outdoor deployment environments and have resource constraints such as weak computing power, limited battery life, and small storage capacity. Traditional high-security authentication schemes often employ complex encryption algorithm combinations, resulting in high computational overhead and excessive energy consumption. This can lead to problems such as insufficient device battery life and excessively long authentication delays (affecting passenger clearance efficiency), making it difficult to adapt to the needs of different scenarios. 3) Certificate readers may be vulnerable to physical contact attacks (such as device cloning and private key extraction). Existing solutions mostly rely on software encryption and lack hardware-level trust root support, making them unable to effectively resist the risk of device tampering or cloning. At the same time, some solutions directly transmit or store original certificate information during the authentication process, which can easily lead to the leakage of passenger identity privacy, triggering the risk of information abuse and violating the compliance requirements for privacy protection in cross-border consumption. 4) Lack of multi-scenario compatibility and compliance: Offshore duty-free shopping requires integration with multiple systems such as customs, taxation, and duty-free shops. Existing authentication schemes are mostly customized for single scenarios and lack a unified lightweight authentication standard, resulting in complex inter-system integration and poor compatibility. Furthermore, some schemes do not fully consider the compliance requirements for cross-border data transmission, posing a risk to data security when exported and failing to meet the customs supervision requirements for data integrity and traceability.

[0005] In summary, the existing security authentication and encryption methods for offshore duty-free scenarios are not very secure and have low algorithm efficiency. Summary of the Invention

[0006] The first aspect of this invention provides a secure authentication and encryption method for a document reader, applied to a duty-free shopping scenario in Hainan. The method is characterized in that the secure authentication involves three-way secure authentication between the document reader, the authentication server, and a trusted institution, and negotiation of a symmetric key SK. The encryption method utilizes the symmetric key SK for encryption, and includes the following steps: S1: Extract the ID of the security chip, the MAC address of the radio frequency communication module, and the motherboard serial number of the certificate reader, and generate a 32-byte hardware identifier string HID; S2: During the process of the certificate reader reading the card, the timestamp, the card's unique serial number UID, the communication signal strength RSSI between the certificate reader and the card, the device voltage, and the cumulative number of card readings are collected to generate a 36-byte dynamic factor string DF'. S3: Obtain the symmetric key SK, combine it with the hardware identifier string HID to generate the hardware binding key K1, and combine the hardware binding key K1 and the dynamic factor string DF' to generate the dynamic session key K2; S4: Preprocess the read identity information M to obtain a byte stream M' containing a length identifier, and perform the following encryption process: S41: Generate an extended hash H_extend using the hardware binding key K1, and perform hash obfuscation on the byte stream M' to obtain C1; S42: Generate a permutation table using the dynamic session key K2 as a seed, and perform a whole-byte permutation on C1 to obtain C2; S43: Generate an extended key K2_extend using the dynamic session key K2, and XOR diffuse C2 to obtain C3; S5: Encapsulate the hash value of C3, the hash value of the hardware identifier string HID, the hash value of the dynamic factor string DF', and the hash value of C3 into TLV format ciphertext, which is used as the final encrypted ciphertext.

[0007] As a further limitation of the present invention, the hardware identifier string HID in step S1 is generated by converting the security chip ID (64-bit), the MAC address of the radio frequency communication module (48-bit), and the motherboard serial number (32-bit) into hexadecimal strings and concatenating them, and then taking the first 32 bytes after SHA-256 hash processing.

[0008] As a further limitation of the present invention, the dynamic factor string DF' in step S2 is characterized in that it is a concatenation of a 32-byte dynamic factor DF and the CRC32 value (4 bytes) of DF, wherein the DF is concatenated in the order of timestamp (8 bytes)∥UID (8 bytes)∥RSSI (1 byte)∥voltage (1 byte)∥cumulative count (2 bytes)∥0x00 filling.

[0009] As a further limitation of the present invention, the generation rules of the hardware binding key K1 and the dynamic session key K2 in step S3 are: K1 = SHA-256(SK∥HID), K2 = SHA-256(K1∥DF'), where “∥” indicates byte-level concatenation.

[0010] As a further limitation of the present invention, the byte stream M' in step S4 includes the original identity information M and a 2-byte length identifier.

[0011] As a further limitation of the present invention, the specific process of step S41 is as follows: S411: Calculate the hash extension value H = SHA - 256 (K1∥M'); S412: Consolidate the hash extension value H in a loop until it is the same length as M' to obtain H_extend; S413: Calculate C1=M'⊕H_extend, where “⊕” represents byte-level XOR.

[0012] As a further limitation of the present invention, the specific process of step S42 is as follows: S421: Using the first 16 bytes of the dynamic session key K2 as a seed, generate a permutation table P[i] with the same length as C1, where the elements in P[i] are random and non-repeating integers between 0 and len(C1)-1, and len(C1) is the length of C1; S422: Calculate C2[i]=C1[P[i]], where i is the byte index.

[0013] As a further limitation of the present invention, the process of step S43 is specifically as follows: S431: Circularly concatenate the dynamic session key K2 to the same length as C2 to obtain the extended key K2_extend; S432: Calculate C3 = C2 ⊕ K2_extend, where “⊕” represents byte-level XOR.

[0014] As a further limitation of the present invention, the final encrypted text in step S5 includes: Header: SHA-256 hash value of the hardware identifier string HID (32 bytes) + version number (2 bytes) + reserved bits (2 bytes); Main body: Tag 0x00 (representing complete information) || C3 Length (2 bytes) || C3; Tail: Dynamic factor string DF' (36 bytes) + the first 4 bytes of the SHA-256 hash of the body (4 bytes).

[0015] As a further limitation of the present invention, the security authentication process includes an initialization phase, a registration phase, and a login and key negotiation phase, with the specific steps as follows: Initialization phase: Trusted organization (TA) determines the elliptic curve parameter set. Finite prime group Generator , large prime numbers and one-way hash function Generate the private key of the TA. and public key and publicly disclose system parameters The authentication server and certificate reader have built-in SRAM physically unclonable functions. As a hardware root of trust; Registration phase: 1) Authentication server registration: The authentication server administrator selects a password. and identity identifier Generate random numbers Calculate its device identifier and temporary encryption device identifier ,Will Send to TA via secure channel; TA generates random number. Calculate the private key and public key ,return Give it to the authentication server; the authentication server calculates... , ,storage and and will Report to TA for recordation; 2) Certificate Reader Registration: The certificate reader administrator selects a password. and identity identifier Generate random numbers Calculate its device identifier and temporary encryption device identifier ,Will Send to TA via secure channel; TA generates random number. Calculate the private key and public key ,return Give the certificate reader; the certificate reader calculates , ,storage and and will Report to TA, who will then synchronize the information to the corresponding authentication server; Login and key negotiation phase: 1) When the certificate reader and authentication server start, the administrator enters the corresponding username and password, the system verifies them, and after successful verification, the system will... or Stored in the memory of the certificate reader or authentication server; 2) Certificate reader initiates authentication: The certificate reader loads the stored... , and Generate timestamp and random numbers ,calculate , , , Send an authentication request message to the authentication server. ; 3) The authentication server verifies the identity of the certificate reader: The authentication server receives... First, verify If the time frame is within the valid time threshold, terminate the session if invalid; otherwise, calculate the time frame. , ,verify Is it consistent with the filing? Consistent, and verified Is it equal to If both verifications are successful, the identity of the document reader is considered legitimate; 4) Authentication server responds to authentication: The authentication server generates a timestamp. and random numbers ,calculate , , Send a response message to the certificate reader. ; 5) The certificate reader verifies the identity of the authentication server: The certificate reader receives... ,check After validity, calculate ,verify Is it equal to If the verification is successful, the authentication server's identity is valid; Negotiating and sharing the session key: The certificate reader and the authentication server each calculate the shared symmetric key. The identity information M can then be encrypted or decrypted using this key.

[0016] The present invention can achieve at least the following beneficial effects: This invention presents a secure authentication method adapted to the resource constraints of duty-free shopping on outlying islands. By combining ECC and PUF, it achieves strong two-way authentication between the document reader and multiple systems, resisting attacks such as forgery and tampering. The authentication overhead is low (156ms / 1408 bits), suitable for the battery life requirements of portable devices. Hardware-level protection and encrypted transmission ensure passenger privacy and data security, are compatible with customs and other systems, support transaction compliance traceability, and balance security with customs clearance efficiency.

[0017] The secure encryption method designed in this invention is adapted to the offshore duty-free scenario. The lightweight encryption takes ≤180ms, meeting the requirements of high concurrency. Hardware binding prevents device theft and leakage. Dynamic factors resist replay attacks. The encrypted text contains traceability information to adapt to regulatory compliance. It is compatible with existing equipment, has low deployment cost, and comprehensively protects the security of certificate information and the efficient operation of business. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art are briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of a lightweight security encryption method for a certificate reader applied in the offshore duty-free scenario, provided by an embodiment of the present invention. Detailed Implementation

[0020] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0021] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0022] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".

[0023] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0024] Example 1:

[0025] The first aspect of this invention provides a secure authentication and encryption method for a document reader, applied to a duty-free shopping scenario in Hainan. The method is characterized in that the secure authentication involves three-way secure authentication between the document reader, the authentication server, and a trusted institution, and negotiation of a symmetric key SK. The encryption method utilizes the symmetric key SK for encryption, and includes the following steps: S1: Extract the ID of the security chip, the MAC address of the radio frequency communication module, and the motherboard serial number of the certificate reader, and generate a 32-byte hardware identifier string HID; S2: During the process of the certificate reader reading the card, the timestamp, the card's unique serial number UID, the communication signal strength RSSI between the certificate reader and the card, the device voltage, and the cumulative number of card readings are collected to generate a 36-byte dynamic factor string DF'. S3: Obtain the symmetric key SK, combine it with the hardware identifier string HID to generate the hardware binding key K1, and combine the hardware binding key K1 and the dynamic factor string DF' to generate the dynamic session key K2; S4: Preprocess the read identity information M to obtain a byte stream M' containing a length identifier, and perform the following encryption process: S41: Generate an extended hash H_extend using the hardware binding key K1, and perform hash obfuscation on the byte stream M' to obtain C1; S42: Generate a permutation table using the dynamic session key K2 as a seed, and perform a whole-byte permutation on C1 to obtain C2; S43: Generate an extended key K2_extend using the dynamic session key K2, and XOR diffuse C2 to obtain C3; S5: Encapsulate the hash value of C3, the hash value of the hardware identifier string HID, the hash value of the dynamic factor string DF', and the hash value of C3 into TLV format ciphertext, which is used as the final encrypted ciphertext.

[0026] As a further limitation of the present invention, the hardware identifier string HID in step S1 is generated by converting the security chip ID (64-bit), the MAC address of the radio frequency communication module (48-bit), and the motherboard serial number (32-bit) into hexadecimal strings and concatenating them, and then taking the first 32 bytes after SHA-256 hash processing.

[0027] As a further limitation of the present invention, the dynamic factor string DF' in step S2 is characterized in that it is a concatenation of a 32-byte dynamic factor DF and the CRC32 value (4 bytes) of DF, wherein the DF is concatenated in the order of timestamp (8 bytes)∥UID (8 bytes)∥RSSI (1 byte)∥voltage (1 byte)∥cumulative count (2 bytes)∥0x00 filling.

[0028] As a further limitation of the present invention, the generation rules of the hardware binding key K1 and the dynamic session key K2 in step S3 are: K1 = SHA-256(SK∥HID), K2 = SHA-256(K1∥DF'), where “∥” indicates byte-level concatenation.

[0029] As a further limitation of the present invention, the byte stream M' in step S4 includes the original identity information M and a 2-byte length identifier.

[0030] As a further limitation of the present invention, the specific process of step S41 is as follows: S411: Calculate the hash extension value H = SHA - 256 (K1∥M'); S412: Consolidate the hash extension value H in a loop until it is the same length as M' to obtain H_extend; S413: Calculate C1=M'⊕H_extend, where “⊕” represents byte-level XOR.

[0031] As a further limitation of the present invention, the specific process of step S42 is as follows: S421: Using the first 16 bytes of the dynamic session key K2 as a seed, generate a permutation table P[i] with the same length as C1, where the elements in P[i] are random and non-repeating integers between 0 and len(C1)-1, and len(C1) is the length of C1; S422: Calculate C2[i]=C1[P[i]], where i is the byte index.

[0032] As a further limitation of the present invention, the process of step S43 is specifically as follows: S431: Circularly concatenate the dynamic session key K2 to the same length as C2 to obtain the extended key K2_extend; S432: Calculate C3 = C2 ⊕ K2_extend, where “⊕” represents byte-level XOR.

[0033] As a further limitation of the present invention, the final encrypted text in step S5 includes: Header: SHA-256 hash value of the hardware identifier string HID (32 bytes) + version number (2 bytes) + reserved bits (2 bytes); Main body: Tag 0x00 (representing complete information) || C3 Length (2 bytes) || C3; Tail: Dynamic factor string DF' (36 bytes) + the first 4 bytes of the SHA-256 hash of the body (4 bytes).

[0034] The core technical solution of this invention is to construct a lightweight encryption architecture integrating hardware identifier, dynamic parameters, and key SK. Using the preset key SK as the root, a hardware binding factor is generated by integrating the unique hardware identifier of the certificate reader, and a dynamic encryption factor is generated by combining real-time card reading parameters. This three-layer simplified encryption method unifies the processing of complete identity information. The specific steps are as follows: Extraction of unique hardware identifier for document reader: Obtain the unique, tamper-proof hardware identifier of the document reader as the basis for encrypted device binding, ensuring a strong association between the ciphertext and the device. Select hardware characteristics from the document reader that are unique, tamper-proof, and easily readable. Security Chip ID: The factory-unique ID of the built-in security encryption chip (such as the national standard SM1 chip) (64-bit, stored in the chip fuse bit, cannot be modified); RF Communication Module MAC Address: The physical address of the contactless RF communication module (48-bit, globally unique); Motherboard Serial Number: The production serial number of the certificate reader motherboard (32-bit, burned into the BIOS, cannot be rewritten).

[0035] For example: Security chip ID=0x1A2B3C4D5E6F7890, MAC=0x001122334455, motherboard serial number=0xABCDEF12.

[0036] Hardware Identifier String (HID) Generation: First, convert the above hardware identifiers into hexadecimal strings (remove delimiters). For example, the security chip ID is converted to "1A2B3C4D5E6F7890". Then, concatenate the three identifiers in the order of "Security Chip ID || MAC || Motherboard Serial Number", and perform SHA-256 hashing. The first 32 bytes are taken as the hardware identifier string (HID) (fixed length, for easy key calculation). For example, if the concatenated string is "1A2B3C4D5E6F7890001122334455ABCDEF12", the first 32 bytes of the HID (SHA-256 concatenated string) are 0x212223...52 (32 bytes).

[0037] Dynamic parameter acquisition and encoding for card reading: Collect dynamic parameters that change over time and with the card during the card reading process, and generate a one-time encryption factor to avoid the risks associated with static encryption rules.

[0038] Time parameters: Card reading start timestamp (Unix millisecond level, 64-bit), ensuring parameters are different for the same device at different times; Card parameters: Unique serial number of the ID card chip (UID, 64-bit, unique for each ID card), communication signal strength between the card and the ID card reader (RSSI, 8-bit, range -90 to -30dBm); Device status parameters: Current operating voltage of the ID card reader (8-bit, unit 0.1V), cumulative number of card reads (16-bit, stored in non-volatile memory). For example: Timestamp = 1720000000000 (July 3, 2024, 08:00:00), UID = 0x8877665544332211, RSSI = 0xB5 (-75dBm), Voltage = 0x28 (3.2V), Cumulative number of reads = 0x03E8 (1000 times).

[0039] Dynamic Factor String (DF) Generation: Concatenate the above parameters in a fixed order into a 32-byte string: DF = [Timestamp (8 bytes)] ∥ [UID (8 bytes)] ∥ [RSSI (1 byte)] ∥ [Voltage (1 byte)] ∥ [Cumulative Count (2 bytes)] ∥ [0x00 padded to 32 bytes]. Integrity Verification: Calculate the CRC32 value of DF (4 bytes) and concatenate it into a 36-byte dynamic factor string DF' = DF ∥ CRC32 (DF) (used to verify parameter consistency during decryption).

[0040] Dynamic encryption key derivation: Based on the preset key SK, a dynamic encryption key is generated by integrating HID and DF'. Two types of keys are derived, used for different encryption stages: Hardware-bound key (K1): bound to the certificate reader hardware for the first layer of hash obfuscation; Dynamic session key (K2): bound to the card reading scenario for the third layer of XOR diffusion.

[0041] Key generation rules: K1 generation: H=SHA-256 (K1∥M') (32 bytes, combining the key and hardware identifier to ensure device binding); K2 generation: K2 = SHA-256(K1∥DF') (32 bytes, combining K1 and dynamic factor to ensure one-time key).

[0042] Complete identity information is uniformly encrypted: The complete ID card information (without split fields) is encrypted using a three-layer encryption process of "hash obfuscation - overall substitution - XOR diffusion" to balance security and efficiency. Complete identity information, including all fields (ID number, name, address, photo, etc.), is read according to the "GA450-2013 Technical Requirements for Resident ID Card Readers". This data is then concatenated into a continuous byte stream M (variable length, usually ≤2048 bytes) in the original data format. A 2-byte length identifier is added to the header of M (recording the total number of bytes in M ​​for easy decryption and reconstruction), resulting in preprocessed data M' = [length identifier (2 bytes)]∥M.

[0043] First layer of encryption: Hardware-bound hash obfuscation. Using K1 to obfuscate M' achieves device binding: Calculate the hash extension value: H = SHA-256 (K1∥M') (32 bytes). Concatenate H cyclically until it is the same length as M', obtaining the extended hash H_extend; Obfuscation result: C1 = M'⊕H_extend (byte-level XOR, utilizing the one-way nature of hashing to ensure irreversible obfuscation). Example: M' is 1502 bytes long. H is concatenated 47 times (32 × 47 = 1504 bytes). The first 1502 bytes are taken as H_extend, C1 = M' ⊕ H_extend (1502 bytes).

[0044] The second layer of encryption: A full-byte permutation of C1 is performed to enhance data diffusion. Permutation table generation: Using the first 16 bytes of K2 as a seed, a permutation table P of the same length as C1 is generated (elements in P are unique integers from 0 to len(C1)-1, ensuring each position is permuted only once); permutation rule: C2[i] = C1[P[i]] (all bytes of C1 are rearranged according to permutation table P). For example, if C1 is 1502 bytes long and permutation table P is [5,3,10,...,2] (1502 unique indices), the i-th byte of C2 is equal to the P[i]-th byte of C1.

[0045] Third layer of encryption: Dynamic XOR diffusion. K2 is used to XOR diffuse C2 to enhance dynamism: K2 is cyclically concatenated to the same length as C2 to obtain the extended key K2_extend; diffusion result: C3=C2⊕K2_extend.

[0046] Ciphertext Encapsulation and Verification: The encrypted complete data C3, device verification information, and dynamic verification information are encapsulated into standard ciphertext, supporting legality verification during decryption. Ciphertext Structure: The final ciphertext is encapsulated in TLV format, with a total length of header + body + footer.

[0047] The secure encryption method designed in this invention is adapted to the offshore duty-free scenario. The lightweight encryption takes ≤180ms, meeting the requirements of high concurrency. Hardware binding prevents device theft and leakage. Dynamic factors resist replay attacks. The encrypted text contains traceability information to adapt to regulatory compliance. It is compatible with existing equipment, has low deployment cost, and comprehensively protects the security of certificate information and the efficient operation of business.

[0048] Example 2:

[0049] As a further limitation of the present invention, the security authentication process includes an initialization phase, a registration phase, and a login and key negotiation phase, with the specific steps as follows: Initialization phase: Trusted organization (TA) determines the elliptic curve parameter set. Finite prime group Generator , large prime numbers and one-way hash function Generate the private key of the TA. and public key and publicly disclose system parameters The certificate reader has built-in SRAM physically unclonable functions. As a hardware root of trust; Registration phase: 1) Authentication server registration: The authentication server administrator selects a password. and identity identifier Generate random numbers Calculate its device identifier and temporary encryption device identifier ,Will Send to TA via secure channel; TA generates random number. Calculate the private key and public key ,return Give it to the authentication server; the authentication server calculates... , ,storage and and will Report to TA for recordation; 2) Certificate Reader Registration: The certificate reader administrator selects a password. and identity identifier Generate random numbers Calculate its device identifier and temporary encryption device identifier ,Will Send to TA via secure channel; TA generates random number. Calculate the private key and public key ,return Give the certificate reader; the certificate reader calculates , ,storage and and will Report to TA, who will then synchronize the information to the corresponding authentication server; Login and key negotiation phase: 1) When the certificate reader and authentication server start, the administrator enters the corresponding username and password, the system verifies them, and after successful verification, the system will... or Stored in the memory of the certificate reader or authentication server; 2) Certificate reader initiates authentication: The certificate reader loads the stored... , and Generate timestamp and random numbers ,calculate , , , Send an authentication request message to the authentication server. ; 3) The authentication server verifies the identity of the certificate reader: The authentication server receives... First, verify If the time frame is within the valid time threshold, terminate the session if invalid; otherwise, calculate the time frame. , ,verify Is it consistent with the filing? Consistent, and verified Is it equal to If both verifications are successful, the identity of the document reader is considered legitimate; 4) Authentication server responds to authentication: The authentication server generates a timestamp. and random numbers ,calculate , , Send a response message to the certificate reader. ; 5) The certificate reader verifies the identity of the authentication server: The certificate reader receives... ,check After validity, calculate ,verify Is it equal to If the verification is successful, the authentication server's identity is valid; Negotiating and sharing the session key: The certificate reader and the authentication server each calculate the shared symmetric key. The identity information M can then be encrypted or decrypted using this key.

[0050] This invention presents a secure authentication method adapted to the resource constraints of duty-free shopping on outlying islands. By combining ECC and PUF, it achieves strong two-way authentication between the document reader and multiple systems, resisting attacks such as forgery and tampering. The authentication overhead is low (156ms / 1408 bits), suitable for the battery life requirements of portable devices. Hardware-level protection and encrypted transmission ensure passenger privacy and data security, are compatible with customs and other systems, support transaction compliance traceability, and balance security with customs clearance efficiency.

[0051] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0052] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A security authentication and encryption method for a certificate reader, the method being applied to offshore duty-free scenarios, characterized in that, The security authentication is used for three-party security authentication between the certificate reader, the authentication server, and the trusted authority, and to negotiate a symmetric key SK. The encryption method is used to encrypt using the symmetric key SK, and the encryption method includes the following steps: S1: Extract the ID of the security chip, the MAC address of the radio frequency communication module, and the motherboard serial number of the certificate reader, and generate a 32-byte hardware identifier string HID; S2: During the process of the certificate reader reading the card, the timestamp, the card's unique serial number UID, the communication signal strength RSSI between the certificate reader and the card, the device voltage, and the cumulative number of card readings are collected to generate a 36-byte dynamic factor string DF'. S3: Obtain the symmetric key SK, combine it with the hardware identifier string HID to generate the hardware binding key K1, and combine the hardware binding key K1 and the dynamic factor string DF' to generate the dynamic session key K2; S4: Preprocess the read identity information M to obtain a byte stream M' containing a length identifier, and perform the following encryption process: S41: Generate an extended hash H_extend using the hardware binding key K1, and perform hash obfuscation on the byte stream M' to obtain C1; S42: Generate a permutation table using the dynamic session key K2 as a seed, and perform a whole-byte permutation on C1 to obtain C2; S43: Generate an extended key K2_extend using the dynamic session key K2, and XOR diffuse C2 to obtain C3; S5: Encapsulate the hash value of C3, the hash value of the hardware identifier string HID, the hash value of the dynamic factor string DF', and the hash value of C3 into TLV format ciphertext, which is used as the final encrypted ciphertext.

2. The method according to claim 1, characterized in that, The hardware identifier string HID mentioned in step S1 is generated as follows: the security chip ID (64-bit), the MAC address of the radio frequency communication module (48-bit), and the motherboard serial number (32-bit) are converted into hexadecimal strings and concatenated. After SHA-256 hash processing, the first 32 bytes are taken.

3. The method according to claim 1, characterized in that, The dynamic factor string DF' in step S2 is a concatenation of a 32-byte dynamic factor DF and its CRC32 value (4 bytes). The DF is concatenated in the following order: timestamp (8 bytes) → UID (8 bytes) → RSSI (1 byte) → voltage (1 byte) → cumulative count (2 bytes) → 0x00 padding.

4. The method according to claim 1, characterized in that, The generation rules for the hardware binding key K1 and the dynamic session key K2 in step S3 are: K1 = SHA-256(SK∥HID), K2 = SHA-256(K1∥DF'), where "∥" indicates byte-level concatenation.

5. The method according to claim 1, characterized in that, The byte stream M' in step S4 includes the original identity information M and a 2-byte length identifier.

6. The method according to claim 5, characterized in that, The specific process of step S41 is as follows: S411: Calculate the hash extension value H = SHA - 256 (K1∥M'); S412: Consolidate the hash extension value H in a loop until it is the same length as M' to obtain H_extend; S413: Calculate C1=M'⊕H_extend, where "⊕" represents byte-level XOR.

7. The method according to claim 6, characterized in that, The specific process of step S42 is as follows: S421: Using the first 16 bytes of the dynamic session key K2 as a seed, generate a permutation table P[i] with the same length as C1, where the elements in P[i] are random and non-repeating integers between 0 and len(C1)-1, and len(C1) is the length of C1; S422: Calculate C2[i]=C1[P[i]], where i is the byte index.

8. The method according to claim 7, characterized in that, The process of step S43 is as follows: S431: Circularly concatenate the dynamic session key K2 to the same length as C2 to obtain the extended key K2_extend; S432: Calculate C3 = C2 ⊕ K2_extend, where "⊕" represents byte-level XOR.

9. The method according to claim 8, characterized in that, The final ciphertext in step S5 includes: Header: SHA-256 hash value of the hardware identifier string HID (32 bytes) + version number (2 bytes) + reserved bits (2 bytes); Main body: Tag 0x00 (representing complete information) || C3 Length (2 bytes) || C3; Tail: Dynamic factor string DF' (36 bytes) + the first 4 bytes of the SHA-256 hash of the body (4 bytes).

10. The method according to claim 1, characterized in that, The security authentication process includes an initialization phase, a registration phase, and a login and key negotiation phase. The specific steps are as follows: Initialization phase: Trusted organization (TA) determines the elliptic curve parameter set. Finite prime group Generator , large prime numbers and one-way hash function Generate the private key of the TA. and public key and publicly disclose system parameters The authentication server and certificate reader have built-in SRAM physically unclonable functions. As a hardware root of trust; Registration phase: 1) Authentication server registration: The authentication server administrator selects a password. and identity identifier Generate random numbers Calculate its device identifier and temporary encryption device identifier ,Will Send to TA via secure channel; TA generates random number. Calculate the private key and public key ,return Give it to the authentication server; the authentication server calculates... , ,storage and and will Report to TA for recordation; 2) Certificate Reader Registration: The certificate reader administrator selects a password. and identity identifier Generate random numbers Calculate its device identifier and temporary encryption device identifier ,Will Send to TA via secure channel; TA generates random number. Calculate the private key and public key ,return Give the certificate reader; the certificate reader calculates , ,storage and and will Report to TA, who will then synchronize the information to the corresponding authentication server; Login and key negotiation phase: 1) When the certificate reader and authentication server start, the administrator enters the corresponding username and password, the system verifies them, and after successful verification, the system will... or Stored in the memory of the certificate reader or authentication server; 2) Certificate reader initiates authentication: The certificate reader loads the stored... , and Generate timestamp and random numbers ,calculate , , , Send an authentication request message to the authentication server. ; 3) The authentication server verifies the identity of the certificate reader: The authentication server receives... First, verify If the time frame is within the valid time threshold, terminate the session if invalid; otherwise, calculate the time frame. , ,verify Is it consistent with the filing? Consistent, and verified Is it equal to If both verifications are successful, the identity of the document reader is considered legitimate; 4) Authentication server responds to authentication: The authentication server generates a timestamp. and random numbers ,calculate , , Send a response message to the certificate reader. ; 5) The certificate reader verifies the identity of the authentication server: The certificate reader receives... ,check After validity, calculate ,verify Is it equal to If the verification is successful, the authentication server's identity is valid; Symmetric key negotiation: The certificate reader and the authentication server each calculate the shared symmetric key. The identity information M can then be encrypted or decrypted using this key.