A U disk identity authentication method, system, device and medium based on a digital signature trusted chain
By generating environmental summary data and combining it with time perturbation factors for signature verification and challenge data construction, the problems of environment cloning attacks and forged terminals in U-shield identity authentication are solved, achieving higher security and the integrity of the authentication process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-04-07
AI Technical Summary
Existing U-shield authentication schemes lack a continuous analysis and identification mechanism for dynamic changes in the terminal environment, which cannot effectively prevent environment cloning attacks and successful deception by forged terminals. Furthermore, the lack of multi-level environment digest association verification results in insufficient security of the authentication process when facing man-in-the-middle attacks and signature replay.
By collecting device identifiers, network parameters, and geographic location information, environmental summary data is generated. Then, multi-level signature data is generated using summary processing and perturbation mechanisms. Combined with time perturbation factors, signature verification and challenge data construction are carried out to achieve the linkage effect of multi-source data and deep environmental consistency verification.
It enhances the timeliness and uniqueness of authentication requests, improves the ability to verify the true state of the receiving terminal, strengthens anti-counterfeiting capabilities and protection, and reduces the risk of forgery and the possibility of man-in-the-middle attacks.
Smart Images

Figure CN121000540B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, specifically to a U-shield identity authentication method, system, device, and medium based on a digital signature trusted chain. Background Technology
[0002] Digital certificate-based identity authentication technology is widely used in fields with high requirements for identity trustworthiness, such as finance, telecommunications, and e-government. Among them, the U-shield, as a hardware carrier with digital certificate storage and private key protection capabilities, has become a key medium for end users to perform digital signatures and identity authentication.
[0003] Existing USB-shield-based authentication processes typically involve the user inserting the USB-shield, the system reading the digital certificate and signing specific authentication data using the private key within the USB-shield, and the authentication server verifying the signature using the public key to confirm the user's identity. This type of authentication scheme primarily relies on the hardware encapsulation characteristic of the user's private key being non-exportable, and the advantages of digital signatures in terms of tamper resistance and non-repudiation.
[0004] However, traditional USB key-based authentication methods typically do not fully consider the dynamic and unique nature of access terminal environment parameters, such as device hardware identifiers, network parameters, and geographical location information. While these environmental factors can provide additional contextual information for authentication, existing solutions lack a unified collection mechanism and processing method, failing to form a complete chain of trust. Especially when facing threats such as man-in-the-middle attacks, terminal impersonation, or signature replay, static signature verification alone often cannot guarantee the integrity and authenticity of the authentication chain.
[0005] In addition, although some current authentication systems have introduced challenge response mechanisms, the challenge data is mostly random strings that are not generated in conjunction with terminal status information, nor are multi-level environment summary verifications introduced. This poses a risk of being forged or bypassed, resulting in deficiencies in the authentication process in terms of security and anti-counterfeiting capabilities. Summary of the Invention
[0006] In view of the above-mentioned problems, the present invention is proposed.
[0007] Therefore, the technical problem solved by this invention is that existing U-shield authentication schemes typically rely solely on a single environmental parameter binding to assist in identity verification, lacking a continuous analysis and identification mechanism for dynamic environmental changes. This allows attackers to bypass the authentication process when they copy the terminal's environmental characteristics or forge similar network and device parameters, resulting in environment cloning attacks. Especially when the user's private key is genuine and the U-shield has not been stolen, the authentication system can still be successfully deceived by forged terminals, posing a significant security risk.
[0008] Furthermore, the environmental parameter processing in existing authentication processes mostly lacks disturbance control and structural cascading mechanisms, and does not have the linkage effect between multi-source data. This makes it difficult for the authentication process to resist counterfeit construction behavior targeting the environmental field structure, and it is impossible to perform deep environmental consistency verification on the receiving terminal.
[0009] To address the aforementioned technical problems, this invention provides the following technical solution: a U-shield identity authentication method based on a digital signature trusted chain, comprising,
[0010] After the receiving terminal connects to the USB key, it reads the user's digital certificate stored in the USB key and collects the receiving terminal's device identifier, network parameters, and geographical location information. It then generates first environment digest data through digest processing. The receiving terminal uses the private key stored in the USB key to digitally sign the first environment digest data, generating first signature data. It then sends the first environment digest data, the first signature data, and the user's digital certificate to the authentication server. Upon receiving the first signature data, the authentication server verifies the signature data using the public key in the user's digital certificate. If the verification is successful, it stores the first environment digest data. After sending the first environment digest data, the receiving terminal sends an authentication request to the authentication server. Upon receiving the authentication request, the authentication server generates random challenge data and sends it to the receiving terminal. The receiving terminal then collects the current device identifier, network parameters, and geographical location information. The system uses identifiers, network parameters, and geographic location information to generate a second environment digest data through digest processing. This second environment digest data is then concatenated with challenge data according to a preset structure to construct the original signature data. The receiving terminal uses the private key stored in its USB key to digitally sign the original signature data, generating second signature data. Both the original and second signature data are then sent to the authentication server. Upon receiving the original and second signature data, the authentication server verifies the second signature data using the public key in the user's digital certificate. If the verification is successful, the server extracts the second environment digest data from the original signature data. The authentication server then compares the extracted second environment digest data with the stored first environment digest data for similarity. When the second signature data is successfully verified and the similarity is higher than a preset threshold, the authentication server determines that the receiving terminal's identity authentication is valid.
[0011] As a preferred embodiment of the U-shield identity authentication method based on a digital signature trusted chain described in this invention, the step of generating the first environment digest data through digest processing includes: converting the motherboard number, processor serial number, and device unique identifier in the device identifier into their corresponding hexadecimal codes, and concatenating them in reverse order to obtain a first string; converting the MAC address, IP address, and default gateway address in the network parameters into unsigned integer formats, and concatenating them in order to obtain a second string; converting the base station number, longitude, and latitude in the geographic location information into floating-point numbers, multiplying them by 10,000, and converting them into integer formats, and concatenating them in order to obtain a third string; calculating a cyclic redundancy check value based on the device unique identifier, and extracting from the check value... The least significant byte is used as the perturbation seed; the first string is subjected to index perturbation rearrangement based on the field length setting using the perturbation seed to generate the first intermediate data; two digest processing functions with different output bit widths are sequentially executed on the second string to generate the first digest value and the second digest value respectively; bit-level modulo operations are performed on the first digest value and the second digest value respectively, and they are concatenated according to the preset structure order to generate the second intermediate data; byte compression processing is performed on the third string, and the compression result is input for mirror swapping to generate the third intermediate data; the first intermediate data, the second intermediate data and the third intermediate data are sequentially concatenated into a combined data sequence; bit re-encoding processing, perturbation processing and fixed-length compressed digest processing are sequentially performed on the combined data sequence to generate the first environment digest data.
[0012] As a preferred embodiment of the U-shield identity authentication method based on a digital signature trusted chain described in this invention, the generation of the first signature data includes: concatenating the first environment digest data, the terminal identification data field, the UTC timestamp, and the verification value corresponding to the first environment digest data in a preset field order to form the first signature data; the receiving terminal inputs the original signature data as signature request data to the U-shield through the signature instruction interaction interface between the receiving terminal and the access U-shield; the U-shield performs an asymmetric encryption operation on the original signature data using its stored user private key to generate a signature value; the receiving terminal concatenates the signature value, the used UTC timestamp, and the verification value of the first environment digest data in a field order to form the first signature data.
[0013] As a preferred embodiment of the U-shield identity authentication method based on a trusted digital signature chain as described in this invention, the step of verifying the first signature data using the public key in the user's digital certificate includes: reconstructing the corresponding original signature data based on the signature value, the used UTC timestamp, and the verification value of the first environment digest data in the received first signature data; calling the public key corresponding to the user's digital certificate to perform an asymmetric verification operation on the signature value; when the verification is successful, extracting the used UTC timestamp and calculating the time perturbation factor; applying the time perturbation factor to the field sequence of the first environment digest data and performing a perturbation remapping operation to generate perturbation-mapped digest data; constructing an expected digest verification structure based on the terminal identifier field previously registered by the receiving terminal and matching it with the perturbation-mapped digest data; and under the condition that the verification is successful and the matching is successful, the authentication server establishes a binding relationship between the first environment digest data and the user's digital certificate.
[0014] As a preferred embodiment of the U-shield identity authentication method based on a digital signature trusted chain described in this invention, the generation of random challenge data includes: constructing a perturbation vector based on the byte verification values of each field in the first intermediate data, the second intermediate data, and the third intermediate data, as well as a time perturbation factor; based on the perturbation vector, performing field order rearrangement on the first intermediate data, performing byte-by-byte rotation on the second intermediate data, and performing bit-by-bit masking on the third intermediate data to generate perturbated challenge base data; concatenating the perturbated challenge base data with the UTC timestamp and the session identifier parameters set by the authentication server according to a predetermined field order to form a challenge data source string; and sequentially performing bit-level perturbation processing, field-level reorganization, and fixed-length digest compression operations on the challenge data source string to generate the final random challenge data.
[0015] As a preferred embodiment of the U-shield identity authentication method based on a digital signature trusted chain described in this invention, the step of concatenating the second environment digest data and challenge data according to a preset structure includes: the receiving terminal aligning and arranging the fields of the second environment digest data and the random challenge data sent by the authentication server according to a predetermined structural rule to form a combined structure; performing a field mapping and replacement operation on the combined structure and normalizing the field values therein to obtain an initial signature source string; performing a perturbation factor injection operation on the initial signature source string, performing XOR perturbation processing on specific positions based on a time perturbation factor to obtain a perturbed signature string; and reorganizing the fields of the perturbed signature string according to a fixed structural template to form the original signature data.
[0016] As a preferred embodiment of the U-shield identity authentication method based on a digital signature trusted chain as described in this invention, the similarity comparison includes: dividing the first environment digest data and the second environment digest data into several digest segments according to the same field segmentation rules; performing a bit-level XOR operation on each corresponding digest segment, calculating the number of bits that are 0 in the XOR result, and obtaining a local similarity value; weighting and accumulating all local similarity values, wherein the weight of each digest segment is determined according to the order in which the fields appear in the first environment digest data; calculating the percentage difference between the weighted cumulative similarity and the theoretical maximum similarity to obtain a final similarity score; and comparing the final similarity score with a trusted threshold preset by the authentication server.
[0017] This invention provides a U-shield identity authentication system based on a digital signature trusted chain.
[0018] To address the aforementioned technical problems, this invention provides the following technical solution: a U-shield identity authentication system based on a digital signature trusted chain, comprising: a receiving terminal, configured to, after accessing the U-shield, read the user's digital certificate stored in the U-shield, and collect device identifier, network parameters, and geographical location information, and perform digest processing to generate first environment digest data; the receiving terminal is further configured to call the private key stored in the U-shield to sign the first environment digest data, generating first signature data, and send the first environment digest data, the first signature data, and the user's digital certificate to an authentication server; and upon receiving challenge data returned by the authentication server, collect current device information to generate second environment digest data, construct original signature data, and further... The system performs the following steps: First, it signs the data and sends it to the authentication server. Second, it uses a USB key to store the user's digital certificate and private key, and responds to calls from the receiving terminal to complete the signing of the first environment digest data and the original signature data. Third, it receives the first signature data and verifies it using the public key in the user's digital certificate, storing the first environment digest data upon successful verification. Fourth, it generates random challenge data after receiving an authentication request and sends it to the receiving terminal. Fifth, it verifies the validity of the second signature data after receiving the original signature data and the second signature data, extracts the second environment digest data, and compares it with the first environment digest data for similarity. If the similarity exceeds a preset threshold, the authentication is confirmed to be valid.
[0019] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the U-shield identity authentication method based on a digital signature trusted chain.
[0020] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the U-shield identity authentication method based on a digital signature trusted chain.
[0021] The beneficial effects of this invention are as follows: By performing structured processing on device identifiers, network parameters, and geographic location information respectively, dynamic environmental summary data is generated. This environmental summary data is generated in stages and bound to the signature during the authentication process, enhancing the timeliness and uniqueness of authentication requests and effectively improving the verification capability of the receiving terminal's true status.
[0022] During the digest generation process, the device identification field employs an index rearrangement method controlled by a perturbation seed. Network parameters generate dual digest values using digest functions with two different output bit widths and undergo bit-level modulo operations. Geographic location information is compressed into bytes and then mirrored. These three data processing strategies correspond to different information structures and security characteristics, enhancing the overall digest's resistance to forgery.
[0023] The digest verification process introduces a time perturbation factor, which is injected into the environmental digest field structure and then subjected to perturbation remapping. The perturbation factor is then compared with the target structure constructed from the terminal identifier field. This enables the signature verification process to have dual verification capabilities for time synchronization and digest consistency, thereby improving the protection strength against signature forgery and digest replacement attacks.
[0024] When constructing random challenge data, the authentication server uses the verification values of three intermediate data fields and a time perturbation factor to jointly construct a perturbation vector, further controlling field rearrangement, bit rotation, and masking operations, thereby generating challenge data with a non-linear changing structure and eliminating the replayability risk under traditional static challenges.
[0025] The environment summary comparison mechanism adopts field-level XOR, bit-level statistics and weighted accumulation to ensure that the system has the ability to identify changes in terminal status, thus maintaining the tolerance performance of the authentication process while ensuring security. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 The above is a flowchart of a U-shield identity authentication method based on a digital signature trusted chain, provided as an embodiment of the present invention. Detailed Implementation
[0028] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0029] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a U-shield identity authentication method based on a digital signature trusted chain, including:
[0030] Step 101: After the receiving terminal accesses the U-shield, it reads the user's digital certificate stored in the U-shield, and collects the receiving terminal's device identifier, network parameters, and geographical location information, and generates the first environment digest data through digest processing.
[0031] In step 101, generating the first environmental summary data through summary processing includes: converting the motherboard number, processor serial number, and device unique identifier in the device identifier into their corresponding hexadecimal codes, and concatenating them in reverse order of the fields to obtain a first string; converting the MAC address, IP address, and default gateway address in the network parameters into unsigned integer formats, and concatenating them in order of the fields to obtain a second string; converting the base station number, longitude, and latitude in the geographic location information into floating-point numbers, multiplying them by 10,000, and then converting them into integer formats, and concatenating them in order of the fields to obtain a third string; calculating the cyclic redundancy check value based on the device unique identifier, and extracting the least significant byte from the check value as a perturbation seed; and utilizing... The perturbation seed performs an index perturbation rearrangement operation on the first string based on the field length setting to generate the first intermediate data; it sequentially executes two digest processing functions with different output bit widths on the second string to generate the first digest value and the second digest value respectively; it performs bit-level modulo operations on the first digest value and the second digest value respectively, and concatenates them in a preset structure order to generate the second intermediate data; it performs byte compression processing on the third string, and performs a mirror swap operation on the compressed result to generate the third intermediate data; it concatenates the first intermediate data, the second intermediate data and the third intermediate data in sequence into a combined data sequence; it sequentially performs bit re-encoding processing, perturbation processing and fixed-length compressed digest processing on the combined data sequence to generate the first environment digest data.
[0032] In a preferred embodiment of the present invention, after the receiving terminal accesses the USB key, it first reads the user's digital certificate stored in the USB key through an interface driver or middleware control logic. This digital certificate can adopt the standard X.509 format and contains the certificate holder's public key information, issuing authority information, and their signature, uniquely identifying the USB key user. The reading operation is completed through the operating system's authorized interface, ensuring the integrity and trusted origin of the certificate data.
[0033] During the device identification collection process, the receiving terminal extracts the motherboard serial number, processor serial number, and device unique identifier as basic hardware identification information for the device. The motherboard serial number can be read by accessing the computer's motherboard BIOS information; the processor serial number is obtained through hardware interfaces provided by the processor manufacturer or operating system service interfaces (such as the WMI interface on the Windows platform); the device unique identifier is a pre-set or uniquely generated ID string in the receiving terminal system, such as a UUID format identifier. For standardized processing, these fields are converted to standard hexadecimal string format and concatenated in reverse order to form the first string. This reverse order processing helps increase structural transformation features and improves the irreversibility of subsequent data.
[0034] Network parameters include MAC address, IP address, and default gateway address. The receiving terminal obtains the physical and logical address information bound to the current network connection through the network interface module. The MAC address is typically represented in 6-byte hexadecimal format, while the IP address and default gateway address are 4-byte IPv4 addresses. These three types of parameters are uniformly converted to unsigned integer format and then concatenated in their original field order to form the second string.
[0035] Geographic location information is obtained through a positioning module (such as a GPS module) or communication module (such as cellular base station information) connected to the receiving terminal, including three fields: base station number, longitude, and latitude. To ensure accuracy, longitude and latitude are retained in floating-point format to six decimal places, and then multiplied by a factor of 10,000 to convert them into integer form, thereby avoiding the impact of floating-point errors on the stability of subsequent processing. The three fields are concatenated into a third string in their original order to ensure an orderly distribution among the fields.
[0036] To introduce a controllable perturbation mechanism, the receiving terminal calculates its Cyclic Redundancy Check (CRC) value based on the device's unique identifier, using the CRC-8 algorithm, which outputs an 8-bit check result. The least significant byte is extracted from this result as a perturbation seed, which is used to control subsequent field perturbations and random behavior.
[0037] Based on the aforementioned perturbation seed, the receiving terminal performs a field-level index perturbation operation on the first string. This operation first constructs an index table based on the original bit length of each field, and then, combined with the pseudo-random sequence generated by the perturbation seed, rearranges the positions of the fields to generate the first intermediate data, thereby introducing structural variability and enhancing the decoupling between fields.
[0038] The second string is processed sequentially by two digest functions: one with a 160-bit output width (such as SHA-1) and the other with a 256-bit output width (such as SM3). The two digest values are used as binary bit sequences as input, and bitwise XOR operations (i.e., modulo 2 addition) are performed to generate a fused interference sequence. This sequence is then re-segmented and reassembled according to a set template structure to form the second intermediate data.
[0039] The third string is first compressed using a compression algorithm (such as a custom fixed-length compression algorithm or the standard LZ algorithm) to obtain a shortened encoded sequence. The compressed result is then subjected to mirroring, i.e., byte order reversal and bit-level flipping operations, to obtain a third intermediate data with high structural complexity.
[0040] The receiving terminal concatenates the three intermediate data segments in a preset order to construct a combined data sequence. This sequence serves as the raw input for digest processing. First, it undergoes a bit-reordering process (e.g., using Gray coding to break down the relationships between adjacent bits). Then, guided by a perturbation seed, it performs perturbation processing, including bit flipping, swapping, and field interference. Finally, a fixed-length compression algorithm (such as SM3 or Blake2) is used to generate a digest of the perturbated data, outputting a 256-bit first environment digest.
[0041] It should be noted that in step 101 of this invention, by classifying the device identifier, network parameters, and geographical location information of the receiving terminal, and combining a perturbation mechanism and a multi-digest algorithm, a first environmental digest data with high uniqueness and dynamism is constructed. Compared with the existing technology that only performs simple concatenation or hashing of basic parameters, the solution adopted in this invention has significant advantages in terms of anti-forgery, anti-replay, and authenticity assurance.
[0042] Specifically, device identification information reflects inherent attributes at the terminal hardware level and possesses strong static uniqueness. Therefore, it is represented in hexadecimal format for normalization, and initial perturbation is introduced by reversing the field order. Network parameters represent the terminal's connection state under specific environments and may change with network variations. To improve the structure of its summary representation, it is uniformly converted to unsigned integers while maintaining the field order. Geographic location information has strong time sensitivity and accuracy requirements; it is converted to integer format and amplified to help maintain fidelity in subsequent compression summarization.
[0043] Building upon this, the present invention proposes a method for calculating cyclic redundancy check values using the device's unique identifier and extracting the least significant byte as a perturbation seed, thereby achieving the automatic generation of device-specific perturbation parameters. By driving the index perturbation rearrangement of the first string through the perturbation seed, not only is the non-linearity of the device information digest improved, but the field structure is also effectively prevented from being reverse-engineered.
[0044] Furthermore, two digest functions with different bit widths are applied to the second string to extract information. Then, bit-level modulo operations and structured concatenation are used to form a unified data block, which enhances the obfuscation level and collision resistance while preserving the core features of the parameters. The third string undergoes byte compression and mirror swapping, which makes the geographic location data more dispersed while being compressed, improving the overall complexity and security of the digest.
[0045] Ultimately, by concatenating the three intermediate data into a combined data sequence and performing a complete processing flow including bit weight encoding, perturbation, and fixed-length compression, the first environmental summary data was ensured to maintain high uniqueness, stability, and tamper resistance while keeping its length under control.
[0046] Specifically, the first environmental summary data includes the motherboard serial number collected by the receiving terminal. Processor serial number Unique Device Identifier Then, they are converted to their corresponding hexadecimal string codes, and recorded as follows: .
[0047] Concatenate the three hexadecimal strings in reverse order to form the first string of the device identifier. :
[0048] ;
[0049] in, This indicates a splicing operation.
[0050] The receiving terminal collects the MAC address, IP address, and default gateway address, converting them from their original hexadecimal or dotted decimal formats to unsigned integer formats, and denoted as follows: .
[0051] The above integers are concatenated in the original collection order to form the second string of network parameters. :
[0052] ;
[0053] The above concatenation operation is performed by concatenating integers sequentially in standard binary form.
[0054] The receiving terminal collects three fields: base station ID, longitude, and latitude. The base station ID is denoted as BSID, longitude as Lon, and latitude as Lat. The longitude and latitude are obtained by using floating-point numbers accurate to six decimal places, magnifying them by a factor of 10,000, and then rounding them down.
[0055] ;
[0056] ;
[0057] in, This represents a floating-point value after longitude is magnified ten thousand times. This represents a floating-point value after the latitude is magnified ten thousand times. Represents floating-point numbers Perform a rounding operation, taking the integer part and discarding the decimal part; This represents the integer value of longitude after rounding. This represents the integer value of latitude after rounding.
[0058] Concatenate the fields according to their original order to form a third-party geographic location string. :
[0059] ;
[0060] in, The base station number is represented and directly collected and represented in integer format.
[0061] The receiving terminal uses a hexadecimal string representing its unique device identifier. As input, the CRC-8 algorithm is used to calculate the cyclic redundancy check value as the perturbation seed. The expression is:
[0062] ;
[0063] in, Using standard polynomials The calculation result is taken as the lower 8 bits as the perturbation seed, mod represents the modulo operation, and the result is limited to... scope; This represents the perturbation seed, used to control the random rearrangement and perturbation operations in the subsequent perturbation process.
[0064] Use perturbation seeds The first string of the device identifier Perform an index perturbation and rearrangement operation.
[0065] Define the index table as Using seeds Generate a pseudo-random sequence to determine the index rearrangement order and form a new index table. According to the index table right The fields are rearranged to form the first intermediate data. :
[0066] ;
[0067] in, Indicates based on perturbation seed The generated index is rearranged in the order of the device identifier field. , , This represents the rearranged index sequence;
[0068] The receiving terminal receives the second string of network parameters. The digest function is executed twice, using the SHA-1 algorithm with an output width of 160 bits and the SM3 algorithm with an output width of 256 bits respectively:
[0069] ;
[0070] ;
[0071] Summary results Perform bitwise XOR (modulo-2 addition) operations on each bit separately to form a fused digest sequence:
[0072] ;
[0073] Merge summary sequence Re-segment according to the set template structure, and sequentially concatenate them to form the second intermediate data. .
[0074] The receiving terminal receives a third string of geographic location data. Perform fixed-length compression to obtain a compressed data sequence. .
[0075] Compression results Perform a mirror swap, which involves reversing the byte sequence and inverting the bits within each byte to obtain the third intermediate data. .
[0076] First intermediate data Second intermediate data Third intermediate data By concatenating them sequentially, a combined data sequence is formed. :
[0077] ;
[0078] Combined data sequences The following processes are performed sequentially: First, bit recoding is performed to re-encode the sequence using Gray coding to obtain the recoded sequence. Secondly, using the aforementioned perturbation seeds For recoded sequences Perform perturbation processing, including bit swapping, flipping, and random perturbation within fields, to obtain a perturbed data sequence. Finally, a fixed-length digest algorithm is used to process the perturbed data sequence. Perform digest processing to generate the final 256-bit first environment digest data. ,Right now:
[0079] ;
[0080] in, The 256-bit output digest algorithm, such as SM3 or Blake2, can be used for computation.
[0081] It should be noted that step 101 performs specific transformation, perturbation and summarization operations on the device identifier, network parameters and geographical location information respectively, and introduces a data transformation mechanism controlled by perturbation seeds at each stage. The resulting first environmental summary data not only has high uniqueness and anti-forgery properties, but is also difficult to obtain the original input data through reverse operation or simple attempts.
[0082] Step 102: The receiving terminal uses the private key stored in the U-shield to digitally sign the first environment digest data, generate the first signature data, and send the first environment digest data, the first signature data, and the user digital certificate to the authentication server.
[0083] In step 102, generating the first signature data includes concatenating the first environment digest data, the terminal identification data field, the UTC timestamp, and the verification value corresponding to the first environment digest data in a preset field order to form the first signature data; the receiving terminal inputs the original signature data as signature request data to the U-shield through the signature instruction interaction interface between the receiving terminal and the access U-shield; the U-shield uses its stored user private key to perform an asymmetric encryption operation on the original signature data to generate a signature value; the receiving terminal concatenates the signature value, the used UTC timestamp, and the verification value of the first environment digest data in a field order to form the first signature data.
[0084] It should be noted that the preset field order when constructing the original signature data is as follows: The first field is the first environment digest data, which has a fixed length of 64 bytes and is derived from the result of digesting the data such as the receiving terminal device identifier, network parameters, and geographical location information in step 101; the second field is the terminal identifier data field, used to uniquely identify the device identifier information of the current receiving terminal, such as MAC address or motherboard serial number, with a field length of 16 bytes; the third field is the UTC timestamp, using a 64-bit integer format, representing the number of milliseconds that have elapsed since 1970, with a length of 8 bytes; the fourth field is the check value of the first environment digest data, which is obtained by performing a CRC-32 algorithm or hash function on the first environment digest data, and its lower 4 bytes are truncated as the check field. The above four fields are concatenated in sequence, and all fields are encoded using a unified byte order (such as big-endian mode) to form the structured signature original data.
[0085] After completing the data concatenation process, the receiving terminal uses the original signature data as input and calls the signature interface provided by the U-Shield to perform an asymmetric encryption signature operation. Specifically, the U-Shield pre-stores the private key associated with the user's digital certificate; this private key is hardware-protected and cannot be exported. The receiving terminal transmits the original signature data to the U-Shield in binary format via a physical interface (such as USB). After receiving the data, the U-Shield automatically calls its internal cryptographic module (such as supporting RSA, ECC, or SM2 algorithms) to perform encryption operations on the data using the stored private key and outputs the signature result. The length of this signature value depends on the algorithm used; for example, RSA-2048 outputs a 256-byte signature.
[0086] After the signing operation is completed, the receiving terminal receives the signature value returned by the U-shield and concatenates it sequentially with the UTC timestamp used in the original signature data and the verification value of the first environment digest data. Specifically, the order is: the first field is the signature value, the second field is the UTC timestamp, and the third field is the verification value of the first environment digest data. This concatenation process can be implemented by writing sequentially to a memory buffer or through a data structure organization method. The generated data is the first signature data, which is used to subsequently send it to the authentication server for signature verification.
[0087] It should be noted that in step 102 of this invention, when the receiving terminal generates the first signature data, it does not simply sign the data fields. Instead, it first structurally concatenates the first environment digest data, the terminal identifier field, the UTC timestamp, and the check value corresponding to the environment digest according to a strict field order to form a unified and complete original signature data. This structuring process ensures the semantic consistency of the data and the determinism of field matching before signing, preventing signature verification failure or data forgery caused by differences in terminal implementation or malicious adjustment of field order by attackers.
[0088] Furthermore, the original signature data is transmitted to the U-shield via the receiving terminal's signature command interface. The U-shield's built-in security chip then performs asymmetric encryption using the user's private key to generate a unique signature value. Because the private key is strictly stored inside the U-shield and not exposed externally, the entire signing process has a robust key protection mechanism, effectively resisting security threats such as private key leakage and fake signature generation.
[0089] Furthermore, after the signature value is generated, it is not used directly for transmission. Instead, it is concatenated with the UTC timestamp used during signing and the verification value of the first environment digest data, following a unified field order, to form the first signature data. This facilitates the subsequent reconstruction and verification of data consistency by the authentication server during signature verification. This design not only improves the integrity and verifiability of data transmission but also provides structural guarantees for subsequent data traceability and anomaly detection.
[0090] Compared to traditional methods that only sign device serial numbers or simple environmental parameters, this invention introduces multi-dimensional environmental information into the construction of the original signature data, supplemented by a digest verification mechanism and a timing synchronization design, thereby improving the signature's anti-tampering and anti-forgery capabilities from the source. Especially in high-security scenarios such as finance, tax control, and power, the U-shield signature combined with structured environment binding adopted in this invention can ensure the signature's legitimacy while binding it to a real-world usage scenario, significantly reducing the risk of forgery and man-in-the-middle attacks.
[0091] Step 103: After receiving the first signature data, the authentication server uses the public key in the user's digital certificate to verify the first signature data, and stores the first environment digest data if the verification is successful.
[0092] In step 103, the verification of the first signature data using the public key in the user's digital certificate includes: reconstructing the corresponding original signature data based on the signature value, the UTC timestamp used, and the verification value of the first environment digest data in the received first signature data; calling the public key corresponding to the user's digital certificate to perform an asymmetric verification operation on the signature value; when the verification is successful, extracting the UTC timestamp used and calculating the time perturbation factor; applying the time perturbation factor to the field sequence of the first environment digest data and performing a perturbation remapping operation to generate perturbation-mapped digest data; constructing the expected digest verification structure according to the terminal identifier field previously registered by the receiving terminal and matching it with the perturbation-mapped digest data; and under the condition that the verification is successful and the matching is successful, the authentication server establishes a binding relationship between the first environment digest data and the user's digital certificate.
[0093] It should be noted that in step 103, the authentication server first receives the first signature data sent from the receiving terminal. This signature data includes the signature value, the UTC timestamp used for signing, and the verification value of the first environment digest data. The server extracts the above fields as the basis for subsequent signature verification processing.
[0094] To perform signature verification, the authentication server needs to reconstruct the original signature input data. Specifically, the authentication server concatenates the first environment digest data, the terminal identifier field, the UTC timestamp, and the digest verification value sequentially, according to the field arrangement rules pre-defined by the receiving terminal. The field concatenation process must ensure consistent format and accurate order, forming the original data structure used for signature verification.
[0095] Subsequently, the authentication server invokes its internal digital certificate processing module to extract the public key information from the user's digital certificate provided by the receiving terminal. Using this public key, the signature value extracted from the first signature data is verified using asymmetric encryption. The verification algorithm used here can be selected according to the U-Shield system standard, including national cryptographic algorithms (such as SM2) or other conventional asymmetric algorithms (such as RSA, ECC, etc.). The purpose of the verification process is to confirm that the signature value was indeed generated by the corresponding private key, thereby ensuring the integrity and source credibility of the first environment digest data during transmission.
[0096] After successful signature verification, the authentication server continues to verify the environmental consistency of the environmental digest data. First, a time perturbation factor is calculated based on the UTC timestamp extracted from the signature data. This perturbation factor can be generated as follows: after converting the UTC timestamp to a 64-bit binary representation, it is segmented byte by byte, and perturbation functions such as XOR, modulo, bitwise shift, or CRC are performed on each byte, ultimately outputting a fixed-length perturbation vector. The introduction of the perturbation factor aims to guide the digest data structure to dynamically change over time, improving the authentication's resistance to replay attacks and its environmental verifiability.
[0097] Next, the authentication server performs field perturbation mapping operations on the first environment digest data using a time perturbation factor. Specifically, this includes: dividing the first environment digest data into multiple field segments, determining the rearrangement order of the fields based on the perturbation factor, and perturbing the bit-level content of some fields (such as shifting, reversing, truncating, or masking certain bytes), thereby forming perturbed mapped digest data.
[0098] To determine whether the mapping meets expectations, the authentication server generates the desired digest structure template based on the terminal identifier field submitted during the terminal registration phase, using preset digest construction rules. This structure template represents the arrangement and content characteristics of the digest fields that a legitimate terminal should possess in a given environment.
[0099] The authentication server performs a field-by-field matching verification between the perturbed digest data and the constructed expected digest structure. The matching process may include: whether the field names or positions correspond, whether the field values conform to the expected rules, and whether the logical relationships between fields meet the set constraints. If the comparison results show that the field structures are completely consistent, or meet the threshold tolerance standards set by the system, the authentication server can confirm that the source of this signature request is authentic and trustworthy, and the first environment digest data can be formally bound to the user's digital certificate as the environment authentication baseline for the current session.
[0100] It should be noted that the signature verification and binding processing mechanism adopted in step 103 of this invention differs from the traditional U-shield authentication process, which only relies on the signature value and public key for legality comparison. On the basis of successful signature verification, a disturbance factor processing mechanism and a terminal binding verification structure are further introduced, which realizes dual verification of terminal identity and consistency verification of environmental data, significantly improving the security and non-forgeability of the authentication process.
[0101] Specifically, traditional U-shield authentication methods focus on verifying the legitimacy of static data, mainly verifying whether the signature value is generated by encryption of the corresponding private key. The authentication process lacks dynamic perception and structured verification of the terminal's current state, usage environment, and time elements, making it vulnerable to security threats such as relay attacks, offline replay, or device duplication.
[0102] In this invention, after successfully verifying the first signature data, the authentication server extracts the UTC timestamp from the original signature data and calculates a perturbation factor based on the timestamp. This perturbation factor is not arbitrary but a dynamic perturbation parameter generated according to unified rules, possessing uniqueness and time sensitivity, and accurately reflecting the time state at the time of signature generation. Subsequently, this perturbation factor is applied to the field sequence of the first environment digest data to perform a perturbation remapping operation, that is, to perform structural perturbation on the original digest content in ways such as field order, bit-level relationship, or content hashing.
[0103] After generating the perturbation mapping digest data, the authentication server constructs the expected digest verification structure based on the terminal identifier field pre-registered or dynamically identified by the receiving terminal. This structure reflects the terminal environment state, data format, and mapping structure expected by the server, and is a field layout template defined within the system. The authentication server compares this expected structure with the perturbation-processed digest data field by field, determining whether the match is successful through field order, field value matching, and perturbation rule consistency verification.
[0104] This design ensures two key effects: First, the data submitted by the terminal must not only be legal at the signature level, but also conform to the server's dynamic expectations of the terminal's current environment data structure, thereby effectively blocking attack paths for forging terminals or copying signature data; Second, the introduction of perturbation factors gives the data structure a time-sensitive characteristic, so even if an attacker obtains historical valid signatures, it will be difficult for them to generate a matching digest structure under the new perturbation factors, further preventing replay attacks.
[0105] Step 104: After completing the transmission of the first environment summary data, the receiving terminal sends an authentication request to the authentication server. Upon receiving the authentication request, the authentication server generates random challenge data and sends the challenge data to the receiving terminal.
[0106] In step 104, generating random challenge data includes: constructing a perturbation vector based on the byte checksums of each field in the first, second, and third intermediate data, as well as a time perturbation factor; performing field order rearrangement on the first intermediate data, byte-by-byte rotation on the second intermediate data, and bit-by-bit masking on the third intermediate data based on the perturbation vector to generate perturbed challenge base data; concatenating the perturbed challenge base data with the UTC timestamp and the session identifier parameter set by the authentication server according to a predetermined field order to form a challenge data source string; and sequentially performing bit-level perturbation processing, field-level reorganization, and fixed-length digest compression operations on the challenge data source string to generate the final random challenge data.
[0107] In the actual implementation, before generating random challenge data, the authentication server first extracts the byte checksum of each field from the first, second, and third intermediate data. This checksum can be obtained by performing an XOR operation, CRC check, or custom bit-level summation on the content of each field, ensuring that the checksum has a certain degree of uniqueness and collision resistance.
[0108] Subsequently, the authentication server combines the UTC timestamp extracted in step 103 with the aforementioned verification value and performs weighted bitwise operations (such as weighted summation and shift perturbation) to generate a perturbation vector of fixed length. This vector contains several parameters used to control the perturbation mode, such as field swapping order index, bit rotation direction and offset, and mask bitmask.
[0109] Based on the perturbation vector, the authentication server performs the following processing on the three intermediate data segments: for the first intermediate data, the field order is rearranged, and the index mapping table is controlled according to the order in the perturbation vector to adjust the original field positions; for the second intermediate data, byte bit rotation is performed, and each byte is cyclically shifted left or right according to the rotation offset set by the perturbation vector; for the third intermediate data, bit masking is performed, that is, logical masking is applied to the bits at specified positions to make sensitive bits masked in a secure manner.
[0110] After completing the above perturbation process, the authentication server concatenates the perturbed challenge base data with the current UTC timestamp and authentication session identifier parameters according to a preset field order. This concatenation structure typically uses a concatenation of base data, timestamp, and session ID, and can be divided into field blocks to facilitate subsequent parsing.
[0111] The resulting challenge data source string will undergo further perturbation mapping (such as bitwise recoding) and field reorganization operations (including field swapping, insertion of obfuscated segments, etc.), and finally be compressed into fixed-length challenge data by a fixed-length digest compression algorithm.
[0112] It should be noted that traditional identity authentication challenge mechanisms typically use simple random number generators or timestamp seeds to construct random challenge data. Their generation methods are simplistic and lack deep integration with the terminal's local environment, making them vulnerable to man-in-the-middle attacks or replay attacks. Even when dynamic data is incorporated into the challenge construction, the perturbation patterns mostly rely on simple displacement and scrambling, resulting in a loose structure and limited resistance to forgery.
[0113] In contrast, this invention constructs a perturbation vector based on the field verification value and time perturbation factor of three intermediate data segments, and uses this vector as the control basis to perform multiple complex operations such as structural perturbation, byte rotation and bit masking on the three intermediate data segments respectively. This not only enhances the structural unpredictability of the challenge data, but also realizes the deep coupling between the generation process and the local environment and time state of the device, effectively improving the data's unreconstructability and uniqueness.
[0114] Furthermore, by structurally concatenating the perturbation-processed base data with UTC timestamps and authentication session identifier parameters, and performing perturbation mapping, field reorganization, and digest compression operations, the final challenge data possesses high information entropy, good data distribution characteristics, and collision resistance, further enhancing the security of the challenge process.
[0115] Step 105: The receiving terminal collects the current device identifier, network parameters and geographical location information again, generates second environment summary data through digest processing, and concatenates the second environment summary data with the challenge data according to the preset structure to construct the original signature data.
[0116] In step 105, the concatenation of the second environment summary data and the challenge data according to a preset structure includes: the receiving terminal aligning and arranging the fields of the second environment summary data and the random challenge data sent by the authentication server according to a predetermined structural rule to form a combined structure; performing a field mapping and replacement operation on the combined structure and normalizing the field values therein to obtain an initial signature source string; performing a perturbation factor injection operation on the initial signature source string, performing XOR perturbation processing on specific positions based on the time perturbation factor to obtain a perturbed signature string; and rearranging the fields of the perturbed signature string according to a fixed structural template to form the original signature data.
[0117] It should be noted that the receiving terminal's re-collection of device identifiers, network parameters, and geographical location information during the authentication session is not a simple repetition of the previous collection results. Rather, it is to obtain the true dynamic environmental state at the current moment, ensuring that the authentication behavior is consistent with the physical and network environment in which the device is currently located. This re-collection is necessary to defend against man-in-the-middle attacks, data replay attacks, and fake terminal simulation attacks, preventing attackers from intercepting legitimate data in the first stage and then forging requests to repeatedly submit signed data to deceive the system. By re-collecting and regenerating the second environmental digest data, the system can establish a timeliness verification mechanism for terminal behavior, enhancing the integrity and credibility of the authentication chain.
[0118] During the generation of the original signature data, the receiving terminal does not directly concatenate the original data fields. Instead, it aligns and arranges the second environment digest data and the challenge data returned by the authentication server according to a predefined structure template in the system. Specifically, the system template defines the order, bit width, and field boundaries of each field to ensure that the data structure generated in different terminal environments has a unified parsing format, facilitating subsequent structure verification and signature restoration operations on the server side.
[0119] After the combined structure is formed, the system maps and replaces the field numbers or sequence identifiers within the structure. Standard numbers are replaced with pseudo-random indexes via table lookup to scramble the original positional relationships of the fields, improving resistance to structural reconstruction attacks. After mapping, normalization is performed on each field value. For example, longitude and latitude coordinates are standardized to integer format with decimal places scaled; IP addresses are uniformly split into four unsigned integer segments; and MAC addresses are standardized to lowercase unseparated format. These normalization operations improve the uniformity and comparability between fields, preventing digest bias caused by differences in terminal encoding.
[0120] After normalization, the system introduces the time perturbation factor calculated earlier through the signature verification process to inject perturbations into specific locations within the combined structure. The perturbation injection employs a bitwise XOR method to intervene in bits at multiple offset positions within the structure, making the final original signature data time-dependent and unreproducible. The selection of perturbation bits can be based on the bit value of the perturbation factor to determine the intervention position, or a pre-set algorithm can be used to dynamically select the perturbation path, further enhancing the dynamic unpredictability of the signature data.
[0121] The resulting data after perturbation serves as the perturbation signature string. Under the guidance of the system template, the field order is reorganized to ensure that the server can restore the original input according to a fixed structure during signature verification. After the original data is signed, the private key signing stage begins, ensuring the integrity, authenticity, and non-repudiation of the authentication information.
[0122] Step 106: The receiving terminal uses the private key stored in the U-shield to digitally sign the original signature data, generating second signature data, and sends the original signature data and second signature data to the authentication server.
[0123] In step 106, after constructing the original signature data, the receiving terminal sends a signature request containing the original signature data to the U-shield via its local system call to the secure interaction interface between the U-shield and the U-shield. This interaction interface can be based on a unified hardware security module call standard to ensure the integrity of the transmission and the security of the execution of the signature command.
[0124] The receiving terminal sends a signature request structure to the U-shield containing the following: the original signature data body, digest algorithm identifier, signature algorithm identifier, and signature key reference information. Upon receiving the request, the U-shield first verifies the data format validity and the caller's permissions, then reads the user's internally stored private key to perform a digital signature operation on the original signature data. Preferably, the signature operation uses an elliptic curve digital signature algorithm or an RSA asymmetric encryption algorithm; the specific implementation can be configured according to the security level of the authentication system.
[0125] After signing, the U-shield encapsulates the generated signature value and returns it to the receiving terminal. Upon receiving the signature value, the receiving terminal combines the original signature data with the signature value according to a pre-defined format to generate a second signature. Preferably, this combination format includes the original data, the signature value, a timestamp, and verification fields, which are used for subsequent integrity verification and signature reconstruction on the authentication server.
[0126] After the second signature data is constructed, the receiving terminal sends the original signature data and the second signature data together to the authentication server through a network security channel (such as a TLS-based encrypted channel) as a response data packet for the second stage of authentication.
[0127] Step 107: After receiving the original signature data and the second signature data, the authentication server uses the public key in the user's digital certificate to verify the second signature data, and if the verification is successful, extracts the second environment digest data from the original signature data.
[0128] In step 107, after receiving the original signature data and the second signature data sent by the receiving terminal, the authentication server first performs integrity and format verification to ensure that the data has not been tampered with and that the structure conforms to the protocol expectations. Subsequently, the server extracts key information such as the signature value, signature timestamp, and original digest verification field from the received second signature data.
[0129] To verify the authenticity of the signature value, the authentication server uses the public key from the corresponding user's digital certificate in its root certificate chain to perform an asymmetric signature verification operation. This operation typically employs the same algorithm as the signing phase, such as RSA or ECDSA. The input to the verification operation includes the extracted signature value and a digest information reconstructed from the original signature data. The server re-digests the original signature data and compares it with the output of the verification algorithm to determine whether the signature was indeed generated by the entity holding the corresponding private key.
[0130] Once the signature verification is successful, the authentication server confirms that the signature data has not been tampered with and was indeed issued by the user's USB key. At this point, the authentication server extracts the second environment digest data from the original signature data according to a preset structure rule. This structure rule predefines the field positions and byte offset information of the second environment digest data in the original signature data, so the extraction process can be completed through a structure parser or field positioning template without relying on additional prompts from the receiving terminal.
[0131] Preferably, to enhance security, the authentication server can also perform format validation and field consistency checks on the environment summary data during the extraction process. For example, it can perform boundary verification on the format of the device identifier field, the validity of the IP address in the network parameters, and the latitude and longitude range of the geographical location information to prevent maliciously constructed data from affecting subsequent similarity comparison logic.
[0132] Finally, the authentication server caches the extracted second environment summary data into the comparison queue, waiting to perform similarity analysis processing with the first environment summary data stored in step 103.
[0133] Step 108: The authentication server compares the extracted second environment summary data with the stored first environment summary data for similarity.
[0134] In step 108, the similarity comparison includes: dividing the first environment summary data and the second environment summary data into several summary segments according to the same field segmentation rules; performing a bit-level XOR operation on each corresponding position of the summary segment, calculating the number of bits that are 0 in the XOR result, and obtaining a local similarity value; weighting and accumulating all local similarity values, wherein the weight of each summary segment is determined according to the order in which the fields appear in the first environment summary data; calculating the percentage difference between the weighted cumulative similarity and the theoretical maximum similarity to obtain the final similarity score; and comparing the final similarity score with the trusted threshold preset by the authentication server.
[0135] In step 108, to achieve a more accurate and environmentally tolerant authentication mechanism, the authentication server introduces an environmental digest similarity evaluation method based on field-level comparison. This method does not simply compare the overall digest values, but rather decomposes the environmental digest data into multiple semantically defined digest fragments, evaluating their local consistency separately, thereby comprehensively reflecting the consistency of the terminal's environmental characteristics.
[0136] First, the server parses the first and second environment summary data into several summary fragments according to predefined field segmentation rules. These rules can be based on the source of the field, such as summary fragments corresponding to the device identifier field, network parameter field, and geographic location information field, ensuring that each type of environmental element has an independent evaluation dimension in similarity assessment.
[0137] Subsequently, a bitwise XOR operation is performed on the corresponding fields in the two sets of environment summary fragments. Bits with a value of 0 in the XOR result indicate that the content at the corresponding position is completely identical. Therefore, by counting the number of bits with a value of 0 in each summary fragment, the local similarity value of that summary fragment can be obtained. The higher this value, the stronger the consistency of the environmental information of that field in the two collections.
[0138] To further improve assessment accuracy, the authentication server assigns weight parameters to each summary segment. These weights are set based on the order of fields within the summary structure and the importance of the fields themselves; for example, the unique device identifier may have a higher weight than the default gateway address. The system then weights and sums all local similarity values according to their respective weights to obtain the total weighted similarity value for the current environment's data collection behavior.
[0139] After obtaining the weighted cumulative similarity score, the authentication server calculates the percentage difference between it and the predefined theoretical maximum similarity value, converting this into a standardized final similarity score. This score can be understood as the "degree of conformity between the current terminal environment and the initial binding environment," used to measure whether the current usage environment of the terminal is trustworthy.
[0140] Finally, the score is compared with the authentication server's preset trust threshold. If the score is higher than the threshold, it indicates that the current environmental changes are within the system's acceptable range, and authentication continues; otherwise, it is considered an abnormal authentication request, which may trigger further verification steps or reject the authentication.
[0141] Compared to traditional identity authentication methods, this similarity assessment mechanism has stronger anti-counterfeiting capabilities and environmental awareness, significantly improving the security level of the U-shield authentication system.
[0142] Specifically, the first environmental summary data Second environmental summary data Each segment is divided into multiple abstract fragments of equal length according to predetermined field segmentation rules:
[0143] ;
[0144] in, The first environmental summary data represents the first environmental summary data. A summary segment; The second environmental summary data represents the first A summary segment; This indicates the total number of environmental summary data fragments, all of which have the same length, and each fragment is [length missing]. Bit.
[0145] For each pair of corresponding summary fragments, calculate fragment-level local similarity:
[0146] ;
[0147] in, Indicates the first The local similarity value of a summary segment represents the number of bits in the segment that are identical (i.e., have the same value) to the corresponding bits in another segment; the summation symbol indicates the summation of subsequent terms within a specified range. The index used to indicate the position of a bit in a segment is from 1 to the bit length of that segment. Integer variables; This indicates the total number of bits in a single digest segment. Each digest segment is considered a fixed-length binary bit sequence. This indicates that in the first environmental summary data, the first... The first segment Bits. That is, the original environmental data is at the 1st bit. The first field summary One bit; This indicates that in the second environmental summary data, the first... The first segment Bit. That is, in the terminal environment to be verified, the first bit. The first field summary One bit; This represents the bitwise XOR operator, which assigns a value of 1 to two different bits and a value of 0 to the same bit. The `NOT` operator represents the logical NOT operator, inverting the result of the XOR operation. When two bits are identical (XOR is 0), the logical NOT result is 1, indicating that the bits match. `[]` represents the boolean conversion function (boolean value conversion). The value is 1 when the expression within the parentheses is logically true and 0 when it is false. It is used to convert logical values into numerical values that can participate in summation.
[0148] The local similarity values of each abstract segment are weighted and summed to obtain the total weighted cumulative similarity:
[0149] ;
[0150] in, Indicates the first The weight coefficients corresponding to each summary segment are determined based on the importance of the field and its order in the summary data, satisfying the following:
[0151] ;
[0152] in, The total weighted similarity is calculated for the current environment summary data comparison, representing the consistency of the environment summary after weight adjustment.
[0153] Calculate the final environment similarity score:
[0154] ;
[0155] in, This represents the theoretical maximum total similarity value, i.e.: Score represents the normalized percentage similarity score, with a value range of [value range missing]. to ,in This indicates complete agreement.
[0156] With the authentication server's preset trust threshold A comparison is performed to make an identity authentication decision. If the terminal's current environment and the initially bound environment are similar enough to meet the trust requirements, the authentication is successful. This indicates that the current environment of the terminal is significantly different from the initial binding environment, and authentication is rejected or a further two-factor authentication mechanism is triggered.
[0157] Step 109: When the second signature data is successfully verified and the similarity is higher than the preset threshold, the authentication server determines that the identity authentication of the receiving terminal is valid.
[0158] In step 109, after the authentication server completes the verification of the second signature data and calculates the similarity score between the current environment digest data and the bound environment digest data through similarity evaluation, the system compares the score with a preset threshold to determine the validity of the current authentication behavior. This preset threshold, serving as the standard for determining environmental consistency, is a key parameter in the environmental awareness authentication mechanism of this invention, and its setting must balance system security and environmental tolerance.
[0159] In a preferred embodiment of the present invention, the preset threshold is determined through statistical analysis and dynamic adjustment mechanisms, specifically including the following methods:
[0160] First, the authentication server can train samples based on a large amount of historical authentication data. It then compares the first-environment summary data and the second-environment summary data generated under normal conditions (i.e., the terminal is used by a legitimate user in a real-world scenario) to collect their similarity score distribution curves. Typically, when the same terminal authenticates repeatedly at similar times or locations, the similarity scores of its summary data are all in the high range. For example, in scenarios with stable networks and unchanged geographical locations, the similarity scores are mostly concentrated above 95%.
[0161] Then, a certain proportion of abnormal authentication behavior samples are collected, such as authentication requests simulated under different devices, proxy networks, and remote geographical locations. The similarity of their summary data is compared and the scoring results are recorded. The similarity scores under these abnormal scenarios are usually significantly lower than those of normal behavior and can be used to construct security boundary intervals.
[0162] Based on the two types of sample data mentioned above, the system uses Gaussian distribution fitting or cluster analysis algorithms to determine the confidence interval for normal authentication behavior, and uses the lower boundary of this interval as the initial threshold. To further improve the system's anti-counterfeiting and fault tolerance capabilities, a safety margin can be added on top of this. For example, if the lower limit of the 95% confidence interval under normal behavior is 87%, the threshold can be set between 85% and 90%, and adjusted according to the authentication strategy.
[0163] Furthermore, to adapt to the usage needs of different industries, the authentication server in this invention can also provide a dynamic threshold adjustment interface, allowing administrators to dynamically adjust the threshold based on authentication failure rate, terminal activity, or business risk level. For example, for financial applications, the threshold can be increased to over 90%, while for internal enterprise access authentication, it can be appropriately relaxed to around 80%.
[0164] Example 2 is an embodiment of the present invention, which provides a U-shield identity authentication system based on a digital signature trusted chain, including:
[0165] The receiving terminal, after accessing the U-shield, reads the user's digital certificate stored in the U-shield, and collects device identification, network parameters, and geographical location information. It then performs digest processing to generate first environment digest data. The receiving terminal is also used to call the private key stored in the U-shield to sign the first environment digest data, generate first signature data, and send the first environment digest data, first signature data, and user digital certificate to the authentication server. After receiving the challenge data returned by the authentication server, it collects the current device information to generate second environment digest data, constructs the original signature data, signs it, and sends it to the authentication server.
[0166] U-Shield is used to store user digital certificates and private keys, and responds to calls from receiving terminals to complete the signing operation of the first environment digest data and the original signature data;
[0167] The authentication server is used to receive the first signature data and verify the signature using the public key in the user's digital certificate, and to store the first environment digest data when the signature verification is successful; the authentication server is also used to generate random challenge data after receiving the authentication request and send it to the receiving terminal; further, after receiving the original signature data and the second signature data, it is used to verify the validity of the second signature data, extract the second environment digest data and compare it with the first environment digest data for similarity, and when the similarity exceeds a preset threshold, the identity authentication is confirmed to be valid.
[0168] It should be noted that, compared with existing identity verification systems that rely solely on user digital certificates or passwords, the U-shield identity authentication system based on a digital signature trusted chain provided in this embodiment has significant structural improvements and optimized authentication mechanisms, mainly reflected in the following aspects:
[0169] First, most existing authentication systems rely on the user's private key or certificate information and typically employ a single data signature process. This fails to effectively consider the device's current environment for authentication, posing security risks such as forged user identities and transferable USB tokens. In contrast, this invention actively collects and processes device identifiers, network parameters, and geographical location information upon USB token access. It then uses perturbation processing and digest compression techniques to generate a first environmental digest data, which is combined with the user's private key to generate a first signature data. This binds the device's physical environment to the user's identity, fundamentally enhancing the uniqueness and anti-spoofing capabilities of the authentication process.
[0170] Secondly, most existing solutions employ a one-time authentication mechanism, where authentication is considered successful once the signature is verified, lacking continuous control over the authentication chain. In contrast, the system of this invention designs a two-stage authentication process. After the initial signature verification is successful, the authentication server does not immediately confirm the identity but generates perturbation challenge data and sends it to the receiving terminal, requiring the terminal to reconstruct the signature response based on the current environment. This effectively prevents man-in-the-middle attacks and unauthorized transfer of authentication requests.
[0171] Furthermore, regarding the generation of challenge data, traditional methods typically employ pseudo-random numbers or fixed algorithms to generate challenge codes, which are difficult to be specific to and are easily replayed or predicted. This system constructs a perturbation vector based on elements such as byte checksums and time perturbation factors in intermediate data. Based on this vector, it performs field rearrangement, bit rotation, and masking on the intermediate data, ultimately generating challenge data with structural complexity and temporal uniqueness, significantly improving the dynamic protection capabilities of authentication.
[0172] Finally, regarding the authentication comparison mechanism, existing technologies mostly use hash comparison of digest values, which is difficult to tolerate slight deviations caused by environmental fine-tuning and poses a risk of misjudgment. In contrast, this system introduces a weighted similarity scoring model based on field-level XOR comparison, which calculates the local similarity of each field's digest fragment and assigns weights according to their structural order in the original data, thereby maintaining authentication accuracy while possessing a certain degree of environmental fault tolerance.
[0173] This embodiment also provides an electronic device applicable to a U-shield identity authentication method based on a digital signature trusted chain, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the U-shield identity authentication method based on a digital signature trusted chain as proposed in the above embodiment.
[0174] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a U-shield identity authentication method based on a digital signature trusted chain as proposed in the above embodiment.
[0175] The storage medium proposed in this embodiment belongs to the same inventive concept as the U-shield identity authentication method based on digital signature trusted chain proposed in the above embodiment. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0176] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0177] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A U-shield identity authentication method based on a digital signature trusted chain, characterized in that: include, After the receiving terminal accesses the U-shield, it reads the user's digital certificate stored in the U-shield and collects the receiving terminal's device identifier, network parameters, and geographical location information, and generates the first environment digest data through digest processing; The receiving terminal uses the private key stored in the U-shield to digitally sign the first environment digest data, generates the first signature data, and sends the first environment digest data, the first signature data, and the user's digital certificate to the authentication server; After receiving the first signature data, the authentication server uses the public key in the user's digital certificate to verify the first signature data, and stores the first environment digest data if the verification is successful. After the receiving terminal completes the transmission of the first environment summary data, it sends an authentication request to the authentication server. Upon receiving the authentication request, the authentication server generates random challenge data and sends the challenge data to the receiving terminal. The receiving terminal collects the current device identifier, network parameters and geographical location information again, generates second environment summary data through digest processing, and concatenates the second environment summary data with the challenge data according to the preset structure to construct the original signature data. The receiving terminal uses the private key stored in the U-shield to digitally sign the original signature data, generates second signature data, and sends the original signature data and second signature data to the authentication server. After receiving the original signature data and the second signature data, the authentication server uses the public key in the user's digital certificate to verify the second signature data, and extracts the second environment digest data from the original signature data if the verification is successful. The authentication server compares the extracted second environment summary data with the stored first environment summary data; When the second signature data is successfully verified and the similarity is higher than the preset threshold, the authentication server determines that the identity authentication of the receiving terminal is valid.
2. The U-shield identity authentication method based on a digital signature trusted chain as described in claim 1, characterized in that: The step of generating the first environment summary data through summary processing includes converting the motherboard number, processor serial number and device unique identifier in the device identifier into their corresponding hexadecimal codes, and concatenating them in reverse order of the fields to obtain the first string; Convert the MAC address, IP address, and default gateway address in the network parameters to unsigned integer format, and then concatenate them according to the field order to obtain the second string; The base station number, longitude, and latitude in the geographic location information are converted to floating-point numbers, magnified by 10,000 times, converted to integer format, and then concatenated according to the field order to obtain the third string; Calculate the cyclic redundancy check value based on the device's unique identification code, and extract the least significant byte from the check value as a perturbation seed; The first string is subjected to an index perturbation rearrangement operation based on the field length setting using the perturbation seed to generate the first intermediate data; The second string is processed sequentially using two digest functions with different output bit widths to generate the first digest value and the second digest value, respectively. Perform bit-level modulo operations on the first digest value and the second digest value respectively, and concatenate them according to the preset structure order to generate the second intermediate data; Perform byte compression on the third string, input the compressed result for mirror swapping, and generate the third intermediate data; The first intermediate data, the second intermediate data, and the third intermediate data are sequentially concatenated into a combined data sequence; The combined data sequence is sequentially processed by bit re-encoding, perturbation, and fixed-length compressed digest processing to generate the first environment digest data.
3. The U-shield identity authentication method based on a digital signature trusted chain as described in claim 2, characterized in that: The process of generating the first signature data includes concatenating the first environment digest data, the terminal identification data field, the UTC timestamp, and the verification value corresponding to the first environment digest data in a preset field order to form the first signature data. The receiving terminal inputs the original signature data as signature request data to the U-shield through the signature instruction interaction interface between the receiving terminal and the access U-shield; The U-Shield uses the user's private key stored in it to perform asymmetric encryption on the original signature data to generate a signature value; The receiving terminal concatenates the signature value, the UTC timestamp used, and the verification value of the first environment digest data in the order of the fields to form the first signature data.
4. The U-shield identity authentication method based on a digital signature trusted chain as described in claim 3, characterized in that: The step of verifying the first signature data using the public key in the user's digital certificate includes reconstructing the corresponding original signature data based on the signature value in the received first signature data, the UTC timestamp used, and the verification value of the first environment digest data. Use the public key corresponding to the user's digital certificate to perform an asymmetric signature verification operation on the signature value; When the signature verification is successful, extract the UTC timestamp used and calculate the time disturbance factor; Apply the time perturbation factor to the field sequence of the first environment summary data, perform a perturbation remapping operation, and generate perturbation-mapped summary data; Based on the terminal identifier field previously registered by the receiving terminal, a expected digest verification structure is constructed and matched with the perturbation mapping digest data. If the signature verification is successful and the matching is successful, the authentication server will establish a binding relationship between the first environment digest data and the user's digital certificate.
5. The U-shield identity authentication method based on a digital signature trusted chain as described in claim 4, characterized in that: The generation of random challenge data includes constructing a perturbation vector based on the byte verification values of each field in the first intermediate data, the second intermediate data, and the third intermediate data, as well as the time perturbation factor. Based on the perturbation vector, the field order is rearranged on the first intermediate data, the byte-by-byte rotation is performed on the second intermediate data, and the bit-by-bit masking is performed on the third intermediate data to generate the perturbated challenge base data. The perturbed challenge base data is concatenated with the UTC timestamp and the session identifier parameter set by the authentication server in a predetermined field order to form the challenge data source string; The challenge data source string is sequentially subjected to bit-level perturbation, field-level reorganization, and fixed-length digest compression operations to generate the final random challenge data.
6. The U-shield identity authentication method based on a digital signature trusted chain as described in claim 5, characterized in that: The step of splicing the second environment summary data and challenge data according to a preset structure includes the receiving terminal aligning the fields and arranging the random challenge data sent by the authentication server according to a predetermined structural rule to form a combined structure. Perform field mapping and replacement operations on the composite structure and normalize the field values to obtain the initial signature source string; A perturbation factor injection operation is performed on the initial signature source string, and an XOR perturbation process is performed on the specific position based on the time perturbation factor to obtain the perturbation signature string; The perturbation signature string is reorganized and its fields are rearranged according to a fixed structure template to form the original signature data.
7. The U-shield identity authentication method based on a digital signature trusted chain as described in claim 6, characterized in that: The similarity comparison includes dividing the first environment summary data and the second environment summary data into several summary segments according to the same field segmentation rules; Perform a bit-level XOR operation on the summary fragment at each corresponding position, calculate the number of bits that are 0 in the XOR result, and obtain the local similarity value; All local similarity values are weighted and accumulated, with the weight of each summary segment determined according to the order in which the fields appear in the first environment summary data; The final similarity score is obtained by calculating the percentage difference between the weighted cumulative similarity and the theoretical maximum similarity. The final similarity score is compared with the trust threshold preset by the authentication server.
8. A U-shield identity authentication system based on a digital signature trusted chain, employing the U-shield identity authentication method based on a digital signature trusted chain as described in any one of claims 1 to 7, characterized in that, include: The receiving terminal is used to read the user's digital certificate stored in the U-shield after accessing the U-shield, and to collect device identification, network parameters and geographical location information, and to perform digest processing to generate first environment digest data; the receiving terminal is also used to call the private key stored in the U-shield to sign the first environment digest data, generate first signature data, and send the first environment digest data, the first signature data and the user's digital certificate to the authentication server; After receiving the challenge data returned by the authentication server, the system collects the current device information to generate the second environment summary data, constructs the original signature data, signs it, and sends it to the authentication server. U-Shield is used to store user digital certificates and private keys, and responds to calls from receiving terminals to complete the signing operation of the first environment digest data and the original signature data; The authentication server is used to receive the first signature data and verify the signature using the public key in the user's digital certificate, and to store the first environment digest data when the signature verification is successful; the authentication server is also used to generate random challenge data after receiving the authentication request and send it to the receiving terminal; further, after receiving the original signature data and the second signature data, it is used to verify the validity of the second signature data, extract the second environment digest data and compare it with the first environment digest data for similarity, and when the similarity exceeds a preset threshold, the identity authentication is confirmed to be valid.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the U-shield identity authentication method based on a digital signature trusted chain as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the U-shield identity authentication method based on a digital signature trusted chain as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Digest authentication method and digest authentication system
CN107454115A
Collaborative signature method, device and system based on SM2 algorithm, and medium
CN111130804A