CN115632773A - Plaintext data encryption method, device, equipment and computer readable storage medium - Google Patents

Plaintext data encryption method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115632773A
CN115632773A CN202211291557.6A CN202211291557A CN115632773A CN 115632773 A CN115632773 A CN 115632773A CN 202211291557 A CN202211291557 A CN 202211291557A CN 115632773 A CN115632773 A CN 115632773A
Authority
CN
China
Prior art keywords
data
curve
plaintext
determining
key
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.)
Pending
Application number
CN202211291557.6A
Other languages
Chinese (zh)
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.)
Shenzhen Everything Safety Technology Co ltd
Original Assignee
Shenzhen Everything Safety Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Everything Safety Technology Co ltd filed Critical Shenzhen Everything Safety Technology Co ltd
Priority to CN202211291557.6A priority Critical patent/CN115632773A/en
Publication of CN115632773A publication Critical patent/CN115632773A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Landscapes

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

Abstract

The invention discloses a plaintext data encryption method, a plaintext data encryption device, plaintext data encryption equipment and a computer-readable storage medium, wherein the method comprises the following steps: acquiring plaintext data and the number of first bytes; generating a first curve group according to the first mathematical model and the number of the first curves, and generating a second curve according to the second mathematical model; determining first key data according to the first curve group, determining that the multiple of the number of the first curves is larger than or equal to the minimum value of the number of the first bytes, and determining first filling data according to the second curve if the minimum value is not equal to the number of the first bytes; first target encrypted data is determined according to the first key data, the first padding data and the plaintext data. The first key data and the first filling data in the encryption process are dynamically generated according to the mathematical model, and the transmission of the first key data is not needed, so that the transmission risk of the key file and the storage risk of the key file are saved, and the safety of data transmission is further improved.

Description

Plaintext data encryption method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of plaintext data encryption technologies, and in particular, to a plaintext data encryption method, apparatus, device, and computer-readable storage medium.
Background
With the rapid development of informatization, people have higher and higher requirements on information security, and in the application of information security and plaintext encryption, plaintext encryption is one of basic application technologies for protecting information.
In the prior art, a plaintext encryption method usually performs encryption and decryption through a Key file, however, a process of transmitting the Key file may often cause disclosure of the Key file, and if Public Key Infrastructure (PKI) is built, it is a difficult thing for an engineer without basic knowledge of cryptography.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a plaintext data encryption method, a plaintext data encryption device, plaintext data encryption equipment and a computer-readable storage medium, and aims to solve the technical problems that the conventional process for transmitting a key file may cause the key file to be leaked or the key file to be stolen in use and the like.
In order to achieve the above object, the present invention provides a plaintext data encryption method, comprising the steps of:
acquiring plaintext data and a first byte number of the plaintext data;
generating a first curve group according to a preset first mathematical model and a preset first curve quantity, and generating a second curve according to a preset second mathematical model;
determining first key data according to the first curve group, determining that the multiple of the first curve number is larger than or equal to the minimum value of the first byte number, and determining first filling data according to the second curve if the minimum value is not equal to the first byte number;
and determining first target encrypted data corresponding to plaintext data according to the first key data, the first filling data and the plaintext data.
Further, the step of determining first key data from the first curve group comprises:
dividing the first number of bytes by the first number of curves to obtain a first value;
and determining first key data according to the first numerical value and the first curve group.
Further, the step of determining first key data according to the first value and the first curve group includes:
and according to the first numerical value, selecting coordinate data on each first curve in the first curve group to obtain first data, and taking the first data as first key data.
Further, the step of determining first padding data according to the second curve comprises:
performing a modulus operation on the first byte quantity and the first curve quantity to obtain a second numerical value;
and determining first filling data according to the second numerical value and the second curve.
Further, the step of determining the first filling data according to the second numerical value and the second curve includes:
selecting coordinate data on the second curve to obtain a preset number of second coordinate data, and obtaining a second numerical matrix corresponding to the second coordinate data;
and selecting second data in the second numerical value matrix according to a selection algorithm and the second numerical value, and taking the second data as first filling data.
Further, the step of determining, according to the first key data, the first padding data, and the plaintext data, first target encryption data corresponding to the plaintext data includes:
performing bit operation on the plaintext data and the first key data to obtain third data;
performing bit operation on the first padding data and the first key data to obtain fourth data;
mixing the third data and the fourth data according to a preset mixing rule to obtain fifth data;
performing bit operation on the fifth data and the first key data to obtain sixth data;
translating the sixth data according to a preset translation rule to obtain seventh data;
performing a bit operation on the seventh data and the first key data to obtain first encrypted data;
and taking the first encrypted data and the second byte number of the first padding data as first target encrypted data.
Further, the plaintext data encryption method further includes:
acquiring second target encrypted data, wherein the second target encrypted data comprises second encrypted data and a third byte number;
determining a second curve quantity corresponding to the second encrypted data, and determining a third mathematical model and a fourth mathematical model corresponding to the second curve quantity;
generating a third curve group according to the third mathematical model, and generating a fourth curve according to the fourth mathematical model;
determining second key data according to each third curve in the third curve group, and determining second filling data according to the fourth curve and the number of third bytes;
and determining second plaintext data corresponding to second encrypted data according to the second key data, the second padding data and the second encrypted data.
In addition, to achieve the above object, the present invention also provides a plaintext data encryption apparatus, comprising:
the device comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring plaintext data and a first byte number of the plaintext data;
the generating module is used for generating a first curve group according to a preset first mathematical model and a preset first curve quantity and generating a second curve according to a preset second mathematical model;
a first determining module, configured to determine first key data according to the first curve group, determine that a multiple of the first curve number is greater than or equal to a minimum value of the first byte number, and if the minimum value is not equal to the first byte number, determine first padding data according to the second curve;
and the second determining module is used for determining first target encryption data corresponding to the plaintext data according to the first key data, the first padding data and the plaintext data.
In addition, to achieve the above object, the present invention also provides a plaintext data encryption device, comprising: the processor is used for executing the plaintext data encryption program to realize the steps of the plaintext data encryption method.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a plaintext data encryption program, which when executed by a processor, implements the steps of the plaintext data encryption method described above.
The second target encrypted data is obtained, wherein the second target encrypted data comprises second encrypted data and a third byte number, a second curve number corresponding to the second encrypted data is determined, a third mathematical model and a fourth mathematical model corresponding to the second curve number are determined, a third curve group is generated according to the third mathematical model, a fourth curve is generated according to the fourth mathematical model, second key data is determined according to each third curve in the third curve group, second filling data is determined according to the fourth curve and the third byte number, second plaintext data corresponding to the second encrypted data is determined according to the second key data, the second filling data and the second encrypted data, the corresponding third mathematical model and the corresponding fourth mathematical model can be determined according to the second key digit number, and therefore the second key data and the second filling data are determined according to the third key data, the second encrypted data are decrypted to obtain the plaintext data corresponding to the second encrypted data, the second key data and the second mathematical model are generated in the process of decrypting the plaintext data without the encrypted data, and the security of the plaintext data is improved.
Drawings
Fig. 1 is a schematic structural diagram of a plaintext data encryption device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a plaintext data encryption method according to a first embodiment of the invention;
fig. 3 is a functional block diagram of an embodiment of a plaintext data encryption apparatus according to the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a plaintext data encryption device in a hardware operating environment according to an embodiment of the present invention.
The plaintext data encryption device in the embodiment of the present invention may be a PC, or may be a mobile terminal device having a display function, such as a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable computer, and the like.
As shown in fig. 1, the plaintext data encryption device may include: a processor 1001, e.g. a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the plaintext data encryption device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the plaintext data encryption device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the device is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of plaintext data encryption equipment, and related functions (such as pedometer and tapping) for vibration recognition; of course, the plaintext data encryption device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a plaintext data encryption program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to call the plaintext data encryption program stored in the memory 1005.
In this embodiment, a plaintext data encryption device includes: a memory 1005, a processor 1001 and a plaintext data encryption program stored in the memory 1005 and capable of running on the processor 1001, wherein the processor 1001 calls the plaintext data encryption program stored in the memory 1005 and executes the following steps of the plaintext data encryption method in each embodiment.
The invention also provides a plaintext data encryption method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method of the invention.
In this embodiment, the plaintext data encryption method includes the following steps:
step S101, plaintext data and a first byte number of the plaintext data are obtained;
in this embodiment, plaintext data to be encrypted and a first byte number of the plaintext data are obtained, where the plaintext data refers to words or character strings that are not encrypted, and the first byte number indicates how many bytes the plaintext data has.
Step S102, generating a first curve group according to a preset first mathematical model and a preset first curve quantity, and generating a second curve according to a preset second mathematical model;
in this embodiment, a preset first mathematical model is artificially established, a first curve group is generated according to the artificially preset number of first curves, the first curve group includes the preset number of first curves, a preset second mathematical model is artificially established, and a second curve is generated. And each of the first curves and the second curves in the first curve group are defined in a finite field.
Step S103, determining first key data according to the first curve group, determining that the multiple of the first curve number is greater than or equal to the minimum value of the first byte number, and if the minimum value is not equal to the first byte number, determining first filling data according to the second curve;
in this embodiment, first, the first number of bytes is divided by the first number of curves to obtain a first value, and then the first key data is determined according to the first value and the first curve group. It is determined that the multiple of the first curve number is greater than or equal to the minimum value of the first byte number, e.g., the first curve number is 3 and the first byte number is 34, then the multiple of the first curve number is greater than or equal to the minimum value of the first byte number is 36. Then, if the minimum value is not equal to the first byte number, the first byte number and the first curve number of the plaintext data are subjected to a modular operation to obtain a second numerical value, and then the first padding data are determined according to the second numerical value and the second curve.
Further, in an embodiment, the step 103 includes:
step a, dividing the first byte quantity by the first curve quantity to obtain a first numerical value;
and b, determining first key data according to the first numerical value and the first curve group.
In this embodiment, first, the first byte number of the plaintext data is determined, i.e., how many bytes of the plaintext data are determined, for example, the first byte number of the plaintext data is 1024 bytes. Then, the first number of bytes is divided by the first number of curves to obtain a first value, and coordinate data is selected from the first curve group according to the first value to determine first key data. Specifically, coordinate data of a first numerical value may be uniformly selected on each of the first curves to obtain first data, and the first data may be used as the first key data.
Further, in an embodiment, the step b includes:
step b1, according to the first numerical value, selecting coordinate data on each first curve in the first curve group to obtain first data, and taking the first data as first key data.
In this embodiment, coordinate data is selected on each first curve in the first curve group according to the first numerical value to obtain first data, and the first data is used as first key data. Specifically, if the first value is 10, 10 coordinate data are selected on each curve, wherein the coordinate data include X-axis data and Y-axis data.
Further, in an embodiment, step 103 includes:
c, performing modular operation on the first byte quantity and the first curve quantity to obtain a second numerical value;
and d, determining first filling data according to the second numerical value and the second curve.
In the present embodiment, first, the first number of bytes is modulo-operated with the first numerical value to obtain the second numerical value, specifically, the first number of bytes of the plaintext data is 5, the first numerical value is 4, and then the second numerical value is 3, that is, 5-4 absolute value. Finally, the first filling data is determined according to the second numerical value and the second curve.
Further, in an embodiment, step d includes:
step d1, selecting coordinate data on the second curve to obtain a preset number of second coordinate data, and obtaining a second numerical matrix corresponding to the second coordinate data;
and d2, selecting second data in the second numerical value matrix according to a selection algorithm and the second numerical value, and taking the second data as first filling data.
In this embodiment, first, coordinate data is selected from a second curve to obtain a preset number of second coordinate data, and a second numerical matrix corresponding to the second coordinate data is obtained, and specifically, after a second mathematical model is established, the coordinate data is selected from the second curve to obtain the second numerical matrix.
And finally, selecting second data in the second numerical value matrix according to the selection algorithm and the second numerical value, wherein the second data is used as first filling data.
Step S104, determining first target encryption data corresponding to plaintext data according to the first key data, the first padding data and the plaintext data.
In this embodiment, a bit operation is performed according to the first key data, the first padding data, and the plaintext data to increase the security of the first encrypted data, thereby determining the first encrypted data corresponding to the plaintext data. The first encrypted data and the second byte number of the first padding data are taken as first target encrypted data.
Further, in an embodiment, the step S104 includes:
step e, carrying out bit operation on the plaintext data and the first key data to obtain third data;
step f, carrying out bit operation on the first filling data and the first key data to obtain fourth data;
step g, mixing the third data and the fourth data according to a preset mixing rule to obtain fifth data;
h, performing bit operation on the fifth data and the first key data to obtain sixth data;
i, translating the sixth data according to a preset translation rule to obtain seventh data;
step j, performing bit operation on the seventh data and the first key data to obtain first encrypted data;
and k, taking the first encrypted data and the second byte number of the first padding data as first target encrypted data.
In this embodiment, the plaintext data and the first key data are bit-operated to obtain the third data, wherein the bit operation may be bitwise and, bitwise or, bitwise xor, bitwise negation, etc., or may be a combination of multiple bit operation manners, such as bitwise and, bitwise or a combination. And then, carrying out bit operation on the first filling data and the first key data to obtain fourth data, carrying out byte position conversion on the third data and the fourth data according to a mixing rule, and taking the data which is formed by scattering the third data and the fourth data and then reintegrating as fifth data.
Then, the fifth data and the first key data are subjected to bit operation to obtain sixth data. Then, according to a preset translation rule, translating the sixth data to obtain seventh data, where the translation rule may be to swap every two bytes of the sixth data, for example, there are byte 1 and byte 2, and byte 1 is in front of byte 2, and then the swap bit is that byte 1 is behind byte 2, and the translation rule may also be to translate the sixth data by 3 bytes as a whole. And finally, performing bit operation on the seventh data and the first key data to obtain first encrypted data. And finally, taking the first encrypted data and the second byte quantity of the first padding data as first target encrypted data.
According to the plaintext data encryption method provided by the embodiment, plaintext data and the number of first bytes of the plaintext data are obtained, then a first curve group is generated according to a preset first mathematical model and a preset first curve number, a second curve is generated according to a preset second mathematical model, then first key data is determined according to the first curve group, the multiple of the first curve number is determined to be larger than or equal to the minimum value of the first byte number, if the minimum value is not equal to the first byte number, first filling data is determined according to the second curve, then first target encryption data corresponding to the plaintext data is determined according to the first key data, the first filling data and the plaintext data, a curve can be generated according to the preset mathematical model, the first key data and the first filling data are obtained according to the curve, encryption of the plaintext data is achieved according to the first key data and the first filling data, so that first target encryption data are obtained, the first key data in an encryption process is generated by the mathematical model, transmission of the first key data is not needed, and the security of encrypted files is improved.
Based on the first embodiment, a second embodiment of the plaintext data encryption method according to the present invention is proposed, and in this embodiment, step S104 includes:
step S201, obtaining second target encrypted data, where the second target encrypted data includes second encrypted data and a third byte number;
step S202, determining a second curve quantity corresponding to the second encrypted data, and determining a third mathematical model and a fourth mathematical model corresponding to the second curve quantity;
step S203, generating a third curve group according to the third mathematical model, and generating a fourth curve according to the fourth mathematical model;
step S204, determining second key data according to each third curve in the third curve group, and determining second filling data according to the fourth curve and the number of third bytes;
step S202, determining second plaintext data corresponding to second encrypted data according to the second key data, the second padding data, and the second encrypted data.
In this embodiment, first, second target encrypted data is obtained, where the second target encrypted data includes the second encrypted data and a third number of bytes, then, a second number of curves corresponding to the second encrypted data is determined, for example, the second number of curves is 3, and a third mathematical model and a fourth mathematical model corresponding to the second number of curves are determined.
And then, generating a third curve group according to the third mathematical model, generating a fourth curve according to the fourth mathematical model, selecting data on each third curve in the third curve group to obtain second key data, and selecting data on the fourth curve according to the fourth curve and the third byte number to obtain second filling data.
And finally, determining second plaintext data corresponding to the second encrypted data according to the second key data, the second filling data and the second encrypted data.
In this embodiment, by obtaining second target encrypted data, where the second target encrypted data includes second encrypted data and a third number of bytes, then determining a second curve number corresponding to the second encrypted data, determining a third mathematical model and a fourth mathematical model corresponding to the second curve number, then generating a third curve group according to the third mathematical model, generating a fourth curve according to the fourth mathematical model, then determining second key data according to each third curve in the third curve group, determining second filler data according to the fourth curve and the third number of bytes, then determining second plaintext data corresponding to the second encrypted data according to the second key data, the second filler data, and the second encrypted data, determining corresponding third mathematical model and fourth mathematical model according to the second number of key bits, and thus determining the second key data and second filler data according to the third key data, the second filler data, and the second encrypted data, implementing decryption on the second encrypted data to obtain second encrypted data, and further implementing a second key transmission process for decrypting the second encrypted data without using the second key data, the second mathematical model and the plaintext data are generated.
The present invention also provides a plaintext data encryption apparatus, and referring to fig. 3, the plaintext data encryption apparatus includes:
an obtaining module 10, configured to obtain plaintext data and a first byte number of the plaintext data;
the generation module 20 is configured to generate a first curve group according to a preset first mathematical model and a preset first curve number, and generate a second curve according to a preset second mathematical model;
a first determining module 30, configured to determine first key data according to the first curve group, determine that a multiple of the first curve number is greater than or equal to a minimum value of the first byte number, and if the minimum value is not equal to the first byte number, determine first padding data according to the second curve;
the second determining module 40 is configured to determine, according to the first key data, the first padding data, and the plaintext data, first target encrypted data corresponding to the plaintext data.
Further, the first determining module 30 is further configured to:
dividing the first number of bytes by the first number of curves to obtain a first value;
and determining first key data according to the first numerical value and the first curve group.
Further, the first determining module 30 is further configured to:
and selecting coordinate data on each first curve in the first curve group according to the first numerical value to obtain first data, and using the first data as first key data.
Further, the first determining module 30 is further configured to:
performing a modulus operation on the first byte quantity and the first curve quantity to obtain a second numerical value;
and determining first filling data according to the second numerical value and the second curve.
Further, the first determining module 30 is further configured to:
selecting coordinate data on the second curve to obtain a preset number of second coordinate data, and obtaining a second numerical matrix corresponding to the second coordinate data;
and selecting second data in the second numerical value matrix according to a selection algorithm and the second numerical value, and taking the second data as first filling data.
Further, the second determining module 40 is further configured to:
performing bit operation on the plaintext data and the first key data to obtain third data;
performing a bit operation on the first padding data and the first key data to obtain fourth data;
mixing the third data and the fourth data according to a preset mixing rule to obtain fifth data;
performing bit operation on the fifth data and the first key data to obtain sixth data;
translating the sixth data according to a preset translation rule to obtain seventh data;
performing bit operation on the seventh data and the first key data to obtain first encrypted data;
and taking the first encrypted data and the second byte number of the first padding data as first target encrypted data.
Further, the plaintext data encryption apparatus is further configured to:
acquiring second target encrypted data, wherein the second target encrypted data comprises second encrypted data and a third byte number;
determining a second curve quantity corresponding to the second encrypted data, and determining a third mathematical model and a fourth mathematical model corresponding to the second curve quantity;
generating a third curve group according to the third mathematical model, and generating a fourth curve according to the fourth mathematical model;
determining second key data according to each third curve in the third curve group, and determining second filling data according to the fourth curve and the number of third bytes;
and determining second plaintext data corresponding to second encrypted data according to the second key data, the second filling data and the second encrypted data.
The method executed by each program unit can refer to each embodiment of the plaintext data encryption method of the present invention, and is not described herein again.
In addition, an embodiment of the present invention further provides a plaintext data encryption device, where the plaintext data encryption device includes: a memory, a processor and a plaintext data encryption program stored on the memory and executable on the processor, the plaintext data encryption program when executed by the processor implementing the steps of the plaintext data encryption method as described above.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a plaintext data encryption program is stored, and when the plaintext data encryption program is executed by a processor, the plaintext data encryption program implements the steps of the plaintext data encryption method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention or the portions contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A plaintext data encryption method, comprising:
acquiring plaintext data and a first byte number of the plaintext data;
generating a first curve group according to a preset first mathematical model and a preset first curve quantity, and generating a second curve according to a preset second mathematical model;
determining first key data according to the first curve group, determining that the multiple of the first curve number is larger than or equal to the minimum value of the first byte number, and determining first filling data according to the second curve if the minimum value is not equal to the first byte number;
and determining first target encrypted data corresponding to plaintext data according to the first key data, the first filling data and the plaintext data.
2. The plaintext data encryption method of claim 1, wherein the step of determining first key data based on the first curve group comprises:
dividing the first number of bytes by the first number of curves to obtain a first value;
and determining first key data according to the first numerical value and the first curve group.
3. The plaintext data encryption method of claim 2, wherein the step of determining first key data based on the first value and the first set of curves comprises:
and selecting coordinate data on each first curve in the first curve group according to the first numerical value to obtain first data, and using the first data as first key data.
4. The plaintext data encryption method according to any one of claims 1 to 3, wherein the step of determining first padding data based on the second curve comprises:
performing a modulus operation on the first byte quantity and the first curve quantity to obtain a second numerical value;
and determining first filling data according to the second numerical value and the second curve.
5. The plaintext data encryption method of claim 4, wherein the determining the first filler data based on the second value and the second curve comprises:
selecting coordinate data on the second curve to obtain a preset number of second coordinate data, and obtaining a second numerical matrix corresponding to the second coordinate data;
and selecting second data in the second numerical value matrix according to a selection algorithm and the second numerical value, and taking the second data as first filling data.
6. The plaintext data encryption method according to claim 1, wherein the step of determining the first target encryption data corresponding to the plaintext data based on the first key data, the first padding data, and the plaintext data comprises:
performing bit operation on the plaintext data and the first key data to obtain third data;
performing bit operation on the first padding data and the first key data to obtain fourth data;
mixing the third data and the fourth data according to a preset mixing rule to obtain fifth data;
performing bit operation on the fifth data and the first key data to obtain sixth data;
translating the sixth data according to a preset translation rule to obtain seventh data;
performing bit operation on the seventh data and the first key data to obtain first encrypted data;
and taking the first encrypted data and the second byte number of the first padding data as first target encrypted data.
7. The plaintext data encryption method according to claim 1, wherein the plaintext data encryption method further comprises:
acquiring second target encrypted data, wherein the second target encrypted data comprises second encrypted data and a third byte number;
determining a second curve quantity corresponding to the second encrypted data, and determining a third mathematical model and a fourth mathematical model corresponding to the second curve quantity;
generating a third curve group according to the third mathematical model, and generating a fourth curve according to the fourth mathematical model;
determining second key data according to each third curve in the third curve group, and determining second filling data according to the fourth curve and the number of third bytes;
and determining second plaintext data corresponding to second encrypted data according to the second key data, the second padding data and the second encrypted data.
8. A plaintext data encryption apparatus, the plaintext data encryption apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring plaintext data and the first byte quantity of the plaintext data;
the generating module is used for generating a first curve group according to a preset first mathematical model and a preset first curve quantity and generating a second curve according to a preset second mathematical model;
a first determining module, configured to determine first key data according to the first curve group, determine that a multiple of the first curve number is greater than or equal to a minimum value of the first byte number, and if the minimum value is not equal to the first byte number, determine first padding data according to the second curve;
and the second determining module is used for determining first target encryption data corresponding to the plaintext data according to the first key data, the first padding data and the plaintext data.
9. A plaintext data encryption apparatus, the plaintext data encryption apparatus comprising: a memory, a processor, and a plaintext data encryption program stored on the memory and executable on the processor, the plaintext data encryption program when executed by the processor implementing the steps of the plaintext data encryption method as recited in any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a plaintext data encryption program is stored thereon, and when executed by a processor, implements the steps of the plaintext data encryption method according to any one of claims 1 to 7.
CN202211291557.6A 2022-10-20 2022-10-20 Plaintext data encryption method, device, equipment and computer readable storage medium Pending CN115632773A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211291557.6A CN115632773A (en) 2022-10-20 2022-10-20 Plaintext data encryption method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211291557.6A CN115632773A (en) 2022-10-20 2022-10-20 Plaintext data encryption method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115632773A true CN115632773A (en) 2023-01-20

Family

ID=84907267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211291557.6A Pending CN115632773A (en) 2022-10-20 2022-10-20 Plaintext data encryption method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115632773A (en)

Similar Documents

Publication Publication Date Title
CN108769027B (en) Secure communication method, device, mobile terminal and storage medium
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN112989430A (en) Integrity verification method and device, terminal equipment and verification server
JP2005050162A (en) Hardware protection key and method for reissuing it
CN109325357B (en) RSA-based information value calculation method, device and readable storage medium
WO2019127863A1 (en) Key saving device and method, key obtaining device and method, and computer readable storage medium
CN104115440A (en) Preventing pattern recognition in electronic code book encryption
US11323254B2 (en) Device, system, and method of generating and handling cryptographic parameters
WO2019148397A1 (en) Storage of decomposed sensitive data in different application environments
CN109766705B (en) Circuit-based data verification method and device and electronic equipment
CN108933670B (en) Digital signature method and device, mobile device and storage medium
CN107977581A (en) Data processing method, device and computer-readable recording medium
CN111130791B (en) Data signature method, electronic device and computer readable storage medium
CN110990846B (en) Information storage method, device and computer readable storage medium
CN110287733B (en) File tamper-proofing method and device
KR102657388B1 (en) Electronic device for selecting key used for encryption based on an information quantity of data to be encrypted and method for the same
CN114629649B (en) Data processing method and device based on cloud computing and storage medium
CN115632773A (en) Plaintext data encryption method, device, equipment and computer readable storage medium
CN104767622A (en) Encryption method and device
CN115276966A (en) Data encryption method and device, electronic equipment and storage medium
CN110378140B (en) Method, device and system for verifying attribution of deep neural network model
CN110968549B (en) File storage method, device, electronic equipment and medium
CN115174758A (en) Picture encryption method and device, electronic equipment and storage medium
CN108763964B (en) Data processing method and device, readable storage medium and equipment
CN109743289B (en) Data verification method and device based on neural network and electronic equipment

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