A method and device for processing address book
By generating random verification codes on the management side for user identity verification and address book encryption, we ensure that the address book is transmitted in ciphertext during transmission, solving the problem of address book leakage caused by the server storing plaintext, and improving the security of address book sex.
Patent Information
- Application Number
- CN202210188335.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-02-28
AI Technical Summary
The clear text storage of enterprise address books on the server side is low in security, which can easily lead to address books leaks during attacks.
Random verification codes are generated through the management side, which are used for user identity verification and address book encryption, ensuring that address book is transmitted in ciphertext during transmission, and is decrypted only after identity verification is passed, reducing the risk of leakage.
Improve the security of the address book. Even if the server is attacked, the attacker can only obtain the address book cipher text, reducing the leakage of the address book plain text and enhancing data protection.
Smart Images

Figure CN114629876B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of information security technology, and in particular, to a method and device for processing an address book. Background Art
[0002] Currently, corporate address books have been widely used. In corporate address books, address book data is directly stored on the server and maintained and queried by calling server data.
[0003] In the related art, the server needs to store the address book data in plain text so that when the user needs the address book, the address book plain text can be obtained from the server.
[0004] However, plain text storage on the server has low security, and when the server is attacked, the address book will be leaked. Summary of the invention
[0005] The embodiments of the present application provide a method and device for processing an address book, so as to improve the security of the address book and reduce the occurrence of address book leakage.
[0006] In a first aspect, an embodiment of the present application provides a method for processing an address book, which is applied to a management end, and the management end is connected to a service end and a user end respectively; the method comprises:
[0007] In response to the user information of the target user sent by the user terminal, generating a random verification code corresponding to the target user, and sending the random verification code to the user terminal;
[0008] Based on the random verification code and the user information, determine first identity verification information and first encryption information corresponding to the target user;
[0009] Comparing the character length of the first encrypted information with the character length of the target user's address book plaintext, and encrypting the target user's address book plaintext using the first encrypted information based on the comparison result to obtain the target user's address book ciphertext;
[0010] The address book ciphertext and the first identity verification information are sent to the server, so that after the server determines that the second identity verification information sent by the user terminal matches the first identity verification information, the address book ciphertext corresponding to the first identity verification information is sent to the user terminal, and the user terminal decrypts the address book ciphertext based on the second encryption information; wherein the second identity verification information and the second encryption information are determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal.
[0011] In the above scheme, after receiving the user information of the target user, the management end generates first identity verification information for user identity verification based on the random verification code and the user information, and first encryption information for encrypting the address book plaintext of the target user; then based on the character length of the first encryption information and the character length of the address book plaintext of the target user, the address book plaintext of the target user is accurately encrypted to obtain the address book ciphertext of the target user; the management end sends the address book ciphertext and the first identity verification information to the server end, and sends the random verification code to the user end, so that the user end determines the second identity verification information and the second encryption information based on the user information of the user to be verified and the random verification code sent by the management end; after receiving the second identity verification information of the user to be verified sent by the user end, the server end sends the address book ciphertext corresponding to the first identity verification information matching it to the user end, that is, the corresponding address book ciphertext will be sent to the user end only after the identity verification of the user to be verified is passed; because the user end receives the address book ciphertext, it is also necessary to decrypt the received address book ciphertext based on the above second encryption information to obtain the address book plaintext. This embodiment verifies the identity of the user, making the server less vulnerable to attack; by encrypting the address book, even if the server is attacked, the attacker can only obtain the ciphertext of the address book, reducing the occurrence of plaintext leakage of the address book and improving the security of the address book.
[0012] In some optional implementations, determining the first identity verification information and the first encryption information corresponding to the target user based on the random verification code and the user information includes:
[0013] A first hash calculation is performed on the random verification code and the user information to obtain first identity verification information corresponding to the target user; and a second hash calculation is performed on the random verification code and the user information to obtain first encrypted information corresponding to the target user.
[0014] The above scheme determines the first identity verification information and the first encrypted information through different hash calculations, so that the first identity verification information is different from the first encrypted information. Even if an attacker cracks one of the information, he cannot complete the identity verification and decryption at the same time, which further improves the security of the address book.
[0015] In some optional implementations, encrypting the target user's address book plaintext using the first encryption information based on the comparison result includes:
[0016] If the character length of the first encrypted information is the same as the character length of the plain text of the address book, encrypting the plain text of the address book based on all the characters of the first encrypted information;
[0017] If the character length of the first encrypted information is greater than the character length of the plain text of the address book, encrypting the plain text of the address book based on part of the characters of the first encrypted information;
[0018] If the character length of the first encrypted information is less than the character length of the plain text of the address book, multiple first encrypted information are combined to obtain an encrypted stream, and the plain text of the address book is encrypted based on part or all of the characters of the encrypted stream.
[0019] In the above scheme, since the same characters as those in the address book plaintext are needed to encrypt the address book plaintext, when the character length of the first encrypted information is exactly the same as the character length of the address book plaintext, all the characters of the first encrypted information can be directly used to encrypt the address book plaintext; when the character length of the first encrypted information is greater than the character length of the address book plaintext, it is necessary to select part of the characters of the first encrypted information to encrypt the address book plaintext; when the character length of the first encrypted information is less than the character length of the address book plaintext, it is necessary to combine multiple first encrypted information to obtain an encrypted stream with more characters, and encrypt the address book plaintext based on part or all of the characters of the encrypted stream, so as to accurately encrypt the address book plaintext for different application scenarios.
[0020] Some optional implementations also include:
[0021] The ciphertext of the address book corresponding to other users is updated based on the user information of the target user; wherein the user tags of the other users and the target user are the same.
[0022] In the above scheme, since the plain text of the address book of users with the same user tag is the same, the corresponding plain text of the address book will also change after the new user information is available. This embodiment updates the ciphertext of the address book corresponding to other users after the management terminal receives the user information of the target user, so that other users can obtain accurate and complete address books later.
[0023] In a second aspect, an embodiment of the present application provides a second address book processing method, which is applied to a server, and the server is connected to a management terminal and a user terminal respectively; the method comprises:
[0024] In response to the address book acquisition instruction sent by the user end, the second identity verification information contained in the instruction is matched with the first identity verification information; wherein the first identity verification information is determined by the management end based on the random verification code corresponding to the target user and the user information; the second identity verification information is determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end;
[0025] The address book ciphertext corresponding to the first identity verification information matching the second identity verification information is sent to the user end, so that the user end decrypts the obtained address book ciphertext based on the second encryption information; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, the first encryption information is determined by the management end based on the random verification code corresponding to the target user and the user information, and the second encryption information is determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
[0026] In a third aspect, an embodiment of the present application provides a third address book processing method, which is applied to a user end, and the user end is connected to a management end and a service end respectively; the method comprises:
[0027] Determine second identity verification information and second encryption information based on user information of the user to be verified and a random verification code sent by the management terminal;
[0028] Sending a contact book acquisition instruction containing the second identity verification information to the server, so that the server matches the second identity verification information with the first identity verification information after receiving the instruction; wherein the first identity verification information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0029] Receive the address book ciphertext corresponding to the first identity verification information matching the second identity verification information sent by the server; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0030] The character length of the second encrypted information is compared with the character length of the received address book ciphertext, and the received address book ciphertext is decrypted using the second encrypted information based on the comparison result.
[0031] In some optional implementations, determining the second identity verification information and the second encrypted information based on the user information of the user to be verified and the random verification code sent by the management terminal includes:
[0032] A first hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second identity verification information; and a second hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second encrypted information.
[0033] In some optional implementations, decrypting the received address book ciphertext using the second encryption information based on the comparison result includes:
[0034] If the character length of the second encrypted information is the same as the character length of the received address book ciphertext, decrypting the received address book ciphertext based on all the characters of the second encrypted information;
[0035] If the character length of the second encrypted information is greater than the character length of the received address book ciphertext, decrypting the received address book ciphertext based on part of the characters of the second encrypted information;
[0036] If the character length of the second encrypted information is less than the character length of the received address book ciphertext, multiple pieces of the second encrypted information are combined to obtain an encrypted stream, and the received address book ciphertext is decrypted based on part or all of the characters of the encrypted stream.
[0037] In a fourth aspect, an embodiment of the present application provides a first address book processing device, which is applied to a management end, and the management end is connected to a service end and a user end respectively; the device includes:
[0038] A verification code processing module, configured to generate a random verification code corresponding to the target user in response to the user information of the target user sent by the user terminal, and send the random verification code to the user terminal;
[0039] An information determination module, used to determine first identity verification information and first encryption information corresponding to the target user based on the random verification code and the user information;
[0040] an encryption module, configured to compare the character length of the first encryption information with the character length of the plain text of the address book of the target user, and encrypt the plain text of the address book of the target user using the first encryption information based on the comparison result to obtain the cipher text of the address book of the target user;
[0041] A sending module, used to send the address book ciphertext and the first identity verification information to the server, so that the server will send the address book ciphertext corresponding to the first identity verification information to the user end after determining that the second identity verification information received and sent by the user end matches the first identity verification information, and the user end decrypts the address book ciphertext based on the second encryption information; wherein, the second identity verification information and the second encryption information are determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
[0042] In a fifth aspect, an embodiment of the present application provides a second address book processing device, which is applied to a server, and the server is connected to a management terminal and a user terminal respectively; the device includes:
[0043] A matching module, configured to match the second identity verification information contained in the address book acquisition instruction sent by the user terminal with the first identity verification information in response to the address book acquisition instruction sent by the user terminal; wherein the first identity verification information is determined by the management terminal based on the random verification code corresponding to the target user and the user information; and the second identity verification information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal;
[0044] A sending module is used to send the address book ciphertext corresponding to the first identity verification information matching the second identity verification information to the user terminal, so that the user terminal decrypts the acquired address book ciphertext based on the second encryption information; wherein the address book ciphertext is obtained by the management terminal encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, the first encryption information is determined by the management terminal based on the random verification code corresponding to the target user and the user information, and the second encryption information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal.
[0045] In a sixth aspect, an embodiment of the present application provides a third address book processing device, which is applied to a user end, and the user end is connected to a management end and a service end respectively; the device includes:
[0046] An information determination module, used to determine the second identity verification information and the second encrypted information based on the user information of the user to be verified and the random verification code sent by the management terminal;
[0047] a sending module, configured to send an address book acquisition instruction containing the second identity verification information to the server, so that the server matches the second identity verification information with the first identity verification information after receiving the instruction; wherein the first identity verification information is determined by the management end based on a random verification code corresponding to the target user and user information;
[0048] A receiving module, configured to receive a ciphertext of an address book corresponding to the first identity verification information matching the second identity verification information and sent by the server; wherein the ciphertext of the address book is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0049] A decryption module is used to compare the character length of the second encrypted information with the character length of the received address book ciphertext, and decrypt the received address book ciphertext using the second encrypted information based on the comparison result.
[0050] In the seventh aspect, an embodiment of the present application provides a management terminal, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any address book processing method described in the first aspect above.
[0051] In an eighth aspect, an embodiment of the present application provides a server, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any address book processing method described in the second aspect above.
[0052] In the ninth aspect, an embodiment of the present application provides a user terminal, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the address book processing method described in any one of the above third aspects.
[0053] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor executes the address book processing method described in any one of the first aspect, the second aspect or the third aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0056] Figure 2 An interactive flow chart of the first address book processing method provided in an embodiment of the present application;
[0057] Figure 3 An interactive flow chart of a second address book processing method provided in an embodiment of the present application;
[0058] Figure 4 An interactive flow chart of a third address book processing method provided in an embodiment of the present application;
[0059] Figure 5 A flowchart of a first address book processing method provided in an embodiment of the present application;
[0060] Figure 6 A flowchart of a second address book processing method provided in an embodiment of the present application;
[0061] Figure 7 A flowchart of a third address book processing method provided in an embodiment of the present application;
[0062] Figure 8 A schematic diagram of the structure of a first address book processing device provided in an embodiment of the present application;
[0063] Fig. 9 A schematic diagram of the structure of a second address book processing device provided in an embodiment of the present application;
[0064] Fig.10 A schematic diagram of the structure of a third address book processing device provided in an embodiment of the present application;
[0065] Fig.11 A schematic diagram of the structure of the management terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0067] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0068] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal connection of two devices. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0069] In the corporate address book, the address book data is directly stored on the server and maintained and queried by calling the server data.
[0070] In the related art, the server needs to store the address book data in plain text so that when the user needs the address book, the address book plain text can be obtained from the server.
[0071] However, plain text storage on the server has low security, and when the server is attacked, the address book will be leaked.
[0072] In some embodiments, encryption protection of the address book is achieved by dynamically allocating keys, but key management is relatively complex.
[0073] In view of this, the embodiments of the present application provide a method and device for processing an address book, so as to improve the security of the address book and reduce the occurrence of address book leakage.
[0074] See also Figure 1 The figure is a schematic diagram of an application scenario provided in an embodiment of the present application, and the scenario includes a management end, a service end and a user end.
[0075] Among them, the management end is connected to the server end and the user end respectively; the server end is also connected to the user end;
[0076] When configuring the address book ciphertext:
[0077] The user end sends the user information of the target user to the management end;
[0078] The management end generates a random verification code corresponding to the target user in response to the user information of the target user sent by the user end, and sends the random verification code to the user end; determines the first identity verification information and the first encryption information corresponding to the target user based on the random verification code and the user information; compares the character length of the first encryption information with the character length of the target user's address book plaintext, and encrypts the target user's address book plaintext using the first encryption information based on the comparison result to obtain the target user's address book ciphertext; and sends the address book ciphertext and the first identity verification information to the server end.
[0079] When the user to be verified needs to obtain the plain text of the address book:
[0080] The user end determines the second identity verification information and the second encrypted information based on the user information of the user to be verified and the random verification code sent by the management end; and sends a contact book acquisition instruction containing the second identity verification information to the server end;
[0081] After receiving the instruction, the server matches the second identity verification information with the first identity verification information; and sends the address book ciphertext corresponding to the first identity verification information matching the second identity verification information to the user end;
[0082] The user end compares the character length of the second encrypted information with the character length of the received address book ciphertext, and uses the second encrypted information to decrypt the received address book ciphertext based on the comparison result.
[0083] In the above scheme, after receiving the user information of the target user, the management end generates first identity verification information for user identity verification based on the random verification code and the user information, and first encryption information for encrypting the address book plaintext of the target user; then based on the character length of the first encryption information and the character length of the address book plaintext of the target user, the address book plaintext of the target user is accurately encrypted to obtain the address book ciphertext of the target user; the management end sends the address book ciphertext and the first identity verification information to the server end, and sends the random verification code to the user end, so that the user end determines the second identity verification information and the second encryption information based on the user information of the user to be verified and the random verification code sent by the management end; after receiving the second identity verification information of the user to be verified sent by the user end, the server end sends the address book ciphertext corresponding to the first identity verification information matching it to the user end, that is, the corresponding address book ciphertext will be sent to the user end only after the identity verification of the user to be verified is passed; because the user end receives the address book ciphertext, it is also necessary to decrypt the received address book ciphertext based on the above second encryption information to obtain the address book plaintext. This embodiment verifies the identity of the user, making the server less vulnerable to attack; by encrypting the address book, even if the server is attacked, the attacker can only obtain the ciphertext of the address book, reducing the occurrence of plaintext leakage of the address book and improving the security of the address book.
[0084] The management end, the service end and the user end may exchange data through a variety of communication methods, which are not specifically limited in this embodiment.
[0085] The above application scenarios are only examples of application scenarios for implementing the embodiments of the present application, and the embodiments of the present application are not limited to the above application scenarios.
[0086] The following will be combined with the accompanying drawings and specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0087] Figure 2 The interactive flow chart of the first address book processing method provided in the embodiment of the present application is a process of configuring the address book ciphertext, such as Figure 2 As shown, the following steps are included:
[0088] Step S201: The user terminal sends user information of the target user to the management terminal.
[0089] When configuring the address book of the target user, the target user inputs user information to the user terminal; since the address book needs to be configured by the management terminal, the user terminal sends the user information of the target user to the management terminal.
[0090] This embodiment does not specifically limit the implementation method of user information. For example, user information includes at least one of the following: user name, telephone number, position, address, etc.
[0091] Step S202: the management end generates a random verification code corresponding to the target user in response to the user information of the target user sent by the user end.
[0092] In order to improve the security of the address book, this embodiment needs to verify the identity of the user and encrypt the plain text of the address book, and needs to first determine the identity verification information and encryption information based on random data. Based on this, in this embodiment, after receiving the user information of the target user, the management end generates a random verification code corresponding to the target user.
[0093] Step S203: The management terminal sends the random verification code to the user terminal.
[0094] Since the user terminal needs to perform identity verification and decrypt the encrypted address book later, that is, the user terminal needs to know the random verification code, based on this, the server sends the random verification code to the user terminal.
[0095] Step S204: The management end determines the first identity verification information and the first encryption information corresponding to the target user based on the random verification code and the user information.
[0096] As described above, in this embodiment, it is necessary to verify the identity of the user and encrypt the plain text of the address book. Based on this, after generating a random verification code, it is necessary to determine the first identity verification information corresponding to the target user based on the random verification code and user information to verify the identity of the user; it is also necessary to determine the first encryption information corresponding to the target user based on the random verification code and user information to encrypt the plain text of the address book.
[0097] Step S205: The management end compares the character length of the first encryption information with the character length of the target user's address book plaintext, and based on the comparison result, uses the first encryption information to encrypt the target user's address book plaintext to obtain the target user's address book ciphertext.
[0098] In practice, the lengths of the first encrypted information and the plain text of the address book are uncertain. If characters in the first encrypted information are randomly selected to encrypt the plain text of the address book, subsequent decryption may be affected. Based on this, this embodiment compares the character length of the first encrypted information with the character length of the plain text of the address book of the target user, and then uses the first encrypted information to accurately encrypt the plain text of the address book of the target user based on the comparison result.
[0099] Step S206: The management end sends the address book ciphertext and the first identity verification information to the server end.
[0100] So that after the server determines that the second identity verification information sent by the user end matches the first identity verification information, the server end sends the address book ciphertext corresponding to the first identity verification information to the user end, and the user end decrypts the address book ciphertext based on the second encryption information; wherein the second identity verification information and the second encryption information are determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
[0101] In the above scheme, after receiving the user information of the target user, the management end generates first identity verification information for user identity verification based on the random verification code and the user information, and first encryption information for encrypting the address book plaintext of the target user; then based on the character length of the first encryption information and the character length of the address book plaintext of the target user, the address book plaintext of the target user is accurately encrypted to obtain the address book ciphertext of the target user; the management end sends the address book ciphertext and the first identity verification information to the server end, and sends the random verification code to the user end, so that the user end determines the second identity verification information and the second encryption information based on the user information of the user to be verified and the random verification code sent by the management end; after receiving the second identity verification information of the user to be verified sent by the user end, the server end sends the address book ciphertext corresponding to the first identity verification information matching it to the user end, that is, the corresponding address book ciphertext will be sent to the user end only after the identity verification of the user to be verified is passed; because the user end receives the address book ciphertext, it is also necessary to decrypt the received address book ciphertext based on the above second encryption information to obtain the address book plaintext. This embodiment verifies the identity of the user, making the server less vulnerable to attack; by encrypting the address book, even if the server is attacked, the attacker can only obtain the ciphertext of the address book, reducing the occurrence of plaintext leakage of the address book and improving the security of the address book.
[0102] In addition, since the management end can determine the first encrypted information based on the user information and the generated random verification code, the user end can determine the second encrypted information based on the user information and the random verification code sent by the management end, which eliminates the complicated key management process.
[0103] In some optional implementation manners, the above step S204 may be implemented by but not limited to the following methods:
[0104] A first hash calculation is performed on the random verification code and the user information to obtain first identity verification information corresponding to the target user; and a second hash calculation is performed on the random verification code and the user information to obtain first encrypted information corresponding to the target user.
[0105] In practice, if the same calculation method is used to determine the first identity verification information and the first encrypted information, then the first identity verification information and the first encrypted information are the same. After cracking one piece of information, the attacker can complete the identity verification and decryption, affecting the security of the address book.
[0106] Based on this, this embodiment performs a first hash calculation on the random verification code and user information to obtain the first identity verification information corresponding to the target user; and, performs a second hash calculation on the random verification code and user information to obtain the first encrypted information corresponding to the target user, so that the first identity verification information is different from the first encrypted information. Even if an attacker cracks one of the information, he cannot complete the identity verification and decryption at the same time.
[0107] The following is a specific example to illustrate:
[0108] In this example, the user information includes at least name and phone number;
[0109] The first hash calculation is: Hash(name||telephone number||verification code);
[0110] The second hash calculation is: Hash(name||phone number||verification code+phone number).
[0111] The above-mentioned first hash calculation and second hash calculation are only exemplary descriptions, and the first hash calculation and the second hash calculation can be set according to specific scenarios.
[0112] The above scheme determines the first identity verification information and the first encrypted information through different hash calculations, so that the first identity verification information is different from the first encrypted information. Even if an attacker cracks one of the information, he cannot complete the identity verification and decryption at the same time, which further improves the security of the address book.
[0113] In some optional implementation manners, the above step S205 may be implemented by but not limited to the following methods:
[0114] If the character length of the first encrypted information is the same as the character length of the plain text of the address book, encrypting the plain text of the address book based on all the characters of the first encrypted information;
[0115] If the character length of the first encrypted information is greater than the character length of the plain text of the address book, encrypting the plain text of the address book based on part of the characters of the first encrypted information;
[0116] If the character length of the first encrypted information is less than the character length of the plain text of the address book, multiple first encrypted information are combined to obtain an encrypted stream, and the plain text of the address book is encrypted based on part or all of the characters of the encrypted stream.
[0117] In implementation, the same characters as in the plain text of the address book need to be used to encrypt the plain text of the address book;
[0118] Based on this, if the character length of the first encrypted information is exactly the same as the character length of the plain text of the address book, all the characters of the first encrypted information can be directly used to encrypt the plain text of the address book;
[0119] If the character length of the first encrypted information is greater than the character length of the plain text of the address book, it is necessary to select some characters of the first encrypted information to encrypt the plain text of the address book, for example, if the character length of the plain text of the address book is N characters, select the characters before the Nth character in the first encrypted information to encrypt the plain text of the address book;
[0120] If the character length of the first encrypted information is smaller than the character length of the plain text of the address book, it is necessary to combine multiple first encrypted information to obtain an encrypted stream with more characters, and encrypt the address book plain text based on part or all of the characters of the encrypted stream. For example, if the character length of the plain text of the address book is N bits, select the characters before the Nth bit in the encrypted stream to encrypt the plain text of the address book.
[0121] This embodiment does not limit the specific encryption method. For example, XOR encryption can be used, that is, the address book ciphertext = the character determined from the first encryption information ^ the address book plaintext, ^ represents the XOR operation.
[0122] In the above scheme, since the same characters as those in the address book plaintext are needed to encrypt the address book plaintext, when the character length of the first encrypted information is exactly the same as the character length of the address book plaintext, all the characters of the first encrypted information can be directly used to encrypt the address book plaintext; when the character length of the first encrypted information is greater than the character length of the address book plaintext, it is necessary to select part of the characters of the first encrypted information to encrypt the address book plaintext; when the character length of the first encrypted information is less than the character length of the address book plaintext, it is necessary to combine multiple first encrypted information to obtain an encrypted stream with more characters, and encrypt the address book plaintext based on part or all of the characters of the encrypted stream, so as to accurately encrypt the address book plaintext for different application scenarios.
[0123] Figure 3This is an interactive flow chart of the second address book processing method provided in the embodiment of the present application. This embodiment is also a process of configuring the address book ciphertext, such as Figure 3 As shown, the following steps are included:
[0124] Step S301: The user terminal sends user information of the target user to the management terminal.
[0125] Step S302: the management end generates a random verification code corresponding to the target user in response to the user information of the target user sent by the user end.
[0126] Step S303: The management terminal sends the random verification code to the user terminal.
[0127] Step S304: The management end determines the first identity verification information and the first encryption information corresponding to the target user based on the random verification code and the user information.
[0128] Step S305: The management end compares the character length of the first encryption information with the character length of the target user's address book plaintext, and based on the comparison result, uses the first encryption information to encrypt the target user's address book plaintext to obtain the target user's address book ciphertext.
[0129] Step S306: The management end sends the address book ciphertext and the first identity verification information to the server end.
[0130] The specific implementation of steps S301 - S306 may refer to the above embodiment and will not be described again here.
[0131] Step S307: The management end updates the ciphertext of the address book corresponding to other users based on the user information of the target user.
[0132] The other users have the same user tag as the target user.
[0133] In practice, the plain text of the address book of users with the same user tag is the same. When new user information is available, the corresponding plain text of the address book will also change. Based on this, after receiving the user information of the target user, the management end not only needs to configure the address book ciphertext for the target user, but also needs to update the address book ciphertext corresponding to other users.
[0134] This embodiment does not limit the specific implementation method of updating the ciphertext of the address book corresponding to other users, and is described below with several examples:
[0135] 1) Add the user information of the target user to the original address book plain text to obtain a new address book plain text; re-encrypt the new address book plain text based on the first encrypted information of other users to obtain new address book ciphertext of other users;
[0136] 2) Using the first encrypted information of other users to encrypt the user information of the target user to obtain a newly added ciphertext, and using the newly added ciphertext and the original address book ciphertext of other users as the new address book ciphertext of other users.
[0137] The specific encryption method can refer to the above embodiment and will not be described again here.
[0138] Of course, other methods may also be used in implementation to update the ciphertexts of the address books corresponding to other users, as long as the updated ciphertexts of the address books corresponding to other users include the user information of the target user.
[0139] In the above scheme, since the plain text of the address book of users with the same user tag is the same, the corresponding plain text of the address book will also change after the new user information is available. This embodiment updates the ciphertext of the address book corresponding to other users after the management terminal receives the user information of the target user, so that other users can obtain accurate and complete address books later.
[0140] Figure 4 The interactive flow chart of the third address book processing method provided in the embodiment of the present application is a process of obtaining the plain text of the address book, such as Figure 4 As shown, the following steps are included:
[0141] Step S401: The user terminal determines second identity verification information and second encryption information based on the user information of the user to be verified and the random verification code sent by the management terminal.
[0142] As described above, this embodiment requires identity verification of the user and encryption of the plain text of the address book. Based on this, the user end needs to determine the second identity verification information based on the user information of the user to be verified and the random verification code sent by the management end for identity verification; it also needs to determine the second encryption information based on the user information of the user to be verified and the random verification code sent by the management end for decrypting the ciphertext of the address book.
[0143] Step S402: the user terminal sends a contact list acquisition instruction including the second identity verification information to the server terminal.
[0144] During implementation, the user sends a contact list acquisition instruction containing the second identity verification information to the server, and the server performs identity verification on the user to be verified based on the second identity verification information and the first identity verification sent by the management end.
[0145] Step S403: The server matches the second identity verification information contained in the instruction with the first identity verification information.
[0146] The first identity verification information is determined by the management end based on a random verification code corresponding to the target user and user information.
[0147] Step S404: The server sends the address book ciphertext corresponding to the first identity verification information matching the second identity verification information to the user terminal.
[0148] Among them, the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is determined by the management end based on the random verification code corresponding to the target user and user information.
[0149] In this embodiment, by matching the second identity verification information with the first identity verification information, if the first identity verification information successfully matches the second identity verification information, the identity verification of the user to be verified passes, and the address book ciphertext corresponding to the first identity verification information is sent to the user end.
[0150] Step S405: The user terminal compares the character length of the second encryption information with the character length of the received address book ciphertext, and uses the second encryption information to decrypt the received address book ciphertext based on the comparison result.
[0151] Since the user end receives the ciphertext of the address book, the user needs to obtain the plaintext of the address book. Based on this, the user end needs to decrypt the ciphertext of the address book after receiving it.
[0152] In practice, the lengths of the second encrypted information and the address book ciphertext are uncertain. If characters in the second encrypted information are randomly selected to decrypt the address book ciphertext, decryption errors may occur. Based on this, this embodiment compares the character length of the second encrypted information with the character length of the received address book ciphertext, and then uses the second encrypted information to accurately decrypt the received address book ciphertext based on the comparison result.
[0153] In the above scheme, after receiving the user information of the target user, the management end generates first identity verification information for user identity verification based on the random verification code and the user information, and first encryption information for encrypting the address book plaintext of the target user; then based on the character length of the first encryption information and the character length of the address book plaintext of the target user, the address book plaintext of the target user is accurately encrypted to obtain the address book ciphertext of the target user; the management end sends the address book ciphertext and the first identity verification information to the server end, and sends the random verification code to the user end, so that the user end determines the second identity verification information and the second encryption information based on the user information of the user to be verified and the random verification code sent by the management end; after receiving the second identity verification information of the user to be verified sent by the user end, the server end sends the address book ciphertext corresponding to the first identity verification information matching it to the user end, that is, the corresponding address book ciphertext will be sent to the user end only after the identity verification of the user to be verified is passed; because the user end receives the address book ciphertext, it is also necessary to decrypt the received address book ciphertext based on the above second encryption information to obtain the address book plaintext. This embodiment verifies the identity of the user, making the server less vulnerable to attack; by encrypting the address book, even if the server is attacked, the attacker can only obtain the ciphertext of the address book, reducing the occurrence of plaintext leakage of the address book and improving the security of the address book.
[0154] In some optional implementation manners, the above step S401 may be implemented by but not limited to the following methods:
[0155] A first hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second identity verification information; and a second hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second encrypted information.
[0156] In this embodiment, in order to achieve identity verification and decryption, the user end determines the second identity verification information in the same way as the management end determines the first identity verification information, and the user end determines the second encryption information in the same way as the management end determines the first encryption information.
[0157] As described above, if the same calculation method is used to determine the first identity verification information and the first encrypted information, then the first identity verification information and the first encrypted information are the same. After cracking one piece of information, the attacker can complete the identity verification and decryption, affecting the security of the address book.
[0158] Based on this, in this embodiment, the management end performs a first hash calculation on the random verification code and the user information to obtain the first identity verification information corresponding to the target user; correspondingly, the user end performs a first hash calculation on the random verification code and the user information to obtain the second identity verification information corresponding to the user to be verified;
[0159] The management end performs a second hash calculation on the random verification code and user information to obtain the first encrypted information corresponding to the target user; correspondingly, the user end performs a second hash calculation on the random verification code and user information to obtain the second encrypted information corresponding to the user to be verified.
[0160] The above scheme determines the second identity verification information and the second encrypted information through different hash calculations, so that the second identity verification information is different from the second encrypted information. Even if an attacker cracks one of the information, he cannot complete the identity verification and decryption at the same time, which further improves the security of the address book.
[0161] In some optional implementation manners, the above step S405 may be implemented by but not limited to the following methods:
[0162] If the character length of the second encrypted information is the same as the character length of the received address book ciphertext, decrypting the received address book ciphertext based on all the characters of the second encrypted information;
[0163] If the character length of the second encrypted information is greater than the character length of the received address book ciphertext, decrypting the received address book ciphertext based on part of the characters of the second encrypted information;
[0164] If the character length of the second encrypted information is less than the character length of the received address book ciphertext, multiple pieces of the second encrypted information are combined to obtain an encrypted stream, and the received address book ciphertext is decrypted based on part or all of the characters of the encrypted stream.
[0165] In this embodiment, in order to achieve decryption of the address book, the process of encrypting the plain text of the address book by the management end is the reverse process of decrypting the cipher text of the address book by the user end.
[0166] In practice, the same characters as those in the plain text of the address book are needed to encrypt the plain text of the address book; and the same characters as those in the cipher text of the address book are also needed to decrypt the cipher text of the address book.
[0167] Based on this, if the character length of the second encrypted information is exactly the same as the character length of the address book ciphertext, all the characters of the second encrypted information can be directly used to decrypt the address book ciphertext;
[0168] If the character length of the second encrypted information is greater than the character length of the address book ciphertext, it is necessary to select part of the characters of the second encrypted information to decrypt the address book ciphertext, for example, if the character length of the address book ciphertext is N characters, select the characters before the Nth character in the second encrypted information to decrypt the address book ciphertext;
[0169] If the character length of the second encrypted information is smaller than the character length of the address book ciphertext, it is necessary to combine multiple second encrypted information to obtain an encrypted stream with more characters, and decrypt the address book ciphertext based on part or all of the characters of the encrypted stream. For example, if the character length of the address book plaintext is N bits, select the characters before the Nth bit in the encrypted stream to decrypt the address book plaintext.
[0170] In the above scheme, since the address book ciphertext can be decrypted only with the same characters as those in the address book ciphertext, when the character length of the second encrypted information is exactly the same as the character length of the address book ciphertext, all the characters of the second encrypted information can be directly used to decrypt the address book ciphertext; when the character length of the second encrypted information is greater than the character length of the address book ciphertext, it is necessary to select part of the characters of the second encrypted information to decrypt the address book ciphertext; when the character length of the second encrypted information is less than the character length of the address book ciphertext, it is necessary to combine multiple second encrypted information to obtain an encrypted stream with more characters, and decrypt the address book ciphertext based on part or all of the characters of the encrypted stream, so as to accurately decrypt the address book ciphertext for different application scenarios.
[0171] In order to more clearly illustrate the address book processing method, the above embodiment introduces the process of configuring the address book ciphertext and the process of obtaining the address book plaintext separately. However, in implementation, the two processes are carried out in coordination.
[0172] In the embodiment of the present application, the address book processing method executed by the management end is as follows: Figure 5 As shown, the following steps are included:
[0173] Step S501: in response to the user information of the target user sent by the user terminal, generating a random verification code corresponding to the target user, and sending the random verification code to the user terminal;
[0174] Step S502: Determine first identity verification information and first encryption information corresponding to the target user based on the random verification code and the user information;
[0175] Step S503: comparing the character length of the first encryption information with the character length of the plain text of the address book of the target user, and encrypting the plain text of the address book of the target user using the first encryption information based on the comparison result to obtain the cipher text of the address book of the target user;
[0176] Step S504: Send the address book ciphertext and the first identity verification information to the server, so that the server will send the address book ciphertext corresponding to the first identity verification information to the user end after determining that the second identity verification information sent by the user end matches the first identity verification information, and the user end decrypts the address book ciphertext based on the second encryption information; wherein the second identity verification information and the second encryption information are determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
[0177] In some optional implementations, determining the first identity verification information and the first encryption information corresponding to the target user based on the random verification code and the user information includes:
[0178] A first hash calculation is performed on the random verification code and the user information to obtain first identity verification information corresponding to the target user; and a second hash calculation is performed on the random verification code and the user information to obtain first encrypted information corresponding to the target user.
[0179] In some optional implementations, encrypting the target user's address book plaintext using the first encryption information based on the comparison result includes:
[0180] If the character length of the first encrypted information is the same as the character length of the plain text of the address book, encrypting the plain text of the address book based on all the characters of the first encrypted information;
[0181] If the character length of the first encrypted information is greater than the character length of the plain text of the address book, encrypting the plain text of the address book based on part of the characters of the first encrypted information;
[0182] If the character length of the first encrypted information is less than the character length of the plain text of the address book, multiple first encrypted information are combined to obtain an encrypted stream, and the plain text of the address book is encrypted based on part or all of the characters of the encrypted stream.
[0183] Some optional implementations also include:
[0184] The ciphertext of the address book corresponding to other users is updated based on the user information of the target user; wherein the user tags of the other users and the target user are the same.
[0185] In the embodiment of the present application, the address book processing method executed by the server is as follows: Figure 6 As shown, the following steps are included:
[0186] Step S601: In response to the address book acquisition instruction sent by the user terminal, the second identity verification information contained in the instruction is matched with the first identity verification information; wherein the first identity verification information is determined by the management terminal based on the random verification code corresponding to the target user and the user information; the second identity verification information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal;
[0187] Step S602: Send the address book ciphertext corresponding to the first identity verification information matching the second identity verification information to the user terminal, so that the user terminal decrypts the obtained address book ciphertext based on the second encryption information; wherein the address book ciphertext is obtained by the management terminal encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, the first encryption information is determined by the management terminal based on the random verification code corresponding to the target user and the user information, and the second encryption information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal.
[0188] In the embodiment of the present application, the address book processing method executed by the user end is as follows: Figure 7 As shown, the following steps are included:
[0189] Step S701: Determine second identity verification information and second encryption information based on the user information of the user to be verified and the random verification code sent by the management terminal;
[0190] Step S702: Sending a contact book acquisition instruction containing the second identity verification information to the server, so that the server matches the second identity verification information with the first identity verification information after receiving the instruction; wherein the first identity verification information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0191] Step S703: receiving the address book ciphertext corresponding to the first identity verification information matching the second identity verification information sent by the server; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0192] Step S704: compare the character length of the second encryption information with the character length of the received address book ciphertext, and decrypt the received address book ciphertext using the second encryption information based on the comparison result.
[0193] In some optional implementations, determining the second identity verification information and the second encrypted information based on the user information of the user to be verified and the random verification code sent by the management terminal includes:
[0194] A first hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second identity verification information; and a second hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second encrypted information.
[0195] In some optional implementations, decrypting the received address book ciphertext using the second encryption information based on the comparison result includes:
[0196] If the character length of the second encrypted information is the same as the character length of the received address book ciphertext, decrypting the received address book ciphertext based on all the characters of the second encrypted information;
[0197] If the character length of the second encrypted information is greater than the character length of the received address book ciphertext, decrypting the received address book ciphertext based on part of the characters of the second encrypted information;
[0198] If the character length of the second encrypted information is less than the character length of the received address book ciphertext, multiple pieces of the second encrypted information are combined to obtain an encrypted stream, and the received address book ciphertext is decrypted based on part or all of the characters of the encrypted stream.
[0199] Figure 5 to Figure 7 The specific implementation of the embodiment can refer to the implementation of the above-mentioned interaction method, and the repeated parts will not be repeated.
[0200] like Figure 8 As shown, based on Figure 5 The invention concept of the address book processing method shown in FIG. 1 is the same as that of the invention concept, and the embodiment of the present application provides a first address book processing device 800, which is applied to the management end, and the device includes:
[0201] The verification code processing module 801 is used to generate a random verification code corresponding to the target user in response to the user information of the target user sent by the user terminal, and send the random verification code to the user terminal;
[0202] An information determination module 802 is used to determine first identity verification information and first encryption information corresponding to the target user based on the random verification code and the user information;
[0203] The encryption module 803 is used to compare the character length of the first encryption information with the character length of the plain text of the address book of the target user, and encrypt the plain text of the address book of the target user using the first encryption information based on the comparison result to obtain the cipher text of the address book of the target user;
[0204] The sending module 804 is used to send the address book ciphertext and the first identity verification information to the server, so that the server can send the address book ciphertext corresponding to the first identity verification information to the user end after determining that the second identity verification information received and sent by the user end matches the first identity verification information, and the user end decrypts the address book ciphertext based on the second encryption information; wherein, the second identity verification information and the second encryption information are determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
[0205] In some optional implementation manners, the information determination module 802 is specifically configured to:
[0206] A first hash calculation is performed on the random verification code and the user information to obtain first identity verification information corresponding to the target user; and a second hash calculation is performed on the random verification code and the user information to obtain first encrypted information corresponding to the target user.
[0207] In some optional implementation manners, the encryption module 803 is specifically used for:
[0208] If the character length of the first encrypted information is the same as the character length of the plain text of the address book, encrypting the plain text of the address book based on all the characters of the first encrypted information;
[0209] If the character length of the first encrypted information is greater than the character length of the plain text of the address book, encrypting the plain text of the address book based on part of the characters of the first encrypted information;
[0210] If the character length of the first encrypted information is less than the character length of the plain text of the address book, multiple first encrypted information are combined to obtain an encrypted stream, and the plain text of the address book is encrypted based on part or all of the characters of the encrypted stream.
[0211] In some optional implementations, the encryption module 803 is further used to:
[0212] The ciphertext of the address book corresponding to other users is updated based on the user information of the target user; wherein the user tags of the other users and the target user are the same.
[0213] like Fig. 9 As shown, based on Figure 6The embodiment of the present application provides a first address book processing device 900, which is applied to a server, and includes:
[0214] A matching module 901, configured to match the second identity verification information contained in the instruction with the first identity verification information in response to the address book acquisition instruction sent by the user terminal; wherein the first identity verification information is determined by the management terminal based on the random verification code corresponding to the target user and the user information; and the second identity verification information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal;
[0215] The sending module 902 is used to send the address book ciphertext corresponding to the first identity verification information matching the second identity verification information to the user terminal, so that the user terminal decrypts the acquired address book ciphertext based on the second encryption information; wherein the address book ciphertext is obtained by the management terminal encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, the first encryption information is determined by the management terminal based on the random verification code corresponding to the target user and the user information, and the second encryption information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal.
[0216] like Fig.10 As shown, based on Figure 7 The embodiment of the present application provides a first address book processing device 1000, which is applied to a user end and includes:
[0217] The information determination module 1001 is used to determine the second identity verification information and the second encrypted information based on the user information of the user to be verified and the random verification code sent by the management terminal;
[0218] The sending module 1002 is used to send an address book acquisition instruction containing the second identity verification information to the server, so that the server matches the second identity verification information with the first identity verification information after receiving the instruction; wherein the first identity verification information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0219] The receiving module 1003 is used to receive the address book ciphertext corresponding to the first identity verification information matching the second identity verification information sent by the server; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is determined by the management end based on the random verification code corresponding to the target user and the user information;
[0220] The decryption module 1004 is used to compare the character length of the second encrypted information with the character length of the received address book ciphertext, and decrypt the received address book ciphertext using the second encrypted information based on the comparison result.
[0221] In some optional implementation manners, the information determination module 1001 is specifically used to:
[0222] A first hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second identity verification information; and a second hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second encrypted information.
[0223] In some optional implementations, the decryption module 1004 is specifically used for:
[0224] If the character length of the second encrypted information is the same as the character length of the received address book ciphertext, decrypting the received address book ciphertext based on all the characters of the second encrypted information;
[0225] If the character length of the second encrypted information is greater than the character length of the received address book ciphertext, decrypting the received address book ciphertext based on part of the characters of the second encrypted information;
[0226] If the character length of the second encrypted information is less than the character length of the received address book ciphertext, multiple pieces of the second encrypted information are combined to obtain an encrypted stream, and the received address book ciphertext is decrypted based on part or all of the characters of the encrypted stream.
[0227] Figure 8 to Figure 10 The specific implementation of the embodiment can refer to the implementation of the above-mentioned interaction method, and the repeated parts will not be repeated.
[0228] Based on the same technical concept, the embodiment of the present application also provides a management terminal 1100, such as Fig.11 As shown, it includes at least one processor 1101 and a memory 1102 connected to the at least one processor. The specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present application. Fig.10 For example, the processor 1101 and the memory 1102 are connected via a bus 1103. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0229] Among them, the processor 1101 is the control center of the management end, and can use various interfaces and lines to connect various parts of the management end, and realize data processing by running or executing instructions stored in the memory 1102 and calling data stored in the memory 1102. Optionally, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes the issuance of instructions. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0230] The processor 1101 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the address book processing method may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0231] Memory 1102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1102 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1102 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0232] In the embodiment of the present application, the memory 1102 stores a computer program, and when the program is executed by the processor 1101, the processor 1101 executes the steps of the method corresponding to the above-mentioned management end.
[0233] Based on the same technical concept, an embodiment of the present application also provides a server, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the steps of the corresponding method of the above-mentioned server.
[0234] Based on the same technical concept, an embodiment of the present application also provides a user terminal, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the steps of the corresponding method of the above-mentioned user terminal.
[0235] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program runs on the processor, the processor executes the steps of the above-mentioned address book processing method.
[0236] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0237] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0238] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0239] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0240] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0241] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for processing an address book, characterized in that: Applied to a management end, the management end is connected to a service end and a user end respectively; the method comprises: In response to the user information of the target user sent by the user terminal, generating a random verification code corresponding to the target user, and sending the random verification code to the user terminal; Performing a first hash calculation on the random verification code and the user information to obtain first identity verification information corresponding to the target user; and performing a second hash calculation on the random verification code and the user information to obtain first encrypted information corresponding to the target user; Comparing the character length of the first encrypted information with the character length of the target user's address book plaintext, and encrypting the target user's address book plaintext using the first encrypted information based on the comparison result to obtain the target user's address book ciphertext; The address book ciphertext and the first identity verification information are sent to the server, so that after the server determines that the second identity verification information sent by the user terminal matches the first identity verification information, the address book ciphertext corresponding to the first identity verification information is sent to the user terminal, and the user terminal decrypts the address book ciphertext based on the second encryption information; wherein the second identity verification information and the second encryption information are determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal.
2. The method according to claim 1, characterized in that Encrypting the target user's address book plaintext using the first encryption information based on the comparison result includes: If the character length of the first encrypted information is the same as the character length of the plain text of the address book, encrypting the plain text of the address book based on all the characters of the first encrypted information; If the character length of the first encrypted information is greater than the character length of the plain text of the address book, encrypting the plain text of the address book based on part of the characters of the first encrypted information; If the character length of the first encrypted information is less than the character length of the plain text of the address book, multiple first encrypted information are combined to obtain an encrypted stream, and the plain text of the address book is encrypted based on part or all of the characters of the encrypted stream.
3. The method according to claim 1 or 2, characterized in that Also includes: The ciphertext of the address book corresponding to other users is updated based on the user information of the target user; wherein the user tags of the other users and the target user are the same.
4. A method for processing an address book, characterized in that: Applied to a server, the server is connected to a management terminal and a user terminal respectively; the method comprises: In response to the address book acquisition instruction sent by the user end, the second identity verification information contained in the instruction is matched with the first identity verification information; wherein the first identity verification information is obtained by the management end performing a first hash calculation on the random verification code corresponding to the target user and the user information; the second identity verification information is determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end; The address book ciphertext corresponding to the first identity verification information matching the second identity verification information is sent to the user end, so that the user end decrypts the acquired address book ciphertext based on the second encryption information; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, the first encryption information is obtained by the management end performing a second hash calculation on the random verification code and user information corresponding to the target user, and the second encryption information is determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
5. A method for processing an address book, characterized in that: Applied to a user end, the user end is connected to a management end and a service end respectively; the method comprises: Determine second identity verification information and second encryption information based on user information of the user to be verified and a random verification code sent by the management terminal; Sending an address book acquisition instruction containing the second identity verification information to the server, so that the server matches the second identity verification information with the first identity verification information after receiving the instruction; wherein the first identity verification information is obtained by the management end performing a first hash calculation on the random verification code corresponding to the target user and the user information; Receive the address book ciphertext corresponding to the first identity verification information that matches the second identity verification information and sent by the server; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is obtained by the management end performing a second hash calculation on the random verification code corresponding to the target user and the user information; The character length of the second encrypted information is compared with the character length of the received address book ciphertext, and the received address book ciphertext is decrypted using the second encrypted information based on the comparison result.
6. The method according to claim 5, characterized in that Determining second identity verification information and second encrypted information based on user information of the user to be verified and the random verification code sent by the management terminal includes: A first hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second identity verification information; and a second hash calculation is performed on the random verification code sent by the management end and the user information of the user to be verified to obtain the second encrypted information.
7. The method according to claim 5, characterized in that Decrypting the received address book ciphertext using the second encryption information based on the comparison result includes: If the character length of the second encrypted information is the same as the character length of the received address book ciphertext, decrypting the received address book ciphertext based on all the characters of the second encrypted information; If the character length of the second encrypted information is greater than the character length of the received address book ciphertext, decrypting the received address book ciphertext based on part of the characters of the second encrypted information; If the character length of the second encrypted information is less than the character length of the received address book ciphertext, multiple pieces of the second encrypted information are combined to obtain an encrypted stream, and the received address book ciphertext is decrypted based on part or all of the characters of the encrypted stream.
8. A device for processing an address book, characterized in that: Applied to a management end, the management end is connected to a service end and a user end respectively; the device comprises: A verification code processing module, configured to generate a random verification code corresponding to the target user in response to the user information of the target user sent by the user terminal, and send the random verification code to the user terminal; An information determination module, configured to perform a first hash calculation on the random verification code and the user information to obtain first identity verification information corresponding to the target user; and perform a second hash calculation on the random verification code and the user information to obtain first encrypted information corresponding to the target user; an encryption module, configured to compare the character length of the first encryption information with the character length of the plain text of the address book of the target user, and encrypt the plain text of the address book of the target user using the first encryption information based on the comparison result to obtain the cipher text of the address book of the target user; A sending module, used to send the address book ciphertext and the first identity verification information to the server, so that the server will send the address book ciphertext corresponding to the first identity verification information to the user end after determining that the second identity verification information received and sent by the user end matches the first identity verification information, and the user end decrypts the address book ciphertext based on the second encryption information; wherein, the second identity verification information and the second encryption information are determined by the user end based on the user information of the user to be verified and the random verification code sent by the management end.
9. A device for processing an address book, characterized in that: Applied to a server, the server is connected to a management terminal and a user terminal respectively; the device comprises: A matching module, configured to match the second identity verification information contained in the instruction with the first identity verification information in response to the address book acquisition instruction sent by the user terminal; wherein the first identity verification information is obtained by the management terminal performing a first hash calculation on the random verification code corresponding to the target user and the user information; and the second identity verification information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal; A sending module is used to send the address book ciphertext corresponding to the first identity verification information matching the second identity verification information to the user terminal, so that the user terminal decrypts the acquired address book ciphertext based on the second encryption information; wherein the address book ciphertext is obtained by the management terminal encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, the first encryption information is obtained by the management terminal performing a second hash calculation on the random verification code and user information corresponding to the target user, and the second encryption information is determined by the user terminal based on the user information of the user to be verified and the random verification code sent by the management terminal.
10. A device for processing an address book, characterized in that: Applied to the user end, the user end is connected to the management end and the service end respectively; the device comprises: An information determination module, used to determine the second identity verification information and the second encrypted information based on the user information of the user to be verified and the random verification code sent by the management terminal; A sending module, used for sending an address book acquisition instruction containing the second identity verification information to the server, so that the server matches the second identity verification information with the first identity verification information after receiving the instruction; wherein the first identity verification information is obtained by the management end performing a first hash calculation on the random verification code corresponding to the target user and the user information; A receiving module, used for receiving the address book ciphertext corresponding to the first identity verification information matching the second identity verification information sent by the server; wherein the address book ciphertext is obtained by the management end encrypting the address book plaintext of the target user based on the first encryption information corresponding to the target user, and the first encryption information is obtained by the management end performing a second hash calculation on the random verification code corresponding to the target user and the user information; A decryption module is used to compare the character length of the second encrypted information with the character length of the received address book ciphertext, and decrypt the received address book ciphertext using the second encrypted information based on the comparison result.
Citation Information
Patent Citations
Method for preventing short message service from being attacked, server, electronic equipment and storage medium
CN112566121A
Identity security verification method and system
CN113364777A
