E-commerce platform privacy data encryption, decryption and desensitization method and system
By using randomly generated key pairs and encrypted identifier management in the e-commerce platform's intranet environment, combined with a multi-layered key system and regular key replacement, the security risks of user privacy data in the e-commerce platform's intranet environment are resolved, and the secure transmission and storage of user privacy data are achieved.
Patent Information
- Application Number
- CN202510059527.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-01-15
AI Technical Summary
There are security risks in the transmission, sharing and use of users' personal privacy data in the intranet environment of e-commerce platforms. Existing technologies are difficult to effectively protect the security of users' privacy data.
Encryption is achieved using randomly generated key pairs, combined with the management of key identifiers and ciphertext identifiers. Access permissions are controlled through an authentication server, and a microservice architecture is used in the intranet environment for encryption, decryption, and desensitization. A multi-layered key system and regular key replacement are employed to ensure security.
To ensure the security of user privacy data during transmission and storage, and to prevent unauthorized access and manipulation, encryption, decryption, and anonymization are implemented by field, thereby improving data security and compliance.
Smart Images

Figure CN119475404B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data security technology, and in particular to a method, system, device and medium for encrypting, decrypting and desensitizing private data on an e-commerce platform. Background Art
[0002] E-commerce platforms involve a wide variety of highly sensitive personal data, including, but not limited to, user personal information (such as name, contact information, and home address), detailed order information (purchase history, payment details), and user profiles generated through big data analysis (purchase preferences, purchasing methods, etc.). Protecting user privacy data presents significant challenges. Comprehensive and effective encryption of user privacy data is crucial to prevent the leakage and misuse of sensitive data. Existing e-commerce platforms have implemented a range of measures to strengthen the protection of user privacy data.
[0003] At the data storage level, each business domain encrypts and stores user privacy data based on its own characteristics and needs. For external network communications, e-commerce platforms generally use the HTTPS protocol, utilizing SSL / TLS encryption technology to ensure that all user privacy data is encrypted during data transmission, whether logging in, browsing products, or placing orders. This effectively mitigates man-in-the-middle attacks and the risk of data theft. However, within intranet environments, potential security risks still exist in the transmission, sharing, and use of user privacy data. Summary of the Invention
[0004] In order to at least partially address the deficiencies in the prior art, embodiments of the present invention provide a method and system for encrypting and decrypting private data on an e-commerce platform.
[0005] In a first aspect, the method for encrypting private data on an e-commerce platform provided by an embodiment of the present invention includes the following steps:
[0006] Accepting an encryption request initiated by a client, wherein the encryption request carries private data and a data type identifier of the private data, wherein the data type identifier is a name identifier, a phone identifier, an address identifier, a bank card number identifier, or a payment password identifier;
[0007] Randomly generating a key pair including an encryption key and a decryption key, storing the key pair in a local database and setting a key identifier for the key pair, encrypting the private data field by field using the encryption key according to the data type identifier of the private data to generate encrypted private data, and storing the key identifier and the encrypted private data in the local database;
[0008] According to the data type identifier of the private data, a ciphertext identifier is set for the encrypted private data, and the ciphertext identifier is associated with the key identifier and the encrypted private data respectively;
[0009] According to the business domain where the private data is located, the data type identifier and ciphertext identifier of the private data are sent to the corresponding decryption server, wherein the business domain includes the user domain, the order domain and the payment domain.
[0010] In one example, before accepting the encryption request initiated by the client, the e-commerce platform private data encryption method further includes:
[0011] The encryption request is sent to an authentication server, and the authentication server is used to determine whether the encryption request has encryption authority. If it is determined that the encryption request has encryption authority, the encryption request is accepted.
[0012] In one example, the encryption key is a key encrypted by a working key, and the working key is a key encrypted by a master key.
[0013] In one example, the master key is configured in shards using the Shamir sharding algorithm.
[0014] In one example, the method further includes:
[0015] The working key and the master key are replaced regularly.
[0016] In a second aspect, the method for decrypting private data on an e-commerce platform provided by an embodiment of the present invention includes the following steps:
[0017] Accepting a decryption request initiated by the encryption server, wherein the decryption request carries a data type identifier of the private data and a ciphertext identifier of the private data encrypted using the e-commerce platform private data encryption method disclosed in the first aspect;
[0018] Determining whether the encrypted private data associated with the ciphertext identifier exists;
[0019] If it is determined that the encrypted private data exists, obtaining a key identifier associated with the ciphertext identifier;
[0020] Obtaining a decryption key for the encrypted private data according to the key identifier, decrypting the encrypted private data according to the decryption key to obtain decrypted private data, and associating the ciphertext identifier with the decrypted private data;
[0021] Storing the data type of the private data and the encrypted ciphertext identifier of the private data in a local database;
[0022] According to the business domain where the decrypted private data is located, the data type of the private data and the ciphertext identifier of the encrypted private data are sent to the corresponding desensitizing server.
[0023] In a third aspect, the method for desensitizing private data on an e-commerce platform provided by an embodiment of the present invention includes the following steps:
[0024] Accepting a desensitization request sent by the decryption server, wherein the desensitization request carries the data type of the private data and the ciphertext identifier of the private data after encryption using the e-commerce platform private data encryption method disclosed in the first aspect;
[0025] Determining whether the encrypted private data associated with the ciphertext identifier exists;
[0026] If it is determined that the encrypted private data exists, obtaining a key identifier associated with the ciphertext identifier;
[0027] Obtaining a decryption key for the encrypted private data according to the key identifier and decrypting the encrypted private data according to the decryption key to obtain decrypted private data;
[0028] According to the data type identifier of the private data, a corresponding desensitization strategy is adopted to desensitize the decrypted private data.
[0029] In a fourth aspect, an embodiment of the present invention provides an e-commerce platform privacy data encryption system comprising:
[0030] an acquisition module configured to accept an encryption request initiated by a client, wherein the encryption request carries private data and a data type identifier of the private data, wherein the data type identifier is a name identifier, a phone identifier, an address identifier, a bank card number identifier, or a payment password identifier;
[0031] an encryption module configured to randomly generate a key pair including an encryption key and a decryption key, store the key pair in a local database and set a key identifier for the key pair, encrypt the private data field by field using the encryption key according to the data type identifier of the private data, generate encrypted private data, and store the key identifier and the encrypted private data in the local database;
[0032] an associating module configured to set a ciphertext identifier for the encrypted private data according to a data type identifier of the private data, and associate the ciphertext identifier with the key identifier and the encrypted private data respectively;
[0033] The sending module is configured to send the data type identifier and ciphertext identifier of the private data to the corresponding decryption server according to the business domain where the private data is located, wherein the business domain includes the user domain, the order domain and the payment domain.
[0034] In a fifth aspect, an electronic device provided by an embodiment of the present invention includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the e-commerce platform privacy data encryption method described in the first aspect, the e-commerce platform privacy data decryption method described in the second aspect, or the e-commerce platform privacy data desensitization method described in the third aspect.
[0035] In a sixth aspect, a computer-readable storage medium provided by an embodiment of the present invention stores computer program instructions, which, when executed by a processor, implement the e-commerce platform privacy data encryption method described in the first aspect, the e-commerce platform privacy data decryption method described in the second aspect, or the e-commerce platform privacy data desensitization method described in the third aspect.
[0036] Compared with the existing technology, the e-commerce platform private data encryption and decryption method and system provided by the embodiments of the present invention have the following beneficial effects:
[0037] (1) During the entire decryption and desensitization process, only the ciphertext identifier and data type identifier of the private data are transmitted between the encryption server, decryption server, and desensitization server. Since the ciphertext identifier is a unique and irreversible identifier and is only associated with the encrypted private data, no information about the original data can be inferred from it. This ensures the security of the user's private data (or sensitive data) during transmission and storage, and can also prevent unauthorized access and operation, ensuring the compliance of the user's private data;
[0038] (2) For privacy data of different data types, different encryption keys, decryption keys and desensitization strategies are used to encrypt, decrypt and desensitize the privacy data respectively, realizing encryption, decryption and desensitization of privacy data by field, further ensuring the security of privacy data. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0040] Figure 1 A flowchart of a method for encrypting private data on an e-commerce platform disclosed according to an embodiment of the present invention;
[0041] Figure 2 A flowchart of a method for decrypting private data on an e-commerce platform disclosed according to an embodiment of the present invention;
[0042] Figure 3 A schematic diagram of a privacy data desensitization process for an e-commerce platform disclosed according to an embodiment of the present invention;
[0043] Figure 4 A schematic diagram of the microservice architecture of an e-commerce platform disclosed according to an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of a private data encryption system according to an embodiment of the present invention;
[0045] Figure 6 The figure is a schematic diagram of the structure of an electronic device disclosed according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following embodiments of the present disclosure are further described in detail with reference to the accompanying drawings and examples. The detailed description of the following embodiments and the accompanying drawings are intended to illustrate the principles of the present disclosure, but are not intended to limit the scope of the present disclosure. The present disclosure can be implemented in many different forms and is not limited to the specific embodiments disclosed herein, but rather includes all technical solutions within the scope of the claims.
[0047] Explanation of terms
[0048] Microservices are about splitting an application into multiple different services according to certain standards (such as business areas), and each service is independently developed, deployed, and expanded. Services communicate with each other through HTTP and other methods. Each service can be developed, deployed, and elastically expanded. Each service has its own database, forming resource isolation, preventing resource shortages caused by multiple services connecting to the same database to operate the database, and facilitating management. Microservices are usually deployed in containers. The embodiments of the present invention mainly involve authentication services, encryption services, decryption services, and desensitization services, and each service is only called in the intranet environment.
[0049] Example 1
[0050] like Figure 1 As shown, the e-commerce platform private data encryption method provided by the embodiment of the present invention is executed by the encryption server and includes the following steps:
[0051] S101, accepting an encryption request initiated by a client, wherein the encryption request carries private data and a data type identifier of the private data, wherein the data type identifier is a name identifier, a phone identifier, an address identifier, a bank card number identifier, or a payment password identifier.
[0052] In some examples, before step S101, the authentication server is used to determine whether the encryption request has access rights, and if so, the encryption request is accepted, and if not, the encryption request is rejected.
[0053] Specifically, permissions are configured for each business request (including encryption requests, decryption requests, and desensitization requests). Only business requests with permissions can access the corresponding microserver normally. A business request has one and only one credential, which serves as the unique identifier of the business request, appid. The appid needs to be applied for in advance and saved in the corresponding microserver. Business requests without appid cannot use encryption services, decryption services, and desensitization services normally. The data type is a classification and description of data in different fields. One data type corresponds to one field, and the data type identifier is the unique identifier of each different field data. The authentication server verifies the permissions of the encryption request and feeds back the verification results to the encryption server. Only authorized encryption requests (with encryption request appid) can be accepted by the encryption server. The authentication server can be a gateway.
[0054] S102: Randomly generate a key pair including an encryption key and a decryption key, store the key pair in a local database and set a key identifier for the key pair; encrypt the private data field by field using the encryption key according to the data type of the private data, generate encrypted private data, and store the key identifier and the encrypted private data in the local database.
[0055] In some examples, the encryption key is a key encrypted by a working key, and the working key is a key encrypted by a master key.
[0056] Specifically, different encryption keys and encryption algorithms are used to encrypt privacy data of different data types, which realizes encryption of privacy data by field and ensures the security of privacy data.
[0057] Specifically, to ensure the security of the key, a three - layer key system is adopted, mainly including the master key, the working key, and the encryption key. The master key is a key - encryption key, and its main function is to protect the secure transmission and storage of its lower - layer keys. The master key is configured by fragmenting through the Shamir fragmentation algorithm and distributed to different storage servers. That is, a fragment of a key is generated through the key - fragment interface and configured into different storage servers, ensuring that even if a certain storage server is compromised, the master key cannot be restored, which is a security mechanism. When the encryption and decryption service starts, it obtains the key fragments from the database file and the configuration file and restores the master key based on the key fragments. For example: using the threshold algorithm for splitting. For example, using the Shamir secret sharing scheme, the key K is split into n key components K1...K n , and only when more than or equal to t (t < n) key components are available can K be restored. The working key is a key - encryption key, and its main function is to protect the secure transmission, distribution, and storage of the encryption key. The encryption key is the key that protects the security of private data and is used to directly encrypt private data.
[0058] Randomly generate the working key (asymmetric key), and then use the public key of the master key to encrypt the private key of the working key. Randomly generate the data encryption key (symmetric key) and encrypt the data key through the public key of the working key.
[0059] In some examples, the working key and the master key are replaced regularly.
[0060] Specifically, to ensure key security, the risk of the key being cracked is reduced by regularly replacing the key. Configure a timer to regularly replace the data key and the working key. According to the set replacement period, configure the timer to trigger the key replacement operation at a specified time, update the newly generated key and the key version information to the key repository, and establish a key mapping table.
[0061] S103, set a ciphertext identifier for the encrypted private data, and associate the ciphertext identifier with the key identifier and the encrypted private data respectively.
[0062] Specifically, one ciphertext identifier corresponds to and associates with one key identifier and the encrypted private data of one data type.
[0063] S104, according to the business domain where the private data is located, send the ciphertext identifier to the corresponding decryption server, where the business domain includes the user domain, the order domain, and the payment domain.
[0064] Specifically, the privacy data corresponding to the user domain includes data of different data types (fields) such as name, contact information, and contact address; the privacy data corresponding to the order domain includes data of different data types (fields) such as product name, purchase preferences, and purchase methods; and the privacy data corresponding to the payment domain includes data of different data types (fields) such as payment amount, payment password, and payment method.
[0065] Encryption and decryption services rely on various cryptographic algorithms to encrypt and decrypt private data. This embodiment is compatible with internationally accepted algorithms such as RSA, AES-CBC, and AES-ECB. It also supports national cryptographic algorithms certified by the State Cryptography Administration, such as SM2, SM3-CBC, and SM4-CFB. Encryption and decryption services can switch between these algorithms.
[0066] Specifically, when used in batch privacy data encryption scenarios, the business scenario for batch privacy data encryption (saving user information, real-name authentication) is determined, such as: batch encryption requests for mobile phone numbers and addresses. The plaintext and data type identifier corresponding to the mobile phone number, and the plaintext and data type identifier corresponding to the address are packaged into a data set and sent to the encryption server for encryption by field. The encryption service call permission is verified (pre-configured). After verification, the encrypted privacy data is stored in the encryption server, and the data type identifier of the mobile phone number, the data type identifier of the address, the ciphertext identifier of the encrypted mobile phone number, and the ciphertext identifier of the encrypted address are returned. When processing batch privacy data, it may contain data of different data types. If privacy data of a certain data type in the encryption request is not authorized, the entire encryption request is rejected and no data is processed.
[0067] Example 2
[0068] like Figure 2 As shown, the e-commerce platform private data decryption method provided by the embodiment of the present invention is executed by the decryption server and includes the following steps:
[0069] S201, accepting a decryption request sent by an encryption server, wherein the decryption request carries a data type identifier of the private data and a ciphertext identifier of the encrypted private data obtained by using the e-commerce platform private data encryption method disclosed in Example 1.
[0070] S202: Determine whether the encrypted private data associated with the ciphertext identifier exists.
[0071] Specifically, the encrypted private data is stored in the encryption server.
[0072] S203: If it is determined that the encrypted private data exists, obtain the key identifier associated with the ciphertext identifier.
[0073] Specifically, the key identifier is stored in the encryption server.
[0074] S204 , obtaining a decryption key for the encrypted private data according to the key identifier and decrypting the encrypted private data according to the decryption key to obtain decrypted private data, and associating the ciphertext identifier with the decrypted private data.
[0075] Specifically, the decryption key is stored in the encryption server. Specifically, different decryption keys and decryption algorithms are used for decryption of different types of private data, realizing the decryption of private data by field, further ensuring the security of private data.
[0076] S205: Store the data type of the private data and the ciphertext identifier of the encrypted private data in a local database.
[0077] S206 , according to the business domain where the decrypted private data is located, the data type identifier of the private data and the ciphertext identifier of the encrypted private data are sent to the corresponding desensitizing server.
[0078] Specifically, before accepting a decryption request from the encryption server, the decryption server uses the authentication server to determine whether the decryption request is authorized to decrypt the data of that type. The authentication server verifies the decryption request's permissions and returns the verification result to the decryption server. Only authorized decryption requests (those with the decryption requesting appid) are accepted by the decryption server.
[0079] Example 3
[0080] like Figure 3 As shown, the e-commerce platform privacy data desensitization method provided by the embodiment of the present invention is executed by the desensitization server and includes the following steps:
[0081] S301, accepting a desensitization request sent by a decryption server, wherein the desensitization request carries the data type of the private data and the ciphertext identifier of the encrypted private data obtained by using the e-commerce platform private data encryption method disclosed in Example 1.
[0082] Specifically, before accepting a decryption request from the decryption server, the decryption server uses the authentication server to determine whether the decryption request is authorized to decrypt the data. The authentication server verifies the authorization of the decryption request and returns the verification result to the decryption server. Only authorized decryption requests (with the decryption request appid) can be accepted by the decryption server.
[0083] In particular, the encryption server may also directly send a desensitization request to the desensitization server.
[0084] S302: Determine whether the encrypted private data associated with the ciphertext identifier exists.
[0085] Specifically, the encrypted private data is stored in the encryption server.
[0086] S303: If it is determined that the encrypted private data exists, obtain the key identifier associated with the ciphertext identifier.
[0087] Specifically, the key identifier is stored in the encryption server.
[0088] S304: Obtain a decryption key for the encrypted private data according to the key identifier and decrypt the encrypted private data according to the decryption key to obtain decrypted private data.
[0089] Specifically, the decryption key is stored in the encryption server.
[0090] S305 , according to the data type identifier of the private data, adopt a corresponding desensitization strategy to perform desensitization processing on the decrypted private data.
[0091] Specifically, we use masking to desensitize different types of private data using different desensitization strategies, achieving field-by-field desensitization of private data, further ensuring the security of private data. Taking mobile phone number desensitization as an example, for mobile phone number 12345678901:
[0092] Before desensitization: registerMobile = "12345678901";
[0093] Desensitization strategy: retain the first three and last four digits, and replace the middle four digits with asterisks;
[0094] After desensitization: registerMobile = "123****8901".
[0095] Specifically, if Figure 4 As shown, the authentication server, encryption server, decryption server and desensitizing server form a microservice architecture and are in the same intranet environment. The authentication server, encryption server, decryption server and desensitizing server can be cloud servers, and the authentication server, encryption server, decryption server and desensitizing server communicate with each other in two directions through HTTP.
[0096] During the entire process of decryption and desensitization, only the ciphertext identifier and data type identifier of the private data are transmitted between the encryption server, decryption server and desensitizing server. Since the ciphertext identifier is a unique and irreversible identifier and is only associated with the encrypted private data, no information about the original data can be inferred from it. This can ensure the security of the user's private data during transmission and storage, and prevent unauthorized access and operation.
[0097] Example 4
[0098] like Figure 5 As shown, the e-commerce platform privacy data encryption system provided by the embodiment of the present invention includes:
[0099] The acquisition module is configured to accept an encryption request initiated by a client, wherein the encryption request carries private data and a data type identifier of the private data, and the data type identifier is a name identifier, a telephone identifier, an address identifier, a bank card number identifier, or a payment password identifier.
[0100] The encryption module is configured to randomly generate a key pair including an encryption key and a decryption key, store the key pair in a local database and set a key identifier for the key pair, encrypt the private data field by field using the encryption key according to the data type identifier of the private data, generate encrypted private data, and store the key identifier and the encrypted private data in the local database.
[0101] The association module is configured to set a ciphertext identifier for the encrypted private data according to the data type identifier of the private data, and associate the ciphertext identifier with the key identifier and the encrypted private data respectively.
[0102] The sending module is configured to send the data type identifier and ciphertext identifier of the private data to the corresponding decryption server according to the business domain where the private data is located, wherein the business domain includes the user domain, the order domain and the payment domain.
[0103] Figure 6 The block diagram shows the hardware structure principle of an embodiment of the electronic device provided by the present invention. The electronic device includes a processor 601 and a memory 602 storing computer program instructions. When the processor executes the computer program instructions, the method disclosed in the embodiment of the present invention is implemented.
[0104] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits for implementing the embodiments of the present invention.
[0105] Memory 602 may include a large-capacity memory for data or instructions. By way of example and not limitation, memory 602 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a specific embodiment, memory 602 is a non-volatile solid-state memory.
[0106] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0107] In some examples, such as Figure 6 As shown, the electronic device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other. The electronic device in the embodiment of the present invention can be an encryption server, a decryption server, a desensitizing server, or other computing device, or a cloud-based encryption server, a cloud-based decryption server, or a cloud-based desensitizing server.
[0108] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiment of the present invention.
[0109] Bus 610 includes hardware, software, or both, and couples the components of the online data traffic metering device to each other. By way of example, and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industrial Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Area Network (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 610 may include one or more buses. Although embodiments of the present invention describe and illustrate specific buses, the present invention contemplates any suitable bus or interconnect.
[0110] The present invention further provides a computer program product comprising computer program instructions, wherein when the computer program instructions are executed by a processor, the method provided by an embodiment of the present invention is implemented. The computer program product may be, for example, a software installation package, a plug-in compatible with a related software system, or the like.
[0111] It should be understood that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted. In the above embodiments, several specific steps are described and illustrated as examples. However, the method of the present invention is not limited to the specific steps described and illustrated. Those skilled in the art may make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present invention.
[0112] In addition, the terms "first", "second" and the like used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different parts.
[0113] The above description is only a specific embodiment of the present invention. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the processes in the aforementioned method embodiments and will not be repeated here. It should be understood that the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the scope of protection of the present invention.
Claims
1. A method for encrypting private data on an e-commerce platform, characterized in that: The following steps are involved: Accepting an encryption request initiated by a client, wherein the encryption request carries private data and a data type identifier of the private data, wherein the data type identifier is a name identifier, a phone identifier, an address identifier, a bank card number identifier, or a payment password identifier; Randomly generate a key pair including an encryption key and a decryption key, store the key pair in a local database and set a key identifier for the key pair, encrypt the private data field by field using the encryption key according to the data type identifier of the private data to generate encrypted private data, and store the key identifier and the encrypted private data in the local database, wherein the encryption key is a key encrypted by a working key, the working key is a key encrypted by a master key, and the master key adopts the Shamir sharding algorithm and is sharded; According to the data type identifier of the private data, a ciphertext identifier is set for the encrypted private data, and the ciphertext identifier is associated with the key identifier and the encrypted private data respectively; According to the business domain where the private data is located, the data type identifier and ciphertext identifier of the private data are sent to the corresponding decryption server, wherein the business domain includes the user domain, the order domain and the payment domain; The data type identifier corresponding to the user domain includes a name identifier, a phone identifier, and an address identifier; the data type identifier corresponding to the payment domain includes a bank card number identifier and a payment password identifier; Before accepting the encryption request initiated by the client, the e-commerce platform privacy data encryption method also includes: sending the encryption request to an authentication server, using the authentication server to determine whether the encryption request has encryption authority, and if it is determined that the encryption request has encryption authority, accepting the encryption request; if the privacy data identified by the data type in the encryption request is not authorized, rejecting the entire encryption request.
2. The method for encrypting private data on an e-commerce platform according to claim 1, characterized in that: The method further comprises: The working key and the master key are replaced regularly.
3. A method for decrypting private data on an e-commerce platform, characterized in that: The following steps are involved: Accepting a decryption request initiated by the encryption server, wherein the decryption request carries a data type identifier of the private data and a ciphertext identifier of the private data after encryption using the e-commerce platform private data encryption method according to claim 1; Determining whether the encrypted private data associated with the ciphertext identifier exists; If it is determined that the encrypted private data exists, obtaining a key identifier associated with the ciphertext identifier; Obtaining a decryption key for the encrypted private data according to the key identifier, decrypting the encrypted private data according to the decryption key to obtain decrypted private data, and associating the ciphertext identifier with the decrypted private data; Storing the data type of the private data and the encrypted ciphertext identifier of the private data in a local database; According to the business domain where the decrypted private data is located, the data type of the private data and the ciphertext identifier of the encrypted private data are sent to the corresponding desensitizing server.
4. A method for desensitizing private data on an e-commerce platform, characterized in that: The following steps are involved: Accepting a desensitization request sent by a decryption server, wherein the desensitization request carries the data type of the private data and the ciphertext identifier of the private data after encryption obtained by the e-commerce platform private data encryption method according to claim 1; Determining whether the encrypted private data associated with the ciphertext identifier exists; If it is determined that the encrypted private data exists, obtaining a key identifier associated with the ciphertext identifier; Obtaining a decryption key for the encrypted private data according to the key identifier and decrypting the encrypted private data according to the decryption key to obtain decrypted private data; According to the data type identifier of the private data, a corresponding desensitization strategy is adopted to desensitize the decrypted private data.
5. An e-commerce platform privacy data encryption system, characterized by: include: an acquisition module configured to accept an encryption request initiated by a client, wherein the encryption request carries private data and a data type identifier of the private data, wherein the data type identifier is a name identifier, a phone identifier, an address identifier, a bank card number identifier, or a payment password identifier; An encryption module is configured to randomly generate a key pair including an encryption key and a decryption key, store the key pair in a local database and set a key identifier for the key pair, encrypt the private data field by field using the encryption key according to the data type identifier of the private data, generate encrypted private data, and store the key identifier and the encrypted private data in the local database, wherein the encryption key is a key encrypted by a working key, the working key is a key encrypted by a master key, and the master key adopts a Shamir sharding algorithm and a sharding configuration; an associating module configured to set a ciphertext identifier for the encrypted private data according to a data type identifier of the private data, and associate the ciphertext identifier with the key identifier and the encrypted private data respectively; a sending module configured to send a data type identifier and a ciphertext identifier of the private data to a corresponding decryption server according to a business domain in which the private data is located, wherein the business domain includes a user domain, an order domain, and a payment domain; The data type identifier corresponding to the user domain includes a name identifier, a phone identifier, and an address identifier; the data type identifier corresponding to the payment domain includes a bank card number identifier and a payment password identifier; The authentication module is configured to send the encryption request initiated by the client to the authentication server before accepting the encryption request, and use the authentication server to determine whether the encryption request has encryption permission. If it is determined that the encryption request has encryption permission, the encryption request is accepted; if the private data identified by the data type in the encryption request is not authorized, the entire encryption request is rejected.
6. An electronic device comprising a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the e-commerce platform privacy data encryption method according to any one of claims 1-2, the e-commerce platform privacy data decryption method according to claim 3, or the e-commerce platform privacy data desensitization method according to claim 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by the processor, implement the e-commerce platform privacy data encryption method according to any one of claims 1 to 2, the e-commerce platform privacy data decryption method according to claim 3, or the e-commerce platform privacy data desensitization method according to claim 4.
Citation Information
Patent Citations
Theft and tamper resistant data protection
CN110799941A
Data transmission method and system in Internet of Vehicles, storage medium and electronic device
CN116132979A