Data element ciphertext sorting method and device, equipment, medium and product

By improving the ciphertext key structure of the decryption encryption algorithm and adding node keys, combined with trusted third-party management, the problem of uncontrolled key updates was solved, achieving efficient ciphertext sorting of data elements, ensuring data security and computational efficiency, and reducing the risk of attacks.

CN121644091APending Publication Date: 2026-03-10CHINA MOBILE INTERNET CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, authorized comparison of ciphertext cannot support key updates by the encryptor, which means that after multiple rounds of sorting, attackers may be able to roughly determine the data range, thus increasing the risk of data leakage. Ciphertext comparison implemented through homomorphism has errors in comparison precision, which can lead to ciphertext comparison errors when the data is dense. Through trusted networks, key updates are not controlled by the data requester, which poses a security risk that trusted network administrators may abuse update capabilities to launch system attacks.

Method used

By improving the ciphertext key structure of the decryption encryption algorithm and adding node keys, a decryption encryption algorithm with updatable keys is realized. Combined with the management of a trusted third party, the lifecycle management of the decryption encryption key by the data provider is ensured, reducing the computational overhead when users update the ciphertext of data elements. Furthermore, the partial order relationship is determined by directly comparing whether the ciphertexts are the same, and the sorting algorithm is executed.

Benefits of technology

A key-updateable deorder encryption algorithm was implemented, which reduced the computational overhead when users updated the ciphertext of data elements, ensured the data security of newly uploaded data, prevented attackers from speculating on the partial order relationship between the obtained data element catalog and the latest data element catalog, cut off the attacker's cumulative analysis path of ciphertext statistical features in multiple rounds of sorting, and reduced the risk of differential attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644091A_ABST
    Figure CN121644091A_ABST
Patent Text Reader

Abstract

The invention relates to a data element ciphertext sorting method and device, equipment, a medium and a product in the technical field of data security. The method applied to a trusted third party comprises the following steps: initializing parameters and issuing a certificate; receiving the partial sequence encrypted ciphertext uploaded by the data provider, and storing the partial sequence encrypted ciphertext passing verification into a ciphertext database; receiving a signature ciphertext sorting request and a ciphertext comparison range, judging a partial order relation by directly comparing whether the ciphertexts are the same or not, executing a sorting algorithm to obtain a sorting result, and feeding back the sorting result; and according to an update key uploaded by the data provider, carrying out conversion calculation on the ciphertext component of the to-be-updated partial sequence encrypted ciphertext taken out from the ciphertext database, generating a new partial sequence encrypted ciphertext, and updating and storing the new partial sequence encrypted ciphertext. By improving the ciphertext key structure of the sequence-uncovering encryption algorithm, the sequence-uncovering encryption algorithm with an updatable key is realized, a life cycle management mechanism of a data provider for the sequence-uncovering encryption key is also realized, and the calculation overhead when a user updates the data element ciphertext is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data security technology, and in particular to a method, apparatus, device, medium and product for ciphertext sorting of data elements. Background Technology

[0002] Currently, to securely and conveniently retrieve data elements, existing technologies offer solutions for ciphertext sorting. Among these, authorized decryption encryption systems without bilinear pairing achieve ciphertext comparison and sorting by generating user public-private key pairs, authorization tokens, and bit sub-ciphertexts. These systems can eliminate bilinear mapping operations and support authorized ciphertext order comparison (without revealing plaintext), making them suitable for privacy-preserving ciphertext sorting. Homomorphic encryption-based data sorting methods utilize symbolic functions to generate encrypted comparison vectors, and then achieve ciphertext sequence rearrangement through nonlinear mapping and polynomial computation. Ciphertext sorting systems based on multi-party secure computation utilize de-identification and compliance review to achieve ciphertext data sorting.

[0003] However, current technology has the following technical problems: authorized comparison of ciphertext cannot support the updating of the cipherm's key, which means that after multiple rounds of sorting, attackers may be able to roughly determine the data range, thus increasing the risk of leakage; ciphertext comparison implemented through homomorphism has errors in comparison precision, leading to ciphertext comparison errors when the data is dense, and the comparison performance gradually decreases with the size of the ciphertext; although trusted networks ensure the sorting and updating capabilities of ciphertext data, the key for updating ciphertext data is not controlled by the data requester, which poses a security risk that trusted network administrators may abuse the update capability to launch system attacks. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this disclosure provide a method, apparatus, device, medium, and product for ciphertext sorting of data elements, enabling the key for ciphertext comparison to be updatable and highly reliable.

[0005] A first aspect of this disclosure provides a method for ciphertext sorting of data elements, applied to a trusted third party, the method comprising: Initialize parameters and issue certificates to data providers and data requesters; Receive the partially ordered encrypted ciphertext uploaded by the data provider and store the verified partially ordered encrypted ciphertext into the ciphertext database; Receive the signed ciphertext sorting request and ciphertext comparison range uploaded by the data requester. Extract the corresponding partially ordered encrypted ciphertext from the ciphertext database, determine the partially ordered relationship by directly comparing whether the ciphertexts are the same, execute the sorting algorithm to obtain the sorting result and feed it back; Based on the update key uploaded by the data provider, the ciphertext component of the partially ordered encrypted ciphertext to be updated, retrieved from the ciphertext database, is transformed and calculated to generate a new partially ordered encrypted ciphertext and update its storage.

[0006] A second aspect of this disclosure provides a method for ciphertext sorting of data elements, applied to a data provider, the method comprising: Generate a decryption encryption key containing the node key based on the reference string CRS; Data elements are encrypted to generate partially ordered encrypted ciphertext, which is then uploaded to a trusted third party. Generate an update key and upload the update key to a trusted third party.

[0007] A third aspect of this disclosure provides a method for ciphertext sorting of data elements, applied to a data requester, the method comprising: Submit certificate information containing identity information to a trusted third party, and receive and store signature certificates issued by the trusted third party; Send a signed, encrypted sorting request to a trusted third party; After receiving the encrypted sorting result returned by a trusted third party, obtain the partial order information of the data elements.

[0008] A fourth aspect of this disclosure provides an apparatus for ciphertext sorting of data elements, applied to a trusted third party, the apparatus comprising: The initialization module is configured to initialize parameters and issue certificates to data providers and data requesters. The storage module is configured to receive partially ordered encrypted ciphertext uploaded by the data provider and store the verified partially ordered encrypted ciphertext into the ciphertext database. The sorting module is configured to receive signed, encrypted sorting requests and the range of encrypted comparisons uploaded by the data requester. Extract the corresponding partially ordered encrypted ciphertext from the ciphertext database, determine the partially ordered relationship by directly comparing whether the ciphertexts are the same, execute the sorting algorithm to obtain the sorting result and feed it back; The update module is configured to perform transformation calculations on the ciphertext components of the partially ordered encrypted ciphertext to be updated retrieved from the ciphertext database based on the update key uploaded by the data provider, generate new partially ordered encrypted ciphertext, and update the storage.

[0009] A fifth aspect of this disclosure provides an apparatus for ciphertext sorting of data elements, applied to a data provider, the apparatus comprising: The generation module is configured to generate a decryption encryption key containing the node key based on the reference string CRS; The encryption module is configured to encrypt data elements to generate partial-order encrypted ciphertext and upload the partial-order encrypted ciphertext to a trusted third party; The update module is configured to generate an update key and upload the update key to a trusted third party.

[0010] A sixth aspect of this disclosure provides an apparatus for ciphertext sorting of data elements, applied to a data requester, the apparatus comprising: The submission module is configured to submit certificate information containing identity information to a trusted third party, and to receive and store signature certificates issued by the trusted third party. The request module is configured to send a signed, encrypted sorting request to a trusted third party. The acquisition module is configured to receive the encrypted sorting result returned after successful verification by a trusted third party, and to obtain the partial order information of data elements.

[0011] A seventh aspect of this disclosure provides an electronic device, comprising: At least one processor; Memory for storing the at least one processor-executable instruction; The at least one processor is used to execute the instructions to implement the above-described method.

[0012] An eighth aspect of this disclosure provides a computer-readable storage medium that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method described above.

[0013] A ninth aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for sorting encrypted data elements.

[0014] The above-mentioned at least one technical solution adopted in the embodiments of this disclosure can achieve the following beneficial effects: In the embodiments of this disclosure, by improving the ciphertext key structure of the deciphering encryption algorithm, a deciphering encryption algorithm with updatable keys is realized, and a lifecycle management mechanism for the deciphering encryption key by the data provider is also realized, reducing the computational overhead when users update the ciphertext of data elements. By adding node keys to the deciphering encryption ciphertext structure, the problem of leakage of sorting information that may occur due to the inability to update the deciphering encryption ciphertext is solved; after each update of the ciphertext, the data requester will not be able to infer the partial order relationship between the obtained data element catalog and the latest data element catalog, ensuring the data security of newly uploaded data. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0016] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A schematic diagram of a system architecture for ciphertext sorting of data elements provided in this disclosure embodiment; Figure 2 A flowchart illustrating a method for ciphertext sorting of data elements applied to a trusted third party, provided in this embodiment of the disclosure; Figure 3 A flowchart illustrating a method for ciphertext sorting of data elements applied to a trusted third party, provided in this embodiment of the disclosure; Figure 4 A flowchart illustrating a method for ciphertext sorting of data elements applied to a data requester, as provided in this embodiment of the disclosure; Figure 5 A schematic flowchart illustrating a method for ciphertext sorting of data elements provided in this embodiment of the disclosure; Figure 6 A schematic diagram of the structure of an apparatus for ciphertext sorting of data elements applied to a trusted third party, provided in an embodiment of this disclosure; Figure 7 A schematic diagram of the structure of an apparatus for ciphertext sorting of data elements applied to a data provider, provided in an embodiment of this disclosure; Figure 8 A schematic diagram of the structure of an apparatus for ciphertext sorting of data elements applied to a data requester, provided in an embodiment of this disclosure; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure; Figure 10 This is a schematic diagram of the structure of an exemplary computer system provided in an embodiment of the present disclosure. Detailed Implementation

[0018] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0019] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0020] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0021] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0022] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0023] Before explaining this disclosure, the terms used in this disclosure will be explained for ease of understanding.

[0024] The following is combined Figures 1-10 This disclosure describes the methods, apparatus, devices, media, and products for ciphertext sorting of data elements provided in the embodiments of this disclosure.

[0025] Figure 1 This is a schematic diagram of a system architecture for ciphertext sorting of data elements provided in an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiments of the present disclosure are shown.

[0026] like Figure 1 As shown, the method provided in this disclosure involves three types of entities: data providers, data users, and trusted third parties.

[0027] Trusted third party: At the PKI (Public Key Infrastructure) level, it uses mobile authentication products to issue public key certificates to data providers and data requesters through personal authentication / number authentication; at the data element circulation level, it stores the partially ordered encrypted ciphertext uploaded by the data provider, receives key update events reported by the data provider, and updates the ciphertext version.

[0028] Data provider: Uploads the partially ordered encrypted ciphertext generated from data elements to a trusted third party. When the decryption encryption key expires (e.g., certificate expires, key is lost, etc.), it uploads an updated key to the trusted third party.

[0029] Data requester: Submits a data sorting request to a trusted third party and obtains the encrypted data sorting result from the trusted third party.

[0030] To achieve the various functions of the embodiments of this disclosure, the data provider, the data requester, and the trusted third party will perform steps such as creation, uploading of partially ordered encrypted ciphertext, ciphertext sorting, and updating of ciphertext.

[0031] This disclosure improves the steps of uploading partially ordered encrypted ciphertext and updating ciphertext by adding a node key to the partially ordered encrypted ciphertext and generating an update key in the updating ciphertext step. This allows for the rapid updating of deordered encrypted ciphertext using the update key when deordered ciphertext already exists, reducing the processing time for key updates by the data provider and optimizing the user experience.

[0032] Figure 2 This is a flowchart illustrating a method for ciphertext sorting of data elements applied to a trusted third party, as provided in an embodiment of this disclosure. Figure 2 As shown, the method includes: S201. Initialize parameters and issue certificates to data providers and data requesters; S202. Receive the partially ordered encrypted ciphertext uploaded by the data provider and store the verified partially ordered encrypted ciphertext into the ciphertext database. S203. Receiving the signed ciphertext sorting request and ciphertext comparison range uploaded by the data requester. Extract the corresponding partially ordered encrypted ciphertext from the ciphertext database, determine the partially ordered relationship by directly comparing whether the ciphertexts are the same, execute the sorting algorithm to obtain the sorting result and feed it back; S204. Based on the update key uploaded by the data provider, perform conversion calculations on the ciphertext component of the partial-order encrypted ciphertext to be updated retrieved from the ciphertext database, generate a new partial-order encrypted ciphertext, and update the storage.

[0033] This embodiment of the disclosure improves the ciphertext key structure of the deciphering encryption algorithm, realizing a key-updateable deciphering encryption algorithm. It also implements a lifecycle management mechanism for the deciphering encryption key by the data provider, reducing the computational overhead when users update the ciphertext of data elements. By adding node keys to the deciphering encryption ciphertext structure, it solves the problem of leakage of sorting information that may occur due to the inability to update the deciphering encryption ciphertext. After each ciphertext update, the data requester will not be able to infer the partial order relationship between the obtained data element catalog and the latest data element catalog, ensuring the data security of newly uploaded data.

[0034] Figure 3 This is a flowchart illustrating a method for ciphertext sorting of data elements applied to a data provider, as provided in an embodiment of this disclosure. Figure 3 As shown, the method includes: S301. Generate a decryption encryption key containing the node key based on the reference string CRS; S302. Encrypt the data elements to generate partial-order encrypted ciphertext, and upload the partial-order encrypted ciphertext to a trusted third party; S303. Generate an update key and upload the update key to a trusted third party.

[0035] This embodiment of the disclosure improves the ciphertext key structure of the deciphering encryption algorithm, realizing a key-updateable deciphering encryption algorithm. It also implements a lifecycle management mechanism for the deciphering encryption key by the data provider, reducing the computational overhead when users update the ciphertext of data elements. By adding node keys to the deciphering encryption ciphertext structure, it solves the problem of leakage of sorting information that may occur due to the inability to update the deciphering encryption ciphertext. After each ciphertext update, the data requester will not be able to infer the partial order relationship between the obtained data element catalog and the latest data element catalog, ensuring the data security of newly uploaded data.

[0036] Figure 4 This is a schematic flowchart illustrating a method for ciphertext sorting of data elements applied to a data requester, as provided in an embodiment of this disclosure. Figure 4 As shown, the method includes: S401. Submit certificate information containing identity information to a trusted third party, and receive and store the signature certificate issued by the trusted third party; S402. Send a signed ciphertext sorting request to a trusted third party; S403. Receive the encrypted sorting result returned after the trusted third party has verified the data, and obtain the partial order information of the data elements.

[0037] This embodiment replaces the original identity data transmission with certificate information exchange, and combines it with a signed ciphertext mechanism to avoid the risk of sensitive data leakage while achieving traceability and non-repudiation of data sources and preventing data tampering. Relying on the neutrality and standardized operation of a trusted third party, it ensures the fairness and compliance of the sorting process. Through professional sorting optimization, it reduces the local computing overhead of the data holder, and the output partial order information can directly support hierarchical retrieval, range query and other businesses, improving data utilization efficiency. After each ciphertext update, the data requester will not be able to infer the partial order relationship between the obtained data element catalog and the latest data element catalog, ensuring the data security of newly uploaded data.

[0038] Figure 5 This is a schematic flowchart illustrating a method for ciphertext sorting of data elements provided in an embodiment of this disclosure, as shown below. Figure 5 As shown, the method includes: S501. Initialization and Authentication; This step involves a trusted third party generating a Public Reference String (CRS) and its own public / private key pair, synchronizing the CRS to the data provider and data requester; the data provider and data requester submit identity documents, and the trusted third party issues a signature certificate after verifying the identities, thus establishing a mutually trusted identity foundation and a unified algorithm parameter foundation among the three parties.

[0039] This step specifically includes: S5011, Trusted Third Party Initialization Parameters; Includes the following steps: S50111, Trusted Third Party Initialization Common Reference String (CRS) , , ).

[0040] in, Represents a discrete logarithmic group. Represents the generator within the group. Representative group The prime number parameter.

[0041] S50112, A trusted third party generates its own public / private key pair { , }

[0042] For example, the public-private key pair can be generated using Mobile Authentication Access RSA (3072 bits) or the SM2 national cryptographic algorithm.

[0043] The CRS and its own public-private key pair are generated by a trusted third party, ensuring that subsequent key generation and encryption operations by data providers and data requesters are based on a unified parameter foundation, thus avoiding process abnormalities caused by parameter incompatibility.

[0044] S50113. A trusted third party provides CRS to data providers and data requesters.

[0045] S5012, a trusted third party receives certificates from both the data provider and the data requester, and returns a signed certificate containing their identities. Specifically, this includes: S50121. Data providers and data requesters can generate certificate information and submit it to a trusted third party. Data providers and data requesters proactively cooperate by submitting materials, and a trusted third party centrally completes the verification and certificate issuance, forming an efficient and collaborative pre-preparation process that lowers the certification threshold for all parties while ensuring the accuracy of identity verification.

[0046] S50122. A trusted third party uses the supporting information in the certificate information to verify the identity information of the certificate applicant; Supported information includes: certificate holder's name, email address, mobile phone number, and employer.

[0047] S50123, Trusted third party returns signature certificate.

[0048] A trusted third party returns a signing certificate to the data provider and the data requester.

[0049] For example, the above S5012 can be completed using the CA issuance mode of an X509 certificate.

[0050] Understandably, having a trusted third party complete identity verification and issue a signature certificate helps to avoid the risk of malicious entities accessing the system from the source, and provides trusted identity support for signature verification in all subsequent data interactions between the three parties (such as encrypted uploads and sorting request submissions).

[0051] S5013, The data provider generates the decryption encryption key; specifically including: S50131, The data provider decodes the CRS and generates a positive integer space. ; positive integer space This forms the numerical basis for key generation, ensuring key compatibility with parameters of subsequent encryption and sorting algorithms.

[0052] S50132, The data provider uses a random algorithm to generate a decryption encryption key. , ).

[0053] In the space of positive integers Two core parameters are randomly generated internally: node key And a random number r.

[0054] For example, the data provider can use the random generation algorithm provided by the national cryptographic resource pool to calculate... , .

[0055] This disclosure implements key lifecycle management by introducing node keys and a rapid update mechanism, effectively reducing the computational burden and time cost for data providers during key updates. Furthermore, a trusted third party initializes parameters and issues certificates. The data provider generates a de-ordered encryption key using a public reference string and uses a hash function to generate a partially ordered encrypted ciphertext with the node key, which is then uploaded. After verification and storage by the trusted third party, the data requester submits a ciphertext sorting request, and sorting is performed directly through comparison. During updates, the data provider uploads an updated key, which the trusted third party uses to quickly replace the node key in the partially ordered encrypted ciphertext without re-encryption, effectively achieving efficient key management and ciphertext maintenance.

[0056] S502, Ciphertext Generation and Storage; The data provider generates a de-order encryption key containing the node key based on CRS, encrypts the data elements to generate a partial-order encrypted ciphertext, signs it, and uploads it to a trusted third party; after the trusted third party verifies the validity of the signature, it stores the partial-order encrypted ciphertext in the ciphertext database, completing the collaborative closed loop of "encryption-signing-verification-storage".

[0057] The uploaded partial-order encrypted ciphertext includes: S5021, The data provider uses a hash function and a cyclic group of discrete logarithms to calculate encrypted data. m .

[0058] In this embodiment, a node key is newly added during the encryption process. This enables ciphertext update operations to be performed on partially ordered encrypted ciphertext. Specifically, it includes the following steps: S50211, Data provider decodes data to be encrypted. m , is a binary string ( 1 2… ); S50212, Data provider selects hash function , 1 ≤ i ≤ ,exist Perform calculations within the specified range: A. Calculation ← ( 1 2… 1|0 ) +

[0059] B. Calculation ← ( 1 2… 1|0 ) + +1 C. Calculation ← , ←

[0060] By combining the group generator g synchronized by a trusted third party, two sets of ciphertext components are obtained through discrete logarithmic exponentiation: ← , ← .

[0061] D. Generate partially ordered encrypted ciphertext ←

[0062] Finally, the two sets of ciphertext components are combined to form the final partial-order encrypted ciphertext. ← ; in, 1 2 … 1|0 Indicates the preceding i- 1-bit binary string and subsequent ni The difference in the middle value of the string concatenated with 0 bits provides a basis for subsequent partial order relationship judgment.

[0063] Hash functions are used to map segments of a binary string into operable numerical values, ensuring the uniqueness of the encryption.

[0064] S5022, The data provider uploads partially ordered encrypted ciphertext; Specifically, the following steps are included: S50221, The data provider uses its own certificate private key to encrypt the partial order ciphertext. Signature generation generates unique signature information and will Signature information Upload them together to a trusted third party; S50222, A trusted third party uses the data provider's public key Verify signature information If the verification passes, the partial-order encrypted ciphertext will be used. Store in encrypted database Otherwise, no action will be taken.

[0065] That is, using public keys Decrypt signature information The system checks whether the decryption result matches the partially ordered encrypted ciphertext c. If they match, it means the ciphertext source is legitimate and the transmission process has not been tampered with, and the verification passes. If they do not match, the verification fails.

[0066] For example, the signature algorithm may be implemented using the Chinese national cryptographic standard SM2.

[0067] S503, Ciphertext Sorting and Result Feedback; The data requester sets the encrypted comparison range and signs it, then submits a sorting request to a trusted third party. After the trusted third party verifies the signature, it extracts the corresponding encrypted text from the encrypted database, executes the encrypted sorting algorithm to obtain the sorting result, and feeds it back to the data requester, thus completing the collaborative process of "request-verification-sorting-feedback".

[0068] The ciphertext sorting process includes the following steps: S5031, Data requester uploads encrypted text sorting request; S50311, Data requester sets encrypted comparison range And use the certificate's private key to sign. and will , Upload them together to a trusted third party; For example, the ciphertext comparison range can be set by employing a searchable encryption algorithm or an anonymous query algorithm. .

[0069] For example, the SM2 national cryptographic algorithm is used to compare the ciphertext range. Perform a signature and generate signature information. .

[0070] S50312, A trusted third party utilizes the public key of the data requester. Verify signature information If the verification passes, proceed to S5032; otherwise, no processing is performed.

[0071] For example, the signature algorithm can be implemented using the national cryptographic standard SM2, and the scope of ciphertext comparison described by the data requester can be implemented using secure encryption algorithms such as searchable encryption and stealth query.

[0072] S5032, a trusted third party executes the ciphertext sorting algorithm.

[0073] The sorting algorithm in this embodiment uses direct comparison of whether the ciphertexts are the same to determine the partial order relationship, which can reduce the additional computational overhead caused by ciphertext transformation or calculation.

[0074] Specifically, the following steps are included: S50321, Trusted Third Party Extract two partially ordered encrypted ciphertexts from the data. , ∈ .

[0075] S50322, A trusted third party performs ciphertext decoding to obtain the sequence. ← and ← .

[0076] S50323, Order From 1 to Increment, compare separately and The following situation occurs: A. If ,and = End the increment and return. ≤ ; B. If ,and End the increment and return. ≤ ; C. If Increment to ,return = .

[0077] For example, the above comparison scheme can be embedded with mature sorting algorithms (such as bubble sort and quick sort) to reduce the scope. Number of times the inner ciphertext is compared.

[0078] A trusted third party determines the partial order relationship by directly comparing whether the ciphertexts are the same, executes a sorting algorithm to obtain the sorting result, and then provides feedback.

[0079] After sorting all the ciphertexts, a sorted partial-order encrypted ciphertext list is formed, which is the sorting result.

[0080] S504, Key Update and Ciphertext Synchronization; Updating the ciphertext includes the following steps: S5041, The data provider generates an update key Δ; This disclosure utilizes a fast update algorithm for partially ordered encrypted ciphertexts to generate an update key Δ, that is, replacing the node keys in the partially ordered encrypted ciphertexts with discrete logarithmic operations. Specifically, it includes the following steps: S50411, The data provider uses a random algorithm to generate new node keys. ; For example, the data provider can use the random generation algorithm provided by the national cryptographic resource pool to calculate... .

[0081] S50412, The data provider calculates the update key Δ ← / ; Using the initial node key With the new node key The division operation yields the updated key Δ.

[0082] S50413, Referring to S5022, the data provider uses the issued certificate to upload the update key Δ to a trusted third party.

[0083] Data providers can upload the updated key to a trusted third party after signing it with their own certificate and private key.

[0084] S5042, Trusted third party updates partially ordered encrypted ciphertext ; Specifically, the following steps are included: S50421, Trusted third party from encrypted database Extract the partially ordered encrypted ciphertext ; S50422, Trusted Third-Party Computing ← ; S50423, Trusted Third-Party Computing ′ ← ; Specifically, a trusted third party retrieves [the information] sequentially. , 1 ≤ ≤ And perform the following calculations: ← = ; ← = ; A comparison with S5021 shows that, Ciphertext and the node key used calculate The same partial-order encrypted ciphertext will be obtained, and the data provider does not need to regenerate the partial-order encrypted ciphertext locally. Therefore, the ciphertext update step can enable the data provider to quickly complete the key update.

[0085] S50424, Trusted Third Party Store partial order encrypted ciphertext ′.

[0086] The updated ciphertext c' is based on the new node key. The generation and data requirement method infers the original partial order relationship between the old sorting results and the new ciphertext by associating them, thereby cutting off the attacker's cumulative analysis path of the statistical features of the ciphertext in multiple rounds of sorting, reducing the risk of differential attacks, and controlling the leakage of sorting-related information.

[0087] This embodiment of the disclosure solves the problem of sorting information leakage that may occur due to the inability to update the deordered encrypted ciphertext by adding a node key to the deordered encrypted ciphertext structure. Compared with the existing technology, this embodiment ensures that the data requester cannot infer the partial order relationship between the obtained data element catalog and the latest data element catalog after each ciphertext update, thus guaranteeing the data security of newly uploaded data.

[0088] This embodiment discloses a method for encrypted sorting of data elements, applied to the scenario of medical data element circulation. Specifically, it describes a scenario where a large hospital A (data provider) uploads a personal medical record data catalog to operator B (trusted third party), and research institution C (data requester) obtains the recent medical record data catalog through encrypted sorting.

[0089] Because Hospital A's data involves sensitive information and is subject to strict outbound control, only the catalog information of data elements (such as medical record collection time, medical record summary, etc.) is provided to operator B in encrypted form. Research institution C, however, wishes to obtain recent medical record information. The following implementation method can be used to allow the research institution to obtain the encrypted recent medical record information and, with authorization from the hospital, to view the plaintext medical record information.

[0090] Initialization phase: (1) Operator B initializes parameters, generates CRS strings, and provides CRS strings to Hospital A and Research Institution C; After starting the system, operator B first completes parameter initialization: generating a discrete logarithmic group. In-group generator g and group The common reference string CRS for the prime number parameter p; Simultaneously, it uses the SM2 national cryptographic algorithm to generate its own public and private key pair. , Alternatively, the RSA 3072-bit algorithm can be used to generate your own public-private key pair.

[0091] Operator B will simultaneously send the CRS to Hospital A and Research Institution C, providing a unified parameter basis for their subsequent key generation and encryption operations.

[0092] (2) Hospital A and research institution C respectively apply for certificates from operator B using CRS strings. After receiving the holder's name, email, and mobile phone number, operator B issues the certificate information. After receiving the CRS, Hospital A and Research Institution C simultaneously submitted certificate application materials to Operator B (all materials included the certificate holder's name, contact person's email address, work mobile phone number, and information about the company / organization to which they belong). At the PKI level (PKI stands for Public Key Infrastructure, which is the basic architecture that provides security services such as identity authentication and data encryption for network communication), operator B uses mobile authentication products to verify the identities of hospital A and research institution C respectively. Specifically, it verifies the institutional qualification information of hospital A and performs personal authentication of the contact person and work mobile phone number authentication for research institution C.

[0093] After verifying the legitimacy of both parties' identities, operator B issues signature certificates to hospital A and research institution C respectively using the CA issuance mode of X.509 certificates. After receiving the signature certificates, hospital A and research institution C store them in their local security modules to complete the acquisition of identity credentials and prepare for signature verification in subsequent data exchanges.

[0094] Initialization and certificate issuance are completed through tripartite collaboration, ensuring parameter synchronization and a foundation of mutual trust for identity authentication. Operator B leads parameter generation to ensure algorithm consistency, while Hospital A and Research Institution C actively cooperate to improve process efficiency. Mobile authentication at the PKI level lowers the authentication threshold for applicants and ensures the accuracy of identity verification. The X509 certificate provides trusted identity support for subsequent signature verification throughout the entire process, avoiding the risk of malicious entities accessing the system from the source.

[0095] (3) Hospital A initializes the encryption key and saves it locally to prepare for data element uploading.

[0096] After completing parameter initialization and identity authentication collaboration with a trusted third party (operator B), Hospital A initiates the initialization process for the decryption encryption key, as follows: 1. Key generation preparation: Hospital A first receives and decodes the public reference string (CRS) synchronized by operator B, and extracts the discrete logarithm group from the decoding result. The prime number parameter p generates a space for positive integers. ; 2. Key initialization generation: The random generation algorithm provided by the national cryptographic resource pool is used in the positive integer space. Two core parameters are randomly generated internally: node key And a random number r, the two are combined to form the complete decryption encryption key ( , ); 3. Secure local storage of the key: Hospital A will store the generated decryption encryption key locally. , The key is stored in a local dedicated secure storage module (such as an encrypted hardware security module HSM or a local encrypted database that complies with national cryptographic security standards), and the key generation time and associated CRS version information are recorded to establish a key management ledger. 4. Data upload preparation and connection: After local saving is completed, the de-order encryption key is ready and is specifically used for the subsequent data element upload process of Hospital A. After Hospital A retrieves the medical record catalog and waits for the data elements to be uploaded, it can directly call the locally saved key to complete the generation of the partial order encryption ciphertext without repeating key initialization, thus improving the data upload efficiency.

[0097] Upload of partially ordered encrypted ciphertext stage: This stage is the core step where the data provider (Hospital A) uploads the encrypted data to a trusted third party (Operator B) after encrypting the data elements.

[0098] (1) Hospital A extracts the collection time from the medical records. Perform partial order encryption to obtain the partially ordered encrypted ciphertext. ; Hospital A extracts the collection time from the medical records m Partial order encryption is performed to obtain the partially ordered encrypted ciphertext c: Hospital A first extracts the core data element—the medical record collection time—from the medical record catalog data to be uploaded as the data to be encrypted. m (This data) m (This is the core basis for subsequent sorting). Then, encryption preprocessing is performed to convert the acquisition time into plaintext. m Decode into standard binary string (b 1 b 2 …b n )(n (The length of the binary string is determined based on the numerical range of the collection time). Then, a suitable hash function is selected. , 1 ≤ i ≤ Calculate the two intermediate values ​​corresponding to each bit of the binary representation in turn: ← ( 1 2… 1|0 ) + , ← ( 1 2… 1|0 ) + + 1, where, 1 2… 1|0 Indicates the preceding i- 1-bit binary string and subsequent ni The string concatenated with 0 bits, the difference in the middle value, provides the basis for subsequent partial order relationship determination; finally, Hospital A calls the previously stored de-order encryption key (including the node key) locally. A random number r), combined with a group generator g synchronized by a trusted third party, is used to calculate two sets of ciphertext components through discrete logarithmic exponentiation: ← , ← The two sets of ciphertext components are then combined to form the final partial-order encrypted ciphertext. ←

[0099] (2) Hospital A uses the certificate private key to encrypt the partial order ciphertext. Signature information and encrypt the ciphertext in a partial order. Signature information Upload it to operator B together; Hospital A uses its certificate's private key to sign the partially ordered encrypted ciphertext c, obtaining the signature information. And the partial order encrypted ciphertext c and signature information Uploaded to Operator B: After Hospital A generates the partially ordered encrypted ciphertext c, to ensure the integrity and traceability of the ciphertext during transmission and to prevent tampering, a signing operation is performed. This involves calling the private key corresponding to the signature certificate issued by Operator B and securely storing it locally, and then using the SM2 national cryptographic algorithm to sign the partially ordered encrypted ciphertext c, generating a unique signature. After signing, Hospital A transmits the partially encrypted ciphertext c and the signature information through a secure encrypted channel. Upload the data to operator B along with basic instructions for data uploading (such as the medical record category corresponding to the encrypted data, to facilitate subsequent management).

[0100] (3) Operator B verifies the validity of the signature. If the verification passes, then... Store in encrypted database .

[0101] Operator B receives c and signature information uploaded by hospital A. Then, the signature validity verification process is initiated first, retrieving Hospital A's public key from its own stored identity information ledger. The signature information is processed using the SM2 national cryptographic algorithm, which is consistent with the signature used by Hospital A. Verification is performed; the core verification logic is: using the public key. Decrypt signature information The system checks whether the decryption result matches the partially ordered encrypted ciphertext c. If they match, it means the ciphertext source is legitimate and the transmission process has not been tampered with, and the verification is successful. If they do not match, the verification fails, and operator B immediately refuses to store the ciphertext and returns an error message to hospital A: "Signature verification failed, you need to re-upload." Once the verification is successful, operator B stores the partially ordered encrypted ciphertext c in the preset ciphertext database EDB, and records the ciphertext storage time, the associated hospital A's identity information, and the key version information, thus completing the entire ciphertext uploading process.

[0102] Encryption sorting stage: Research institution C obtains the sorting result of the partially ordered encrypted ciphertext within a specified range through a trusted third-party operator B without accessing the plaintext data, while ensuring the legitimacy of the request and the security of data privacy.

[0103] (1) Research institution C applies to operator B to perform encrypted sorting and determines the scope through certificate signing. The partially ordered encrypted ciphertext uploaded by Hospital A; Research institution C first clarifies its own needs (e.g., obtaining the encrypted medical record catalog of the past 3 months uploaded by hospital A). Based on this need, it transforms the requirement into a comparison range at the encrypted level using a searchable encryption algorithm or an anonymous query algorithm. In this embodiment, the comparison range The partially ordered encrypted ciphertext uploaded by Hospital A constitutes the comparison range. The selection criteria are limited to partially ordered encrypted ciphertexts that have been signed and uploaded by Hospital A and verified and stored by Operator B, to avoid range confusion. Then, Research Institution C uses the private key of the signature certificate issued by Operator B, which is securely stored locally, to compare the ciphertext against the specified range using the SM2 national cryptographic algorithm. Perform a signature and generate signature information. Finally, sort the application and signature information. and comparison range Submit it to operator B together.

[0104] Binding "Ordering Request - Scope" via certificate signing - The identity of research institution C is used as a basis for subsequent verification by operator B, preventing malicious entities from impersonating research institutions to initiate illegal ranking requests; at the same time, the scope of comparison is expanded. The encrypted ciphertext is explicitly limited to the partially ordered ciphertext uploaded by Hospital A to ensure the accuracy of the sorting object and avoid interference from irrelevant ciphertext.

[0105] (2) Operator B verifies the certificate signature information of research institution C and executes the encrypted sorting algorithm to obtain the sorting result. That is, the sorted partial-order encrypted ciphertext list; After receiving the application, operator B first retrieves the public key of research institution C from its own identity information ledger. The SM2 national cryptographic algorithm, consistent with that used in C signatures by research institutions, is employed. Verification is performed; the verification logic is as follows: using the public key Decryption Determine the decryption result and the comparison range. If they match, it means the request is legitimate and the scope has not been tampered with, and the verification passes; if they do not match, the sorting will be rejected and an error message will be returned.

[0106] After verification, operator B extracts the "belonging to the range" from the encrypted database EDB. The entire partially ordered encrypted ciphertext "and uploaded by Hospital A" is then sorted using a fast sorting algorithm with embedded ciphertext comparison logic. The core sorting logic is to directly compare the ciphertext components to determine the partial order relationship: two ciphertexts c to be sorted are sequentially retrieved. Decoding yields the component sequence (u1) 0 u2 0 …u n 0 , u1¹u2¹…u n ¹) and (û1) 0 û2 0 …û n 0 , û1¹û2¹…û n ¹), bit-by-bit comparison u i 0 with û i 0 According to "u i 0 ≠û i 0 andu i 0 =û i ¹, then The order is determined by rules such as "≤ c".

[0107] After sorting all the ciphertexts, a sorted partial-order encrypted ciphertext list is formed, which is the sorting result D.

[0108] The signature verification process establishes a security barrier to ensure the legitimacy of requests, avoiding the risks of malicious data queries and scope tampering. The sorting process does not require decryption of the ciphertext; it directly determines the order through component comparison, which not only protects the privacy and security of Hospital A's medical record data but also improves sorting efficiency through a fast sorting algorithm, adapting to the needs of large-scale ciphertext sorting.

[0109] (3) Operator B returns the sorting results After the research institution reviews and ranks the results, it applies to Hospital A to access the medical records. Operator B returns the sorting result D (the sorted partial-order encrypted ciphertext list) to research institution C through a secure encrypted channel. After receiving the result, research institution C first verifies the legality of the result format (such as the number of ciphertext components, sequence integrity, etc.). After confirming that the result is correct, it completes the acquisition of the partial-order information (i.e., determining "which hospital A's ciphertext medical records correspond to recent data"). Since the sorting result D is still ciphertext, research institution C cannot directly obtain the plaintext medical record information. Therefore, it needs to submit a plaintext access request to the data provider hospital A based on the sorting result. Only after hospital A approves the request can the plaintext data of the corresponding medical records be obtained.

[0110] The secure channel for feedback ensures that the sorting results are not tampered with or stolen during transmission; research institution C only obtains the partially ordered encrypted ciphertext list and does not access the plaintext, further strengthening the protection of medical data privacy; the subsequent process of applying to hospital A for plaintext access ensures hospital A's sovereign control over its own data and complies with the compliance requirements for the circulation of medical data.

[0111] Encryption update phase: Data provider Hospital A generates an update key, which is then used by trusted third-party operator B to quickly update the ciphertext, achieving key lifecycle management and cutting off attackers' path to accumulate and analyze the statistical characteristics of the ciphertext, thus reducing the risk of data leakage.

[0112] (1) Hospital A regularly maintains the sorting status of partially ordered encrypted ciphertexts on operator B. When the number of sorting operations triggers a threshold... When the value is ≥100, an update key Δ is generated; Hospital A regularly monitors the number of times "self-uploaded partial order encrypted ciphertext" is sorted on operator B through the operation and maintenance system. When the number of sorting is detected to reach the preset threshold T=100, a key update is triggered, or the key may expire or be lost.

[0113] Hospital A first uses the random generation algorithm provided by the national cryptographic resource pool in the positive integer space. (Originated from the CRS of decoding operator B) Generate a new node key Then through the initial node key With the new node key The division operation yields the updated key Δ, i.e., Δ ← / Finally, Hospital A uses its own certificate private key to sign Δ using the SM2 national cryptographic algorithm and uploads the signed Δ to Operator B.

[0114] Regularly triggering key updates based on the number of sorting operations can avoid security risks caused by long-term key use; the update key Δ is calculated from the initial node key and the new node key, eliminating the need for Hospital A to re-encrypt massive amounts of original medical record data, significantly reducing computational overhead; the signature upload Δ can ensure the legitimacy of the update key's source and prevent the update key from being tampered with.

[0115] (2) After obtaining the update key Δ, operator B performs an update operation on the ciphertext to control the leakage of sorting information.

[0116] After receiving the signed Δ, operator B first verifies the signature's validity using hospital A's public key. Upon successful verification, it proceeds to the ciphertext update process. The ciphertext update process involves retrieving all the partially ordered encrypted ciphertexts c from hospital A's ciphertext database EDB, and decoding each ciphertext c to obtain the ciphertext component u. i 0 u i ¹(1≤i≤n); The components are transformed by exponentiation, i.e., the calculation is performed. ← , ← The transformed components are combined to generate a new partial-order encrypted ciphertext. ′ ← Store the new partially ordered encrypted ciphertext c' into the EDB, overwriting the original partially ordered encrypted ciphertext c, and return a success message to Hospital A; Logic to control the leakage of sorting information: The updated partially ordered encrypted ciphertext c' is based on the new node key. The generation process prevents data requesters (such as research institution C) from inferring the original data partial order relationship between the old sorting results and the new partial order encrypted ciphertext. This cuts off the attacker's cumulative analysis path of the ciphertext statistical features in multiple rounds of sorting, reduces the risk of differential attacks, and controls the leakage of sorting-related information.

[0117] The encrypted update is uniformly executed by operator B, ensuring the standardization and security of the update process and avoiding encrypted version confusion; the encrypted update does not require hospital A to re-encrypt the original data, improving update efficiency; the partial order relationship of the updated encrypted data is untraceable, further strengthening data security and adapting to the security needs of dynamic changes in medical data.

[0118] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements, optimizations and modifications can be made without departing from the principle of the present invention, and these should also be considered within the scope of protection of the present invention.

[0119] Figure 6 This is a schematic diagram of a device for ciphertext sorting of data elements applied to a trusted third party, provided in an embodiment of this disclosure. The device 600 includes: Initialization module 601 is configured to initialize parameters and issue certificates to data providers and data requesters. Storage module 602 is configured to receive partially ordered encrypted ciphertext uploaded by the data provider and store the verified partially ordered encrypted ciphertext into the ciphertext database. The sorting module 603 is configured to receive a signed ciphertext sorting request and a ciphertext comparison range uploaded by the data requester. Extract the corresponding partially ordered encrypted ciphertext from the ciphertext database, determine the partially ordered relationship by directly comparing whether the ciphertexts are the same, execute the sorting algorithm to obtain the sorting result and feed it back; The update module 604 is configured to perform transformation calculations on the ciphertext components of the partially ordered encrypted ciphertext to be updated retrieved from the ciphertext database based on the update key uploaded by the data provider, generate new partially ordered encrypted ciphertext, and update the storage.

[0120] Figure 7 This is a schematic diagram of a device for ciphertext sorting of data elements applied to a data provider, provided in an embodiment of this disclosure. The device 700 includes: The generation module 701 is configured to generate a decryption encryption key containing the node key based on the reference string CRS; Encryption module 702 is configured to encrypt data elements to generate partial-order encrypted ciphertext and upload the partial-order encrypted ciphertext to a trusted third party; The update module 703 is configured to generate an update key and upload the update key to a trusted third party.

[0121] Figure 8 This is a schematic diagram of a device for ciphertext sorting of data elements applied to a data requester, provided in an embodiment of this disclosure. The device 800 includes: Submission module 801 is configured to submit certificate information containing identity information to a trusted third party, and to receive and store signature certificates issued by the trusted third party. Request module 802 is configured to send a signed ciphertext ordering request to a trusted third party; The acquisition module 803 is configured to receive the encrypted sorting result returned after the trusted third party has verified the data, and to obtain the partial order information of the data elements.

[0122] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0123] Figure 9This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 9 As shown, this disclosure also provides an electronic device 900, which includes at least one processor 901 and a memory 902 coupled to the processor 901. The memory 902 is used to store at least one processor 901 executable instructions, wherein the at least one processor 901 is used to execute the instructions to implement the steps of the method described above in this disclosure.

[0124] The processor 901 described above can also be called a Central Processing Unit (CPU), which can be an integrated circuit chip with signal processing capabilities. Each step in the method described in this embodiment can be implemented by the integrated logic circuitry in the processor 901 or by software instructions. The processor 901 can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method in this embodiment can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in the memory 902, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor 901 reads information from the memory 902 and, in conjunction with its hardware, completes the steps of the method described above.

[0125] Figure 10 This is a schematic diagram of an exemplary computer system provided by an embodiment of the present disclosure. Various operations / processes according to embodiments of the present disclosure, implemented via software and / or firmware, can be transmitted from a storage medium or network to a computer system with a dedicated hardware architecture, for example... Figure 10 The computer system 1000 shown is equipped with the programs that constitute the software. When various programs are installed, the computer system is able to perform various functions, including those described above.

[0126] Computer system 1000 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0127] like Figure 10 As shown, the computer system 1000 includes a computing unit 1001, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of the computer system 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0128] Multiple components in the computer system 1000 are connected to the I / O interface 1005, including: an input unit 1006, an output unit 1007, a storage unit 1008, and a communication unit 1009. The input unit 1006 can be any type of device capable of inputting information into the computer system 1000. The input unit 1006 can receive input numerical or character information and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 1007 can be any type of device capable of presenting information and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. The storage unit 1008 may include, but is not limited to, a hard disk and an optical disk. The communication unit 1009 allows the computer system 1000 to exchange information / data with other devices via a network such as the Internet, and may include, but is not limited to, modems, network interface cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, Wi-Fi devices, WiMax devices, cellular communication devices, and / or the like.

[0129] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above. For example, in some embodiments, the methods described above in the embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via ROM 1002 and / or communication unit 1009. In some embodiments, the computing unit 1001 can be configured to perform the methods described above in the embodiments of this disclosure by any other suitable means (e.g., by means of firmware).

[0130] This disclosure provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the methods described in this disclosure.

[0131] Computer-readable storage media can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0132] It should be noted that the computer-readable storage medium described in this disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), or any suitable combination thereof.

[0133] Embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for ciphertext sorting of data elements.

[0134] In embodiments of this disclosure, computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include, but are not limited to, object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0135] The modules, components, or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules, components, or units do not necessarily constitute a limitation on the module, component, or unit itself.

[0136] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), etc.

[0137] It should be noted that, in this document, terms such as "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0138] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method of data element ciphertext ordering, applied to a trusted third party, characterized in that, The method comprises: initializing parameters and issuing certificates to data providers and data demanders; receiving partial order encryption ciphertext uploaded by the data provider, and storing the partial order encryption ciphertext that passes verification in a ciphertext database; Receiving a signed ciphertext sorting request and ciphertext comparison range uploaded by a data demander Extracting corresponding partial order encryption ciphertext from the ciphertext database, judging the partial order relation by directly comparing whether the ciphertext is the same, executing the sorting algorithm to obtain the sorting result and feeding back; According to the update key uploaded by the data provider, the ciphertext components of the partial order encryption ciphertext to be updated are converted and calculated from the ciphertext database, a new partial order encryption ciphertext is generated, and the storage is updated.

2. The method of claim 1, wherein, The initialization parameters and the issuance of certificates to data providers and data demanders comprise: initializing parameters, generating a public reference string CRS and a self public-private key pair; provide the public reference string CRS to the data provider and the data demander; receive the certificate information submitted by the data provider and the data demander, and return the signed certificate after verifying the identity.

3. The method of claim 2, wherein, The receiving of the certificate information submitted by the data provider and the data demander, and the returning of the signed certificate after verifying the identity comprise: receive the certificate information submitted by the data provider and the data demander; verify the identity information of the certificate applicant through the support information in the certificate information; return the signed certificate to the data provider and the data demander.

4. The method of claim 2, wherein, The common reference string CRS comprises a discrete logarithm group , a group generator g and a prime number parameter p of the group .

5. The method of claim 1, wherein, The receiving of the partial order encryption ciphertext uploaded by the data provider, and the storing of the partial order encryption ciphertext that passes verification in the ciphertext database comprise: receive the partial order encryption ciphertext uploaded by the data provider; verify the signature through the public key of the data provider; if the verification is passed, store the partial order encryption ciphertext in the ciphertext database.

6. The method of claim 1, wherein, The receiving data demander uploads a signed ciphertext ordering request and a ciphertext comparison range Extracting the corresponding partial order encryption ciphertext from the ciphertext database, judging the partial order relation by directly comparing whether the ciphertext is the same, executing the ordering algorithm to obtain the ordering result and feeding back, including: Receiving a signed ciphertext sorting request and ciphertext comparison range uploaded by a data demander ; verify the signature according to the public key of the data demander; extract the corresponding partial order encryption ciphertext from the ciphertext database after the verification is passed; judge the partial order relation by directly comparing whether the ciphertexts are the same, execute the sorting algorithm to obtain the sorting result and feedback.

7. The method of claim 1, wherein, The receiving of the update key uploaded by the data provider, the conversion and calculation of the ciphertext components of the partial order encryption ciphertext to be updated from the ciphertext database, the generation of a new partial order encryption ciphertext, and the updating of the storage comprise: receive the update key uploaded by the data provider; extract the partial order encryption ciphertext to be updated from the ciphertext database; convert and calculate the ciphertext components according to the update key, generate a new partial order encryption ciphertext, and update the storage.

8. The method of claim 6, wherein, The judgment rule for judging the partial order relation by directly comparing whether the ciphertexts are identical is: let i i = 1 n , and when the components of the two ciphertexts , and = , return ≤ c; when , and , return c ≤ ; when i is incremented to n , and the above cases do not occur, return c = .

9. The method of claim 1, wherein, The conversion and calculation of the ciphertext components of the partial order encryption ciphertext to be updated from the ciphertext database comprise: sequentially taking out components of the ciphertext to be updated , 1 ≤ ≤ , calculating ← 、 ← , wherein Δ is an update key uploaded by the data provider, generating a new partial order encryption ciphertext ′ ← .

10. The method of claim 2, wherein, generate a self public-private key pair by using RSA 3072 algorithm or SM2 national secret algorithm.

11. The method of claim 2, wherein, issue the signed certificate by using the CA issuing mode of X509 certificate.

12. A method for data element ciphertext ordering, applied to a data provider, characterized in that, The method comprises: generate a partial order encryption key containing a node key based on a reference string CRS; encrypt the data element to generate a partial order encryption ciphertext, and upload the partial order encryption ciphertext to a trusted third party; generate an update key, and upload the update key to the trusted third party.

13. The method of claim 12, wherein, The generation of a partial order encryption key containing a node key based on a reference string CRS comprises: receiving a public reference string CRS provided by a trusted third party, the public reference string CRS comprising: a discrete logarithm group , a generator g within the group and a prime number parameter p of the group ; Decoding CRS generates positive integer space ; A random generation algorithm is used to generate node keys. and random numbers r The decryption encryption key ( , ).

14. The method of claim 12, wherein, The encryption of a data element to generate a partial order encryption ciphertext, and the uploading of the partial order encryption ciphertext to a trusted third party comprise: Data elements to be encrypted m Decode into a binary string; Selecting a hash function to calculate the intermediate value, combined with the node key , group generator g and random number r Calculate whether the ciphertext is the same, generate a partial order encryption ciphertext; sign the partial order encryption ciphertext by using the private key of the self certificate to obtain signature information, and upload the partial order encryption ciphertext and the signature information to the trusted third party.

15. The method of claim 12, wherein, The generation of an update key, and the uploading of the update key to a trusted third party comprise: Generating new node keys using random algorithms ; By dividing the initial node key with the new node key an update key Δ is obtained. upload the update key to the trusted third party after signing by using the private key of the self certificate.

16. The method of claim 12, wherein, An initial node key is calculated by a random generation algorithm provided by the national secret resource pool , a random number r , and a new node key .

17. A method for data element ciphertext ordering, applied to a data demander, characterized in that, The method comprises: submitting certificate information containing identity information to a trusted third party, receiving and storing a signed certificate issued by the trusted third party; sending a signed ciphertext ordering request to the trusted third party; receiving a ciphertext ordering result returned after verification by the trusted third party, and obtaining partial order information of data elements.

18. The method of claim 17, wherein, The sending of the signed ciphertext ordering request to the trusted third party comprises: Setting a range for cryptogram comparison ; The ciphertext comparison range is compared by a certificate private key The signature information is obtained by signing ; The ciphertext comparison range and signature information are uploaded to a trusted third party together.

19. The method of claim 18, wherein, Setting a range of ciphertext comparisons by searchable encryption algorithms or a cloaking query algorithm .

20. The method of claim 18, wherein, Adopting SM2 national encryption algorithm to compare the range of ciphertext Signatures are performed.

21. An apparatus for data element ciphertext ordering, applied to a trusted third party, comprising: The device comprises: an initialization module configured to initialize parameters and issue certificates to data providers and data demanders; a storage module configured to receive partial order encryption ciphertext uploaded by the data providers, and store the verified partial order encryption ciphertext in a ciphertext database; The sorting module is configured to receive a signed ciphertext sorting request and a ciphertext comparison range uploaded by a data demander The corresponding partial order encryption ciphertext is extracted from the ciphertext database, the partial order relation is judged by directly comparing whether the ciphertext is the same, the sorting algorithm is executed to obtain the sorting result, and feedback is given. an update module configured to generate new partial order encryption ciphertext and update storage by converting and calculating ciphertext components of the partial order encryption ciphertext to be updated from the ciphertext database according to an update key uploaded by the data providers.

22. An apparatus for data element ciphertext ordering, applied to a data provider, the apparatus comprising: The device comprises: a generation module configured to generate a partial order encryption key containing a node key based on a reference string CRS; an encryption module configured to encrypt data elements to generate partial order encryption ciphertext, and upload the partial order encryption ciphertext to a trusted third party; an update module configured to generate an update key, and upload the update key to the trusted third party.

23. A data element ciphertext ordering apparatus applied to a data demander, characterized in that, The device comprises: a submission module configured to submit certificate information containing identity information to a trusted third party, and receive and store a signed certificate issued by the trusted third party; a request module configured to send a signed ciphertext ordering request to the trusted third party; an acquisition module configured to receive a ciphertext ordering result returned after verification by the trusted third party, and obtain partial order information of data elements.

24. An electronic device, comprising: comprises: at least one processor; a memory for storing instructions executable by the at least one processor; wherein the at least one processor is configured to execute the instructions to implement the method of any one of claims 1-11 or 12-16 or 17-21.

25. A computer readable storage medium, characterized in that, The instructions in the computer-readable storage medium are executed by the processor of the electronic device, so that the electronic device can execute the method of any one of claims 1-11 or 12-16 or 17-21.

26. A computer program product comprising a computer program, characterised in that, The computer program is executed by the processor to implement the steps of the method of data element ciphertext ordering of any one of claims 1-11 or 12-16 or 17-21.

Citation Information

Patent Citations

  • Anonymous electric power bidding transaction method and system based on block chain technology

    CN113570372A

  • Non-interactive and verifiable privacy protection block chain in-order query method

    CN117668033A

  • Block chain-based spatial text data searchable encryption system

    CN119128919A

  • Power grid privacy enhancement transaction secret state matching method and system based on sequence uncovering encryption

    CN120744966A

  • System and method for securely storing and sharing information

    WO2017210563A1