CN115664847A - User information safe storage method of internet education platform - Google Patents
User information safe storage method of internet education platform Download PDFInfo
- Publication number
- CN115664847A CN115664847A CN202211573642.1A CN202211573642A CN115664847A CN 115664847 A CN115664847 A CN 115664847A CN 202211573642 A CN202211573642 A CN 202211573642A CN 115664847 A CN115664847 A CN 115664847A
- Authority
- CN
- China
- Prior art keywords
- vertex
- encrypted
- plaintext
- bipartite graph
- sequence
- 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.)
- Granted
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
The invention relates to the technical field of data encryption storage, in particular to a user information safe storage method of an internet education platform, which comprises the following steps: acquiring a plaintext sequence according to user information, and constructing an initial encryption bipartite graph as a shared key between an encryption terminal and a decryption terminal; and carrying out maximum weight matching on the encrypted bipartite graph, encrypting the plaintext according to the obtained corresponding relation of the vertexes, and adjusting the weight of the edges in the encrypted bipartite graph according to the data rule of the plaintext in the encrypted plaintext sequence and the data rule of the ciphertext to realize dynamic updating of the shared key in the encryption process. The initial encrypted bipartite graph is complex, the key space is large, and brute force cracking attack can be resisted; the invention dynamically updates the encrypted bipartite graph in the encryption process, destroys the original data rule in the plaintext sequence, makes the ciphertext sequence more complex and can resist the attack of statistical analysis.
Description
Technical Field
The invention relates to the technical field of data encryption storage, in particular to a user information safe storage method of an internet education platform.
Background
With the rapid development of the internet education platform, the online learning proportion of users is higher and higher. In order to provide better services for users, internet education platforms need to store user information, such as basic information filled in when users register, user history learning records, course purchase records, and the like.
Basic information filled in during user registration, user history learning records, course purchasing records and the like contain privacy information of the user, and in order to prevent the privacy of the user from being leaked, the user information needs to be encrypted to realize safe storage of the user information.
In the existing encryption method such as AES and the like, a key is fixed in the encryption process, and a fixed key is used for encrypting all data, so that the data rule of the original data may be retained in a ciphertext, and an attacker may analyze the data rule in the ciphertext to crack the ciphertext and steal the user privacy information.
Disclosure of Invention
The invention provides a user information safe storage method of an internet education platform, which aims to solve the existing problems.
The invention relates to a user information safe storage method of an internet education platform, which adopts the following technical scheme:
one embodiment of the invention provides a user information safe storage method of an internet education platform, which comprises the following steps:
s1: acquiring user information of an internet education platform, and acquiring a plaintext sequence according to the user information; constructing an initial bipartite graph, and obtaining a weight of each edge in the initial bipartite graph according to an encryption key to obtain an initial encryption bipartite graph;
s2: constructing a first counter of 0 and a second counter of 0 for each vertex in the right subset of the encrypted bipartite graph, and constructing an empty encrypted plaintext sequence;
s3: performing maximum weight matching on the encrypted bipartite graph to obtain the corresponding relation between each vertex in the left subset and each vertex in the right subset of the encrypted bipartite graph;
s4: sequentially taking each plaintext in the plaintext sequence as a plaintext to be encrypted, and encrypting the plaintext to be encrypted, wherein the encrypting process comprises the following steps: searching a vertex in the right subset corresponding to the vertex in the left subset with the same value as the plaintext to be encrypted in the encrypted bipartite graph to serve as an encrypted vertex of the plaintext to be encrypted, and taking the value of the encrypted vertex as a ciphertext of the plaintext to be encrypted; adding one to the first counter of the encrypted vertex, setting the second counter of the encrypted vertex to 0, and adding one to the second counters of the rest vertexes in the right subset; adding a plaintext to be encrypted into the encrypted plaintext sequence;
s5: repeating S4 until the value of the first counter or the second counter with the vertex in the right subset of the encrypted bipartite graph is larger than a third preset threshold value, stopping iteration, taking the vertex with the value of the first counter or the second counter larger than the third preset threshold value as the first vertex value, and adjusting the weight of the edge in the encrypted bipartite graph according to the frequency of the value of the vertex connected with the first vertex in the encrypted bipartite graph in the encrypted plaintext sequence to obtain a new encrypted bipartite graph;
s6: repeating the steps S3-S5 until each plaintext in the plaintext sequence is encrypted, stopping iteration, and forming all the ciphertexts into a ciphertext sequence; and storing the ciphertext sequence.
Preferably, the obtaining of the plaintext sequence according to the user information includes the steps of:
serializing user information to obtain a binary sequence; the binary sequence is divided into a plurality of binary strings with the length being a first preset length, each binary string is converted into a decimal number to serve as a plaintext, and all the plaintext forms a plaintext sequence.
Preferably, the constructing the initial bipartite graph includes the steps of:
recording the first preset length as k; constructing a bipartite graph, a left subset of which containsA vertex, the right subset includingAnd the degree of each vertex of the bipartite graph is a second preset value, and the bipartite graph is used as an initial bipartite graph.
Preferably, the obtaining the weight of each edge in the initial bipartite graph according to the encryption key includes the steps of:
sequencing all edges in the initial bipartite graph according to the value of the vertex in the left subset and the value of the vertex in the right subset corresponding to each edge to obtain an edge sequence; and acquiring a chaotic sequence by utilizing a chaotic mapping method according to the encryption key, and sequentially taking elements in the chaotic sequence as the weight of each edge in the edge sequence.
Preferably, the adjusting the weight of the edge in the encrypted bipartite graph according to the frequency of the value of the vertex connected with the first vertex in the encrypted bipartite graph in the encrypted plaintext sequence to obtain a new encrypted bipartite graph includes the steps of:
taking a vertex corresponding to the first vertex as a second vertex, taking a vertex connected with the first vertex in the encrypted bipartite graph as a candidate second vertex, and obtaining the frequency count of the value of each candidate second vertex in the encrypted plaintext sequence as the frequency count of each candidate second vertex;
when the value of the first counter of the first vertex is larger than a third preset threshold value, obtaining the adjusted edge weight of the first vertex and the second vertex according to the frequency of each candidate second vertex, and setting the first counter of the first vertex to be 0; when the value of the second counter of the first vertex is larger than a third preset threshold value, obtaining the adjusted edge weight value of the first vertex and each candidate second vertex according to the frequency number of each candidate second vertex, and setting the second counter of the first vertex to be 0;
and acquiring a new encrypted bipartite graph according to the adjusted edge weight.
Preferably, the expression of the edge weight after the adjustment of the first vertex and the second vertex is:
whereinThe edge weight values after the adjustment of the first vertex and the second vertex;adjusting the edge weight value before the first vertex and the second vertex are adjusted;frequency of the second vertex;is a firstFrequency count of the candidate second vertices;the number of the candidate second vertexes is;as a function of the maximum value.
Preferably, the expression of the adjusted edge weight of the first vertex and each candidate second vertex is:
whereinIs the first vertex and the second vertexThe edge weight value of the candidate second vertex after adjustment;is the first vertex and the second vertexThe edge weight value of the candidate second vertex before adjustment;first, theThe frequency of the candidate second vertices.
The technical scheme of the invention has the beneficial effects that:
1. according to the invention, the initial encryption bipartite graph is constructed as the shared key between the encryption terminal and the decryption terminal, the complexity of the initial encryption bipartite graph is high, namely the key space is large, an attacker is difficult to guess the initial bipartite graph appointed by the encryption terminal and the decryption terminal, brute force attack can be resisted, and the safety of user information storage is ensured.
2. In the existing encryption method, a key is fixed in the encryption process, and all data are encrypted by adopting a fixed key, so that the data rule of original data can be retained in a ciphertext, and an attacker can analyze the data rule in the ciphertext in a statistical manner to crack the ciphertext and steal user information. The invention carries out maximum weight matching on the encrypted bipartite graph, carries out plaintext encryption according to the obtained corresponding relation of vertexes, and adjusts the weight of the sides in the encrypted bipartite graph according to the data rule of plaintext in the encrypted plaintext sequence and the data rule of ciphertext to realize dynamic update of a shared key in the encryption process, so that the one-to-one corresponding relation between the plaintext and the ciphertext obtained by using the maximum weight matching on the encrypted bipartite graph is dynamically changed, thereby the same plaintext can be encrypted into different ciphertexts, different plaintexts can be encrypted into the same ciphertext, and the balance of all ciphertexts is ensured as much as possible by adjusting the weight of the sides, so that the data rule of the plaintext sequence is destroyed in the finally obtained ciphertext sequence, the complexity of the ciphertext is increased, and the statistical analysis attack can be resisted. The security of the user information is increased.
3. The invention adjusts the weight of the sides in the encrypted bipartite graph according to the ciphertext obtained by encryption, so that the ciphertext has a good avalanche effect, if a plaintext in a plaintext sequence changes, the corresponding ciphertext can also change, the weight adjustment of the sides in the encrypted bipartite graph is different, and the one-to-one correspondence between the plaintext and the ciphertext is further obtained to change, so that the encryption result of each plaintext after the plaintext in the plaintext sequence can possibly change, the complexity of the ciphertext is further increased, the ciphertext can resist statistical analysis attack, and the safety of user information storage of an internet education platform is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart illustrating steps of a method for securely storing user information of an Internet education platform according to the present invention;
fig. 2 is an initial encrypted bipartite graph of a user information secure storage method of an internet education platform according to the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a user information security storage method of an internet education platform according to the present invention, and the specific implementation, structure, features and effects thereof with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the user information secure storage method of the internet education platform provided by the present invention in detail with reference to the accompanying drawings.
Referring to fig. 1, a method for securely storing user information of an internet education platform according to an embodiment of the present invention is shown, the method including the steps of:
and S001, acquiring user information of the internet education platform, and acquiring a plaintext sequence according to the user information.
The Internet education platform collects user information in the using process of a user, such as basic information of the user, which is filled when the user registers an account number of the Internet education platform, historical learning records of the user on the Internet education platform, and records of course purchasing of the user on the Internet education platform.
It should be noted that the types of data, such as the basic information of the user, the historical learning record of the user on the internet education platform, and the course purchase record of the user on the internet education platform, which are filled when the user registers the account of the internet education platform, are different, may include various types such as characters, numbers, letters, and the like, and it is difficult to directly encrypt all data by using an encryption method. And any type of data needs to be converted into a binary form for storage or transmission, so that the user information is converted into the binary form, the formats of all data are unified, and all data in the unified format are encrypted together.
In this embodiment, the user information is serialized and converted into a binary format, so as to obtain a binary sequence. To facilitate subsequent encryption, the binary sequence is divided into a plurality of lengthsEach binary string is converted to a decimal number. The decimal number is a plaintext and all the plaintext constitutes a sequence of plaintext. In this exampleIs a first preset length and is a second preset length,in other embodiments, the implementer may set up as desiredThe value of (c).
It should be noted that, in the process of segmenting the binary sequence, if the length of the last binary string obtained is insufficient, the length of the last binary string obtained is not enoughThen supplement thereafterTo make it reach the length. Record the length of the binary sequence as。
Thus, a plaintext is obtained. The plaintext is encrypted by the production and waste unit.
S002, constructing an initial bipartite graph, and obtaining a weight of each edge in the initial bipartite graph according to the encryption key to obtain the initial encryption bipartite graph.
It should be noted that the encryption idea of this embodiment is to use a bipartite graph as an encryption key, obtain a ciphertext matched with a plaintext through maximum weight matching of the bipartite graph, and dynamically adjust an edge weight of the bipartite graph according to the obtained ciphertext to achieve dynamic updating of the bipartite graph, so that a maximum weight matching result is updated, further the obtained ciphertext is more complex, and security of ciphertext data is increased. Therefore, an initial encrypted bipartite graph needs to be constructed. The bipartite graph is a special undirected graph, all vertexes of the bipartite graph can be divided into two independent subsets, no edge exists between all vertexes in each subset, and two vertexes, to which each edge depends, in the bipartite graph belong to the two independent subsets respectively. These two independent subsets are referred to as the left subset and the right subset, respectively, in this embodiment. Each vertex in the left subset is used to represent plaintext and each vertex in the right subset is used to represent ciphertext.
Since the plaintext obtained in step S001 is composed of the length ofIs converted into a binary string of lengthIs a binary string ofThe variety of the possibility, corresponding plaintext value also hasThe possible value set of the plaintext is. In order to make each plaintext encryptable according to the bipartite graph, it is required that the left subset includesAnd each vertex corresponds to a possible plaintext value. In order to facilitate subsequent decryption, the value ranges of the ciphertext and the plaintext are required to be consistent, and the right subset also includesA vertex corresponding to eachOne value of (1).
In order to increase the complexity of the ciphertext, the degree of each vertex in the bipartite graph needs to be as large as possible, but if the degree of each vertex is very large, the longer the time that needs to be consumed in subsequent maximum weight matching on the bipartite graph, the lower the efficiency. Therefore, it is necessary to set an appropriate value for the degree of the apex.
In this embodiment, the left subset of the bipartite graph isThe right subset isDegree of each vertex isI.e. each vertex in the left and right subsets of the bipartite graphEdges exist among the vertices, each vertex in the right subset and the left subset of the bipartite graphThere are edges between the vertices. Then the bipartite graph satisfying the above conditions hasOne is randomly acquired as the initial bipartite graph, which is a possible case. In the present embodiment, it is preferred that,is a second preset value, and is,whereinIs shown inAndselecting a smaller number asIn order to avoid that the value of the degree of setting exceeds the number of vertices in the subset, resulting in the bipartite graph not being present. In other embodiments, the implementer may set up the settings as desiredThe value of (c) is, it should be noted that,the number of vertices in all subsets needs to be less than or equal to.
It should be noted that the initial bipartite graph can be regarded as a key for encrypting the user information, and is set in advance by the internet education platform encryption server, and the initial bipartite graph is managed separately and is not stored together with the ciphertext. Since the initial bipartite graph hasThe complexity is high, and an attacker can not guess the initial bipartite graph agreed by the encryption terminal and the decryption terminal easily, so that brute force attack can be resisted.
The initial bipartite graph is an unweighted bipartite graph, and each vertex in the left subset of the initial bipartite graph corresponds to each vertex in the right subsetA vertex, each vertex in the right subset corresponding to the left subsetAnd in order to ensure that each vertex in the left subset and each vertex in the right subset are in dynamic one-to-one correspondence in the encryption process, a weight value can be randomly set for each edge in the initial bipartite graph so that the initial bipartite graph becomes a weighted bipartite graph.
In one embodiment, the internet education platform encryption server may set a weight of each edge in the initial bipartite graph in advance, and take the obtained weighted bipartite graph as the initial encryption bipartite graph.
In another embodiment, the internet education platform encryption server encrypts data according to an encryption key each time the data is encrypted or decryptedAnd randomly setting a weight value for each edge in the initial bipartite graph to obtain the initial encrypted bipartite graph. Randomly setting a weight for each edge in the initial bipartite graphThe method of values is as follows:
and if the edges correspond to the same vertex in the left subset, sequencing the edges from small to large according to the values of the vertices in the right subset corresponding to the edges, and finally obtaining an edge sequence. The number of elements in the edge sequence isAnd (4) respectively. Using the encryption key agreed by the encryption side and the decryption side in advanceObtaining a length ofIn a chaotic sequence of which each element has a range ofObtaining the first in the chaotic sequenceTo the firstAnd taking the elements as the weight of each edge in the edge sequence in turn. Thus, a weighted bipartite graph is obtained, which is used as the initial encrypted bipartite graph.
It should be noted that the chaotic sequence is very chaotic, and it is difficult for an attacker to guess the chaotic sequence, and thus it is difficult to obtain an initial encrypted bipartite graph. Encryption keyManaged separately and not stored with the ciphertext.
Thus, an initial encrypted bipartite graph is obtained.An initial encrypted bipartite graph of time is shown in fig. 2.
And S003, encrypting the plaintext sequence.
It should be noted that, in the initial encrypted bipartite graph, the value of each vertex in the left subset is used to represent plaintext, and the value of each vertex in the right subset is used to represent ciphertext, so that in the encryption process, the plaintext and the ciphertext uniquely correspond to each other, the maximum weight matching may be performed on the initial encrypted bipartite graph, and the one-to-one correspondence relationship between the plaintext and the ciphertext is obtained. However, if the one-to-one correspondence relationship between the plaintext and the ciphertext remains unchanged during the whole encryption process, the same plaintext in the plaintext sequence may be encrypted into the same ciphertext, so that the finally obtained ciphertext sequence still retains the data rule in the plaintext sequence, and an attacker may perform statistical analysis attack by using the data rule to break the plaintext. Therefore, the one-to-one correspondence relationship between the plaintext and the ciphertext needs to be adjusted in the encryption process, the one-to-one correspondence relationship between the plaintext and the ciphertext depends on the weight of each edge in the encrypted bipartite graph, if the weight is changed, the maximum weight matching results are different, and the obtained correspondence relationship between the plaintext and the ciphertext is different. Therefore, the weight of the edges in the encrypted bipartite graph can be dynamically adjusted according to the rule of data in the encryption process, so that the one-to-one corresponding relation between the plaintext and the ciphertext is dynamically changed, the data rule of the plaintext sequence is destroyed in the finally obtained ciphertext sequence, the complexity of the ciphertext is increased, and the effect of resisting statistical analysis attack is achieved.
In this embodiment, the process of encrypting each plaintext in the plaintext sequence is as follows:
1. and constructing a first counter and a second counter for each vertex in the right subset of the encrypted bipartite graph, wherein the first counter is used for recording the times of using each vertex in the right subset as a ciphertext, and the second counter is used for recording the times of continuously unmatching each vertex in the right subset. The initial state of both the first counter and the second counter is 0. An empty encrypted plaintext sequence is constructed.
2. By usingAnd performing maximum weight matching on the encrypted bipartite graph by using a matching algorithm to obtain the one-to-one correspondence between each vertex in the left subset and each vertex in the right subset of the encrypted bipartite graph.
3. Sequentially taking each plaintext in the plaintext sequence as a plaintext to be encrypted, and encrypting the plaintext to be encrypted, wherein the encrypting process comprises the following steps: and searching a vertex in the left subset of the encrypted bipartite graph, which has the same value as the plaintext to be encrypted, acquiring a vertex in the right subset matched with the vertex, using the vertex as the encrypted vertex of the plaintext to be encrypted, and using the value of the encrypted vertex as the ciphertext of the plaintext to be encrypted. And adding one to the first counter of the encrypted vertex, setting the second counter of the encrypted vertex to 0, and adding one to the second counters of the rest vertexes in the right subset. Adding the plaintext to be encrypted to the encrypted plaintext sequence.
4. Repeating the step 3 until the value of the first counter or the second counter of the vertex existing in the right subset of the encrypted bipartite graph is larger than a third preset threshold valueStopping iteration, and at this time, showing that the obtained ciphertext is unevenly distributed and has a strong data rule, at this time, the first counter or the second counter needs to be larger than a third preset thresholdThe weight of the edge corresponding to the vertex is adjusted, so that the distribution of the ciphertext data is balanced as much as possible after adjustment, and the original data rule of the plaintext is destroyed.
In this embodiment, the value of the first counter or the second counter is greater than a third preset thresholdThe specific method for adjusting the weight of the edge corresponding to the vertex is as follows:
the value of the first counter or the second counter is larger than a third preset threshold valueThe vertex of (2) is taken as a first vertex, the vertex corresponding to the first vertex in the left subset is taken as a second vertex, and the vertex connected with the first vertex in the left subset of the encrypted bipartite graphEach vertex (including the second vertex) is taken as a candidate second vertex, and the frequency of the occurrence of the value of each candidate second vertex in the encrypted plaintext sequence is countedAs the frequency count for each candidate second vertex. The frequency number of the second vertex is recorded as。
When the value of the first counter of the first vertex is larger than a third preset threshold valueIn the meantime, the weight of the edge between the first vertex and the second vertex (i.e. the weight of the edge between the first vertex and the second vertex) is recorded asIf the edge weight value after the adjustment of the first vertex and the second vertex is not the same as the edge weight value after the adjustment of the second vertexComprises the following steps:
whereinThe edge weight values after the adjustment of the first vertex and the second vertex;adjusting the edge weight value before the first vertex and the second vertex are adjusted;frequency of the second vertex;is a firstFrequency count of candidate second vertices;the number of the candidate second vertexes is set;the frequency numbers of all candidate second vertexes are summed;is a function of the maximum value of the signal,is shown inAndthe larger number is selected in order to prevent the edge weight from being smaller than。
When the value of the second counter of the first vertex is larger than a third preset threshold valueThen, the edge weights of the first vertex and each candidate second vertex are respectively recorded asThe first vertex and each candidate second vertex are adjustedThe side weight is:
whereinIs the first vertex and the second vertexThe edge weight value of the candidate second vertex after adjustment;is the first vertex and the second vertexThe edge weight value before the adjustment of the candidate second vertex;first, theFrequency count of the candidate second vertices;is the sum of the frequency counts of all candidate second vertices.
Therefore, the updating of the weight of the edge corresponding to the first vertex is realized, the updated encrypted bipartite graph is obtained, and at the moment, if the value of the first counter of the first vertex is greater than the third preset threshold valueThen set the first counter of the first vertex toIf the value of the second counter of the first vertex is larger than a third preset threshold valueSetting the second counter of the first vertex to be。
5. And according to the updated encrypted bipartite graph, repeating the steps 2-4 to encrypt the plaintext which is not encrypted in the plaintext sequence until all the plaintext in the plaintext sequence is encrypted. And all the obtained ciphertexts form a cipher text sequence.
Therefore, the encryption of the plaintext is realized, and the ciphertext sequence is obtained. It should be noted that, in the embodiment, the weight values of the edges in the encrypted bipartite graph are dynamically adjusted by combining the data rule in the encryption process, so that the one-to-one correspondence relationship between the plaintext and the ciphertext obtained by using the maximum weight matching for the encrypted bipartite graph is dynamically changed, so that the same plaintext may be encrypted into different ciphertexts, and the different plaintext may be encrypted into the same ciphertext, and the balance of all ciphertexts is ensured as much as possible by adjusting the weight values of the edges, so that the data rule of the plaintext sequence is destroyed in the finally obtained ciphertext sequence, and the complexity of the ciphertext is increased; in this embodiment, the weight of the edge in the encrypted bipartite graph is adjusted according to the ciphertext obtained through encryption, so that the ciphertext has a very good avalanche effect, if a plaintext in a plaintext sequence changes, the corresponding ciphertext of the plaintext also changes, so that the weight of the edge in the encrypted bipartite graph is adjusted differently, and further, the one-to-one correspondence between the plaintext and the ciphertext changes, so that the encryption result of each plaintext after the plaintext in the plaintext sequence may change, the complexity of the ciphertext is further increased, and the ciphertext can resist statistical analysis attack.
And S004, storing the ciphertext sequence.
The length of the ciphertext sequence and the binary sequence obtained in step S001And storing the information to an internet education platform user information storage server. It should be noted that the initial bipartite graph and the encryption keyManaged separately and not stored with the ciphertext sequence.
The process of decrypting the user information is specifically as follows:
the initial encrypted bipartite graph is obtained by the method in step S002 according to the initial bipartite graph and the encryption key.
The method for decrypting the ciphertext sequence according to the initial encryption bipartite graph comprises the following steps:
1. a first counter and a second counter are constructed for each vertex in the right subset of the encrypted bipartite graph. The initial state of both the first counter and the second counter is 0. An empty encrypted plaintext sequence is constructed.
2. By usingAnd performing maximum weight matching on the encrypted bipartite graph by using a matching algorithm to obtain the one-to-one correspondence between each vertex in the left subset and each vertex in the right subset of the encrypted bipartite graph.
3. And sequentially using each ciphertext in the ciphertext sequence as a ciphertext to be decrypted, decrypting the ciphertext to be decrypted, wherein the decrypting comprises the following steps: and searching vertexes, which have the same value as the ciphertext to be decrypted, in the right subset of the encrypted bipartite graph to be used as decryption vertexes, and acquiring values of vertexes, which are matched with the decryption vertexes, in the left subset to be used as the plaintext of the ciphertext to be decrypted. And increasing one by the first counter of the decryption vertex, setting the second counter of the decryption vertex to be 0, and increasing one by the second counters of the rest vertexes in the right subset. Adding the obtained plaintext to the encrypted plaintext sequence.
4. Repeating the step 3 until the value of the first counter or the second counter of the vertex existing in the right subset of the encrypted bipartite graph is larger than a third preset threshold valueStopping iteration, and using the method in step S003 to make the first counter or the second counter greater than a third preset thresholdThe weight of the edge corresponding to the vertex is adjusted to obtain the updated encrypted bipartite graph, and at the moment, if the value of the first counter is greater than a third preset threshold valueSetting the first counter of the corresponding vertex to beIf the value of the second counter is larger than a third preset threshold valueSetting the second counter of the corresponding vertex to be。
5. And (4) according to the updated encrypted bipartite graph, repeating the step 2-4 to decrypt the ciphertext which is not decrypted in the ciphertext sequence until all the ciphertexts in the ciphertext sequence are decrypted. All the plaintext obtained constitutes a plaintext sequence.
Each element in the plaintext sequence is a decimal number, each decimal number is converted into an eight-bit binary number, all the eight-bit binary numbers are spliced into a binary sequence, and before the binary sequence is obtainedBit and forward binary sequenceAnd performing deserialization on the bits to obtain user information of the Internet education platform.
Through the steps, the safe storage of the user information of the internet education platform is realized.
According to the embodiment of the invention, a plaintext sequence is obtained according to user information, and an initial encryption bipartite graph is constructed to be used as a shared key between an encryption terminal and a decryption terminal; and carrying out maximum weight matching on the encrypted bipartite graph, encrypting the plaintext according to the obtained corresponding relation of the vertexes, and adjusting the weight of the edges in the encrypted bipartite graph according to the data rule of the plaintext in the encrypted plaintext sequence and the data rule of the ciphertext to realize dynamic updating of the shared key in the encryption process. The initial encrypted bipartite graph is complex, the key space is large, and brute force cracking attack can be resisted; the invention dynamically updates the encrypted bipartite graph according to the encrypted plaintext and the obtained ciphertext in the encryption process, destroys the original data rule in a plaintext sequence, simultaneously enables the ciphertext to have a very good avalanche effect, increases the complexity of the ciphertext sequence, can resist statistical analysis attack, and ensures the safety of user information storage.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (7)
1. A user information safe storage method of an internet education platform is characterized by comprising the following steps:
s1: acquiring user information of an internet education platform, and acquiring a plaintext sequence according to the user information; constructing an initial bipartite graph, and obtaining a weight of each edge in the initial bipartite graph according to an encryption key to obtain an initial encryption bipartite graph;
s2: constructing a first counter of 0 and a second counter of 0 for each vertex in the right subset of the encrypted bipartite graph, and constructing an empty encrypted plaintext sequence;
s3: performing maximum weight matching on the encrypted bipartite graph to obtain a corresponding relation between each vertex in the left subset and each vertex in the right subset of the encrypted bipartite graph;
s4: sequentially taking each plaintext in the plaintext sequence as a plaintext to be encrypted, and encrypting the plaintext to be encrypted, wherein the encrypting process comprises the following steps: searching a vertex in the right subset corresponding to the vertex in the left subset with the same value as the plaintext to be encrypted in the encrypted bipartite graph to serve as an encrypted vertex of the plaintext to be encrypted, and taking the value of the encrypted vertex as a ciphertext of the plaintext to be encrypted; adding one to the first counter of the encrypted vertex, setting the second counter of the encrypted vertex to 0, and adding one to the second counters of the rest vertexes in the right subset; adding a plaintext to be encrypted into the encrypted plaintext sequence;
s5: repeating S4 until the value of the first counter or the second counter with the vertex in the right subset of the encrypted bipartite graph is larger than a third preset threshold value, stopping iteration, taking the vertex of which the value of the first counter or the second counter is larger than the third preset threshold value as a first vertex, and adjusting the weight of the edge in the encrypted bipartite graph according to the frequency of the value of the vertex connected with the first vertex in the encrypted bipartite graph in the encrypted plaintext sequence to obtain a new encrypted bipartite graph;
s6: repeating the steps S3-S5 until each plaintext in the plaintext sequence is encrypted, stopping iteration, and forming all the ciphertexts into a ciphertext sequence; and storing the ciphertext sequence.
2. The method for securely storing user information of an internet education platform as claimed in claim 1, wherein said obtaining a plaintext sequence according to the user information comprises the steps of:
serializing user information to obtain a binary sequence; the binary sequence is divided into a plurality of binary strings with the length of a first preset length, each binary string is converted into a decimal number to serve as a plaintext, and all the plaintext forms a plaintext sequence.
3. The method for securely storing user information of an internet education platform as claimed in claim 1, wherein the constructing of the initial bipartite graph includes the steps of:
4. The method for securely storing user information of an internet education platform according to claim 1, wherein the obtaining of the weight of each edge in the initial bipartite graph according to the encryption key comprises the steps of:
sequencing all edges in the initial bipartite graph according to the value of the vertex in the left subset and the value of the vertex in the right subset corresponding to each edge to obtain an edge sequence; and acquiring a chaotic sequence by using a chaotic mapping method according to the encryption key, and sequentially using elements in the chaotic sequence as the weight of each edge in the edge sequence.
5. The method for securely storing user information of an internet education platform according to claim 1, wherein the method for adjusting the weight of the edge in the encrypted bipartite graph according to the frequency of the value of the vertex connected to the first vertex in the encrypted bipartite graph in the encrypted plaintext sequence to obtain a new encrypted bipartite graph comprises the steps of:
taking a vertex corresponding to the first vertex as a second vertex, taking a vertex connected with the first vertex in the encrypted bipartite graph as a candidate second vertex, and obtaining the frequency count of the value of each candidate second vertex in the encrypted plaintext sequence as the frequency count of each candidate second vertex;
when the value of the first counter of the first vertex is larger than a third preset threshold value, obtaining the adjusted edge weight of the first vertex and the second vertex according to the frequency of each candidate second vertex, and setting the first counter of the first vertex to be 0; when the value of the second counter of the first vertex is larger than a third preset threshold value, obtaining the adjusted edge weight value of the first vertex and each candidate second vertex according to the frequency of each candidate second vertex, and setting the second counter of the first vertex to be 0;
and acquiring a new encrypted bipartite graph according to the adjusted edge weight value.
6. The method for securely storing user information of an internet education platform according to claim 5, wherein the expression of the edge weights adjusted by the first vertex and the second vertex is:
whereinThe edge weight values after the first vertex and the second vertex are adjusted;adjusting the edge weight value before the first vertex and the second vertex are adjusted;frequency count of the second vertex;is as followsFrequency count of the candidate second vertices;the number of the candidate second vertexes is;as a function of the maximum value.
7. The method as claimed in claim 5, wherein the expression of the adjusted edge weights of the first vertex and each candidate second vertex is:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211573642.1A CN115664847B (en) | 2022-12-08 | 2022-12-08 | User information safe storage method of internet education platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211573642.1A CN115664847B (en) | 2022-12-08 | 2022-12-08 | User information safe storage method of internet education platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115664847A true CN115664847A (en) | 2023-01-31 |
CN115664847B CN115664847B (en) | 2023-03-14 |
Family
ID=85017386
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211573642.1A Active CN115664847B (en) | 2022-12-08 | 2022-12-08 | User information safe storage method of internet education platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115664847B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115859341A (en) * | 2023-02-27 | 2023-03-28 | 山东水浒文化传媒有限公司 | Online file intelligent reading and amending system |
CN115994374A (en) * | 2023-03-23 | 2023-04-21 | 汶上县金源物流有限公司 | Logistics circulation sorting information management method and system |
CN116094836A (en) * | 2023-03-09 | 2023-05-09 | 深圳市网联天下科技有限公司 | Router data secure storage method and system based on symmetric encryption |
CN116720211A (en) * | 2023-08-07 | 2023-09-08 | 知心健(南京)科技有限公司 | Dynamic monitoring data security encryption method for heart rehabilitation |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114693317A (en) * | 2022-04-08 | 2022-07-01 | 重庆邮电大学 | Telecommunication fraud security federation detection method fusing homogeneous graph and bipartite graph |
CN115204888A (en) * | 2021-04-14 | 2022-10-18 | 腾讯科技(深圳)有限公司 | Target account identification method and device, storage medium and electronic equipment |
CN115276989A (en) * | 2022-09-28 | 2022-11-01 | 南通德辰智能科技有限公司 | Serialized data encryption method based on direction scrambling |
-
2022
- 2022-12-08 CN CN202211573642.1A patent/CN115664847B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115204888A (en) * | 2021-04-14 | 2022-10-18 | 腾讯科技(深圳)有限公司 | Target account identification method and device, storage medium and electronic equipment |
CN114693317A (en) * | 2022-04-08 | 2022-07-01 | 重庆邮电大学 | Telecommunication fraud security federation detection method fusing homogeneous graph and bipartite graph |
CN115276989A (en) * | 2022-09-28 | 2022-11-01 | 南通德辰智能科技有限公司 | Serialized data encryption method based on direction scrambling |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115859341A (en) * | 2023-02-27 | 2023-03-28 | 山东水浒文化传媒有限公司 | Online file intelligent reading and amending system |
CN116094836A (en) * | 2023-03-09 | 2023-05-09 | 深圳市网联天下科技有限公司 | Router data secure storage method and system based on symmetric encryption |
CN116094836B (en) * | 2023-03-09 | 2023-06-06 | 深圳市网联天下科技有限公司 | Router data secure storage method and system based on symmetric encryption |
CN115994374A (en) * | 2023-03-23 | 2023-04-21 | 汶上县金源物流有限公司 | Logistics circulation sorting information management method and system |
CN115994374B (en) * | 2023-03-23 | 2023-05-19 | 汶上县金源物流有限公司 | Logistics circulation sorting information management method and system |
CN116720211A (en) * | 2023-08-07 | 2023-09-08 | 知心健(南京)科技有限公司 | Dynamic monitoring data security encryption method for heart rehabilitation |
CN116720211B (en) * | 2023-08-07 | 2023-10-17 | 知心健(南京)科技有限公司 | Dynamic monitoring data security encryption method for heart rehabilitation |
Also Published As
Publication number | Publication date |
---|---|
CN115664847B (en) | 2023-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115664847B (en) | User information safe storage method of internet education platform | |
US10361842B2 (en) | Encryption function and decryption function generating method, encryption and decryption method and related apparatuses | |
CN110677237B (en) | File encryption method with chaos-like characteristic | |
KR102354456B1 (en) | Post-quantum asymmetric key cryptosystem with one-to-many distributed key management based on prime modulo double encapsulation | |
US10009170B2 (en) | Apparatus and method for providing Feistel-based variable length block cipher | |
CN115276989B (en) | Serialized data encryption method based on directional scrambling | |
CN107135062B (en) | Improved large file encryption method | |
US11750362B2 (en) | Private decision tree evaluation using an arithmetic circuit | |
JP2008516296A (en) | Cryptographic basic elements, error coding, and pseudorandom number improvement method using quasigroups | |
JP2009503580A (en) | Symmetric key data encryption method | |
CN107241196A (en) | Digital signature method and system based on block chain technology | |
CN115065555B (en) | Information security processing method and system | |
Kumar et al. | Intertwining logistic map and Cellular Automata based color image encryption model | |
CN116796354B (en) | Information security enhancement method for computer system | |
CN115147111A (en) | Key generation method and device, electronic device and storage medium | |
Razaq et al. | Secure communication through reliable S-box design: A proposed approach using coset graphs and matrix operations | |
CN112398646B (en) | Identity-based encryption method and system with short public parameters on ideal lattice | |
CN109787764A (en) | A kind of encryption method based on cipher key delivery equipment | |
CN111817853B (en) | Signcryption algorithm for post-quantum security | |
WO2023030316A1 (en) | Key generation and distribution method, key generation apparatus, and key management system | |
CN107493164B (en) | DES encryption method and system based on chaotic system | |
CN115834062A (en) | Enterprise data transmission encryption method for data hosting service | |
Hassan et al. | A hybrid encryption technique based on dna cryptography and steganography | |
EP3959841B1 (en) | Compression and oblivious expansion of rlwe ciphertexts | |
JP2023529690A (en) | Apparatus and method for performing statistical calculation on isomorphic ciphertext |
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 |