Search

CN-122022815-A - Trusted execution environment payment privacy protection method, device, equipment and medium

CN122022815ACN 122022815 ACN122022815 ACN 122022815ACN-122022815-A

Abstract

The invention belongs to the technical field of information security. The method comprises the steps of generating transaction data in a trusted execution environment based on transaction session token information, performing encryption processing on the transaction data based on a national encryption algorithm to obtain transaction ciphertext data, performing fragmentation processing on the transaction ciphertext data or a transaction master key for decrypting the transaction ciphertext data based on a Shamir threshold secret sharing principle to obtain multiple secret fragment data meeting threshold parameter information, performing encryption packaging processing on the multiple secret fragment data based on the national encryption algorithm to obtain encrypted fragment data, and performing decryption and reconstruction processing on the encrypted fragment data meeting the threshold number to obtain a secret value for recovering the transaction ciphertext data. The invention has the effects of improving the authentication credibility and reducing the risk of transaction data leakage under the condition of limited calculation power of the payment terminal.

Inventors

  • GAO HEFU

Assignees

  • 广州市易售宝互联网科技有限公司

Dates

Publication Date
20260512
Application Date
20260123

Claims (10)

  1. 1. A trusted execution environment payment privacy protection method, characterized in that the trusted execution environment payment privacy protection method comprises: executing a multi-factor authentication protocol based on a cryptographic algorithm in a trusted execution environment to generate transaction session token information; generating transaction data in a trusted execution environment based on the transaction session token information, and performing encryption processing on the transaction data based on a national encryption algorithm to obtain transaction ciphertext data; Executing fragmentation processing based on a Shamir threshold secret sharing principle on transaction ciphertext data or a transaction master key for decrypting the transaction ciphertext data to obtain a plurality of secret fragmentation data meeting threshold parameter information, and executing encryption packaging processing on the plurality of secret fragmentation data respectively based on a national encryption algorithm to obtain encrypted fragmentation data; Writing the encrypted fragment data into a local storage area according to a preset distribution strategy, sending the encrypted fragment data to an edge node for storage, obtaining transaction data recovery request information, executing validity check processing on the transaction data recovery request information based on transaction session token information in a trusted execution environment, and executing decryption and reconstruction processing on the encrypted fragment data meeting the threshold number when the number of the available encrypted fragment data meets the threshold number requirement based on threshold parameter information, so as to obtain a secret value for recovering transaction ciphertext data.
  2. 2. The method according to claim 1, wherein the generating transaction session token information based on performing a multi-factor authentication protocol based on a cryptographic algorithm in the trusted execution environment comprises: Generating random challenge information for authenticating interactions in a trusted execution environment; Acquiring certificate interaction information for representing factors held by a user by using a preset certificate reading and writing card assembly, and acquiring authentication input information submitted by the user; And performing association calculation on the random challenge information, the certificate interaction information and the authentication input information to generate authentication calculation input information, performing authentication calculation processing on the authentication calculation input information based on a cryptographic algorithm to obtain authentication result information, and generating transaction session token information in a trusted execution environment when the authentication result information indicates that authentication is passed.
  3. 3. The method according to claim 1, wherein the generating transaction data in the trusted execution environment based on the transaction session token information and performing encryption processing on the transaction data based on a cryptographic algorithm to obtain transaction ciphertext data comprises: analyzing based on the transaction session token information to obtain token identification information and token random quantity information; determining token binding key information from pre-loaded key material information based on token identification information in a trusted execution environment, and executing a cryptographic algorithm operation according to a preset key derivation rule based on token random quantity information and the token binding key information to obtain encryption key information; generating initial vector information in a trusted execution environment by using a preset national secret random number generation rule; Transaction element information corresponding to the transaction session token information is obtained, transaction data is generated according to the transaction element information and a preset field coding rule, encryption processing of a cryptographic algorithm is performed on the transaction data based on encryption key information and initial vector information, and transaction ciphertext data is obtained.
  4. 4. The method according to claim 1, wherein the generating transaction data in the trusted execution environment based on the transaction session token information and performing encryption processing on the transaction data based on a cryptographic algorithm to obtain transaction ciphertext data, further comprises: Generating model update input information for the federal learning model update mechanism based on the transaction data, generating model update information based on the model update input information in a trusted execution environment, sending the model update information to the edge nodes for collaborative computing aggregation, receiving a model update result returned by the edge nodes, and executing loading processing on the model update result.
  5. 5. The method according to claim 1, wherein the performing a sharding process on transaction ciphertext data or a transaction master key for decrypting the transaction ciphertext data based on Shamir threshold secret sharing principle to obtain a plurality of secret shards satisfying threshold parameter information, and performing an encryption packaging process on the plurality of secret shards based on a national encryption algorithm to obtain encrypted shards, respectively, includes: determining fragment number information and threshold number information based on threshold parameter information, and determining fragment object data in transaction ciphertext data and a transaction master key based on a preset fragment object selection rule; Performing finite field mapping processing on the segmented object data to obtain secret value data, and calculating to obtain secret segmented data corresponding to each segmented identification information one by one based on a Shamir threshold secret sharing principle under a plurality of groups of different segmented identification information corresponding to the segmented quantity information; And respectively adding fragment identification information and threshold parameter information to the secret fragment data to obtain pre-encapsulation fragment data, respectively performing encryption processing on the pre-encapsulation fragment data based on a national encryption algorithm in a trusted execution environment to obtain encrypted fragment content data, and binding the encrypted fragment content data with the corresponding fragment identification information to form the encrypted fragment data.
  6. 6. The method according to claim 1, wherein the step of writing the encrypted fragmented data into the local storage area and sending the encrypted fragmented data to the edge node for storage to obtain transaction data recovery request information, performing validity check processing on the transaction data recovery request information based on the transaction session token information in the trusted execution environment, and performing decryption and reconstruction processing on the encrypted fragmented data satisfying the threshold number when determining that the number of the available encrypted fragmented data satisfies the threshold number requirement based on the threshold parameter information, to obtain a secret value for recovering the transaction ciphertext data comprises: determining first encrypted fragmented data written into a local storage area based on a preset distribution strategy and second encrypted fragmented data sent to an edge node; Writing the first encrypted fragment data into a local storage area and sending the second encrypted fragment data to an edge node for storage; Acquiring transaction data recovery request information, performing consistency verification on the transaction data recovery request information based on transaction session token information in a trusted execution environment to obtain verification result information, acquiring first encrypted fragment data when the verification result information indicates that verification is passed, and requesting to acquire second encrypted fragment data from an edge node to obtain an acquired encrypted fragment data set; and selecting the encrypted fragment data meeting the threshold number when the fragment number of the acquired encrypted fragment data set meets the threshold number requirement based on the threshold parameter information, performing decryption processing of a cryptographic algorithm on the selected encrypted fragment data to obtain secret fragment data, and performing reconstruction processing based on a Shamir threshold secret sharing principle based on the secret fragment data to obtain a secret value.
  7. 7. The method of claim 6, wherein obtaining the transaction data restoration request information and performing a consistency check on the transaction data restoration request information based on the transaction session token information in the trusted execution environment to obtain check result information, obtaining the first encrypted fragmented data and requesting the edge node to obtain the second encrypted fragmented data to obtain the set of available encrypted fragmented data when the check result information indicates that the check is passed, comprises: Acquiring request token information and identification information to be recovered in transaction data recovery request information; performing consistency comparison processing in a trusted execution environment based on transaction session token information and request token information to obtain token consistency result information; Retrieving the first encrypted fragment data bound with the identification information to be restored in the local storage area based on the identification information to be restored when the token consistency result information indicates consistency, and sending fragment request information to the edge node based on the identification information to be restored so as to request to acquire the second encrypted fragment data bound with the identification information to be restored; and receiving second encrypted fragment data returned by the edge node, and carrying out aggregation processing on the first encrypted fragment data and the second encrypted fragment data to obtain an available encrypted fragment data set.
  8. 8. A trusted execution environment payment privacy protection apparatus, the trusted execution environment payment privacy protection apparatus comprising: the multi-factor authentication token generation module is used for executing a multi-factor authentication protocol based on a cryptographic algorithm in a trusted execution environment to generate transaction session token information; The transaction data generation encryption module is used for generating transaction data in a trusted execution environment based on the transaction session token information, and executing encryption processing on the transaction data based on a national encryption algorithm to obtain transaction ciphertext data; The threshold slicing encryption packaging module is used for executing slicing processing based on a Shamir threshold secret sharing principle on transaction ciphertext data or a transaction master key for decrypting the transaction ciphertext data to obtain multiple secret slicing data meeting threshold parameter information, and executing encryption packaging processing on the multiple secret slicing data respectively based on a national encryption algorithm to obtain encrypted slicing data; The fragmentation distribution storage and threshold reconstruction module is used for writing the encrypted fragmentation data into a local storage area according to a preset distribution strategy and sending the encrypted fragmentation data to an edge node for storage to obtain transaction data recovery request information, executing validity check processing on the transaction data recovery request information based on transaction session token information in a trusted execution environment, and executing decryption and reconstruction processing on the encrypted fragmentation data meeting the threshold number when the number of the available encrypted fragmentation data meets the threshold number requirement based on threshold parameter information to obtain a secret value for recovering transaction ciphertext data.
  9. 9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of a trusted execution environment payment privacy protection method according to any one of claims 1 to 7 when the computer program is executed.
  10. 10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of a trusted execution environment payment privacy protection method according to any one of claims 1 to 7.

Description

Trusted execution environment payment privacy protection method, device, equipment and medium Technical Field The present invention relates to the field of information security technologies, and in particular, to a method, an apparatus, a device, and a medium for protecting payment privacy in a trusted execution environment. Background With the popularization of mobile payment, aggregate payment and various offline acceptance scenes, payment terminals are widely deployed in the scenes of catering retail, transportation, public service and the like. The existing payment terminals generally need to complete the operations of user identity confirmation, transaction element collection, transaction data encryption transmission and storage, transaction risk identification and the like. Due to factors such as the volume, the power consumption and the cost of the terminal, the computing capacity and the security protection capacity of the payment terminal are often insufficient, so that security and privacy risks are easy to occur at the terminal side under high concurrency, weak network or complex environment. Disclosure of Invention In order to improve authentication credibility and reduce transaction data leakage risk under the condition that the computing power of a payment terminal is limited, the application provides a method, a device, equipment and a medium for protecting payment privacy of a credible execution environment. The first object of the present application is achieved by the following technical solutions: A trusted execution environment payment privacy protection method, the trusted execution environment payment privacy protection method comprising: executing a multi-factor authentication protocol based on a cryptographic algorithm in a trusted execution environment to generate transaction session token information; generating transaction data in a trusted execution environment based on the transaction session token information, and performing encryption processing on the transaction data based on a national encryption algorithm to obtain transaction ciphertext data; Executing fragmentation processing based on a Shamir threshold secret sharing principle on transaction ciphertext data or a transaction master key for decrypting the transaction ciphertext data to obtain a plurality of secret fragmentation data meeting threshold parameter information, and executing encryption packaging processing on the plurality of secret fragmentation data respectively based on a national encryption algorithm to obtain encrypted fragmentation data; Writing the encrypted fragment data into a local storage area according to a preset distribution strategy, sending the encrypted fragment data to an edge node for storage, obtaining transaction data recovery request information, executing validity check processing on the transaction data recovery request information based on transaction session token information in a trusted execution environment, and executing decryption and reconstruction processing on the encrypted fragment data meeting the threshold number when the number of the available encrypted fragment data meets the threshold number requirement based on threshold parameter information, so as to obtain a secret value for recovering transaction ciphertext data. By adopting the technical scheme, the multi-factor authentication protocol can be executed based on the cryptographic algorithm in the trusted execution environment and transaction session token information is generated, so that the authentication factor information and the authentication operation process related to authentication interaction are protected by the trusted execution environment and the transaction session token information is used as the trusted basis for subsequent transaction processing, thereby reducing the risk that an existing payment terminal is easy to steal authentication input or imposter a session when carrying out identity confirmation in the common execution environment, generating transaction data in the trusted execution environment based on the transaction session token information and carrying out cryptographic processing on the transaction data by a cryptographic algorithm to obtain transaction ciphertext data, enabling the transaction data formed after the transaction element acquisition to participate in subsequent processing in a ciphertext mode at a terminal side, reducing the risk that the transaction data is easy to be read or tampered in a local processing and storage stage of the high-concurrency, weak network or complex environment, carrying out the processing of the transaction ciphertext data or a transaction master key based on a Shamir threshold secret sharing principle and respectively carrying out cryptographic packaging processing on the secret piece data by the cryptographic algorithm to obtain encrypted piece data, enabling the sensitive secret piece data to be stored in a request of a direct-to be distrib