CN114978560B - Plaintext cipher encryption and decryption method, device, equipment and medium - Google Patents

Plaintext cipher encryption and decryption method, device, equipment and medium Download PDF

Info

Publication number
CN114978560B
CN114978560B CN202110204619.4A CN202110204619A CN114978560B CN 114978560 B CN114978560 B CN 114978560B CN 202110204619 A CN202110204619 A CN 202110204619A CN 114978560 B CN114978560 B CN 114978560B
Authority
CN
China
Prior art keywords
password
plaintext
determining
encryption
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110204619.4A
Other languages
Chinese (zh)
Other versions
CN114978560A (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.)
China United Network Communications Group Co Ltd
Unicompay Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicompay 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 China United Network Communications Group Co Ltd, Unicompay Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202110204619.4A priority Critical patent/CN114978560B/en
Publication of CN114978560A publication Critical patent/CN114978560A/en
Application granted granted Critical
Publication of CN114978560B publication Critical patent/CN114978560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The embodiment of the invention provides a plaintext cipher encryption and decryption method, a device, equipment and a medium, wherein the plaintext cipher encryption method comprises the following steps: acquiring a plaintext password input by a user; determining the mapping relation between each character in the plaintext password and elements in an element periodic table stored in the encryption database according to the plaintext password and a preset encryption database; determining a target password according to the mapping relation and the plaintext password; and outputting the target password. According to the plaintext password encryption method, as the target password corresponds to each element of the periodic table of elements, when other people crack the target password, the meaning of each character in the target password is difficult to crack, and compared with a plaintext password encryption mode commonly used at present, the plaintext password encryption method is higher in safety.

Description

Plaintext cipher encryption and decryption method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of data encryption and decryption, in particular to a plaintext cipher encryption and decryption method, device, equipment and medium.
Background
With the continuous development of network technology, many traditional works are changed from offline to online. For enterprises, when working on line, a large amount of document data needs to be transmitted every day, and among the document data, there is no document which needs to be kept secret.
In order to avoid leakage of the content of the file data, a plaintext password is generally set for the file data, and meanwhile, the plaintext password is further encrypted to prevent the plaintext password from being cracked by others, so that the safety of file data transmission is improved. The current common encryption methods include an AES encryption method and an MD5 encryption method, which are all carried out by a series of fixed logic algorithms for encryption and decryption. Due to the popularization of the AES encryption method and the MD5 encryption method, the ways of cracking the two encryption methods are increasing, so that the security of the current encryption method using the plaintext password is lower.
Disclosure of Invention
The invention provides a plaintext cipher encryption and decryption method, device, equipment and medium, which are used for solving the problem of lower security of the existing plaintext cipher encryption mode.
An embodiment of the present invention provides a plaintext cipher encryption method, including:
acquiring a plaintext password input by a user;
determining the mapping relation between each character in the plaintext password and elements in an element periodic table stored in the encryption database according to the plaintext password and a preset encryption database;
determining a target password according to the mapping relation and the plaintext password;
And outputting the target password.
Further, according to the method, four mapping relations are stored in the encryption database according to four seasons of the year; the four mapping relations are the corresponding mapping relations between each character and elements in the plaintext password;
the determining the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database according to the plaintext password and a preset encryption database comprises the following steps:
acquiring the time of inputting a plaintext password by a user, and determining corresponding season information according to the time;
obtaining mapping relations between each character in the plaintext passwords of corresponding types and elements in an element periodic table stored in a preset encryption database according to the corresponding season information;
the determining the target password according to the mapping relation and the plaintext password comprises the following steps:
determining an element password according to the mapping relation and the plaintext password;
determining a season flag symbol according to the corresponding season information;
and splicing the element password and the season mark symbol through a first preset splice symbol, and determining the spliced password as a target password.
Further, according to the method, the element type and the element type mark corresponding to the element are stored in the encryption database in an associated mode;
the determining the target password according to the mapping relation and the plaintext password comprises the following steps:
determining an element password according to the mapping relation and the plaintext password;
determining the element type with the most elements in the element password according to the element password and the element type in the encryption database;
determining a corresponding element type mark in the encryption database according to the element type with the most elements;
splicing the element password and the element type mark, and determining the spliced element password as a target password;
the concatenating the element password and the element type tag includes:
and splicing the element password and the element type mark through a second preset splice symbol.
Further, in the method as described above, mapping relations of the element type marks corresponding to the chemical reaction formulas and the identifiers corresponding to the chemical reaction formulas are also stored in the encryption database in an associated manner;
the determining the spliced element password as the target password comprises the following steps:
determining a corresponding identifier in the encryption database according to the element type mark;
Determining the corresponding chemical reaction formula in the encryption database according to the identification;
performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas;
determining the element password after the secondary splicing is completed as a target password;
the performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas comprises the following steps:
and performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas through a third preset splice symbol.
A second aspect of the embodiment of the present invention provides a plaintext password decryption method, including:
acquiring a target password and encryption identification information corresponding to the target password; the target password comprises a plurality of elements of the periodic table of elements;
determining the mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database according to the encryption identification information and the target password;
determining the plaintext password according to the mapping relation and the target password;
outputting the plaintext password.
Further, as described above, the encrypted identification information includes a first preset splice and a season flag symbol; storing four mapping relations in the preset encryption database according to four seasons of a year, wherein each mapping relation is associated with the season marking symbol; the four mapping relations are the corresponding mapping relations between the elements and each character in the plaintext password;
The determining, according to the encryption identification information and the target password, a mapping relationship between each element in the target password and each character in the plaintext password from a preset encryption database includes:
determining all elements in the target password before the first preset splice sign as element passwords corresponding to the plaintext passwords in the target password;
determining the mapping relation between each element in the element password and each character in the plaintext password from a preset encryption database according to the element password and the seasonal mark symbol;
the determining the plaintext password according to the mapping relationship and the target password comprises:
and determining the plaintext password according to the mapping relation and the element password.
A third aspect of an embodiment of the present invention provides a plaintext cipher encryption apparatus, including:
the acquisition module is used for acquiring a plaintext password input by a user;
the mapping relation determining module is used for determining the mapping relation between each character in the plaintext password and elements in the periodic table of elements stored in the encryption database according to the plaintext password and a preset encryption database;
the target password determining module is used for determining a target password according to the mapping relation and the plaintext password;
And the output module is used for outputting the target password.
Further, according to the device, four mapping relations are stored in the encryption database according to four seasons of the year; the four mapping relations are the corresponding mapping relations between each character and elements in the plaintext password;
the mapping relation determining module is specifically configured to:
acquiring the time of inputting a plaintext password by a user, and determining corresponding season information according to the time; obtaining mapping relations between each character in the plaintext passwords of corresponding types and elements in an element periodic table stored in a preset encryption database according to the corresponding season information;
the target password determining module is specifically configured to:
determining an element password according to the mapping relation and the plaintext password; determining a season flag symbol according to the corresponding season information; and splicing the element password and the season mark symbol through a first preset splice symbol, and determining the spliced password as a target password.
Further, as described above, the encryption database stores the element type and the element type mark corresponding to the element in association;
The target password determining module is specifically configured to:
determining an element password according to the mapping relation and the plaintext password; determining the element type with the most elements in the element password according to the element password and the element type in the encryption database; determining a corresponding element type mark in the encryption database according to the element type with the most elements; splicing the element password and the element type mark, and determining the spliced element password as a target password;
the target password determination module is specifically configured to, when concatenating the element password and the element type tag:
and splicing the element password and the element type mark through a second preset splice symbol.
Further, in the device as described above, the mapping relation between the element type mark and the chemical reaction formula and the identifier corresponding to the chemical reaction formula are also stored in the encryption database in an associated manner;
the target password determining module is specifically configured to, when determining the spliced element password as the target password:
determining a corresponding identifier in the encryption database according to the element type mark; determining the corresponding chemical reaction formula in the encryption database according to the identification; performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas; determining the element password after the secondary splicing is completed as a target password;
The target password determining module is specifically configured to, when performing secondary splicing on the spliced element password and the corresponding chemical reaction formula:
and performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas through a third preset splice symbol.
A fourth aspect of an embodiment of the present invention provides a plaintext cipher decrypting apparatus, including:
the acquisition module is used for acquiring the target password and the encryption identification information corresponding to the target password; the target password comprises a plurality of elements of the periodic table of elements;
the mapping relation determining module is used for determining the mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database according to the encryption identification information and the target password;
the plaintext password determining module is used for determining the plaintext password according to the mapping relation and the target password;
and the output module is used for outputting the plaintext password.
Further, the device as described above, wherein the encrypted identification information includes a first preset splice and a season flag; storing four mapping relations in the preset encryption database according to four seasons of a year, wherein each mapping relation is associated with the season marking symbol; the four mapping relations are the corresponding mapping relations between the elements and each character in the plaintext password;
The mapping relation determining module is specifically configured to:
determining all elements in the target password before the first preset splice sign as element passwords corresponding to the plaintext passwords in the target password; determining the mapping relation between each element in the element password and each character in the plaintext password from a preset encryption database according to the element password and the seasonal mark symbol;
the plaintext cipher determination module is specifically configured to:
and determining the plaintext password according to the mapping relation and the element password.
A fifth aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the plaintext cipher encryption method of any one of the first aspect or the plaintext cipher decryption method of any one of the second aspect by the processor.
A sixth aspect of the embodiment of the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, the computer-executable instructions being used to implement the plaintext cipher encryption method according to any one of the first aspect or the plaintext cipher decryption method according to any one of the second aspect when executed by a processor.
A seventh aspect of embodiments of the present invention provides a computer program product comprising a computer program which, when executed by a processor, implements the plaintext cipher encryption method according to any one of the first aspect or the plaintext cipher decryption method according to any one of the second aspect.
The embodiment of the invention provides a plaintext cipher encryption and decryption method, a device, equipment and a medium, wherein the plaintext cipher encryption method comprises the following steps: acquiring a plaintext password input by a user; determining the mapping relation between each character in the plaintext password and elements in an element periodic table stored in the encryption database according to the plaintext password and a preset encryption database; determining a target password according to the mapping relation and the plaintext password; and outputting the target password. According to the plaintext password encryption method, firstly, the plaintext password input by a user is obtained, and then the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database is determined by combining the preset encryption database with the plaintext password. Therefore, the plaintext password can be converted into the target password through the mapping relation, and meanwhile, as the target password corresponds to each element of the periodic table of elements, when other people crack the target password, the meaning of each character in the target password is difficult to crack, and compared with the current common plaintext password encryption mode, the safety is higher.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a diagram of a plaintext cipher encryption and decryption method that may implement an embodiment of the present invention;
FIG. 2 is a flowchart of a plaintext cipher encryption method according to a first embodiment of the present invention;
FIG. 3 is a flowchart of a plaintext cipher encryption method according to a second embodiment of the present invention;
FIG. 4 is a flowchart of a plaintext cipher encryption method according to a third embodiment of the present invention;
FIG. 5 is a detailed flowchart illustrating a step 306 of a plaintext password encryption method according to a third embodiment of the present invention;
FIG. 6 is a flowchart of a plaintext cipher decrypting method according to a fourth embodiment of the present invention;
FIG. 7 is a flowchart of a plaintext password decrypting method according to a fifth embodiment of the present invention;
fig. 8 is a schematic diagram of a mapping relationship between a plaintext cipher and an element in an encryption database constructed in a plaintext cipher encryption and decryption method according to a sixth embodiment of the present invention;
fig. 9 is a schematic diagram of element types and element type labels in an encryption database in a plaintext cipher encryption and decryption method according to a sixth embodiment of the present invention;
Fig. 10 is a schematic diagram of mapping relationship between a plaintext cipher and an element in an encryption database in a plaintext cipher encryption and decryption method according to a sixth embodiment of the present invention;
FIG. 11 is a schematic diagram of chemical reaction in an encryption database in a plaintext cipher encryption and decryption method according to a sixth embodiment of the present invention;
fig. 12 is a schematic diagram of a primary encryption/decryption interface in a plaintext cipher encryption/decryption method according to a sixth embodiment of the present invention;
fig. 13 is a schematic diagram of a secondary encryption/decryption interface in a plaintext cipher encryption/decryption method according to a sixth embodiment of the present invention;
fig. 14 is a schematic diagram of a three-stage encryption/decryption interface in a plaintext cipher encryption/decryption method according to a sixth embodiment of the present invention;
fig. 15 is a schematic structural diagram of a plaintext cipher encryption apparatus according to a seventh embodiment of the present invention;
fig. 16 is a schematic diagram of a plaintext cipher decrypting apparatus according to an eighth embodiment of the present invention;
fig. 17 is a schematic structural diagram of an electronic device according to a ninth embodiment of the present invention.
Specific embodiments of the present invention have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
For a clear understanding of the technical solutions of the present application, the prior art solutions will be described in detail first. With the continuous development of network technology, many traditional works are changed from offline to online. For enterprises, when working on line, a large amount of file data needs to be transmitted every day, and related data related to enterprise privacy may exist in the file data, in order to avoid leakage of the content of the file data, a plaintext password is usually set for the file data. Plaintext passwords, i.e., passwords commonly used by users, include the digits 0-9, english letter cases, special symbols, and so forth. Because the password composition is relatively simple and is easy to be cracked by other people, when the enterprise user uses the plaintext password, the plaintext password can be further encrypted, so that the plaintext password is prevented from being cracked by other people, and the security of file data transmission is improved. The conventional encryption methods include an AES encryption method and an MD5 encryption method, and the two encryption methods have relatively complex algorithms, but have relatively high popularity, and more people engage in related encryption algorithms, so that the plaintext password encrypted by the two encryption methods is more and more cracked by other people. Thus, the security of the two encryption modes of plaintext ciphers is low at present.
Therefore, aiming at the technical problem of lower security of the encryption mode of the plaintext cipher in the prior art, the inventor discovers in research that in order to solve the problem of lower security of the encryption mode of the plaintext cipher at present, a new encryption mode can be constructed, and the security of the encryption of the plaintext cipher is increased by a novel and complex encryption mode. Firstly, acquiring a plaintext password input by a user, and then determining the mapping relation between each character in the plaintext password and elements in an element periodic table stored in an encryption database through a preset encryption database and combining the plaintext password. Therefore, the plaintext password can be converted into the target password through the mapping relation, and meanwhile, as the target password corresponds to each element of the periodic table of elements, when other people crack the target password, the meaning of each character in the target password is difficult to crack, and compared with the current common plaintext password encryption mode, the safety is higher.
The inventor puts forward the technical scheme of the application based on the creative discovery.
The application scenario of the plaintext cipher encryption method provided by the embodiment of the present invention is described below. As shown in fig. 1, 1 is a first electronic device, 2 is a second electronic device, and 3 is a display device. The network architecture of the application scene corresponding to the plaintext cipher encryption method provided by the embodiment of the invention comprises the following steps: a first electronic device 1, a second electronic device 2 and a display device 3. The first electronic device 1 belongs to a user who transmits file data, and is used for encrypting a plaintext password input by the user. The second electronic device 2 belongs to a user receiving file data for decrypting an encrypted plaintext password. Wherein both the first electronic device 1 and the second electronic device 2 have an encryption database, i.e. both store the mapping relation between the individual characters in the plaintext password and the elements in the periodic table of elements. When a user who needs to send file data needs to set a password for the file data, firstly, a plaintext password is set for the file, and then the plaintext password input by the user is acquired through the first electronic device 1. The first electronic device 1 determines, by combining a preset encryption database with the plaintext password, a mapping relationship between each character in the plaintext password and an element in the periodic table of elements stored in the encryption database. So that the plaintext password can be converted into the target password through the mapping relation. After the target password is generated, the user can send the file data to the second electronic device 2 through the first electronic device 1, and the second electronic device 2 determines the mapping relationship between each character in the plaintext password and the elements in the target password according to the target password and a preset encryption database, so as to determine the plaintext password and output the plaintext password to the display device 3. At this time, the user who receives the file data may input a plaintext password displayed by the display device 3 to open the corresponding file data. When others prepare to crack the target password to obtain the plaintext password, as the target password corresponds to each element of the periodic table of elements, when others crack the target password, the meaning of each character in the target password is difficult to crack, and compared with the current common plaintext password encryption mode, the security is higher.
Embodiments of the present invention will now be described with reference to the accompanying drawings.
Fig. 2 is a flow chart of a plaintext cipher encryption method according to a first embodiment of the present invention, as shown in fig. 2, in this embodiment, an execution body of the present invention is a plaintext cipher encryption apparatus, and the plaintext cipher encryption apparatus may be integrated in an electronic device. The plaintext cipher encryption method provided in this embodiment includes the following steps:
step S101, a plaintext password input by a user is acquired.
In this embodiment, the user input mode may be a keyboard input mode, a voice input mode, or the like of the electronic device, which is not limited in this embodiment.
In this embodiment, the plaintext password, i.e. the password commonly used by the user, includes digits 0-9, english letter case, special symbol, etc., and has a simpler structure.
Step S102, determining the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database according to the plaintext password and the preset encryption database.
In this embodiment, the encryption database stores the mapping relationship between each character in the plaintext password and the element in the periodic table of elements stored in the encryption database. Meanwhile, each character of the plaintext password corresponds to each element, for example, when the plaintext password is 12345, the corresponding HHeLiBeB may be HHeLiBeB, that is, hydrogen helium lithium beryllium boron, and each number corresponds to an element. 1 corresponds to H,2 corresponds to He,3 corresponds to Li,4 corresponds to Be, and 5 corresponds to B. The mapping relationship between each character and each element of the plaintext password may be set according to actual requirements, which is not limited in this embodiment.
Step S103, determining a target password according to the mapping relation and the plaintext password.
In this embodiment, after determining the mapping relationship between each character and each element of the plaintext password, the target password may be determined according to the mapping relationship and the plaintext password.
Step S104, outputting the target password.
In this embodiment, the output of the target password may be output to an electronic device corresponding to the next process, for example, an electronic device corresponding to a decryption process of the target password.
The embodiment of the invention provides a plaintext cipher encryption method, which comprises the following steps: and acquiring a plaintext password input by a user. And determining the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database according to the plaintext password and the preset encryption database. And determining the target password according to the mapping relation and the plaintext password. And outputting the target password. According to the plaintext password encryption method, firstly, the plaintext password input by a user is obtained, and then the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database is determined by combining the preset encryption database with the plaintext password. Therefore, the plaintext password can be converted into the target password through the mapping relation, and meanwhile, as the target password corresponds to each element of the periodic table of elements, when other people crack the target password, the meaning of each character in the target password is difficult to crack, and compared with the current common plaintext password encryption mode, the safety is higher.
Fig. 3 is a flowchart of a plaintext cipher encryption method according to a second embodiment of the present invention, as shown in fig. 3, where each step of the plaintext cipher encryption method according to the present invention is further refined based on the plaintext cipher encryption method according to the previous embodiment of the present invention. The plaintext cipher encryption method provided in this embodiment includes the following steps.
Step S201, a plaintext password input by a user is acquired.
In this embodiment, the implementation manner of step 201 is similar to that of step 101 in the previous embodiment of the present invention, and will not be described in detail here.
It should be noted that, four mapping relations are stored in the encryption database according to four seasons of the year. The four mapping relations are the corresponding mapping relations between each character and elements in the plaintext password.
It should be noted that steps 202-203 are further refinements to step 102.
Step S202, the time of inputting the plaintext password by the user is obtained, and corresponding season information is determined according to the time.
In this embodiment, since four mapping relations are stored in the encryption database according to four seasons of a year, when a user inputs a plaintext password, the time when the user inputs the plaintext password can be obtained, so that corresponding season information is determined according to the time. For example, the time for inputting the plaintext password by the user is 1 month and 11 days, the time is winter, the determined season information is winter season, and meanwhile, the fourth mapping relation in the encrypted database is corresponding.
In this embodiment, the four mapping relationships may be the first spring-sequential mapping relationship, that is, the characters of the plaintext password correspond to the element sequences in the periodic table of elements according to the normal sequence of numbers, uppercase English, lowercase English, and special symbols. For example, 0 corresponds to H in the periodic table, 1 corresponds to He in the periodic table, and 2 corresponds to Li in the periodic table. The second summer is the up-down exchange sequence mapping relation. That is, the characters of the plaintext password correspond to the sequence of up-down interchange of elements in the periodic table of elements according to the normal sequence of numbers, uppercase English, lowercase English and special symbols. For example, 0 corresponds to He in the periodic table, 1 corresponds to H in the periodic table, 2 corresponds to Be in the periodic table, and 3 corresponds to Li in the periodic table. In the third autumn, the sequence mapping relation of the dislocation interchange is that the characters of the plaintext password correspond to the sequence of the dislocation interchange of the elements in the periodic table of the elements according to the normal sequence of numbers, english uppercase, english lowercase and special symbols. For example, 0 corresponds to Li in the periodic table, 1 corresponds to Be in the periodic table, 2 corresponds to H in the periodic table, and 3 corresponds to He in the periodic table. And in the third winter, the sequence mapping relation of head-to-tail exchange, namely, the characters of the plaintext password correspond to the sequence of head-to-tail exchange of elements in the periodic table of elements according to the normal sequence of numbers, english uppercase, english lowercase and special symbols. For example, 0 corresponds to Uuo of the last bit in the periodic table, 1 corresponds to Uus of the second to last bit in the periodic table, and 2 corresponds to Lv of the third to last bit in the periodic table. By adding four mapping relations corresponding to four seasons, the security of the plaintext password can be further improved.
Step S203, according to the corresponding season information, the mapping relation between each character in the corresponding kind of plaintext password and the elements in the periodic table of the elements stored in the encryption database is obtained from the preset encryption database.
In this embodiment, four mapping relations are stored in the encryption database according to four seasons of a year, and at the same time, the corresponding season information corresponds to the mapping relations, so that the corresponding mapping relations can be determined through the corresponding season information.
It should be noted that steps 204-206 are further refinements to step 103.
Step S204, determining the element password according to the mapping relation and the plaintext password.
In this embodiment, the element password refers to a password composed entirely of elements, such as HHeLiBeB.
Step S205, determining the season flag symbol according to the corresponding season information.
In this embodiment, the season flag symbol refers to a flag symbol corresponding to seasons, for example, the season flag symbol of four seasons may be 1 to 4.
Step S206, splicing the element password and the season mark symbol through a first preset splice symbol, and determining the spliced password as a target password.
In this embodiment, the first preset splice is used to separate the element password from the season flag symbol, and the first preset splice may be a special symbol. The target password for the final splice completion contains the element password, the first preset splice symbol and the season flag symbol, such as HHELiBeB-! 3, wherein HHELiBeB is the element cryptographic part, ++! And 3 is a season mark symbol, which corresponds to the third season, namely autumn.
Step S207, outputting the target password.
In this embodiment, the implementation of step 207 is similar to the implementation of step 104 in the previous embodiment of the present invention, and will not be described in detail here.
According to the plaintext cipher encryption method provided by the embodiment of the invention, the mapping relation between each character in four plaintext ciphers corresponding to four seasons and elements in the periodic table of elements stored in the encryption database is constructed. When the user inputs the plaintext password, the time of inputting the plaintext password by the user is correspondingly acquired, so that the corresponding season is judged according to the time, and the corresponding mapping relation is acquired. Therefore, the finally generated target password can change according to the time change of the plaintext password input by the user, and the same plaintext password can become different target passwords after being encrypted at different times, so that the success rate of cracking by other people is reduced, and the safety of the plaintext password is improved.
Fig. 4 is a flowchart of a plaintext cipher encryption method according to a third embodiment of the present invention. As shown in fig. 4, the plaintext cipher encryption method according to the present embodiment is further refined based on the plaintext cipher encryption method according to the previous embodiment of the present invention. The plaintext cipher encryption method provided in this embodiment includes the following steps.
Step S301, a plaintext password input by a user is acquired.
In this embodiment, the implementation manner of step 301 is similar to that of step 101 in the previous embodiment of the present invention, and will not be described in detail here.
It should be noted that, the encryption database is associated with the element type and the element type mark corresponding to the storage element.
Step S302, determining the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database according to the plaintext password and the preset encryption database.
In this embodiment, the implementation manner of step 302 is similar to that of step 102 in the previous embodiment of the present invention, and will not be described in detail here.
Step S303, determining the element password according to the mapping relation and the plaintext password.
In this embodiment, the element password refers to a password composed entirely of elements, such as HHeLiBeN.
Step S304, determining the element type with the most elements in the element password according to the element password and the element type in the encryption database.
In this embodiment, since the element type and the element type flag corresponding to the element are stored in the encryption database in an associated manner, the element type and the element type flag corresponding to the element can be used to enhance the password security.
In this embodiment, the element type with the largest element in the element code, for example, the HHeLiBeN element code, where H belongs to a nonmetal, he belongs to an inert gas, li belongs to an alkali metal, be belongs to an alkaline earth metal, and N belongs to a nonmetal. The element type with the largest number of elements is nonmetallic and the corresponding element type label is a nonmetallic corresponding element type label.
Step S305, determining the corresponding element type mark in the encryption database according to the element type with the most elements.
In this embodiment, the element type marks and the element types are in one-to-one correspondence, and may be set according to actual requirements, which is not limited in this embodiment.
Step S306, the element password and the element type mark are spliced, and the spliced element password is determined to be a target password.
In this embodiment, the spliced target password includes an element password and an element type tag, such as HHeLiBeN7, where HHeLiBeN is an element password portion and 7 is an element type tag portion.
Optionally, in this embodiment, the splicing element password and the element type tag includes:
and splicing the element password and the element type mark through a second preset splice symbol.
In this embodiment, the second preset splice is used to separate the element password from the element type tag. The spliced target password comprises an element password, a second preset splice and an element type mark, such as HHELiBeN@K7, wherein HHELiBeN is an element password part, @is the second preset splice, and K7 is an element type mark part.
Step S307, the target password is output.
In this embodiment, the implementation manner of step 307 is similar to that of step 104 in the previous embodiment of the present invention, and will not be described in detail here.
According to the encryption method for the plaintext password, the element type mark is added to the target password, so that the security of the target password is improved. When a user inputs a plaintext password, the element type with the most elements corresponding to the elements can be determined from the element password generated by mapping, the element type corresponds to the element type mark, and the element type mark is added in the formed target password, so that the success rate of cracking by other people is reduced, and the safety of the plaintext password is improved.
Fig. 5 is a detailed flowchart of step 306 of the plaintext cipher encryption method according to the third embodiment of the present invention. As shown in fig. 5, the plaintext cipher encryption method according to the present embodiment is further refined in step 306 based on the plaintext cipher encryption method according to the previous embodiment of the present invention. The plaintext cipher encryption method provided in this embodiment includes the following steps.
The encryption database is also used for storing the mapping relation between the element type mark and the chemical reaction formula and the mark corresponding to the chemical reaction formula in an associated mode.
Step S3061, the element password and the element type mark are spliced, and corresponding identifications in the encryption database are determined according to the element type mark.
In this embodiment, the mapping relationship between the element type mark and the chemical reaction formula and the identifier corresponding to the chemical reaction formula are also stored in the encryption database in an associated manner. Thus, the corresponding identity in the encrypted database may be determined from the element type tag. The label corresponds to the chemical equation.
Step S3062, determining a corresponding chemical reaction formula in the encryption database according to the identification.
In this embodiment, since the identifier corresponds to the chemical reaction formula, the corresponding chemical reaction formula in the encrypted database can be determined according to the identifier.
And step 3063, performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas.
In this embodiment, the element password after the splicing and the corresponding chemical reaction formula are subjected to the secondary splicing, so that the security of the finally formed target password can be improved.
Optionally, in this embodiment, performing the second splicing on the spliced element password and the corresponding chemical reaction formula includes:
and performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas through a third preset splice symbol.
In this embodiment, a third preset splice is used to separate the element type mark from the chemical reaction formula, and the third preset splice may be a special symbol. The target password for the final splice completion comprises an element password, a second preset splice, an element type mark, a third preset splice and a chemical reaction formula.
And step 3064, determining the element password after the secondary splicing is completed as a target password.
According to the encryption method for the plaintext password, the element type mark and the chemical reaction formula are added in the target password, so that the security of the target password is improved. When a user inputs a plaintext password, the element type corresponding to the element of the converted element password contains the most element types, the element type corresponds to the element type mark, meanwhile, the element type mark corresponds to the chemical reaction formula, and the success rate of cracking by other people is reduced and the safety of the plaintext password is improved by adding the element type mark and the chemical reaction formula in the formed target password.
Fig. 6 is a flowchart of a plaintext cipher decrypting method according to a fourth embodiment of the present invention. As shown in fig. 6, in this embodiment, the execution body of the embodiment of the present invention is a plaintext cipher decrypting apparatus, and the plaintext cipher decrypting apparatus may be integrated in an electronic device. The plaintext cipher decrypting method provided in this embodiment is based on the plaintext cipher encrypting methods of the first to third embodiments, and includes the following steps:
Step S401, obtaining a target password and encryption identification information corresponding to the target password. The target password includes a plurality of elements of the periodic table of elements.
In this embodiment, the encryption identification information refers to each preset splice possibly included in the target password, and according to the encryption identification information, which encryption modes are used in the target password can be distinguished, so as to provide a basis for subsequent decryption.
Step S402, according to the encryption identification information and the target password, determining the mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database.
In this embodiment, the mapping relationship between each element in the target password and each character in the plaintext password is stored in the encryption database. Meanwhile, each character of the plaintext password corresponds to each element, for example, when the plaintext password is 12345, it may be HHeLiBeB, and each number corresponds to an element. 1 corresponds to H,2 corresponds to He,3 corresponds to Li,4 corresponds to Be, and 5 corresponds to B. The mapping relationship between each element of the target password and each character of the plaintext password may be set according to actual requirements, which is not limited in this embodiment.
Step S403, determining the plaintext password according to the mapping relation and the target password.
In this embodiment, after determining the mapping relationship between each element of the target password and each character of the plaintext password, the plaintext password may be determined according to the mapping relationship and the target password.
Step S404, outputting a plaintext password.
The embodiment of the invention provides a plaintext password decryption method, which comprises the following steps: and obtaining the target password and the encrypted identification information corresponding to the target password. The target password includes a plurality of elements of the periodic table of elements. And determining the mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database according to the encryption identification information and the target password. And determining a plaintext password according to the mapping relation and the target password, so as to output the plaintext password. According to the plaintext password decryption method, the encryption mode used in the target password is identified through the encryption identification information, so that the plaintext password is determined according to the mapping relation between each element in the target password and each character in the plaintext password stored in the preset encryption database. Meanwhile, as the target password corresponds to each element of the periodic table of elements, when other people crack the target password, the meaning of each character in the target password is difficult to crack, and the security is high.
Fig. 7 is a flowchart of a plaintext cipher decrypting method according to a fifth embodiment of the present invention. As shown in fig. 7, the method for decrypting the plaintext password according to the present embodiment further refines each step on the basis of the method for decrypting the plaintext password according to the previous embodiment of the present invention. The plaintext password decryption method provided by the embodiment comprises the following steps:
it should be noted that the encrypted identification information includes a first preset splice symbol and a season flag symbol. Storing four mapping relations corresponding to four seasons of a year in a preset encryption database, wherein each mapping relation is associated with a season marking symbol. The four mapping relations are the corresponding mapping relations between the elements and the characters in the plaintext password.
Step S501, obtaining the target password and the encrypted identification information corresponding to the target password. The target password includes a plurality of elements of the periodic table of elements.
Step S502, all elements before the first preset splice in the target password are determined to be element passwords corresponding to the plaintext passwords in the target password.
Step S503, according to the element password and the season mark symbol, determining the mapping relation between each element in the element password and each character in the plaintext password from a preset encryption database.
Step S504, determining the plaintext password according to the mapping relation and the element password.
Step S505, a plaintext password is output.
The plaintext password decryption method provided in this embodiment may decrypt the target password in the method embodiment shown in fig. 2-3, and its implementation principle and technical effects are similar to those in the method embodiment shown in fig. 2-3, and will not be described in detail herein.
Meanwhile, in order to better understand the plaintext cipher encryption and decryption method of the present embodiment, the following describes in detail the construction of a database and the related flow of plaintext cipher encryption and decryption in the plaintext cipher encryption and decryption method. As shown in fig. 8 to 14, first, the mapping relation between each character of the plaintext password and each element in the periodic table of elements is constructed. As shown in fig. 8, the numbers 0-9 correspond to Li, be, na, mg, K, ca, rb, sr, cs, ba in sequence, and meanwhile, the mapping relationship can be increased by three mapping modes according to a seasonal mode, such as a mapping mode of up-down interchange of elements in the second quarter, a mapping mode of misplacement interchange of elements in the third quarter, and a mode of head-tail interchange of elements in the fourth quarter. The second summer is a sequential mapping relationship with up-down exchange. That is, the characters of the plaintext password correspond to the sequence of up-down interchange of elements in the periodic table of elements according to the normal sequence of numbers, uppercase English, lowercase English and special symbols. For example, 0 corresponds to He in the periodic table, 1 corresponds to H in the periodic table, 2 corresponds to Be in the periodic table, and 3 corresponds to Li in the periodic table. In the third autumn, the sequence mapping relation of the dislocation interchange is that the characters of the plaintext password correspond to the sequence of the dislocation interchange of the elements in the periodic table of the elements according to the normal sequence of numbers, english uppercase, english lowercase and special symbols. For example, 0 corresponds to Li in the periodic table, 1 corresponds to Be in the periodic table, 2 corresponds to H in the periodic table, and 3 corresponds to He in the periodic table. And in the third winter, the sequence mapping relation of head-to-tail exchange, namely, the characters of the plaintext password correspond to the sequence of head-to-tail exchange of elements in the periodic table of elements according to the normal sequence of numbers, english uppercase, english lowercase and special symbols. For example, 0 corresponds to Uuo of the last bit in the periodic table, 1 corresponds to Uus of the second to last bit in the periodic table, and 2 corresponds to Lv of the third to last bit in the periodic table. By adding four mapping relations corresponding to four seasons, the security of the plaintext password can be further improved.
Meanwhile, when the encrypted database is constructed, element categories and corresponding element category labels, that is, element categories and labels as shown in fig. 9, are also stored. Wherein the element category includes main group metals, metalloids, non-metals, halogens, inert gases, alkali metals, alkaline earth metals, lanthanides, actinides. The element class labels correspond to K1-K9, respectively.
After the mapping relation between each character of the plaintext password and each element in the periodic table of elements is constructed, the association between the element and the element category is completed, as shown in fig. 10. And then, continuing to construct the corresponding relation between the chemical reaction formula and the mark and the element type mark. As shown in fig. 11, id is the identification. Each label corresponds to a chemical reaction, and each label corresponds to an element type label. The reactant colors in the figures may be used later in order to continue to enhance the target password, which will not be described in detail in this example.
After the encryption database is built, the plaintext password input by the user can be acquired to carry out targeted encryption and decryption. As shown in fig. 12-14, three levels of encryption, respectively. Fig. 12 is a first level of encryption, i.e., enhanced encryption using mapping relationships of four seasons without using element categories and chemical equations. As shown in FIG. 12, test 1332-! The plaintext cipher @ T1 becomes PaFSePaMgBeBeBeLiTlPbPaMg-! 3, wherein PaFSePaMgBeBeBeLiTlPbPaMg is the element code part, |! For the first preset splice, 3 refers to a seasonal marker symbol. Fig. 13 is a second level of encryption, i.e., mapping relationships and element categories for four seasons are used, but no enhanced encryption using chemical equations is used. As shown in FIG. 13, test 1332-! The plaintext cipher @ T1 becomes PaFSePaMgBeBeBeLiTlPbPaMg-! 30K7, wherein PaFSePaMgBeBeBeLiTlPbPaMg is an element code part, |! For the first preset splice, 3 refers to a season flag symbol, 0 is a second preset splice, K7 is an element type flag representing alkaline earth metal, and fig. 14 shows a third-level encryption level, that is, enhanced encryption using mapping relationships of four seasons, element categories, and chemical formulas. As shown in FIG. 14, test 1332-! The plaintext cipher @ T1 becomes PaFSePaMgBeBeBeLiTlPbPaMg-! 30K7@O2K0KO2, wherein PaFSePaMgBeBeBeLiTlPbPaMg is the element code part, I! For the first preset splice, 3 refers to a seasonal tag symbol, 0 is a second preset splice, K7 is an element type tag representing alkaline earth metal, @ is a third preset splice, and O2K0KO2 is a chemical reaction formula.
Meanwhile, the encryption mode corresponding to the encryption level may be set according to the actual requirement, which is not limited in this embodiment. In decryption, the target password can be decrypted in a targeted manner according to the encrypted identification information, namely the first preset splicer, the second preset splicer and the third preset splicer, and the decryption result is shown in fig. 12-14. The password, namely the plaintext password, and the element main attribute and the chemical reaction formula can also be used for multiple times of verification when a user inputs the plaintext password to acquire file data, for example, the password is in a picture form, so that the user can perform multiple times of verification by clicking a correct picture, and the safety of the file data is improved.
Fig. 15 is a schematic diagram of a plaintext cipher encryption apparatus according to a seventh embodiment of the present invention, as shown in fig. 15, in this embodiment, the plaintext cipher encryption apparatus 600 includes:
the obtaining module 601 is configured to obtain a plaintext password input by a user.
The mapping relation determining module 602 is configured to determine, according to the plaintext password and a preset encryption database, a mapping relation between each character in the plaintext password and an element in the periodic table of elements stored in the encryption database.
The target password determining module 603 is configured to determine a target password according to the mapping relationship and the plaintext password.
And the output module 604 is used for outputting the target password.
The plaintext cipher encryption apparatus provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 2, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 2, and are not described in detail herein.
Meanwhile, another embodiment of the plaintext cipher encryption apparatus provided by the present invention further refines the plaintext cipher encryption apparatus 600 based on the plaintext cipher encryption apparatus provided by the previous embodiment.
Optionally, in this embodiment, the encryption database stores four mapping relations according to four seasons of a year. The four mapping relations are the corresponding mapping relations between each character and elements in the plaintext password.
The mapping relation determining module 602 is specifically configured to:
and acquiring the time of inputting the plaintext password by the user, and determining corresponding season information according to the time. And obtaining the mapping relation between each character in the corresponding kind of plaintext password and the elements in the periodic table of the elements stored in the encryption database from the preset encryption database according to the corresponding season information.
The target password determination module 603 is specifically configured to:
and determining the element password according to the mapping relation and the plaintext password. And determining the season flag symbol according to the corresponding season information. And splicing the element password and the season mark symbol through a first preset splice symbol, and determining the spliced password as a target password.
Optionally, in this embodiment, the element type and the element type flag corresponding to the associated storage element in the encryption database.
The target password determination module 603 is specifically configured to:
and determining the element password according to the mapping relation and the plaintext password. And determining the element type with the largest element in the element password according to the element password and the element type in the encryption database. And determining the corresponding element type mark in the encryption database according to the element type with the most elements. And splicing the element password and the element type mark, and determining the spliced element password as a target password.
The target password determination module 603 is specifically configured to, when concatenating the element password and the element type tag:
and splicing the element password and the element type mark through a second preset splice symbol.
Optionally, in this embodiment, the mapping relationship between the element type mark and the chemical reaction formula and the identifier corresponding to the chemical reaction formula are also stored in the encryption database in an associated manner.
The target password determining module 603 is specifically configured to, when determining the spliced element password as the target password:
and determining the corresponding identification in the encryption database according to the element type mark. And determining a corresponding chemical reaction formula in the encryption database according to the identification. And performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas. And determining the element password after the secondary splicing is completed as a target password.
The target password determining module 603 is specifically configured to, when performing secondary concatenation on the element password after concatenation and the corresponding chemical reaction formula:
and performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas through a third preset splice symbol.
The plaintext cipher encryption apparatus provided in this embodiment may implement the technical scheme of the method embodiment shown in fig. 2 to 5, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 2 to 5, and are not described in detail herein.
Fig. 16 is a schematic diagram of a plaintext cipher decrypting apparatus according to an eighth embodiment of the present invention, as shown in fig. 16, in this embodiment, the plaintext cipher decrypting apparatus 700 includes:
the obtaining module 701 is configured to obtain the target password and encrypted identification information corresponding to the target password. The target password includes a plurality of elements of the periodic table of elements.
The mapping relation determining module 702 is configured to determine, according to the encrypted identification information and the target password, a mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database.
The plaintext cipher determination module 703 is configured to determine a plaintext cipher according to the mapping relationship and the target cipher.
And the output module 704 is used for outputting the plaintext password.
The plaintext cipher decrypting apparatus provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 6, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 6, and will not be described in detail herein.
Meanwhile, another embodiment of the plaintext cipher decrypting apparatus provided by the present invention further refines the plaintext cipher decrypting apparatus 700 based on the plaintext cipher decrypting apparatus provided by the previous embodiment.
Optionally, in this embodiment, the encrypted identification information includes a first preset splice symbol and a season flag symbol. Storing four mapping relations corresponding to four seasons of a year in a preset encryption database, wherein each mapping relation is associated with a season marking symbol. The four mapping relations are the corresponding mapping relations between the elements and the characters in the plaintext password.
The mapping relation determining module 702 is specifically configured to:
and determining all elements in the target password before the first preset splice sign as element passwords corresponding to the plaintext passwords in the target password. And determining the mapping relation between each element in the element password and each character in the plaintext password from a preset encryption database according to the element password and the season mark symbol.
The plaintext cipher determination module 703 is specifically configured to:
and determining a plaintext password according to the mapping relation and the element password.
The plaintext cipher decrypting apparatus provided in this embodiment may implement the technical scheme of the method embodiment shown in fig. 6 to 7, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 6 to 7, and will not be described in detail herein.
According to embodiments of the present invention, the present invention also provides an electronic device, a computer-readable storage medium, and a computer program product.
As shown in fig. 17, fig. 17 is a schematic structural diagram of an electronic device according to a ninth embodiment of the present invention. Electronic devices are intended for various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 17, the electronic device includes: a processor 801, and a memory 802. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device.
Memory 802 is a non-transitory computer readable storage medium provided by the present invention. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the plaintext cipher encryption methodology provided by the present invention. The non-transitory computer readable storage medium of the present invention stores computer instructions for causing a computer to execute the plaintext cipher encryption method provided by the present invention.
The memory 802 is a non-transitory computer readable storage medium, and may be used to store a non-transitory software program, a non-transitory computer executable program, and modules, such as program instructions/modules corresponding to a plaintext cipher encryption method according to an embodiment of the present invention (e.g., the acquisition module 601, the mapping relation determination module 602, the target cipher determination module 603, and the output module 604 shown in fig. 15, and the acquisition module 701, the mapping relation determination module 702, the plaintext cipher determination module 703, and the output module 704 shown in fig. 16). The processor 801 executes various functional applications of the server and data processing, i.e., implements the plaintext cipher encryption method in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 802.
Other implementations of the examples of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of embodiments of the invention following, in general, the principles of the embodiments of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the embodiments of the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the embodiments being indicated by the following claims.
It is to be understood that the embodiments of the invention are not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of embodiments of the invention is limited only by the appended claims.

Claims (9)

1. A plaintext cipher encryption method, comprising:
acquiring a plaintext password input by a user;
determining the mapping relation between each character in the plaintext password and elements in an element periodic table stored in the encryption database according to the plaintext password and a preset encryption database;
Determining a target password according to the mapping relation and the plaintext password;
outputting the target password;
the encryption database is used for storing element types and element type marks corresponding to the elements in an associated mode;
the determining the target password according to the mapping relation and the plaintext password comprises the following steps:
determining an element password according to the mapping relation and the plaintext password;
determining the element type with the most elements in the element password according to the element password and the element type in the encryption database;
determining a corresponding element type mark in the encryption database according to the element type with the most elements;
splicing the element password and the element type mark, and determining the spliced element password as a target password;
the concatenating the element password and the element type tag includes:
and splicing the element password and the element type mark through a second preset splice symbol.
2. The method according to claim 1, wherein the encryption database stores four mapping relations according to four seasons of the year; the four mapping relations are the corresponding mapping relations between each character and elements in the plaintext password;
The determining the mapping relation between each character in the plaintext password and the elements in the periodic table of the elements stored in the encryption database according to the plaintext password and a preset encryption database comprises the following steps:
acquiring the time of inputting a plaintext password by a user, and determining corresponding season information according to the time;
obtaining mapping relations between each character in the plaintext passwords of corresponding types and elements in an element periodic table stored in a preset encryption database according to the corresponding season information;
the determining the target password according to the mapping relation and the plaintext password comprises the following steps:
determining an element password according to the mapping relation and the plaintext password;
determining a season flag symbol according to the corresponding season information;
and splicing the element password and the season mark symbol through a first preset splice symbol, and determining the spliced password as a target password.
3. The method of claim 1, wherein the encryption database further stores a mapping relationship of element type labels corresponding to chemical formulas and identifiers corresponding to chemical formulas in association with each other;
the determining the spliced element password as the target password comprises the following steps:
Determining a corresponding identifier in the encryption database according to the element type mark;
determining the corresponding chemical reaction formula in the encryption database according to the identification;
performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas;
determining the element password after the secondary splicing is completed as a target password;
the performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas comprises the following steps:
and performing secondary splicing on the spliced element passwords and the corresponding chemical reaction formulas through a third preset splice symbol.
4. A plaintext cipher decrypting method, comprising:
acquiring a target password and encryption identification information corresponding to the target password; the target password comprises a plurality of elements of the periodic table of elements;
determining the mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database according to the encryption identification information and the target password;
determining the plaintext password according to the mapping relation and the target password;
outputting the plaintext password;
the encryption database is used for storing element types and element type marks corresponding to the elements in an associated mode;
The determining the plaintext password according to the mapping relation and the target password comprises the following steps:
determining an element type mark contained in the target password according to the target password and the element type mark in the encryption database;
removing an element type mark and a second preset splice sign included in the plaintext password to generate a corresponding element password;
and determining a plaintext password according to the mapping relation and the element password.
5. The method of claim 4, wherein the encrypted identification information comprises a first preset splice and a seasonal flag symbol; storing four mapping relations in the preset encryption database according to four seasons of a year, wherein each mapping relation is associated with the season marking symbol; the four mapping relations are the corresponding mapping relations between the elements and each character in the plaintext password;
the determining, according to the encryption identification information and the target password, a mapping relationship between each element in the target password and each character in the plaintext password from a preset encryption database includes:
determining all elements in the target password before the first preset splice sign as element passwords corresponding to the plaintext passwords in the target password;
Determining the mapping relation between each element in the element password and each character in the plaintext password from a preset encryption database according to the element password and the seasonal mark symbol;
the determining the plaintext password according to the mapping relationship and the target password comprises:
and determining the plaintext password according to the mapping relation and the element password.
6. A plaintext cipher encryption apparatus, comprising:
the acquisition module is used for acquiring a plaintext password input by a user;
the mapping relation determining module is used for determining the mapping relation between each character in the plaintext password and elements in the periodic table of elements stored in the encryption database according to the plaintext password and a preset encryption database;
the target password determining module is used for determining a target password according to the mapping relation and the plaintext password;
the output module is used for outputting the target password;
the encryption database is used for storing element types and element type marks corresponding to the elements in an associated mode;
the target password determining module is specifically configured to:
determining an element password according to the mapping relation and the plaintext password; determining the element type with the most elements in the element password according to the element password and the element type in the encryption database; determining a corresponding element type mark in the encryption database according to the element type with the most elements; splicing the element password and the element type mark, and determining the spliced element password as a target password;
The target password determination module is specifically configured to, when concatenating the element password and the element type tag:
and splicing the element password and the element type mark through a second preset splice symbol.
7. A plaintext cipher decrypting apparatus, comprising:
the acquisition module is used for acquiring the target password and the encryption identification information corresponding to the target password; the target password comprises a plurality of elements of the periodic table of elements;
the mapping relation determining module is used for determining the mapping relation between each element in the target password and each character in the plaintext password from a preset encryption database according to the encryption identification information and the target password;
the plaintext password determining module is used for determining the plaintext password according to the mapping relation and the target password;
the output module is used for outputting the plaintext password;
the encryption database is used for storing element types and element type marks corresponding to the elements in an associated mode;
the plaintext cipher determination module is specifically configured to:
determining an element type mark contained in the target password according to the target password and the element type mark in the encryption database; removing an element type mark and a second preset splice sign included in the plaintext password to generate a corresponding element password; and determining a plaintext password according to the mapping relation and the element password.
8. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the plaintext cipher encryption method according to any one of claims 1 to 3 or the plaintext cipher decryption method according to claim 4 or 5 by the processor.
9. A computer readable storage medium having stored therein computer executable instructions for implementing the plaintext cipher encryption method according to any one of claims 1 to 3 or the plaintext cipher decryption method according to claim 4 or 5 when executed by a processor.
CN202110204619.4A 2021-02-24 2021-02-24 Plaintext cipher encryption and decryption method, device, equipment and medium Active CN114978560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110204619.4A CN114978560B (en) 2021-02-24 2021-02-24 Plaintext cipher encryption and decryption method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110204619.4A CN114978560B (en) 2021-02-24 2021-02-24 Plaintext cipher encryption and decryption method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN114978560A CN114978560A (en) 2022-08-30
CN114978560B true CN114978560B (en) 2023-07-18

Family

ID=82973146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110204619.4A Active CN114978560B (en) 2021-02-24 2021-02-24 Plaintext cipher encryption and decryption method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114978560B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161006A (en) * 2015-04-06 2016-11-23 汪风珍 A kind of digital encryption algorithm
CN106788993A (en) * 2016-12-02 2017-05-31 乐视控股(北京)有限公司 A kind of encryption communication method, device and electronic equipment
CN107835075A (en) * 2017-12-06 2018-03-23 北京深思数盾科技股份有限公司 The processing method and processing device of local password
CN108632248A (en) * 2018-03-22 2018-10-09 平安科技(深圳)有限公司 Data ciphering method, data query method, apparatus, equipment and storage medium
CN110263586A (en) * 2019-06-19 2019-09-20 广西师范大学 A kind of hardware security appraisal procedure of chaos cipher system
CN110347723A (en) * 2019-07-12 2019-10-18 税友软件集团股份有限公司 A kind of data query method, system and electronic equipment and storage medium
CN110933063A (en) * 2019-11-25 2020-03-27 中国联合网络通信集团有限公司 Data encryption method, data decryption method and equipment
CN111859444A (en) * 2020-06-12 2020-10-30 中国科学院信息工程研究所 Block chain data supervision method and system based on attribute encryption

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7047420B2 (en) * 2001-01-17 2006-05-16 Microsoft Corporation Exclusive encryption
US10686588B2 (en) * 2017-08-31 2020-06-16 Micro Focus Llc Tweak-based string encryption

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161006A (en) * 2015-04-06 2016-11-23 汪风珍 A kind of digital encryption algorithm
CN106788993A (en) * 2016-12-02 2017-05-31 乐视控股(北京)有限公司 A kind of encryption communication method, device and electronic equipment
CN107835075A (en) * 2017-12-06 2018-03-23 北京深思数盾科技股份有限公司 The processing method and processing device of local password
CN108632248A (en) * 2018-03-22 2018-10-09 平安科技(深圳)有限公司 Data ciphering method, data query method, apparatus, equipment and storage medium
CN110263586A (en) * 2019-06-19 2019-09-20 广西师范大学 A kind of hardware security appraisal procedure of chaos cipher system
CN110347723A (en) * 2019-07-12 2019-10-18 税友软件集团股份有限公司 A kind of data query method, system and electronic equipment and storage medium
CN110933063A (en) * 2019-11-25 2020-03-27 中国联合网络通信集团有限公司 Data encryption method, data decryption method and equipment
CN111859444A (en) * 2020-06-12 2020-10-30 中国科学院信息工程研究所 Block chain data supervision method and system based on attribute encryption

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于奇异值分解的二维码加密算法;葛娅敬;赵礼峰;;计算机科学(第S2期);全文 *
面向文本的标识分组加解密模式;张通明;关建峰;;网络与信息安全学报(第03期);全文 *

Also Published As

Publication number Publication date
CN114978560A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
US8345876B1 (en) Encryption/decryption system and method
Abdullah et al. New approaches to encrypt and decrypt data in image using cryptography and steganography algorithm
CN110166446B (en) Method for realizing geographical weighted average center based on safe multi-party calculation
CN110490589B (en) Hardware wallet creating method and device and hardware wallet
CN108811519A (en) System and method for establishing the link between identifier in the case of underground identification information specific
CN108829899B (en) Data table storage, modification, query and statistical method
CN106096424A (en) One is encrypted method and terminal to local data
Liu et al. A Large-Scale Study of Web Password Habits of Chinese Network Users.
JP6636265B2 (en) Computer application system and method for generating and restoring authentication code
CN112989391A (en) Hybrid encryption method, hybrid decryption method, system, device and storage medium
CN114978560B (en) Plaintext cipher encryption and decryption method, device, equipment and medium
CN103326851B (en) SCM Based a kind of compass encrypting and decrypting method
CN116805912A (en) College educational administration system data transmission and storage method based on angle mapping
CN113965311B (en) Method, system, medium, terminal and application for realizing format keeping encryption
CN115858914A (en) Method, device and system for inquiring hiding trace, terminal equipment and storage medium
CN113904865A (en) Log transmission method and device based on asymmetric algorithm
CN112084487B (en) Weak password analysis method and device, storage medium and electronic equipment
CN112632596B (en) Data processing method, device, storage medium and terminal
EP3985915A1 (en) Key exchange system, communication device, key exchange method, and program
CN106535144A (en) Sending method for encrypted short message and terminal
CN108712424A (en) Based on mapping control point outcome table to the method for text encryption
CN114499829B (en) Key management method and device, electronic equipment and storage medium
CN115834239B (en) Information security processing system and method based on cryptographic algorithm
Ali Implementation of hashed cryptography algorithm based on cryptography message syntax
US20210248262A1 (en) Secret search system and secret search method

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