Address book data encryption method and device based on block chain, equipment, medium and product

By adopting blockchain-based address book data encryption method in the OA office portal system, using technical means such as hash preprocessing, digital certificate generation and blockchain storage, the problems of insufficient security and lack of traceability in traditional systems are solved, and the confidentiality and immutability of data are realized, ensuring the security and privacy protection of user data.

CN119544369AActive Publication Date: 2025-02-28E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411814170.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-02-28
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

There are problems such as insufficient security and lack of traceability in address book processing in traditional OA office portal systems, which makes it difficult to achieve user data security and privacy protection.

Method used

The blockchain-based address book data encryption method is adopted to ensure the confidentiality and tamperability of the data through technical means such as hash preprocessing, digital certificate generation and blockchain storage.

Benefits of technology

It realizes encryption and storage of user address book information, ensuring its immutability, thereby effectively preventing data leakage and tampering, and enhancing data reliability and availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to an address book data encryption method and device based on a block chain, equipment, a medium and a product, and the method comprises the steps: obtaining address book data of a target user, carrying out the Hash preprocessing of the address book data, and obtaining the preprocessed address book data; according to the preprocessed address book data, a target digital certificate corresponding to the target user is generated, the target digital certificate comprises a public key and a private key, the public key is used for encrypting the preprocessed address book data to obtain encrypted address book data, and the private key is used for decrypting the encrypted communication data; and uploading the target digital certificate to a target block chain signed with the target user. By adopting the method, the address book information of the user can be encrypted and stored, and the tampering resistance of the address book information is ensured, so that the problems of data leakage, tampering and the like are effectively prevented; moreover, distributed storage and sharing of the data are realized by utilizing a block chain technology, the problems of single-point failure, data tampering and the like are avoided, and the reliability and availability of the data are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data encryption technology, and in particular to a method, device, equipment, medium and product for encrypting address book data based on blockchain. Background Art

[0002] With the rapid development of the Internet industry, user data and privacy issues are receiving increasing attention. In the traditional OA office portal system address book processing, the sensitivity of address book information and data loss and inconsistent formats during data collection have made user data security and privacy protection a bottleneck.

[0003] In the related technology, it is usually necessary to rely on the API provided by the mobile phone operating system or the third-party SDK to obtain the user's contact data, and perform deduplication, standardization and cleaning to ensure the accuracy and consistency of the data. However, this traditional data encryption method has problems such as insufficient security and lack of traceability. Summary of the invention

[0004] Based on this, it is necessary to provide a blockchain-based address book data encryption method, device, computer equipment, computer-readable storage medium and computer program product to address the technical problems of insufficient security and lack of traceability in the above-mentioned traditional data encryption methods.

[0005] In a first aspect, the present application provides a method for encrypting address book data based on blockchain, the method comprising:

[0006] Obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data;

[0007] Generate a target digital certificate corresponding to the target user according to the preprocessed address book data. The target digital certificate includes a public key and a private key. The public key is used to encrypt the preprocessed address book data to obtain the encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0008] Upload the target digital certificate to the target blockchain signed with the target user.

[0009] In one embodiment, performing hash preprocessing on the address book data to obtain the preprocessed address book data includes:

[0010] Determine the hash preprocessing strategy based on the SHA-256 hash algorithm, the preset obfuscation function and the Whirlpool hybrid hash strategy;

[0011] According to the hash preprocessing strategy, the address book data is preprocessed to obtain the preprocessed address book data.

[0012] In one embodiment, generating a target digital certificate corresponding to a target user according to the preprocessed address book data includes:

[0013] Get the preset bilinear pairing-based public-private key pair generation strategy;

[0014] According to the public key-private key pair generation strategy based on bilinear pairing and the preprocessed address book data, a target digital certificate is generated, and the target digital certificate includes a public key, a private key and a signature.

[0015] In one embodiment, uploading the target digital certificate to the target blockchain contracted with the target user includes:

[0016] Obtaining a preset data compression strategy, compressing the target digital certificate, and obtaining a compressed target digital certificate;

[0017] Upload the compressed target digital certificate to the target blockchain.

[0018] In one embodiment, obtaining a preset data compression strategy, compressing the target digital certificate, and obtaining a compressed target digital certificate includes:

[0019] Process the target digital certificate in blocks to obtain multiple digital certificate data blocks;

[0020] Perform fractal transformation on each digital certificate data block to obtain a transformed digital certificate data block;

[0021] The transformed digital certificate data blocks are quantized and encoded respectively to obtain a compressed target digital certificate.

[0022] In one embodiment, the address book data includes the contact number and user identity association data of the target user, and the method further includes:

[0023] Obtain a preset message expansion strategy, expand the contact number, and obtain the expanded contact number;

[0024] Mixing the corresponding extended contact number and the contact number to obtain a mixed contact number;

[0025] Perform hash preprocessing on the address book data, including:

[0026] Generate a number processing strategy based on the SHA-256 hash algorithm and a preset obfuscation function, and perform hash preprocessing on the mixed contact number based on the number processing strategy;

[0027] According to the hash preprocessing strategy, the mixed contact number is hash preprocessed.

[0028] In a second aspect, the present application also provides a device for encrypting address book data, the device comprising:

[0029] A data preprocessing module is used to obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data;

[0030] A digital certificate generation module is used to generate a target digital certificate corresponding to a target user according to the preprocessed address book data. The target digital certificate includes a public key and a private key. The public key is used to encrypt the preprocessed address book data to obtain encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0031] The encrypted data notarization module is used to upload the target digital certificate to the target blockchain signed with the target user.

[0032] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0033] Obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data;

[0034] Generate a target digital certificate corresponding to the target user according to the preprocessed address book data. The target digital certificate includes a public key and a private key. The public key is used to encrypt the preprocessed address book data to obtain the encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0035] Upload the target digital certificate to the target blockchain signed with the target user.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0037] Obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data;

[0038] Generate a target digital certificate corresponding to the target user according to the preprocessed address book data. The target digital certificate includes a public key and a private key. The public key is used to encrypt the preprocessed address book data to obtain the encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0039] Upload the target digital certificate to the target blockchain signed with the target user.

[0040] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0041] Obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data;

[0042] Generate a target digital certificate corresponding to the target user according to the preprocessed address book data. The target digital certificate includes a public key and a private key. The public key is used to encrypt the preprocessed address book data to obtain the encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0043] Upload the target digital certificate to the target blockchain signed with the target user.

[0044] The above-mentioned blockchain-based address book data encryption method, device, computer equipment, storage medium and computer program product, when encrypting the user's address book data, first obtain the target user's address book data, perform hash preprocessing on the address book data, and obtain the preprocessed address book data, which is the encrypted address book data. Then, based on the preprocessed address book data, generate a target digital certificate corresponding to the target user, the target digital certificate includes a public key and a private key, the public key is used to encrypt the preprocessed address book data to obtain the encrypted address book data, the private key is used to decrypt the encrypted communication data, the uniqueness of each user's digital certificate can ensure the uniqueness and immutability of each data block, and the public key in the target digital certificate is used to encrypt the communication data, and only the party holding the corresponding private key can decrypt the data, thereby helping to ensure the confidentiality of the data during transmission. Finally, uploading the target digital certificate to the target blockchain signed with the target user helps to use blockchain technology to achieve distributed storage and sharing of data, avoid single point failures and data tampering, enhance data reliability and availability, and help to achieve data traceability.

[0045] The blockchain-based address book data encryption method of the present application adopts multiple technical means such as hash processing, digital certificate generation and blockchain storage to realize the encryption and storage of user address book information and ensure its non-tamperability, thereby effectively preventing problems such as data leakage and tampering; moreover, blockchain technology is used to realize distributed storage and sharing of data, avoid single point failures and data tampering, and enhance data reliability and availability. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] FIG1 is an application environment diagram of a blockchain-based address book data encryption method in one embodiment;

[0047] FIG2 is a flow chart of a method for encrypting address book data based on blockchain in one embodiment;

[0048] FIG3 is a flow chart of address book data import and encryption processing in one embodiment;

[0049] FIG4 is a flow chart of obtaining pre-processed address book data in one embodiment;

[0050] FIG5 is a flow chart of generating a target digital certificate in one embodiment;

[0051] FIG6 is a flow chart of uploading a target digital certificate to a target blockchain in one embodiment;

[0052] FIG7 is a flow chart of obtaining a compressed target digital certificate in one embodiment;

[0053] FIG8 is a flow chart of performing hash preprocessing on a contact number in one embodiment;

[0054] FIG9 is a schematic diagram of the relationship between operation changes and blockchain in one embodiment;

[0055] FIG10 is a flowchart of a specific implementation process of a method for encrypting address book data based on blockchain in a detailed embodiment;

[0056] FIG11 is a block diagram of a device for encrypting address book data in one embodiment;

[0057] FIG12 is a diagram showing the internal structure of a computer device in one embodiment;

[0058] FIG. 13 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] With the rapid development of the Internet industry, user data and privacy issues are receiving increasing attention. In the traditional OA office portal system address book processing, the sensitivity of address book information and data loss and inconsistent formats during data collection have made user data security and privacy protection a bottleneck.

[0061] In the related technology, it is usually necessary to rely on the API provided by the mobile phone operating system or the third-party SDK to obtain the user's contact data, and perform deduplication, standardization and cleaning to ensure the accuracy and consistency of the data. However, this traditional data encryption method has problems such as insufficient security and lack of traceability.

[0062] In view of the technical problems of insufficient security and lack of traceability in the above-mentioned traditional data encryption practices, the embodiment of the present application provides a method for encrypting address book data based on blockchain, which adopts technical means such as asymmetric encryption algorithm, hash algorithm, digital certificate mechanism, etc., aiming to solve the security and privacy protection problems existing in the address book processing of the traditional OA office portal system, improve the security and efficiency of the data processing process, realize the encryption protection of the user's address book data, and use distributed storage technology to store the encrypted address book data on multiple nodes of the blockchain, and realize data management and interaction through smart contracts, thereby ensuring the privacy and traceability of the data. The address book data encryption method based on blockchain can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0063] In one embodiment, as shown in FIG2 , the method is applied to the terminal in FIG1 as an example for explanation. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0064] Step 202, obtaining the address book data of the target user, performing hash preprocessing on the address book data, and obtaining preprocessed address book data.

[0065] The target user is an employee or consumer user within a certain enterprise. The address book data is used to represent the target user's identity information or contact information. The address book data may include the target user's name, contact number, email address, and user account data. In order to ensure the privacy of the target user's address book data, the address book data can be hashed and converted into a unique value of a fixed length, making it difficult to reversely restore the original data and achieve data anonymization.

[0066] For example, the address book data structure of a target user is:

[0067] User ID: 01234;

[0068] Name: Zhang San;

[0069] Mobile phone number: 123-456-7890;

[0070] Email: ZS@example.com

[0071] }, after hash preprocessing, multiple encrypted strings are obtained, and the encrypted strings are composed of elements such as numbers, letters, and symbols.

[0072] Step 204, based on the preprocessed address book data, generate a target digital certificate corresponding to the target user, the target digital certificate includes a public key and a private key, the public key is used to encrypt the preprocessed address book data to obtain encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0073] Digital certificates can be used to verify the identity of the target user and ensure the security and legitimacy of the communication. A digital certificate includes a public key, a private key, and a signature. The public key is used to encrypt the pre-processed address book data to ensure the confidentiality of the data. The private key is used to decrypt the data and is only held by the target user to ensure the privacy and security of the data.

[0074] Specifically, a pair of public and private keys can be generated according to a preset encryption algorithm, and the private key is then used to sign a request to create a certificate signature to generate a certificate signature request. The certificate signature request is then verified to be legitimate, and after the identity is confirmed to be legitimate, a digital certificate is generated. Therefore, the digital certificate includes the public key, private key and signature information.

[0075] Step 206, upload the target digital certificate to the target blockchain signed with the target user.

[0076] The target blockchain is a blockchain platform that has signed a contract with the target user to reach a cooperation. The target user can manage, verify and share the target digital certificate through the target blockchain to ensure the security and transparency of the data.

[0077] When uploading the target digital certificate, the target digital certificate is uploaded to the blockchain by calling the interface of the smart contract. The target blockchain will record the transaction of uploading the target digital certificate to ensure the immutability of the certificate information. Among them, smart contracts are a degree of automation running on the blockchain. Smart contracts define and execute contract terms in the form of code. Smart contracts can automatically execute, verify and enforce contract terms to ensure that transactions and agreements between parties can be carried out in accordance with preset conditions and rules. When the preset conditions of the smart contract are met, the smart contract will be automatically executed without the intervention of a third party.

[0078] Specifically, the process of importing and encrypting address book data can be shown in Figure 3. In summary, after obtaining the address book data, its data structure and fields are first analyzed, then HASH processing is performed, and then a digital certificate is generated and stored, and finally the generated digital certificate is uploaded to the corresponding node of the blockchain.

[0079] For example, a company inputs the address book information of each employee into the system and uses a hash algorithm to encrypt it. Then, the system generates a unique digital certificate based on the address book information of each employee and uploads it to the blockchain for storage. At the same time, an encrypted certificate will be generated for any direct or indirect operation of the address book and recorded in the blockchain to ensure that when data risk behavior or accidents occur, all historical operation changes can be traced back to the source through the decryption key to ensure data security. By using the address book privacy intelligent encryption method based on blockchain technology, the "Address Book Management" module of the company's OA office system can protect users' privacy information and improve the efficiency and accuracy of address book management. This method can also be widely used in other fields, such as finance, medical care, etc.

[0080] In the above-mentioned blockchain-based address book data encryption method, multiple technical means such as hash processing, digital certificate generation and blockchain storage are used to realize the encryption and storage of user address book information and ensure its non-tamperability, thereby effectively preventing data leakage and tampering. Moreover, blockchain technology is used to realize distributed storage and sharing of data, avoid single point failures and data tampering, and enhance data reliability and availability.

[0081] In one embodiment, as shown in FIG4 , performing hash preprocessing on the address book data to obtain the preprocessed address book data includes:

[0082] Step 402, determining a hash preprocessing strategy according to the SHA-256 hash algorithm, a preset obfuscation function and a Whirlpool hybrid hash strategy.

[0083] Specifically, in order to enhance the confidentiality and security of the address book data after preprocessing, a hybrid encryption algorithm can be used. In this embodiment, the hash preprocessing strategy is determined based on the SHA-256 hash algorithm, the preset confusion function and the Whirlpool hybrid hash strategy, which helps to increase the complexity of hash calculation and thus improve the security of the data after encryption.

[0084] Exemplarily, the specific formula of the hash preprocessing strategy is:

[0085] H'(input_data)= SHA-256(F(Whirlpool(PBKDF2(input_data, salt, iterations))));

[0086] Wherein, H' is used to represent the preprocessed address book data obtained according to the hash preprocessing strategy; the SHA-256 hash algorithm is a cryptographic hash function that can convert data of any length into a unique hash value of a fixed length (256 bits, i.e., 32 bytes); F is a custom obfuscation function, i.e., a preset obfuscation function, defined as: F(x) = (x XOR constant)>> shift_amount | (x << (32 - shift_amount)), where constant is a preset constant value, and shift_amount is a displacement dynamically calculated based on the input data. By introducing a preset obfuscation function, the complexity and unpredictability of the hash value can be further enhanced.

[0087] Whirlpool is a cryptographic hash function used to generate a 512-bit hash value, providing high security and collision resistance. It is often used in digital signatures to ensure the uniqueness and non-repudiation of the signature and to ensure that the data has not been tampered with during transmission or storage. PBKDF2 (Password-Based Key Derivation Function 2) is a cryptographic base key derivation function 2, a function used to generate an encryption key from a password. It can enhance the security of the password and prevent brute force cracking and dictionary attacks through multiple hash operations, that is, combined with salt and iterations algorithms. input_data is used to represent input data, which is the address book data in this embodiment. Salt is used to represent randomly generated strings to increase the complexity and security of the hash function. Iterations is used to represent the number of iterations of the PBKDF2 function, that is, how many times the hash function needs to be executed to improve security.

[0088] Step 404: pre-process the address book data according to the hash pre-processing strategy to obtain pre-processed address book data.

[0089] Specifically, the preprocessed address book data will be represented in the form of a SHA-256 hash value. After each user's detailed information (name, phone number, email, etc.) has been preprocessed, the generated hash value will be used as the preprocessed address book data. The preprocessed address book data can be represented in the form of a hash value, a hash value list, or a key-value pair.

[0090] In this embodiment, a hash preprocessing strategy is determined based on the SHA-256 hash algorithm, a preset obfuscation function, and a Whirlpool hybrid hash strategy, which helps to increase the complexity of hash calculations and thus improve the security of encrypted data.

[0091] In one embodiment, as shown in FIG5 , generating a target digital certificate corresponding to a target user according to the preprocessed address book data includes:

[0092] Step 502: Obtain a preset bilinear pairing-based public key-private key pair generation strategy.

[0093] In order to enhance the security and validity of digital certificates, in this embodiment, bilinear pairing technology is introduced to improve the generation and verification process of public key-private key pairs, thereby improving the reliability and unforgeability of digital certificates.

[0094] Specifically, the strategy for generating a public key-private key pair includes: first, selecting a secure bilinear pairing e: G1×G2 →G T , where G1, G2 and G T are all cyclic groups, and their orders are the same. Then, randomly select a private key sk ∈ Z*n (n is the order of the groups G1 and G2), and calculate the public key pk = e(g1, g2) sk , where g1∈G1 and g2∈G2 are both generators of the group.

[0095] Step 504, generating a target digital certificate according to the public key-private key pair generation strategy based on bilinear pairing and the pre-processed address book data, the target digital certificate including a public key, a private key and a signature.

[0096] Specifically, the signing and verification process of a digital certificate includes: selecting a secure hash function H, calculating the signature σ=(r,s), where r=g1 −1 (H(m)+sk*r)mod n, m is the address book data to be signed; the receiver uses the public key pk and signature σ to verify the validity of the signature. If e(g1, g2) r *pk -r =1, it indicates that the signature is valid and a target digital certificate is generated.

[0097] For example, assuming g1=3 and g2=4, and assuming g1 and g2 are generators of groups G1 and G2, calculate the public key pk =e(3, 4) 5 =12, assuming the result of e is 12. The signing process is as follows:

[0098] Calculate the hash value, assuming H(m)=7;

[0099] Calculate the signature: select r=2 (assuming g1=3), calculate s= g1 −1 (H(m)+sk*r)mod n=3 -1 (7+5*2) mod10=7 (inverse element), then s=7*17 mod 10=119 mod 10=9, that is, the corresponding signature σ=(2,9).

[0100] The verification process is as follows:

[0101] Calculate e(g1, g2) r *pk -r =e(3, 4) 2 *12 -2 ;

[0102] Assume e(3, 4) 2 *12 -2 =6, then 6*12 -2 =18 (assuming 12 -2 =3);

[0103] Calculation 18 mod 10 = 8 ≠ 1, therefore, the signature is invalid.

[0104] In this embodiment, by introducing bilinear pairing technology, the generation and verification process of the public key-private key pair is improved, thereby improving the reliability and unforgeability of the digital certificate.

[0105] In one embodiment, as shown in FIG6 , uploading the target digital certificate to the target blockchain signed with the target user includes:

[0106] Step 602, obtaining a preset data compression strategy, compressing the target digital certificate, and obtaining a compressed target digital certificate.

[0107] In order to further improve the efficiency of blockchain storage, the present invention adopts a data compression algorithm based on fractal coding.

[0108] Step 604, upload the compressed target digital certificate to the target blockchain.

[0109] Specifically, after obtaining the compressed target digital certificate, it is uploaded to the target blockchain.

[0110] In this embodiment, compressing the target digital certificate through a data compression strategy helps to improve the storage efficiency of the annual target blockchain.

[0111] In one embodiment, as shown in FIG. 7 , obtaining a preset data compression strategy, compressing the target digital certificate, and obtaining a compressed target digital certificate includes:

[0112] Step 702: Process the target digital certificate in blocks to obtain multiple digital certificate data blocks.

[0113] For example, taking the target digital certificate as {User ID: 12345; Department: Technology Department; Position: Software Engineer; Mobile Number: 123-456-7890; Email: user@example.com}, it is divided into two digital certificate data blocks, namely: {User ID: 12345; Department: Technology Department} and {Position: Software Engineer; Mobile Number: 123-456-7890; Email: user@example.com}.

[0114] Step 704: perform fractal transformation on each digital certificate data block to obtain a transformed digital certificate data block.

[0115] Exemplarily, still taking the example of step 702 above as an example, after obtaining two digital certificate data blocks, each digital certificate data block is subjected to fractal transformation processing. Specifically, for each digital certificate data block, a suitable affine transformation A and a compression mapping are first selected. , so that each digital certificate data block can be transformed through its subset and affine transformation A and compression mapping Approximately reconstructed.

[0116] For example, for the digital certificate data block {user ID: 12345; department: technology department}, select a suitable affine transformation A and a compression mapping , assuming that B1 is the digital certificate data block, B'1 is a subset of B1 or the result of the transformation, through the affine transformation A and the compression mapping ,get .

[0117] Specifically, assume that B'1 is the user ID: 12345, and through affine transformation A, we get A(B'1); through compression mapping ,get .

[0118] Step 706, quantize and encode each transformed digital certificate data block to obtain a compressed target digital certificate.

[0119] In order to reduce the storage space of data, the transformed digital certificate data block is quantized and encoded.

[0120] For example, assume that the coefficients of B1 after quantization are [1, 2, 3, 4]; encode these coefficients, and assume that the encoding result is [01, 10, 11, 00]; store the encoding result [01, 10, 11, 00] on the target blockchain.

[0121] Accordingly, during decoding and reconstruction, the stored coefficients and the corresponding inverse transformation are used to reconstruct the individual digital certificate data blocks of the target digital certificate, thereby restoring the complete target digital certificate. For example, the encoding result [01, 10, 11, 00] is obtained from the target blockchain; the encoding is decoded to obtain the quantized coefficients [1, 2, 3, 4]; the inverse transformation of the affine transformation A and the compression mapping are used The inverse transformation is used to reconstruct the digital certificate data block. Assume that the inverse transformation result is {User ID: 12345; Department: Technology Department}. The processing process of the remaining digital certificate data blocks is similar, and finally a complete digital certificate is reconstructed.

[0122] In this embodiment, the data compression algorithm based on fractal coding effectively compresses the digital certificate. Specifically, the block processing, fractal transformation, quantization and encoding steps reduce the storage space of the data, while the decoding and reconstruction steps ensure the complete recovery of the digital certificate. This method not only improves the efficiency of blockchain storage, but also enhances the security and reliability of data.

[0123] In one embodiment, as shown in FIG8 , the address book data includes the contact number and user identity association data of the target user, and the method further includes:

[0124] Step 802, obtaining a preset message expansion strategy, expanding the contact number, and obtaining the expanded contact number.

[0125] This embodiment aims to enhance the complexity and unpredictability of the hash algorithm by adding a triple optimization method of the address book contact number attribution extension function, salt value and number of iterations, thereby improving the anti-collision ability. Specifically, the preset message expansion strategy is a kind of address book mobile phone number attribution extension function, which increases the complexity of the data by obtaining the number segment information of the mobile phone number, so that the diversity and randomness of the hash input data are enhanced. Introducing a random salt value increases the uniqueness and unpredictability of the hash value to prevent rainbow table attacks. In addition, through multiple hash iterations, the complexity and anti-collision ability of the hash calculation are increased. The contact number is the original contact number, that is, the contact number in plain text.

[0126] For example, assuming that the mobile phone number obtained from the address book data is 13800138000, after querying the mobile phone number location database or API interface, the number segment information obtained is City A; for the mobile phone number whose number segment belongs to City A, the following extended function is used:

[0127] extend_message_A = (F(x) XOR 0x12345678) << 3;

[0128] In the formula, 0x12345678 is a preset constant value; the << operation indicates shifting 3 bits to the left. For other number segment ownership information, different extended operations can be designed to achieve it.

[0129] Then, the expanded message (or the output of the custom obfuscation function F if no additional expansion operation is used) is combined with the original input data (or other pre-processed data) as the final input data to enter the subsequent hash processing process.

[0130] Step 804: Mix the corresponding extended contact number and the contact number to obtain a mixed contact number.

[0131] To further enhance the privacy of the contact number, the expanded contact number and the original contact number may be combined to form a hybrid.

[0132] For example, assuming that the original contact number is 13800138000, the mixed contact number is 0x5CFCC4B5013800138000.

[0133] Step 806, generating a number processing strategy according to the SHA-256 hash algorithm and a preset obfuscation function, and performing hash preprocessing on the mixed contact number according to the number processing strategy.

[0134] Exemplarily, when the extended message function is used, the number processing strategy is:

[0135] hash_value_initial=SHA256(salt||extend_message_beijing||input_data_processed).

[0136] Step 808: Perform hash preprocessing on the mixed contact number according to the hash preprocessing strategy.

[0137] Exemplarily, when the extended message function is not used, the hash preprocessing strategy is:

[0138] hash_value_initial = SHA256(salt || F(x) || input_data_processed).

[0139] On this basis, the number of iterations is further increased to improve the anti-collision ability of the hash algorithm. For example, iterate 3 to 4 times:

[0140] hash_value_final = SHA256(SHA256(hash_value_initial) || salt)

[0141] for i in range(2):

[0142] hash_value_final = SHA256(SHA256(hash_value_final) || salt)

[0143] In this embodiment, the complexity and unpredictability of the hash algorithm are significantly enhanced through the triple optimization method of the contact number attribution extension function, salt value and iteration number, and the anti-collision ability is improved. Specifically, the complexity of the data is increased by extending the message function, the salt value increases the uniqueness of the hash value, and the hash calculation of multiple iterations further improves the anti-collision ability. This method is not only suitable for protecting the security of address book data, but can also be widely used in other scenarios that require a strong hash algorithm.

[0144] In addition, as shown in the schematic diagram of the operation change and chain relationship in Figure 9, after optimizing the hash algorithm, the single operation change of the address book data (including but not limited to reading, writing, modifying, auditing, etc.) is processed. When the address book operation changes, the response conditions are preset in the created smart contract model, the response action is triggered, the change action is recorded and formed into structured data information, and the contract value is formed according to the encryption rules through the contract rule constraints, and the contract value is stored in the blockchain.

[0145] In some embodiments, the method further includes: establishing a multi-level index structure on the target blockchain.

[0146] Exemplarily, a multi-level index structure is established in each index level. For example, the first-level index can be a main index table that records the ID of each user and the address of the corresponding second-level index table; the second-level index table records the primary key of each department and the address of the corresponding third-level index table. Through this multi-level index structure, the number of matches during query can be reduced and the query efficiency can be improved. At the same time, for high-frequency query operations, asynchronous query and cache mechanisms are implemented to reduce the number of blockchain accesses.

[0147] In some embodiments, the method further includes: after generating the public key, encrypting the public key.

[0148] Specifically, when the user enters the address book information, it is encrypted using the public key to ensure the security and privacy of the data. The encryption algorithm can use existing symmetric encryption algorithms such as AES, and can be adjusted and optimized according to actual conditions. When the address book information needs to be viewed, the user uses his or her own private key to decrypt the data and obtain the original plaintext data. The decryption algorithm is the same as the encryption algorithm, and can also be adjusted and optimized according to actual conditions.

[0149] It should be noted that before executing the blockchain's address book data encryption method, the smart contract must be deployed to the target blockchain, that is, the infrastructure deployment must be completed first, including blockchain network configuration and smart contract customization. Among them, blockchain network configuration is to set up nodes in the blockchain network, including verification nodes and non-verification nodes, to ensure the reliability and high availability of the network. Smart contract customization is to write a smart contract on the selected blockchain platform, that is, on the target blockchain, based on the address book requirements, to define the address book's data structure, fields, and permission control information, and introduce automated data verification logic to ensure data compliance.

[0150] In addition, the address book data encryption method of the blockchain realizes the backup and recovery of the address book by relying on the encryption and decryption process of the address book structured information of the blockchain. When the data is lost or needs to be restored, the data is restored through the decryption process to ensure the recoverability of the data. In addition, the address book data encryption method of the blockchain can also configure audit logs for the direct and indirect operation behaviors of the address book, and encrypt and write the logs as a part of the blockchain data. The smart contract rules can further cooperate with the audit logs to restrict the access and sharing of private and sensitive information, and improve data privacy and security. At the same time, zero-knowledge proof (ZKP) and homomorphic encryption (HE) technologies are introduced to further enhance data privacy protection capabilities.

[0151] This embodiment adopts the above method, through hash processing, digital certificate generation and blockchain storage and other technical means, to achieve the encryption and storage of user address book information, and ensure its non-tamperability, thereby effectively preventing data leakage and tampering. Problems; moreover, the distributed storage and sharing of data are realized by using blockchain technology to avoid single point failure and data tampering and other problems, and enhance the reliability and availability of data; in addition, through the triple optimization method of address book mobile phone number attribution extension function, salt value, and iteration number, the complexity and unpredictability of the hash algorithm are enhanced, and the anti-collision and security are improved.

[0152] In a detailed embodiment, as shown in FIG10 , the specific implementation process of the blockchain-based address book data encryption method includes the following steps:

[0153] Step 1002, infrastructure deployment.

[0154] Specifically, this step includes two parallel sub-steps, namely, blockchain network configuration and smart contract customization. Among them, blockchain network configuration aims to set up nodes in the blockchain network, including verification nodes and non-verification nodes, to ensure the reliability and high availability of the network. Smart contract customization aims to write smart contracts on the selected blockchain platform according to the needs of the address book, and define the structure of the address book data, permission control, etc.

[0155] Step 1004, user identity verification.

[0156] Specifically, this step includes two parallel sub-steps, namely data information structuring and permission control setting and verification. Among them, data information structuring aims to split and encrypt the address book information according to the contract structure. Permission control setting and verification aims to set the appropriate permission level according to user roles, departments or other attributes, and perform verification and authorization operations in smart contracts to ensure the security of accessing and modifying address book data.

[0157] Step 1006: Data encryption and storage.

[0158] Specifically, this step includes two parallel sub-steps, namely, privacy encryption scheme and distributed storage optimization. Among them, the privacy encryption scheme aims to ensure the confidentiality and integrity of the address book data based on appropriate asymmetric encryption algorithms and hash algorithms. Distributed storage optimization aims to store data in shards to improve the scalability and fault tolerance of the system.

[0159] Step 1008, data backup and recovery.

[0160] Specifically, the backup and recovery of the address book is achieved by relying on the encryption and decryption process of the address book structured information on the blockchain. When data is lost or needs to be restored, the data is restored through the decryption process to ensure the recoverability of the data.

[0161] Step 1010, security and traceability.

[0162] Specifically, this step includes two parallel sub-steps, namely, access audit log and blockchain supervision. Among them, the access audit log is intended to record the user's operations on the address book data, including access, modification, sharing, etc., and store it on the blockchain to achieve an unalterable audit log. Blockchain supervision aims to ensure data security by introducing smart contract rules and restricting the access and sharing of sensitive information, for example.

[0163] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0164] Based on the same inventive concept, the embodiment of the present application also provides a device for encrypting address book data based on blockchain for implementing the above-mentioned method for encrypting address book data. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the device for encrypting address book data provided below can refer to the limitations of the method for encrypting address book data based on blockchain above, and will not be repeated here.

[0165] In one embodiment, as shown in FIG. 11 , a device for encrypting address book data is provided, including: a data preprocessing module 1102, a digital certificate generating module 1104 and an encrypted data storage module 1106, wherein:

[0166] The data preprocessing module 1102 is used to obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data;

[0167] The digital certificate generation module 1104 is used to generate a target digital certificate corresponding to the target user according to the preprocessed address book data. The target digital certificate includes a public key and a private key. The public key is used to encrypt the preprocessed address book data to obtain encrypted address book data, and the private key is used to decrypt the encrypted communication data.

[0168] The encrypted data storage module 1106 is used to upload the target digital certificate to the target blockchain signed with the target user.

[0169] In one embodiment, the data preprocessing module 1102 is further used to: determine a hash preprocessing strategy based on a SHA-256 hash algorithm, a preset obfuscation function, and a Whirlpool mixed hash strategy; and preprocess the address book data according to the hash preprocessing strategy to obtain preprocessed address book data.

[0170] In one embodiment, the data preprocessing module 1102 is also used to: obtain a preset public key-private key pair generation strategy based on bilinear pairings; generate a target digital certificate according to the public key-private key pair generation strategy based on bilinear pairings and the preprocessed address book data, and the target digital certificate includes a public key, a private key and a signature.

[0171] In one embodiment, the encrypted data evidence storage module 1106 is also used to: obtain a preset data compression strategy, compress the target digital certificate, and obtain a compressed target digital certificate; and upload the compressed target digital certificate to the target blockchain.

[0172] In one embodiment, the encrypted data evidence storage module 1106 is also used to: process the target digital certificate in blocks to obtain multiple digital certificate data blocks; perform fractal transformation on each digital certificate data block to obtain a transformed digital certificate data block; quantize and encode each transformed digital certificate data block to obtain a compressed target digital certificate.

[0173] In one embodiment, the data preprocessing module 1102 is also used to: obtain a preset message extension strategy, expand the contact number, and obtain an extended contact number; mix the corresponding extended contact number and the contact number to obtain a mixed contact number; generate a number processing strategy based on the SHA-256 hash algorithm and a preset confusion function, and perform hash preprocessing on the mixed contact number according to the number processing strategy; perform hash preprocessing on the mixed contact number according to the hash preprocessing strategy.

[0174] Each module in the above-mentioned address book data encryption device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0175] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG12. The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as the user's address book data and access records. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for encrypting address book data based on blockchain is implemented.

[0176] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG13. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for encrypting address book data based on blockchain is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0177] Those skilled in the art will understand that the structures shown in FIG. 12 and FIG. 13 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0178] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0180] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0181] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0182] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0183] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0184] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for encrypting address book data based on blockchain, characterized in that: The method comprises: Acquire the address book data of the target user, and perform hash preprocessing on the address book data to obtain preprocessed address book data; Generate a target digital certificate corresponding to the target user according to the preprocessed address book data, wherein the target digital certificate includes a public key and a private key, wherein the public key is used to encrypt the preprocessed address book data to obtain encrypted address book data, and the private key is used to decrypt the encrypted communication data; The target digital certificate is uploaded to the target blockchain signed with the target user.

2. The method according to claim 1, characterized in that The performing hash preprocessing on the address book data to obtain the preprocessed address book data includes: Determine the hash preprocessing strategy based on the SHA-256 hash algorithm, the preset obfuscation function and the Whirlpool hybrid hash strategy; According to the hash preprocessing strategy, the address book data is preprocessed to obtain the preprocessed address book data.

3. The method according to claim 2, characterized in that The step of generating a target digital certificate corresponding to the target user according to the preprocessed address book data includes: Get the preset bilinear pairing-based public-private key pair generation strategy; The target digital certificate is generated according to the public key-private key pair generation strategy based on bilinear pairing and the preprocessed address book data, and the target digital certificate includes a public key, a private key and a signature.

4. The method according to claim 1, characterized in that: The uploading of the target digital certificate to the target blockchain signed with the target user includes: Obtaining a preset data compression strategy, compressing the target digital certificate, and obtaining a compressed target digital certificate; Upload the compressed target digital certificate to the target blockchain.

5. The method according to claim 4, characterized in that The step of obtaining a preset data compression strategy, compressing the target digital certificate, and obtaining a compressed target digital certificate includes: Process the target digital certificate in blocks to obtain multiple digital certificate data blocks; Performing fractal transformation on each of the digital certificate data blocks to obtain transformed digital certificate data blocks; The transformed digital certificate data blocks are quantized and encoded respectively to obtain the compressed target digital certificate.

6. The method according to claim 2, characterized in that The address book data includes the contact number and user identity association data of the target user, and the method further includes: Obtaining a preset message expansion strategy, expanding the contact number, and obtaining an expanded contact number; Mixing the corresponding extended contact number and the contact number to obtain a mixed contact number; The performing hash preprocessing on the address book data includes: Generate a number processing strategy according to the SHA-256 hash algorithm and the preset obfuscation function, and perform hash preprocessing on the mixed contact number according to the number processing strategy; According to the hash preprocessing strategy, the mixed contact number is hash preprocessed.

7. A device for encrypting address book data, characterized in that: The device comprises: A data preprocessing module is used to obtain the address book data of the target user, perform hash preprocessing on the address book data, and obtain the preprocessed address book data; A digital certificate generation module, used to generate a target digital certificate corresponding to the target user according to the preprocessed address book data, wherein the target digital certificate includes a public key and a private key, wherein the public key is used to encrypt the preprocessed address book data to obtain encrypted address book data, and the private key is used to decrypt the encrypted communication data; The encrypted data notarization module is used to upload the target digital certificate to the target blockchain signed with the target user.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Address book backup method and system

    CN109194633A

  • Mobile phone address book synchronization method and device based on block chain, and medium

    CN111027088A

  • Block chain-based information management method and device, equipment and medium

    CN119089471A

  • Access controlling network architectures and systems, having cellular network components and elements modified to host access controlling schemas designed to transform and / or facilitate cellular communication signals in accordance with novel cellular communications protocols with multi-part multi-functional address signaling, and methods for use thereof

    US11477654B1