CN115664847A - User information safe storage method of internet education platform - Google Patents

User information safe storage method of internet education platform Download PDF

Info

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
Application number
CN202211573642.1A
Other languages
Chinese (zh)
Other versions
CN115664847B (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.)
Nanjing Academy Of Sciences University Science Park Management Co ltd
Original Assignee
Nanjing Academy Of Sciences University Science Park Management 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 Nanjing Academy Of Sciences University Science Park Management Co ltd filed Critical Nanjing Academy Of Sciences University Science Park Management Co ltd
Priority to CN202211573642.1A priority Critical patent/CN115664847B/en
Publication of CN115664847A publication Critical patent/CN115664847A/en
Application granted granted Critical
Publication of CN115664847B publication Critical patent/CN115664847B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

User information safe storage method of Internet education platform
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 contains
Figure DEST_PATH_IMAGE001
A vertex, the right subset including
Figure 80074DEST_PATH_IMAGE002
And 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:
Figure 311729DEST_PATH_IMAGE004
wherein
Figure DEST_PATH_IMAGE005
The edge weight values after the adjustment of the first vertex and the second vertex;
Figure 701253DEST_PATH_IMAGE006
adjusting the edge weight value before the first vertex and the second vertex are adjusted;
Figure DEST_PATH_IMAGE007
frequency of the second vertex;
Figure 470364DEST_PATH_IMAGE008
is a first
Figure DEST_PATH_IMAGE009
Frequency count of the candidate second vertices;
Figure 143791DEST_PATH_IMAGE010
the number of the candidate second vertexes is;
Figure DEST_PATH_IMAGE011
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:
Figure DEST_PATH_IMAGE013
wherein
Figure 902273DEST_PATH_IMAGE014
Is the first vertex and the second vertex
Figure 966044DEST_PATH_IMAGE009
The edge weight value of the candidate second vertex after adjustment;
Figure DEST_PATH_IMAGE015
is the first vertex and the second vertex
Figure 774731DEST_PATH_IMAGE009
The edge weight value of the candidate second vertex before adjustment;
Figure 240348DEST_PATH_IMAGE008
first, the
Figure 545296DEST_PATH_IMAGE009
The 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 lengths
Figure 96363DEST_PATH_IMAGE016
Each 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 example
Figure 646424DEST_PATH_IMAGE016
Is a first preset length and is a second preset length,
Figure DEST_PATH_IMAGE017
in other embodiments, the implementer may set up as desired
Figure 546640DEST_PATH_IMAGE016
The 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 enough
Figure 773222DEST_PATH_IMAGE016
Then supplement thereafter
Figure 827897DEST_PATH_IMAGE018
To make it reach the length
Figure 165338DEST_PATH_IMAGE016
. Record the length of the binary sequence as
Figure DEST_PATH_IMAGE019
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 of
Figure 917131DEST_PATH_IMAGE016
Is converted into a binary string of length
Figure 65346DEST_PATH_IMAGE016
Is a binary string of
Figure 591006DEST_PATH_IMAGE001
The variety of the possibility, corresponding plaintext value also has
Figure 732137DEST_PATH_IMAGE001
The possible value set of the plaintext is
Figure 279049DEST_PATH_IMAGE020
. In order to make each plaintext encryptable according to the bipartite graph, it is required that the left subset includes
Figure 113013DEST_PATH_IMAGE001
And 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 includes
Figure 611122DEST_PATH_IMAGE001
A vertex corresponding to each
Figure 555944DEST_PATH_IMAGE020
One 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 is
Figure 220012DEST_PATH_IMAGE020
The right subset is
Figure 959298DEST_PATH_IMAGE020
Degree of each vertex is
Figure 475861DEST_PATH_IMAGE010
I.e. each vertex in the left and right subsets of the bipartite graph
Figure 958795DEST_PATH_IMAGE010
Edges exist among the vertices, each vertex in the right subset and the left subset of the bipartite graph
Figure 745879DEST_PATH_IMAGE010
There are edges between the vertices. Then the bipartite graph satisfying the above conditions has
Figure DEST_PATH_IMAGE021
One is randomly acquired as the initial bipartite graph, which is a possible case. In the present embodiment, it is preferred that,
Figure 469116DEST_PATH_IMAGE010
is a second preset value, and is,
Figure 253401DEST_PATH_IMAGE022
wherein
Figure DEST_PATH_IMAGE023
Is shown in
Figure 867922DEST_PATH_IMAGE024
And
Figure 991736DEST_PATH_IMAGE001
selecting a smaller number as
Figure 72824DEST_PATH_IMAGE010
In 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 desired
Figure 788146DEST_PATH_IMAGE010
The value of (c) is, it should be noted that,
Figure 878462DEST_PATH_IMAGE010
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 has
Figure 873094DEST_PATH_IMAGE021
The 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 subset
Figure 859505DEST_PATH_IMAGE010
A vertex, each vertex in the right subset corresponding to the left subset
Figure 70912DEST_PATH_IMAGE010
And 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 decrypted
Figure DEST_PATH_IMAGE025
And 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 is
Figure 512389DEST_PATH_IMAGE026
And (4) respectively. Using the encryption key agreed by the encryption side and the decryption side in advance
Figure 876374DEST_PATH_IMAGE025
Obtaining a length of
Figure DEST_PATH_IMAGE027
In a chaotic sequence of which each element has a range of
Figure 613779DEST_PATH_IMAGE028
Obtaining the first in the chaotic sequence
Figure DEST_PATH_IMAGE029
To the first
Figure 876264DEST_PATH_IMAGE027
And 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 key
Figure 557650DEST_PATH_IMAGE025
Managed separately and not stored with the ciphertext.
Thus, an initial encrypted bipartite graph is obtained.
Figure 510563DEST_PATH_IMAGE030
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 using
Figure DEST_PATH_IMAGE031
And 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 value
Figure 448563DEST_PATH_IMAGE032
Stopping 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 threshold
Figure 371913DEST_PATH_IMAGE032
The 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 threshold
Figure 607722DEST_PATH_IMAGE006
The 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 value
Figure 431453DEST_PATH_IMAGE032
The 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 graph
Figure 461726DEST_PATH_IMAGE010
Each 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 counted
Figure DEST_PATH_IMAGE033
As the frequency count for each candidate second vertex. The frequency number of the second vertex is recorded as
Figure 931759DEST_PATH_IMAGE007
When the value of the first counter of the first vertex is larger than a third preset threshold value
Figure 721992DEST_PATH_IMAGE032
In 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 as
Figure 901694DEST_PATH_IMAGE006
If 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 vertex
Figure 102868DEST_PATH_IMAGE005
Comprises the following steps:
Figure DEST_PATH_IMAGE035
wherein
Figure 827241DEST_PATH_IMAGE005
The edge weight values after the adjustment of the first vertex and the second vertex;
Figure 388542DEST_PATH_IMAGE006
adjusting the edge weight value before the first vertex and the second vertex are adjusted;
Figure 701711DEST_PATH_IMAGE007
frequency of the second vertex;
Figure 558940DEST_PATH_IMAGE008
is a first
Figure 957560DEST_PATH_IMAGE009
Frequency count of candidate second vertices;
Figure 337200DEST_PATH_IMAGE010
the number of the candidate second vertexes is set;
Figure 239297DEST_PATH_IMAGE036
the frequency numbers of all candidate second vertexes are summed;
Figure 533006DEST_PATH_IMAGE011
is a function of the maximum value of the signal,
Figure DEST_PATH_IMAGE037
is shown in
Figure 730507DEST_PATH_IMAGE018
And
Figure 400654DEST_PATH_IMAGE038
the larger number is selected in order to prevent the edge weight from being smaller than
Figure 422836DEST_PATH_IMAGE018
When the value of the second counter of the first vertex is larger than a third preset threshold value
Figure 654491DEST_PATH_IMAGE032
Then, the edge weights of the first vertex and each candidate second vertex are respectively recorded as
Figure DEST_PATH_IMAGE039
The first vertex and each candidate second vertex are adjustedThe side weight is:
Figure 840753DEST_PATH_IMAGE013
wherein
Figure 298279DEST_PATH_IMAGE014
Is the first vertex and the second vertex
Figure 424236DEST_PATH_IMAGE009
The edge weight value of the candidate second vertex after adjustment;
Figure 590906DEST_PATH_IMAGE015
is the first vertex and the second vertex
Figure 920256DEST_PATH_IMAGE009
The edge weight value before the adjustment of the candidate second vertex;
Figure 433671DEST_PATH_IMAGE008
first, the
Figure 899287DEST_PATH_IMAGE009
Frequency count of the candidate second vertices;
Figure 971279DEST_PATH_IMAGE036
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 value
Figure 787926DEST_PATH_IMAGE032
Then set the first counter of the first vertex to
Figure 836522DEST_PATH_IMAGE018
If the value of the second counter of the first vertex is larger than a third preset threshold value
Figure 687803DEST_PATH_IMAGE032
Setting the second counter of the first vertex to be
Figure 930697DEST_PATH_IMAGE018
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 S001
Figure 234639DEST_PATH_IMAGE019
And storing the information to an internet education platform user information storage server. It should be noted that the initial bipartite graph and the encryption key
Figure 89856DEST_PATH_IMAGE025
Managed 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 using
Figure 795644DEST_PATH_IMAGE031
And 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 value
Figure 943860DEST_PATH_IMAGE032
Stopping iteration, and using the method in step S003 to make the first counter or the second counter greater than a third preset threshold
Figure 249945DEST_PATH_IMAGE032
The 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 value
Figure 391076DEST_PATH_IMAGE032
Setting the first counter of the corresponding vertex to be
Figure 702103DEST_PATH_IMAGE018
If the value of the second counter is larger than a third preset threshold value
Figure 270488DEST_PATH_IMAGE032
Setting the second counter of the corresponding vertex to be
Figure 55080DEST_PATH_IMAGE018
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 obtained
Figure 999902DEST_PATH_IMAGE040
Bit and forward binary sequence
Figure 696594DEST_PATH_IMAGE040
And 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:
recording the first preset length as k; constructing a bipartite graph, a left subset of which contains
Figure DEST_PATH_IMAGE002
A vertex, the right subset including
Figure DEST_PATH_IMAGE004
A vertex, the degree of each vertex of the bipartite graphAnd taking the bipartite graph as an initial bipartite graph for a second preset value.
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:
Figure DEST_PATH_IMAGE006
wherein
Figure DEST_PATH_IMAGE008
The edge weight values after the first vertex and the second vertex are adjusted;
Figure DEST_PATH_IMAGE010
adjusting the edge weight value before the first vertex and the second vertex are adjusted;
Figure DEST_PATH_IMAGE012
frequency count of the second vertex;
Figure DEST_PATH_IMAGE014
is as follows
Figure DEST_PATH_IMAGE016
Frequency count of the candidate second vertices;
Figure DEST_PATH_IMAGE018
the number of the candidate second vertexes is;
Figure DEST_PATH_IMAGE020
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:
Figure DEST_PATH_IMAGE022
wherein
Figure DEST_PATH_IMAGE024
Is the first vertex and the second vertex
Figure 144438DEST_PATH_IMAGE016
The edge weight value of the candidate second vertex after adjustment;
Figure DEST_PATH_IMAGE026
is the first vertex and the second vertex
Figure 264710DEST_PATH_IMAGE016
The edge weight value before the adjustment of the candidate second vertex;
Figure 605693DEST_PATH_IMAGE014
first, the
Figure 317165DEST_PATH_IMAGE016
Frequency count of candidate second vertices.
CN202211573642.1A 2022-12-08 2022-12-08 User information safe storage method of internet education platform Active CN115664847B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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