CN110166493B - Social client address book dynamic protection method and device - Google Patents

Social client address book dynamic protection method and device Download PDF

Info

Publication number
CN110166493B
CN110166493B CN201910584985.XA CN201910584985A CN110166493B CN 110166493 B CN110166493 B CN 110166493B CN 201910584985 A CN201910584985 A CN 201910584985A CN 110166493 B CN110166493 B CN 110166493B
Authority
CN
China
Prior art keywords
address book
control
book data
data
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910584985.XA
Other languages
Chinese (zh)
Other versions
CN110166493A (en
Inventor
周志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201910584985.XA priority Critical patent/CN110166493B/en
Publication of CN110166493A publication Critical patent/CN110166493A/en
Application granted granted Critical
Publication of CN110166493B publication Critical patent/CN110166493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/145Countermeasures against malicious traffic the attack involving the propagation of malware through the network, e.g. viruses, trojans or worms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention provides a method and a device for dynamically protecting an address book of a social client, wherein the method comprises the following steps: receiving an update request of a client to address book data; based on the updating request, acquiring address book data of a client needing to be issued from a preset database, and generating a unique control number for each address book data; encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; respectively and correspondingly generating a control of each address book data based on the control number, the encryption information and the encryption key, and obtaining final encryption data; and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on the number of each control when the client needs to display the address book data. The invention realizes dynamic encryption by displaying the address book data in real time through the multiple control pieces, thereby avoiding that the address book data can be obtained after the version iteration of the virus program.

Description

Social client address book dynamic protection method and device
Technical Field
The invention relates to the technical field of network security, in particular to a method and a device for dynamically protecting an address book of a social client.
Background
The current social client side contains address book friend information, the address book friend information relates to the privacy of users, and illegal viruses or hackers usually intercept and intercept the address book of the users, so that illegal things can be done, and benefits can be obtained. After a hacker analyzes how to obtain the address book information of the application program on the attacked device through reverse analysis, the hacker can obtain the address book information of other devices by writing a virus program and spreading the virus program to other user devices through illegal means. Under the condition that the virus program does not need to be updated, the virus program can not only obtain the address book information of the old version of the client, but also obtain the address book information of the new version.
The protection rule in the scheme provided by the prior art usually changes an encryption algorithm for a network protocol between a server and a client, so as to prevent a virus program or a hacker from acquiring address book information. However, some higher viruses acquire names through control information of the address book, so that an encryption and decryption algorithm of a network protocol is bypassed, and corresponding address book information can be acquired regardless of how a client is updated.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for dynamically protecting an address book of a social client, where dynamic encryption is implemented by displaying address book data in real time through multiple control elements, so that it is avoided that a virus program can obtain address book data after version iteration.
In a first aspect, the present application provides the following technical solutions through an embodiment:
a social client address book dynamic protection method comprises the following steps:
receiving an update request of a client to address book data; based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data; encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
Preferably, the updating request carries the user ID and the operation instruction of the client, and before the address book data of the client that needs to be issued is acquired from a preset database, the method further includes: searching address book data corresponding to the user ID in a preset database; based on the operation instruction, operating address book data corresponding to the user ID; wherein the operation instruction comprises any one or more of the following: deleting the data of the appointed address book; modifying the data of the appointed address book; and adding a new address book data.
Preferably, the updating request carries a version number of the client, and generating a unique control number for each address book data includes: and generating a control number of each control according to the version number of the client and the total amount of the address book data.
Preferably, the encrypting each corresponding address book data to obtain the encryption information and the encryption key of each address book data respectively includes: encrypting each address book data by adopting a random algorithm, and respectively obtaining encrypted information and an encrypted key after each address book data is encrypted; wherein, the encryption includes any one or more of the following modes: and carrying out displacement operation on the address book data, carrying out exclusive OR operation on the address book data, carrying out addition operation on the address book data and carrying out subtraction operation on the address book data.
Preferably, the updating request carries the user ID of the client and the device ID of the client, and the encrypting each corresponding address book data to obtain the encryption information and the encryption key of each address book data includes: respectively determining a control coordinate corresponding to each control number according to the control number of each address book data; obtaining a coordinate key of each control coordinate based on each control coordinate; obtaining a user information key of the client according to the user ID and the equipment ID; respectively obtaining an encryption key of each address book data according to the total number of the address book data, the user information key and each coordinate key; and based on the encryption key of each address book data, encrypting each address book data by adopting a TEA encryption algorithm to obtain the encryption information of each address book data.
Preferably, the obtaining an encryption key of each address book data according to the total number of the address book data, the user information key, and each coordinate key respectively includes: respectively distributing weights to the key of the current control coordinate and the user information key to respectively obtain a first weight and a second weight; the first weight is the weight corresponding to the key of the current control coordinate, the second weight is the weight corresponding to the user information key, and the first weight is smaller than the second weight; based on the first weight, taking out a first key character string from a coordinate key of the current control coordinate; based on the second weight, a second key character string is taken out from the user information key; and splicing the first key character string and the second key character string to obtain the encryption key of the current address book data.
Preferably, the generating the control of each address book data based on the control number, the encryption information, and the encryption key respectively and correspondingly, and obtaining the final encryption data includes: generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion; respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number; respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; and encrypting the total number of the controls and all the controls to obtain the final encrypted data.
In a second aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
a social client address book dynamic protection device comprises:
the receiving module is used for receiving an update request of a client to address book data; the control number generation module is used for acquiring the address book data needing to be issued to the client from a preset database based on the updating request and generating a unique control number for each address book data; the encryption module is used for encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; the control generating module is used for respectively generating a control of each address book data correspondingly based on the control number, the encryption information and the encryption key, and obtaining final encryption data; and the sending module is used for sending the final encrypted data to the client so as to decrypt the final encrypted data and create the controls based on the control numbers when the client needs to display address book data.
In a third aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
a social client address book dynamic protection device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
receiving an update request of a client to address book data; based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data; encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
In a fourth aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
a computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving an update request of a client to address book data; based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data; encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
according to the method and the device for dynamically protecting the address book of the social client, after the update request of the address book data by the client is received, the control of the address book data is generated based on the update request, so that the control is not generated at the client; then, the data of each address book are encrypted respectively, so that one-time cracking of a virus program is avoided; because the control of each address book data is generated on the server, only after the client receives the final encrypted data, the client can decrypt the final encrypted data and create the control based on the number of each control, the data received on the client can be always stored in an encrypted form, the control is created and displayed only when displayed, and because each address book data corresponds to one control, the corresponding different controls can be used for displaying when the address book data is displayed, so that the virus program is prevented from acquiring all the address book data at the same time. Furthermore, because the generation of the control is carried out in the server and is not written and stored locally in the client, the control needs to be generated and issued by the server again after the version is updated, the dynamic property is ensured, and the situation that the address book data can be obtained after the version iteration of the virus program is avoided.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a method for dynamically protecting a social client address book according to a first embodiment of the present invention;
fig. 2 is a functional block diagram of a dynamic social client address book protection apparatus according to a second embodiment of the present invention;
fig. 3 is a block diagram illustrating a social client address book dynamic protection apparatus according to a third embodiment of the present invention;
fig. 4 is a functional block diagram of a computer-readable storage medium according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
First embodiment
Referring to fig. 1, in the present embodiment, a method for dynamically protecting a social client address book is provided, where the method is applicable to a server communicating with a client, and specifically, the method includes:
step S10: receiving an update request of a client to address book data;
step S20: based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data;
step S30: encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data;
step S40: respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data;
step S50: and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
In this embodiment, after receiving an update request of a client for address book data, a control for generating the address book data based on the update request ensures that the generation of the control is not performed at the client; then, the data of each address book are encrypted respectively, so that one-time cracking of a virus program is avoided; because the control of each address book data is generated on the server, only after the client receives the final encrypted data, the client can decrypt the final encrypted data and create the control based on the number of each control, the data received on the client can be always stored in an encrypted form, the control is created and displayed only when displayed, and because each address book data corresponds to one control, the corresponding different controls can be used for displaying when the address book data is displayed, so that the virus program is prevented from acquiring all the address book data at the same time.
Furthermore, the control is generated in the server and is not written and stored in the client locally, and the control needs to be generated and issued by the server again after the version is updated, so that the problem that a virus program can acquire address book data after version iteration is avoided.
Step S10: and receiving an update request of the client to the address book data.
In step S10, the update request is a request sent by the client to the server, where the update request may carry a user ID, a device ID, and an operation instruction of the client, where the operation instruction is an instruction to operate a preset database; wherein, the operation instruction comprises any one or more of the following: deleting the data of the appointed address book; modifying the data of the appointed address book; and adding a new address book data. The update request also comprises a download request used for requesting to download the address book data corresponding to the user ID of the client.
It should be noted that, if the update request carries an operation instruction, before step S20, the method further includes: searching address book data corresponding to the user ID in a preset database; and operating the address book data corresponding to the user ID based on the operation instruction. Step S20 is executed after the operation is completed.
Step S20: and acquiring the address book data needing to be issued to the client in a preset database based on the updating request, and generating a unique control number for each address book data.
In step S20, a preset database is used to store address book data of different user IDs. The control number generation can be directly random number generation, or can randomly generate a first control number, and then sequentially number the control numbers, without limitation.
In this embodiment, the step S20 includes, in a specific implementation manner: and generating a control number of each control according to the version number of the client and the total amount of the address book data. Specific examples thereof include:
firstly, generating random data, and then using the random data to calculate the remainder of the total amount of the control (the total amount of the control is the same as the total amount of the address book data), thereby obtaining a number. And splicing the version number of the client with the adapted number to obtain the final control number, wherein if the version number of the client is 0001 and the number obtained by remainder calculation of random data is 0001, the final control number is 00010001. Then, the control number can be sequentially assigned to each address book data by taking the number as the starting number. The randomness of the control serial numbers is ensured, the situation that certain address book data always corresponds to a specific serial number is avoided, and the safety is improved.
Step S30: and encrypting each corresponding address book data respectively to obtain the encryption information and the encryption key of each address book data.
In step S30, the encrypted information is data obtained by encrypting the address book data, and the encryption key is used to decrypt the encrypted information. In the present embodiment, the following encryption method is provided:
1. and encrypting by adopting a random algorithm.
Specifically, the method comprises the following steps:
encrypting each address book data by adopting a random algorithm, and respectively obtaining encrypted information and an encrypted key after each address book data is encrypted; wherein, the encryption includes any one or more of the following modes: and carrying out displacement operation on the address book data, carrying out exclusive OR operation on the address book data, carrying out addition operation on the address book data and carrying out subtraction operation on the address book data.
The encryption of the random algorithm can make the encryption specific algorithm of each address book data have difference, thus improving the cracking difficulty. For example, the encryption process may be:
Void Encrypt00010001(char*data){
For(int i=0;i<sizeof(data);i++){
(data + i) ^ 0x7 a; a/XOR operation;
(data + i) ^ 0x 34; a/XOR operation;
(data + i) + (0 x 1; v/addition operation;
(data + i) ^ 0x 15; a/XOR operation;
(data + i) ═ ([ data + i) < <3) | ([ data + i) > > (8-3)); v/shift left by 3 bits, shift right by 3 bits;
(data + i) + (0 x 34; v/addition operation;
(data + i) ═ ((data + i) > >4) | ((data + i) < (8-4)); v/shift 4 bits to the right, 4 bits to the left;
}; it is indicated that each character in the address book data with the control number of 00010001 is encrypted, wherein 0x7a, 0x34, 0x1, 0x15 and 0x34 are corresponding keys.
2. And encrypting the corresponding address book data based on the control coordinates of each control.
The position of each control in the whole address book of the client is fixed, and the server can know the relative position of each control in the whole address book when issuing the control. The calculation can be performed in dependence on the control coordinates of the relative position, making the encryption algorithm more complex. The address book data of the whole address book can be encrypted for the second time according to the relative coordinates of each control. So that each address book has its decrypted contact information correct only at the current location.
Specifically, the method comprises the following steps:
step S311: and respectively determining the control coordinate corresponding to each control number according to the control number of each address book data.
Step S312: obtaining a coordinate key of each control coordinate based on each control coordinate;
step S313: obtaining a user information key of the client according to the user ID and the equipment ID;
step S314: respectively obtaining an encryption key of each address book data according to the total number of the address book data, the user information key and each coordinate key; and secondary encryption is realized through the user information key and each coordinate key, so that the safety is improved.
In step S314, the total number of the address book data, the user information key, and each coordinate key may be used to calculate each corresponding address book data encryption key. The manner of calculation is not limited, for example: and calculating the encryption key by means of addition, subtraction, splicing and the like among the three. Specifically, the method further comprises the following acquisition modes:
respectively distributing weights to the key of the current control coordinate and the user information key to respectively obtain a first weight and a second weight; the first weight is the weight corresponding to the key of the current control coordinate, the second weight is the weight corresponding to the user information key, and the first weight is smaller than the second weight;
based on the first weight, taking out a first key character string from a coordinate key of the current control coordinate;
based on the second weight, a second key character string is taken out from the user information key;
and splicing the first key character string and the second key character string to obtain the encryption key of the current address book data.
Step S315: and based on the encryption key of each address book data, encrypting each address book data by adopting a TEA encryption algorithm to obtain the encryption information of each address book data.
For example: at the server, the coordinate position of the current control of the address book data in the whole address book can be known, for example, the position coordinate of the first address book data is (10, 0); the position coordinate of the second address book data is the height of the control, so that the position coordinate is (10, 20). And by analogy, the position coordinate of the third address book data is (10, 40).
Meanwhile, in this example, a part of the weight is also taken based on the user ID and the device ID, and the other part of the weight is taken based on the position coordinates; therefore, the encryption of the address book data can be encrypted depending on the user ID, the equipment ID and the position coordinates of the control, and the information can be correctly decrypted only when the corresponding user and equipment are displayed at the correct position coordinates.
For example, the encryption algorithm may be as follows:
poskey ═ md5.create (10+ 0); for the first contact its encryption key is used to generate the key poskey for the coordinate using the MD5 algorithm.
infokey 128.create (userid + deviceid); and calculating a user information key for the user unique identification and the device unique identification, wherein the sha128.create is an interface of a hash algorithm sha128, the userid is the user ID, and the deviceid is the device ID of the user. Finally, the obtained result is the key info of the user information.
Wherein, poskey is a 32-bit character string; the info key is a 128-bit string, the number of bits of the string is not particularly limited, and 32 bits and 128 bits are merely exemplary.
Then, an encryption key is obtained based on the weight information (i.e., step S314 is performed).
The method specifically comprises the following steps: key ═ poskey [0, num × M% X ] + infokey [ num × M% X, num × N% Y ]; x, Y is the number of digits of the character string, and the weights are assigned in this example as follows: m (first weight) < N (second weight). num is the total number of the address book data, and the total number of the address book, the control coordinates and the user information can be ensured to influence the key together in such a way, so that the safety is improved; meanwhile, the weight M < N can be required, and the same probability of the number of the control coordinates is higher than that of user information (user ID and equipment ID), so that the security of the key can be improved by the weight M < N, and the influence of the user information on the key is larger. Likewise, X < Y can also be made to ensure that the user information has a greater impact on the encryption key relative to the location coordinates.
For example: m ═ 0.2, N ═ 0.8, X ═ 32, Y ═ 128; poskey [0, num 0.2% 32] indicates that as many bit strings as 0 to num 0.2% 32 were taken from poskey, with a weight of 0.2. info key [ num 0.2% 32, num 0.8% 128] represents taking as many strings as num 0.2% 32 to num 0.8% 128 from info key, where the weight is 0.8. And finally, the obtained encryption key is the encryption key for finally carrying out the encryption algorithm on the address book data.
It should be noted that, in other embodiments, the user level of the user may also be introduced, for example, num is replaced with the user level Lv, or the user level Lv is increased, or num is operated (added, subtracted, multiplied, and divided) once by using the user level Lv.
For example: and acquiring an encryption key according to the total number of the address lists of the users and the user level.
The key is poskey [0, (num + Lv) × M% X ] + info key [ (num + Lv) × M% X, (num + Lv) × N% Y ], through this kind of mode, will carry out once update to the key after user's grade takes place to upgrade each time, this update is passive, user's upgrading soon shows that the user uses the customer end more frequently, has higher risk of stealing the address book data by the virus, adopt user's grade to describe and the renewal of encryption key can improve the renewal frequency of encryption key, improve the security of address book data, reduce the risk of stealing of address book data.
And finally, encrypting each address book data by using a TEA encryption algorithm. That is, encrypt tdata ═ tea. Wherein, TEA is the interface of encryption algorithm TEA; info is the information of the contact; the encryption result is encrypt tdata.
After the client receives the encrypted final encrypted data, the specific decryption is as follows:
view v new TextView, pos v getposition (); the position coordinates of the control are obtained through the interface getposition of the control. Decryption key (key) is calculated in the same manner as encryption, and thus, the original data is obtained by a decryption algorithm.
Step S40: and respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data.
In step S40, the method specifically includes:
step S401: generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion;
step S402: respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number;
step S403: respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; in step S403, each piece of encryption information and encryption key may also be encrypted again, for example: encrypt (data, key), encrypt with the traditional encryption algorithm DES. The saving mode can be performed by copying code in the constructor of the control, and the details are described later.
Step S404: and encrypting the total number of the controls and all the controls to obtain the final encrypted data.
In step S40, the generation of the control may be a control code automatically generated based on the type, which defines the specific behavior and attribute information of the control, and the security method of the data. Based on the type of the control, a code automatic generation tool can be used for generating any number of controls, and the difference of the internal encryption mode and the key of each control is realized, so that the virus program cannot acquire all address book data simultaneously. Taking the encryption of a random algorithm as an example (for an encryption mode based on position coordinates, reverse setting can be performed based on the encryption mode when decryption in a control type is designed), the design of a specific control type, for example:
view {// first, a Class name TextViewxxx1 may be defined to represent this control, with subsequent controls changing names. The method has the function of displaying because the method is inherited to the underlying View control.
The control has properties section including the following:
char dataxxx [ MAX ] represents the name of the control display; char keyxxx [ KEY ] represents the KEY of the name of the control; int pos xxxx represents the x coordinate of the control in the parent control; int posxxx represents the y coordinate of the control in the parent control; view parentxxxx represents the parent control of the control.
The constructor of a control when it is created may be as follows:
TextView1(char data, char key, int pos x, int point, view parent); the key comprises encrypted data and a decrypted key.
Memcpy (dataxxx, src); indicating that the system function Memcpy is called to copy the encrypted data into dataxxx.
Memcpy (keyxxx, key) represents copying the key data into keyxxx.
Posxxxx ═ posx; posyxxx ═ posy; paretxxx ═ parent; wherein posxxxx and posxxxx are used to inform the position of the display of the widget; parent represents the parent control of the control and is used for displaying the parent control; the generation method organizes all controls based on a tree structure.
Multiple sets of control codes can be automatically generated based on the defined types.
Furthermore, the encryption process is completed in the server, the address book data sent by the server is encrypted and then sent to the client, and the client stores the encrypted data in the whole process until the control is displayed, so that the decryption operation is not performed.
Therefore, a decryption portion of the control needs to be defined, and decryption is performed in the control by using a temporary variable, including:
creating a temporary variable of a control name and a temporary variable of a key; the name temporary variable is used for acquiring the encryption information when the client decrypts the encrypted data; the key temporary variable is used for acquiring an encryption key when the client decrypts the encrypted data; the name temporary variable and the key temporary variable are also used for clearing data in the control name temporary variable and the key temporary variable after decryption is completed.
Examples are as follows:
Class TextViewxxx1public:View{
this same interface is also a member method ShowTextxxx belonging to the control type.
The interface is used for displaying the data in the control. For the text, the original data can be decrypted only when the text is displayed, the decrypted data is stored in a temporary variable, and the variable is emptied after the text is displayed, so that the safety of the control display data is absolutely guaranteed. The concrete implementation is as follows:
showing Void ShowTextxxxx (); first, a decryption operation needs to be performed on data, and in order to not decrypt the final encrypted data when the client downloads the data, which causes data leakage, in this embodiment, a temporary variable is used for performing the decryption operation. The following were used:
char dataxxxtemp [ MAX ] represents a name temporary variable displayed by the control; char keyxxxtemp [ KEY ] represents a KEY temporary variable of the name of the control; then through Memcpy (dataxxxtemp, dataxxx); memcpy (keyxxxtemp, keyxxx) copies the data into a temporary variable. Decryption algorithm of address book data is performed in temporary variables by aes.
Since the final encryption is performed, the final encrypted data is decrypted once by using the corresponding encryption algorithm in step S404 to obtain the corresponding encryption key.
The data is then decrypted again using a random algorithm.
The random algorithm in step S30 is, for example, as follows:
for (int i ═ 0; i < sizeof (dataxxxtemp); i + +), which has been used to decrypt each byte of dataxxxtemp. Where sizeof (dataxxxtemp) is the length of the calculated data.
And (dataxxxtemp + i) ((dataxxxtemp + i) > >4) | ((dataxxxtemp + i) < (8-4)) means that the data is shifted right by 4 bits and left by 4 bits to obtain final data, and so on.
Data xxxtemp + i) + -0 x34 indicates that 0x4 is added to the address book data, where 0x4 is also a randomly generated key, and so on.
*(dataxxxtemp+i)=(*(dataxxxtemp+i)<<3)|(*(dataxxxtemp+i)>>(8-3));
*(dataxxxtemp+i)^=0x15;
*(dataxxxtemp+i)+=0x1;
*(dataxxxtemp+i)^=0x34;
*(dataxxxtemp+i)^=0x7a。
It should be noted that the number of instructions in the random algorithm encryption is also random. After decryption is completed, the text information which is finally required to be displayed by the control can be obtained, and finally the text is displayed. Wherein, then we call the interface SetText provided by the control to set the text information, SetText (dataxxtemp).
After decryption, namely display is completed, temporary data of the temporary variables needs to be cleared next, and data leakage is prevented. The contents of the variables can all be set to 0 by the system function Memset (dataxxxtemp, 0); after purging, statistics are added to the parent control for display, Parentxxx- > addchild (this, Posxxxx, Posyxxx).
The control generated by the server ensures that the address book data is stored in all places in a ciphertext information mode, the final encrypted data is decrypted until the encrypted data is displayed, and once the address book data is set and displayed to the control, the data in the temporary variable is emptied, so that the safety is improved.
Step S50: and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
In step S50, the specific decryption performed when the client receives the final encrypted data includes: creating a temporary variable of a control name and a temporary variable of a key; copying the address book data part in the encrypted data to the temporary variable of the control name, and copying the key in the encrypted data to the temporary variable of the key, so as to decrypt in the temporary variable of the control name and the temporary variable of the key; and clearing the temporary variables of the control names and the data in the temporary variables of the secret keys, thereby improving the safety of the address book data.
In order to make the solution of the present invention more intuitive and easy to understand, a complete example is described:
each time the client releases the version, the server generates a plurality of sets of control codes, and the server is also provided with the control algorithm codes. And the server extracts the corresponding algorithm version number according to the version number carried by the client updating request. For the server, only address book data is involved, and the display of the control is not involved, so the server only needs to have the corresponding address book data and the encryption algorithm. And the encryption algorithm and the decryption algorithm are reverse processes.
Taking TextViewxxx1 as an example, the specific logic is as follows:
firstly, encrypting and issuing address book data by server
1. Encrypted address book data and control distribution
First the encryption process and decryption process are the reverse processes.
Void Encrypt00010001(char*data){
For(int i=0;i<sizeof(data);i++){
*(data+i)^=0x7a;
*(data+i)^=0x34;
*(data+i)+=0x1;
*(data+i)^=0x15;
*(data+i)=(*(data+i)<<3)|(*(data+i)>>(8-3));
*(data+i)+=0x34;
*(data+i)=(*(data+i)>>4)|(*(data+i)<<(8-4));
And/encrypting each address book data.
DES.Encrypt(data,key);
And/re-encrypting the encryption information and encryption key.
With a number for each widget, the server then numbers the encryption algorithm described above as Encrypt 00010001. The server then reads the user's address book data from the database and creates a random algorithm number for each message and executes the encryption algorithm.
And the Vector < string > address book defines a communication record storage array address book.
Then, the user information uid of the user queries the database to obtain the address book information, and the address book information can be obtained by executing sqlite.
String result, that is, result data result which defines an address book and returns to the client.
Then, each information of the address book creates a data encryption and distribution control as follows:
For(int i=0;i<addressbook.size();i++)
int nRand=Rand()%TextViewxxx.size()
firstly, the number of the control is obtained, the obtaining method is that random data is generated firstly, and then the remainder of the random data on the total amount of the control is obtained, so that a number is obtained. The Rand () is an interface for the system to acquire random data; size () is the total number of controls. The obtained random data nrind can obtain a number correspondingly, and a final control number is obtained by adding the version number, for example, the version number is 0001, and the obtained number by remainder is 0001, so that the control number is 00010001.
2. And acquiring and storing the address book data of the control.
And acquiring address book [ i ] stored in a preset database.
Key ═ rand (); encrypt00010001 (Data); and encrypting the address book data by using a random algorithm corresponding to the control number, and obtaining a key of the random algorithm. Thereby obtaining the encryption information and the encryption key of the address book data.
Then, the encryption information and the encryption key are stored in the widget.
Result. apppendd (00010001); and storing the control number of the address book data.
Result. ap pend (Key); and storing the encryption Key Key.
Result. ap pend (Data); the encrypted information is stored.
The above scheme is used for encrypting each address book data in the loop.
3. Carrying out total encryption on each piece of encrypted information
After the encryption and storage are finally completed, we store the total number of one control in front of the Result data, i.e. Result is num + Result.
After the whole data is encrypted, the data security can be further ensured, and the data finally sent to the client side is totally encrypted. Encryption is accomplished, for example, by using the IDEA algorithm, i.e., Encrypt _ result. And finally obtaining the final encrypted data.
And secondly, after the client receives the final encrypted data, creating the control.
1. After the client receives the final encrypted data from the server, the client decrypts the final encrypted data, analyzes the data and creates each independent control.
Uncrypt (Encrypt _ result); decryption of the outermost layer.
2. And analyzing the encrypted information of the result and creating a control.
The total number of controls num is fetched from the result header.
For(int i=0;i<num;i++){
No=Result[i];Key=Result[i];Data=Result[i];
And obtaining the control number, the corresponding encryption key and the corresponding encryption information from the result.
View ═ new TextView + No (Data, key, posx, posy) }; and the corresponding control is created according to the control number, and the creation and display of the control are finally completed.
Second embodiment
Referring to fig. 2, in the present embodiment, a device 300 for dynamically protecting a social client address book is provided, the device 300 includes:
a receiving module 301, configured to receive an update request of a client for address book data;
a control number generation module 302, configured to obtain, in a preset database, the address book data that needs to be issued to the client based on the update request, and generate a unique control number for each address book data;
the encryption module 303 is configured to encrypt each corresponding address book data to obtain encryption information and an encryption key of each address book data;
a control generating module 304, configured to generate a control of each address book data based on the control number, the encryption information, and the encryption key respectively, and obtain final encrypted data;
a sending module 305, configured to send the final encrypted data to the client, so that when the client needs to display address book data, the client decrypts the final encrypted data and creates the control based on each control number.
As an optional implementation manner, the update request carries a user ID and an operation instruction of the client, and the apparatus further includes an operation module, configured to search, in a preset database, address book data corresponding to the user ID before the address book data of the client that needs to be issued is acquired in the preset database; based on the operation instruction, operating address book data corresponding to the user ID; wherein the operation instruction comprises any one or more of the following: deleting the data of the appointed address book; modifying the data of the appointed address book; and adding a new address book data.
As an optional implementation manner, the control number generating module 302 is specifically configured to:
and generating a control number of each control according to the version number of the client and the total amount of the address book data.
As an optional implementation manner, the encryption module 303 is specifically configured to:
encrypting each address book data by adopting a random algorithm, and respectively obtaining encrypted information and an encrypted key after each address book data is encrypted; wherein, the encryption includes any one or more of the following modes: and carrying out displacement operation on the address book data, carrying out exclusive OR operation on the address book data, carrying out addition operation on the address book data and carrying out subtraction operation on the address book data.
As an optional implementation manner, the update request carries the user ID of the client and the device ID of the client, and the encryption module 303 is specifically configured to:
respectively determining a control coordinate corresponding to each control number according to the control number of each address book data; obtaining a coordinate key of each control coordinate based on each control coordinate; obtaining a user information key of the client according to the user ID and the equipment ID; respectively obtaining an encryption key of each address book data according to the total number of the address book data, the user information key and each coordinate key; and based on the encryption key of each address book data, encrypting each address book data by adopting a TEA encryption algorithm to obtain the encryption information of each address book data.
As an optional implementation manner, the encryption module 303 is further specifically configured to:
respectively distributing weights to the key of the current control coordinate and the user information key to respectively obtain a first weight and a second weight; the first weight is the weight corresponding to the key of the current control coordinate, the second weight is the weight corresponding to the user information key, and the first weight is smaller than the second weight; based on the first weight, taking out a first key character string from a coordinate key of the current control coordinate; based on the second weight, a second key character string is taken out from the user information key; and splicing the first key character string and the second key character string to obtain the encryption key of the current address book data.
As an optional implementation manner, the control generating module 304 is specifically configured to:
generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion; respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number; respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; and encrypting the total number of the controls and all the controls to obtain the final encrypted data.
As an optional implementation manner, the control generating module 304 is further specifically configured to:
creating a temporary variable of a control name and a temporary variable of a key; the name temporary variable is used for acquiring the encryption information when the client decrypts the encrypted data; the key temporary variable is used for acquiring an encryption key when the client decrypts the encrypted data; the name temporary variable and the key temporary variable are also used for clearing data in the control name temporary variable and the key temporary variable after decryption is completed.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Third embodiment
Based on the same inventive concept, as shown in fig. 3, the present embodiment provides a social client address book dynamic protection apparatus 400, which includes a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420, where the processor 420 implements the following steps when executing the computer program 411:
receiving an update request of a client to address book data; based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data; encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
In a specific implementation process, when the processor 420 executes the computer program 411, any implementation manner in the first embodiment (or the second embodiment) may be implemented, which is not described herein again.
Fourth embodiment
Based on the same inventive concept, as shown in fig. 4, the present embodiment provides a computer-readable storage medium 500, on which a computer program 511 is stored, the computer program 511 implementing the following steps when being executed by a processor:
receiving an update request of a client to address book data; based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data; encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data; respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
In a specific implementation process, when the computer program 511 is executed by the processor, any implementation manner of the first embodiment (or the second embodiment) may be implemented, which is not described herein again.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
according to the method and the device for dynamically protecting the address book of the social client, after the update request of the client for the address book data is received, the control of the address book data is generated based on the update request, and the situation that the generation of the control is not carried out at the client is ensured; then, the data of each address book are encrypted respectively, so that one-time cracking of a virus program is avoided; because the control of each address book data is generated on the server, only after the client receives the final encrypted data, the client can decrypt the final encrypted data and create the control based on the number of each control, the data received on the client can be always stored in an encrypted form, the control is created and displayed only when displayed, and because each address book data corresponds to one control, the corresponding different controls can be used for displaying when the address book data is displayed, so that the virus program is prevented from acquiring all the address book data at the same time. Furthermore, because the generation of the control is carried out in the server and is not written and stored locally in the client, the control needs to be generated and issued by the server again after the version is updated, the dynamic property is ensured, and the situation that the address book data can be obtained after the version iteration of the virus program is avoided.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The method functions of the present invention may be stored in a computer-readable storage medium if they are implemented in the form of software function modules and sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A social client address book dynamic protection method is characterized by comprising the following steps:
receiving an update request of a client to address book data;
based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data;
encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data;
respectively and correspondingly generating a control of each address book data based on the control number, the encryption information and the encryption key, and obtaining final encryption data; wherein, specifically include: generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion; respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number; respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; encrypting the total number of the controls and all the controls to obtain the final encrypted data;
and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
2. The method according to claim 1, wherein the update request carries a user ID and an operation instruction of the client, and before the address book data of the client that needs to be issued is acquired from a preset database, the method further comprises:
searching address book data corresponding to the user ID in a preset database;
based on the operation instruction, operating address book data corresponding to the user ID;
wherein the operation instruction comprises any one or more of the following:
deleting the data of the appointed address book;
modifying the data of the appointed address book;
and adding a new address book data.
3. The method of claim 1, wherein the update request carries a version number of the client, and the generating a unique control number for each address book data comprises:
and generating a control number of each control according to the version number of the client and the total amount of the address book data.
4. The method of claim 1, wherein the encrypting each of the address book data respectively to obtain the encryption information and the encryption key of each of the address book data comprises:
encrypting each address book data by adopting a random algorithm, and respectively obtaining encrypted information and an encrypted key after each address book data is encrypted;
the method for encrypting each address book data comprises any one or more of the following steps:
and carrying out displacement operation on the address book data, carrying out exclusive OR operation on the address book data, carrying out addition operation on the address book data, and carrying out subtraction operation on the address book data.
5. The method according to claim 1, wherein the updating request carries a user ID of the client and a device ID of the client, and the encrypting each corresponding address book data to obtain the encryption information and the encryption key of each address book data respectively comprises:
respectively determining a control coordinate corresponding to each control number according to the control number of each address book data;
obtaining a coordinate key of each control coordinate based on each control coordinate;
obtaining a user information key of the client according to the user ID and the equipment ID;
respectively obtaining an encryption key of each address book data according to the total number of the address book data, the user information key and each coordinate key;
and based on the encryption key of each address book data, encrypting each address book data by adopting a TEA encryption algorithm to obtain the encryption information of each address book data.
6. The method of claim 5, wherein the obtaining the encryption key for each address book data according to the total number of the address book data, the user information key, and each coordinate key separately comprises:
respectively distributing weights to the key of the current control coordinate and the user information key to respectively obtain a first weight and a second weight; the first weight is the weight corresponding to the key of the current control coordinate, the second weight is the weight corresponding to the user information key, and the first weight is smaller than the second weight;
based on the first weight, taking out a first key character string from a coordinate key of the current control coordinate;
based on the second weight, a second key character string is taken out from the user information key;
and splicing the first key character string and the second key character string to obtain the encryption key of the current address book data.
7. A social client address book dynamic protection device is characterized by comprising:
the receiving module is used for receiving an update request of a client to address book data;
the control number generation module is used for acquiring the address book data needing to be issued to the client from a preset database based on the updating request and generating a unique control number for each address book data;
the encryption module is used for encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data;
the control generating module is used for respectively generating a control of each address book data correspondingly based on the control number, the encryption information and the encryption key, and obtaining final encryption data; the control generation module is specifically configured to: generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion; respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number; respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; encrypting the total number of the controls and all the controls to obtain the final encrypted data;
and the sending module is used for sending the final encrypted data to the client so as to decrypt the final encrypted data and create the controls based on the control numbers when the client needs to display address book data.
8. A social client address book dynamic protection device, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs configured to be executed by one or more processors comprise instructions for:
receiving an update request of a client to address book data;
based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data;
encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data;
respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; wherein, specifically include: generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion; respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number; respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; encrypting the total number of the controls and all the controls to obtain the final encrypted data;
and sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of:
receiving an update request of a client to address book data;
based on the updating request, acquiring the address book data needing to be issued to the client from a preset database, and generating a unique control number for each address book data;
encrypting each corresponding address book data respectively to obtain encryption information and an encryption key of each address book data;
respectively generating a control of each address book data on the basis of the control number, the encryption information and the encryption key, and acquiring final encryption data; wherein, specifically include: generating a control according to a preset control type; wherein the control comprises a property portion and a decryption portion; respectively matching the control number corresponding to each address book data to a plurality of controls, wherein each control corresponds to one control number; respectively storing the encryption information and the encryption key corresponding to each control number to the attribute part of each control; encrypting the total number of the controls and all the controls to obtain the final encrypted data
And sending the final encrypted data to the client so that the client decrypts the final encrypted data and creates the control based on each control number when the client needs to display address book data.
CN201910584985.XA 2019-07-01 2019-07-01 Social client address book dynamic protection method and device Active CN110166493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910584985.XA CN110166493B (en) 2019-07-01 2019-07-01 Social client address book dynamic protection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910584985.XA CN110166493B (en) 2019-07-01 2019-07-01 Social client address book dynamic protection method and device

Publications (2)

Publication Number Publication Date
CN110166493A CN110166493A (en) 2019-08-23
CN110166493B true CN110166493B (en) 2021-10-15

Family

ID=67637357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910584985.XA Active CN110166493B (en) 2019-07-01 2019-07-01 Social client address book dynamic protection method and device

Country Status (1)

Country Link
CN (1) CN110166493B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
CN106357866A (en) * 2016-09-27 2017-01-25 维沃移动通信有限公司 Contact list management method and mobile intelligent terminal
CN108133139A (en) * 2017-11-28 2018-06-08 西安交通大学 A kind of Android malicious application detecting system compared based on more running environment behaviors

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180019984A1 (en) * 2014-03-31 2018-01-18 Monticello Enterprises LLC System and method for providing a credential management api
EP3602445A4 (en) * 2017-03-19 2020-12-02 Tokenid, Inc. Apparatus and method for payment authorization and authentication based tokenization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
CN106357866A (en) * 2016-09-27 2017-01-25 维沃移动通信有限公司 Contact list management method and mobile intelligent terminal
CN108133139A (en) * 2017-11-28 2018-06-08 西安交通大学 A kind of Android malicious application detecting system compared based on more running environment behaviors

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《动态创建ASP.NET服务器控件解析》;卢成均;《计算机与现代化》;20070731;全文 *

Also Published As

Publication number Publication date
CN110166493A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
US11372980B2 (en) Blockchains for software component vulnerability databases
JP6208586B2 (en) Searchable cryptographic processing system and searchable cryptographic processing method
JP5314016B2 (en) Information processing apparatus, encryption key management method, computer program, and integrated circuit
CN110110163A (en) Safe substring search is with filtering enciphered data
CN106506159A (en) Encryption method and equipment for key safety
WO2016053729A1 (en) Method and system for secure management of computer applications
US20170099144A1 (en) Embedded encryption platform comprising an algorithmically flexible multiple parameter encryption system
CN101443774A (en) Optimized integrity verification procedures
JPH11143780A (en) Method and device for managing secret information in database
CN107040520B (en) Cloud computing data sharing system and method
US11210404B2 (en) Blockchain-based state verifications of software component vulnerability database for software products
CN103853943B (en) program protection method and device
CN107103214A (en) A kind of application program anti-debug method and device applied to android system
CN111091381B (en) Hardware wallet and management method thereof
CN110188545B (en) Data encryption method and device based on chained database
CN108170753A (en) A kind of method of Key-Value data base encryptions and Safety query in shared cloud
US9177123B1 (en) Detecting illegitimate code generators
JP7331714B2 (en) Information processing device, information processing method and program
CN110166493B (en) Social client address book dynamic protection method and device
Lashkami et al. A blockchain based framework for complete secure data outsourcing with malicious behavior prevention
CN113434535B (en) Data processing method, communication system, device, product and storage medium
CN111881474B (en) Private key management method and device based on trusted computing environment
Heinl et al. AntiPatterns regarding the application of cryptographic primitives by the example of ransomware
CN110830252B (en) Data encryption method, device, equipment and storage medium
CN103795547A (en) User data encryption method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant