A distributed privacy protection method for browser cookies

By using AES encryption and RSA public key encryption in browser cookies, a unique identifier of the data group is generated and stored in a distributed manner on the encrypted server, which solves the problem of user privacy data in browser cookies being easily attacked and tracked and leaked. Significantly improves the security of data storage.

CN113010914BActive Publication Date: 2024-09-10HUAYANG COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110245616.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-05
Publication Date
2024-09-10
Estimated Expiration
2041-03-05

AI Technical Summary

Technical Problem

User privacy data stored in browser cookies is vulnerable to attacks and tracking leaks, and existing technologies fail to effectively solve the security problem of plain text cookie data.

Method used

Adopting a distributed privacy protection method for browser cookies, user data is encrypted through the AES encryption algorithm and RSA public key, a unique identifier of the data group is generated, and distributed storage is performed on the encryption server, and the encrypted data is stored using a distributed storage mapping table Blocks are stored in multiple storage servers to reduce the risk of private data leakage.

Benefits of technology

It effectively reduces the risk of browser cookie data being attacked and tracked and leaked, improves the security of data storage, and significantly reduces the chance of being cracked through AES encryption and distributed storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113010914B
    Figure CN113010914B
Patent Text Reader

Abstract

The present invention discloses a distributed privacy protection method for browser cookies. Before user data is written into the browser cookies, the data is encrypted by AES and the AES key is encrypted by RSA, and then the data and the key are sent to a control server; the control server modularizes the encrypted data into groups to generate a data group unique identifier, and performs secondary encryption on the key. The data group unique identifier and the key are encrypted by AES and sent to the encryption server; the encryption server secondary decrypts the key and the data group unique identifier, generates a distributed storage mapping table, encrypts it and sends it to the control server; the control server stores the corresponding data blocks in the corresponding storage server according to the table; finally, the encryption server returns the data group unique identifier and the RSA public key to the browser to write into the cookie. The present invention can effectively prevent the leakage of user privacy in the browser cookie, and adopts a distributed encryption storage method to improve the security of user privacy information on the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security, and in particular to a distributed privacy protection method for browser cookies. Background Art

[0002] Browser cookies are generally used to record private data such as user ID, login credentials, and status, but most cookie data is saved in plain text and faces the risk of leakage due to attacks and tracking. Summary of the invention

[0003] In order to overcome the shortcomings of the above-mentioned prior art, the present invention designs a distributed privacy protection method for browser cookies. When the browser stores cookies, the data is encrypted and transmitted to the control server, and the encryption key key is encrypted twice and transmitted to the encryption server for storage; the encryption server generates a distributed storage mapping table for the data group unique identifier of the encrypted user data; and sends it to the control server for encrypted storage of user data blocks to the distributed storage server. The encryption server sends the data unique identifier to the browser and writes it into the cookie.

[0004] The present invention is implemented by the following technical scheme: a distributed privacy protection method for browser cookies, the method comprising the following steps:

[0005] First, before writing user data into the browser cookie, the user data is encrypted using the AES encryption algorithm with key encryption. The key is encrypted using the RSA public key stored in the cookie, and the encrypted user data and key are sent to the control server;

[0006] Secondly, the control server modularizes the received encrypted data groups, divides the encrypted data stream into data blocks, generates a data group unique identifier based on the data blocks and uses it, and uses AES to encrypt the data group unique identifier once, encrypts the encrypted key twice, and sends the encrypted data group identifier and key to the encryption server;

[0007] Again, the encryption server decrypts the key and data group identifier, uses the AES decryption key for the first encryption, and then uses the RSA private key decryption key for the second encryption; if the final decryption is successful, the data group identifier and key are stored in the record, and the data group identifier and the RSA encryption public key are combined in a message and sent to the user's browser. After receiving the message, the user's browser writes the data group unique identifier and the RSA public key into the cookie;

[0008] From this, the encryption server generates a distributed storage mapping table according to the data group unique identifier, encrypts the distributed storage mapping table and sends it to the control server, and the control server stores the encrypted data block in the corresponding storage server according to the distributed storage mapping table;

[0009] Finally, before the browser uses the cookie, it encrypts the data group unique identifier in the cookie using the RSA algorithm and sends it to the control server; after the control server receives the encrypted data group unique identifier, it transmits the data group unique identifier to the encryption server; after the control server receives the encrypted data unique identifier, it decrypts it using the RSA private key, compares the data group unique identifier with the table item in the record, and searches for the corresponding distributed storage mapping table and key; the encryption server encrypts the corresponding distributed storage table and key found using AES and sends them to the control server; after the control server decrypts, it extracts the corresponding data blocks according to the mapping table, combines them into a data stream, uses the key to decrypt the data stream, restores the user data, and sends it to the browser to meet business needs.

[0010] Preferably, the user data and key encryption transmission process is as follows:

[0011] (1) The browser writes user data into Cookie;

[0012] (2) Before writing data into the cookie, the data is encrypted using the key and AES; after encryption is completed, the key is encrypted using the RSA public key;

[0013] (3) The browser sends the encrypted data and key to the control server. The control server groups the encrypted user data into data blocks and generates a unique identifier for the data group based on the data blocks.

[0014] (4) After the control server finishes splitting the data blocks, it encrypts the unique identifier of the digital group with AES, and then uses the AES algorithm of the control server to encrypt the RSA-encrypted key again;

[0015] (5) The control server sends the second encrypted key and the first encrypted data group unique identifier to the encryption server in the form of a message.

[0016] Preferably, the encrypted data block distributed storage process is as follows:

[0017] (1) After receiving the unique identifier of the AES-encrypted data group and the secondary encryption key, the encryption server first performs AES decryption on the key, and then uses the RSA private key for secondary decryption. If the decryption is successful, the key is obtained;

[0018] (2) After obtaining the key, the data group unique identifier is decrypted, the data group unique identifier and the key are stored in the record, and a data block distributed storage mapping table is generated and sent to the control server;

[0019] (3) The encryption server sends the data group unique identifier, control server IP address and RSA public key to the user browser in the form of a message;

[0020] (4) The control server stores the encrypted user data block into the memory of the corresponding server according to the distributed storage server number based on the received distributed storage mapping table.

[0021] Preferably, the decryption process is as follows:

[0022] (1) Before using the cookie, the browser encrypts the unique identifier of the data group in the cookie using the RSA algorithm and sends it to the control server;

[0023] (2) After receiving the encrypted data group unique identifier, the control server transmits the data group unique identifier to the encryption server;

[0024] (3) After receiving the encrypted data unique identifier, the control server uses the RSA private key to decrypt it, compares the data group unique identifier with the entry in the record, and searches for the corresponding distributed storage mapping table and key;

[0025] (4) The encryption server will find the corresponding distributed storage table and key, use AES encryption to send it to the control server; after decryption, the control server will extract the corresponding data blocks according to the mapping table, combine them into a data stream, use the key to decrypt the data stream, restore the user data, and send it to the browser for business needs. The control server will decrypt the encrypted data to obtain the original cookie data and return it to the browser for business needs.

[0026] Preferably, the fields of the distributed storage mapping table specifically include: a data group unique identifier, a storage server IP, an encryption server IP, a SEQ data block starting position, a distributed storage server number, and an ACK data block ending position.

[0027] Preferably, the encrypted server message field specifically includes: a data group unique identifier, a control server IP address, and an RSA encryption public key.

[0028] Compared with the existing technical solutions, the present invention has the following beneficial effects:

[0029] (1) This method uses data identifiers to store cookies when the browser stores them, reducing the risk of privacy data leakage;

[0030] (2) The original cookie data is encrypted using the AES advanced encryption standard to reduce the chance of being cracked;

[0031] (3) Encrypted cookie data uses distributed storage to improve data storage security. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be further described below in conjunction with the accompanying drawings:

[0033] Figure 1 It is the overall architecture diagram of the present invention;

[0034] Figure 2 This is a schematic diagram of the user data and key encryption transmission process in the present invention;

[0035] Figure 3 It is a schematic diagram of the encryption process flow in the present invention;

[0036] Figure 4 This is a schematic diagram of the distributed storage process in the present invention;

[0037] Figure 5 It is a schematic diagram of the decryption process flow in the present invention;

[0038] Figure 6 A schematic diagram of the fields of the distributed storage mapping table in the present invention;

[0039] Figure 7 It is a schematic diagram of the encrypted server message field in the present invention. DETAILED DESCRIPTION

[0040] like Figures 1 to 7 A distributed privacy protection method for browser cookies is shown, and the method includes the following steps:

[0041] First, before writing user data into the browser cookie, the user data is encrypted using the AES encryption algorithm with key encryption. The key is encrypted using the RSA public key stored in the cookie, and the encrypted user data and key are sent to the control server;

[0042] Secondly, the control server modularizes the received encrypted data groups, divides the encrypted data stream into data blocks, generates and uses a data group unique identifier based on the data blocks. At the same time, AES is used to encrypt the data group unique identifier once and the encrypted key is encrypted twice. The encrypted data group identifier and key are sent to the encryption server.

[0043] Again, the encryption server decrypts the key and data group identifier, uses the AES decryption key for the first encryption, and then uses the RSA private key to decrypt the key for the second encryption. If the final decryption is successful, the data group identifier and key are stored in the record, and the data group identifier and the RSA encryption public key are combined in a message and sent to the user's browser. After receiving the message, the user's browser writes the data group unique identifier and the RSA public key into the cookie;

[0044] From this, the encryption server generates a distributed storage mapping table according to the data group unique identifier, encrypts the distributed storage mapping table and sends it to the control server, and the control server stores the encrypted data block in the corresponding storage server according to the distributed storage mapping table;

[0045] Finally, before using the cookie, the browser encrypts the data group unique identifier in the cookie using the RSA algorithm and sends it to the control server; after receiving the encrypted data group unique identifier, the control server transmits the data group unique identifier to the encryption server; after receiving the encrypted data group unique identifier, the control server uses the RSA private key to decrypt it, compares the data group unique identifier with the table entry in the record, and searches for the corresponding distributed storage mapping table and key.

[0046] The encryption server will find the corresponding distributed storage table and key, use AES encryption to send to the control server. After decryption, the control server extracts the corresponding data blocks according to the mapping table, combines them into a data stream, uses the key to decrypt the data stream, restores the user data, and sends it to the browser for business needs.

[0047] like Figure 2 As shown, the user data and key encryption transmission process in the present invention is as follows:

[0048] (1) The browser writes user data into Cookie;

[0049] (2) Before writing data into the cookie, use the key to encrypt the data using AES. After encryption is complete, use the RSA public key to encrypt the key;

[0050] (3) The browser sends the encrypted data and key to the control server. The control server groups the encrypted user data into data blocks and generates a unique identifier for the data group based on the data blocks.

[0051] (4) After the control server finishes splitting the data blocks, it encrypts the unique identifier of the digital group with AES, and then uses the AES algorithm of the control server to encrypt the RSA-encrypted key again;

[0052] (5) The control server sends the second encrypted key and the first encrypted data group unique identifier to the encryption server in the form of a message.

[0053] like Figure 3 As shown, the encryption process in the present invention is as follows:

[0054] (1) The RSA encrypted key is encrypted again and sent to the encryption server to generate a unique identifier for the data group and the number of data modules, which are then encrypted with AES and sent to the encryption server;

[0055] (2) The encryption server decrypts the identifier and module number, AES decrypts the secondary encryption key, and then the RSA private key decrypts the key to obtain the original data;

[0056] (3) The encryption server generates a distributed storage mapping table based on the identifier and the number of modules, and encrypts and sends it to the control server;

[0057] (4) The control server sends the encrypted data group unique identifier to request decryption. After decryption, the encryption server sends the corresponding distributed storage mapping table and key to the control server based on the storage table.

[0058] like Figure 4 As shown, the distributed storage process in the present invention is as follows:

[0059] (1) After receiving the unique identifier of the AES-encrypted data group and the secondary encryption key, the encryption server first performs AES decryption on the key, and then uses the RSA private key for secondary decryption. If the decryption is successful, the key is obtained;

[0060] (2) After obtaining the key, the data group unique identifier is decrypted, the data group unique identifier and the key are stored in the record, and a data block distributed storage mapping table is generated and sent to the control server;

[0061] (3) The encryption server sends the data group unique identifier, control server IP address and RSA public key to the user browser in the form of a message;

[0062] (4) The control server stores the encrypted user data block into the memory of the corresponding server according to the distributed storage server number based on the received distributed storage mapping table.

[0063] like Figure 5 As shown, the decryption process flow in the present invention is as follows:

[0064] (1) Before using the cookie, the browser encrypts the unique identifier of the data group in the cookie using the RSA algorithm and sends it to the control server;

[0065] (2) After receiving the encrypted data group unique identifier, the control server transmits the data group unique identifier to the encryption server;

[0066] (3) After receiving the encrypted data unique identifier, the control server uses the RSA private key to decrypt it, compares the data group unique identifier with the entry in the record, and searches for the corresponding distributed storage mapping table and key;

[0067] (4) The encryption server will find the corresponding distributed storage table and key, use AES encryption to send it to the control server; after decryption, the control server will extract the corresponding data blocks according to the mapping table, combine them into a data stream, use the key to decrypt the data stream, restore the user data, and send it to the browser for business needs. The control server will decrypt the encrypted data to obtain the original cookie data and return it to the browser for business needs.

[0068] like Figure 6-Figure 7 As shown, the data table format in the present invention is as follows:

[0069] (1) Distributed storage mapping table fields: data group unique identifier, storage server IP, encryption server IP, SEQ data block start position, distributed storage server number, ACK data block end position;

[0070] (2) The encrypted server message fields specifically include: data group unique identifier, control server IP address, and RSA encryption public key.

[0071] It can be seen from the above technical solution that when storing cookies in the browser, this method classifies the stored data, uses identifiers instead of actual data for storage, and performs AES encryption, RSA encryption and distributed storage on the actual privacy data. This can not only effectively reduce the risk of privacy leakage caused by attacks or tracking, but also use AES encryption and distributed storage to improve the security of privacy data storage.

Claims

1. A distributed privacy protection method for browser cookies, characterized by: The method comprises the following steps: First, before the user data is written into the browser cookie, the data is encrypted using the AES encryption algorithm with the key, and then the key is encrypted using the RSA public key, and the encrypted data and encryption key are sent to the control server; Secondly, the control server modularizes the encrypted data groups, generates a unique identifier for the data group, and uses AES to encrypt the unique identifier for the data group once, encrypts the encrypted key twice, and sends the encrypted data group identifier and key to the encryption server; Again, the encryption server decrypts the key and the data group unique identifier. If the key is decrypted again successfully, the data group identifier and the key are stored in the record, and the data group unique identifier and the RSA encrypted public key are sent to the browser in a message; From this, the encryption server generates a distributed storage mapping table according to the data group unique identifier, and encrypts the distributed storage mapping table and sends it to the control server; Finally, the control server will store the encrypted data block in the corresponding storage server according to the distributed storage mapping table; The data and key encryption transmission process is as follows: (1) The browser writes user data into Cookie; (2) Before writing data into the cookie, the data is encrypted using the key and AES; after encryption is completed, the key is encrypted using the RSA public key; (3) The browser sends the encrypted data and key to the control server. The control server groups the encrypted user data into data blocks and generates a unique identifier for the data group based on the data blocks. (4) After the control server finishes splitting the data blocks, it encrypts the unique identifier of the digital group with AES, and then uses the AES algorithm of the control server to encrypt the RSA-encrypted key again; (5) The control server sends the second encrypted key and the first encrypted data group unique identifier to the encryption server in the form of a message; The data distributed storage process is as follows: (1) After receiving the unique identifier of the AES-encrypted data group and the secondary encryption key, the encryption server first performs AES decryption on the key, and then uses the RSA private key for secondary decryption. If the decryption is successful, the key is obtained; (2) After obtaining the key, the data group unique identifier is decrypted, the data group unique identifier and the key are stored in the record, and a data block distributed storage mapping table is generated and sent to the control server; (3) The encryption server sends the data group unique identifier, control server IP address and RSA public key to the user browser in the form of a message; (4) The control server stores the encrypted user data block into the memory of the corresponding server according to the distributed storage server number based on the received distributed storage mapping table; The decryption process is as follows: (1) Before using the cookie, the browser encrypts the unique identifier of the data group in the cookie using the RSA algorithm and sends it to the control server; (2) After receiving the encrypted data group unique identifier, the control server transmits the data group unique identifier to the encryption server; (3) After receiving the encrypted data unique identifier, the control server uses the RSA private key to decrypt it, compares the data group unique identifier with the entry in the record, and searches for the corresponding distributed storage mapping table and key; (4) The encryption server will find the corresponding distributed storage table and key, use AES encryption to send it to the control server; after decryption, the control server will extract the corresponding data blocks according to the mapping table, combine them into a data stream, use the key to decrypt the data stream, restore the user data, and send it to the browser to meet business needs.

2. A distributed privacy protection method for browser cookies according to claim 1, characterized in that: The fields of the distributed storage mapping table specifically include: data group unique identifier, storage server IP, encryption server IP, SEQ data block starting position, distributed storage server number, and ACK data block ending position.

3. A distributed privacy protection method for browser cookies according to claim 1, characterized in that: The encrypted server message fields specifically include: data group unique identifier, control server IP address, and RSA encryption public key.