CN113872753B - Encryption transmission method and device based on SHA256 sequence form data - Google Patents
Encryption transmission method and device based on SHA256 sequence form data Download PDFInfo
- Publication number
- CN113872753B CN113872753B CN202111455178.1A CN202111455178A CN113872753B CN 113872753 B CN113872753 B CN 113872753B CN 202111455178 A CN202111455178 A CN 202111455178A CN 113872753 B CN113872753 B CN 113872753B
- Authority
- CN
- China
- Prior art keywords
- data
- encrypted
- numerical value
- sha256
- encryption 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
The present disclosure provides an encryption transmission method and device based on SHA256 sequence form data, wherein the method comprises: acquiring data to be encrypted; writing the data to be encrypted into a data storage bit of a transmission sequence in an SHA256 sequence form, and encrypting the data stored in the data storage bit by using an encryption key to generate encrypted data; transmitting a transmission sequence in the form of a SHA256 sequence comprising said encrypted data. In this way, the data can be encrypted while an attacker is concerned less about the encrypted data.
Description
Technical Field
The embodiments of the present disclosure generally relate to the field of data encryption transmission technology, and more particularly, to an encryption transmission method and apparatus based on data in the form of SHA256 sequences.
Background
With the continuous development of internet technology, the internet has become an important part of people's life, work and entertainment. People can browse various information through the internet and can perform activities such as payment, file sending and receiving, instant messaging and the like.
With the increasing dependence of people on the internet, the information security in the internet is also very important. Currently, a part of data traffic generated in the internet may carry a fixed feature, which may be represented as a character string with a fixed length, for example. In this way, an attacker can determine which protocol is used for transmitting the current data traffic by intercepting the data traffic and then analyzing the fixed characteristics of the data traffic. Further, an attacker can steal or tamper the data traffic in a targeted manner according to the determined protocol, so that the information security of the user can be endangered.
SHA (Secure Hash Algorithm) is a common message digest Algorithm that can generate Hash values of different lengths according to input parameters. SHA256 uses 256 bits (32 bytes) to represent a hash value.
Important characteristics of SHA are uniqueness and irreversibility, generally speaking, the longer the number of bits of SHA hash, the more difficult it is to crack, and therefore, even if SHA256 hash is intercepted, it is difficult to attract attention of an attacker.
Disclosure of Invention
According to the embodiment of the disclosure, a data encryption method capable of being disguised as SHA256 hash is provided, and an encryption transmission scheme based on the data in the SHA256 sequence form is provided, which can encrypt the data and reduce the attention of an attacker to the encrypted data.
In a first aspect of the present disclosure, there is provided an encrypted transmission method based on data in the form of a SHA256 sequence, including:
acquiring data to be encrypted;
writing the data to be encrypted into a data storage bit of a transmission sequence in an SHA256 sequence form, and encrypting the data stored in the data storage bit by using an encryption key to generate encrypted data;
transmitting a transmission sequence in the form of a SHA256 sequence comprising said encrypted data.
In some embodiments, the transmission sequence further comprises:
the data encryption method comprises the steps of storing a storage bit of an encrypted data check code, a storage bit of an encrypted data check complement code, a storage bit of an encryption type, a storage bit of an encryption key, an initial identification bit of encrypted data in the data storage bit, and a storage bit of an encrypted data length.
In some embodiments, further comprising:
and when the data to be encrypted is written into the data storage bit, replacing the random numbers pre-stored in the corresponding positions in the data storage bit by using the numerical values in the data to be encrypted.
In some embodiments, further comprising:
adding the transmission sequence into a transmission queue comprising one or more common SHA256 codes for transmission, and determining that the corresponding common SHA256 code is the transmission sequence when the common SHA256 codes in the transmission sequence satisfy (s + leftover)% parity = =0, wherein s is the sum of integer values formed by data in data storage bits, the data in the data storage bits form an integer value every 4 bits, leftover is an encrypted data check code, and leftover is an encrypted data check complement code.
In some embodiments, the encrypting the data stored in the data storage bits with an encryption key to generate encrypted data includes:
and encrypting the data stored in the data storage bit by using the encryption key by adopting a plurality of methods to generate encrypted data, wherein different encryption modes correspond to different numerical values.
In some embodiments, the different encryption schemes correspond to different values, including:
the first numerical value is not encrypted correspondingly;
the second numerical value correspondingly uses the encryption key to sum the character segments in the data to be encrypted, and 16 is subtracted from the numerical value with the summation result larger than 16 until the summation result is smaller than 16;
the third numerical value correspondingly uses the encryption key to perform difference calculation on the character segments in the data to be encrypted, and 16 is added to the numerical value with the difference calculation result smaller than 0 until the difference calculation result is larger than 0;
the fourth numerical value correspondingly uses the encryption key to carry out XOR operation on the character segments in the data to be encrypted;
the fifth numerical value correspondingly uses the encryption key to perform exclusive or operation on the character segment generated after the character segment in the data to be encrypted is turned over;
the sixth numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating characters in the data to be encrypted to the left;
the seventh numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating the characters in the data to be encrypted to the right;
the character segment is the character segment in the data to be encrypted, and the length of the character segment is the same as that of the encryption key.
In some embodiments, the writing the data to be encrypted to the data storage bits of the transmission sequence in the form of a SHA256 sequence includes:
selecting a random number from the data storage bits, recording the initial position of the selected random number in the initial identification bit of the encrypted data in the data storage bits, sequentially writing the characters of the data to be encrypted from the initial position, and continuously writing the incompletely written characters from the initial position of the data storage bits.
In a second aspect of the present disclosure, there is provided an apparatus for encrypted transmission of data based on a SHA256 sequence, including:
the data acquisition module is used for acquiring data to be encrypted;
the data encryption module is used for writing the data to be encrypted into data storage bits of a transmission sequence in the SHA256 sequence form, and encrypting the data stored in the data storage bits by using an encryption key to generate encrypted data;
and the data sending module is used for sending the transmission sequence in the form of the SHA256 sequence including the encrypted data.
In a third aspect of the present disclosure, an electronic device is provided, comprising a memory having stored thereon a computer program and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method as set forth above.
By the encryption transmission method based on the SHA256 sequence form data, the data can be encrypted, and meanwhile, the attention of an attacker to the encrypted data can be reduced.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
fig. 1 shows a flowchart of an encrypted transmission method based on data in the form of an SHA256 sequence according to a first embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an encrypted transmission apparatus based on data in the form of an SHA256 sequence according to a second embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an encrypted transmission device based on data in the form of an SHA256 sequence according to a third embodiment of the present disclosure;
fig. 4 shows a data structure diagram of encrypted data according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
According to the encryption transmission method based on the SHA256 sequence form data, the data are encrypted, and the encrypted data are sent in the SHA256 sequence form, so that an attacker can reduce the attention degree of the encrypted data while encrypting the data. Specifically, the data structure of the encrypted data may be defined in advance so that the encrypted data is in the same form as the SHA256 sequence, thereby avoiding attracting the attention of an attacker.
In some optional embodiments of the present disclosure, a data structure of the encrypted data is as shown in fig. 4, and fig. 4 is a schematic diagram of the data structure of the encrypted data. The SHA256 sequence is a 256-bit binary character sequence, and the conversion is 64 bits as hexadecimal characters, and the data structure of the encrypted data of the embodiment of the disclosure adopts the hexadecimal characters. In some embodiment modes, bits 0 to 3 (4 bits in total) are storage bits of an encryption data check code for storing the encryption data check code, bits 4 to 7 (4 bits in total) are storage bits of an encryption data check complement for storing the encryption data check complement, bit 8 is storage bit of an encryption type for storing an encryption type value, bit 9 is storage bit of an encryption key for storing the encryption key, bit 10 is a start identification bit of the encryption data in the storage bits, bit 11 is a storage bit of an encryption data length for storing a length value of the encryption data, and bits 12 to 63 are storage bits of the data for storing the encryption data, wherein different values of the encryption type correspond to different encryption modes, and reference is made to subsequent embodiments of the present disclosure regarding the encryption modes, and the idea of the technical solution of the present disclosure is generally explained herein. Of course, it should be understood that the order of the different storage bits described above can be adjusted according to practical applications, and is only illustrated by way of example and should not be construed as limiting the technical solution of the present disclosure.
With the above explanations as background, the technical solutions of the present disclosure are explained below with reference to specific examples. Fig. 1 is a flowchart of an encrypted transmission method based on data in the form of an SHA256 sequence according to a first embodiment of the present disclosure. As shown in fig. 1, the method for encrypted transmission of data based on the SHA256 sequence format according to this embodiment may include the following steps:
s101: and acquiring data to be encrypted.
When data needs to be encrypted, the data to be encrypted needs to be acquired first. Generally, the data to be encrypted does not exceed 52 bits (hexadecimal), and when the data to be encrypted exceeds 52 bits, the data to be encrypted can be divided into data segments with the maximum length not exceeding 52 bits. The following description is made for the case where the data to be encrypted does not exceed 52 bits.
S102: and writing the data to be encrypted into the data storage bits of the transmission sequence in the SHA256 sequence form, and encrypting the data stored in the data storage bits by using an encryption key to generate encrypted data.
In this embodiment, the transmission sequence includes: the data encryption method comprises the steps of storing a storage bit of an encrypted data check code, a storage bit of an encrypted data check complement code, a storage bit of an encryption type, a storage bit of an encryption key, an initial identification bit of encrypted data in the data storage bit, and a storage bit of an encrypted data length. And generating n random numbers by using a random number generation algorithm, writing the generated n random numbers into the data storage bits, and replacing the random numbers pre-stored in the corresponding positions in the data storage bits by using the values in the data to be encrypted when the data to be encrypted is written into the data storage bits.
Specifically, a random number may be selected from the data storage bits, a start position of the selected random number is recorded in a start identification bit of the encrypted data in the data storage bits, characters of the data to be encrypted are sequentially written from the start position, and the incompletely written characters are continuously written from the start position of the data storage bits.
For example, the length of the data to be encrypted is 23 bits, the random number selected from the data storage bits is 14 th bit among 12 th to 63 th bits, and since 14+23<56, that is, the data to be encrypted can be completely accommodated from the 14 th bit to the 63 th bit of the data storage bits, the data to be encrypted is sequentially written from the 14 th bit. For another example, the length of the data to be encrypted is 23 bits, the random number selected from the data storage bits is 44 th bits of 12 th to 63 th bits, since 44+23>63, that is, the data to be encrypted cannot be completely accommodated from the 44 th bit to the 63 th bit of the data storage bits, the data to be encrypted is still sequentially written from the 44 th bit, the data to be encrypted can be written into the 63 th bit, and the remaining 3 bits are sequentially written from the 12 th bit, that is, the data to be encrypted is stored in the 12 th to 14 th bits of the data storage bits, and the 44 th to 63 th bits.
After the data to be encrypted is written into the data storage bits, the data in the data storage bits needs to be encrypted, that is, the data to be encrypted written into the data storage bits and the random numbers which are not replaced in the data storage bits are encrypted.
In the embodiment of the present disclosure, the data to be encrypted is encrypted by using an exclusive or algorithm. And encrypting the data stored in the data storage bits by using the encryption key by adopting a plurality of different XOR algorithms to generate encrypted data, wherein different encryption modes correspond to different numerical values. Specifically, the first value corresponds to no encryption operation; the second numerical value correspondingly uses the encryption key to sum the character segments in the data to be encrypted, and 16 is subtracted from the numerical value with the summation result larger than 16 until the summation result is smaller than 16; the third numerical value correspondingly uses the encryption key to perform difference calculation on the character segments in the data to be encrypted, and 16 is added to the numerical value with the difference calculation result smaller than 0 until the difference calculation result is larger than 0; the fourth numerical value correspondingly uses the encryption key to carry out XOR operation on the character segments in the data to be encrypted; the fifth numerical value correspondingly uses the encryption key to perform exclusive or operation on the character segment generated after the character segment in the data to be encrypted is turned over; the sixth numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating characters in the data to be encrypted to the left; the seventh numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating the characters in the data to be encrypted to the right; the character segment is the character segment in the data to be encrypted, and the length of the character segment is the same as that of the encryption key. The different values may be numbers from 0 to 6, respectively. For example, the second value (1) corresponds to summing the character segments in the data to be encrypted by using the encryption key, since it is mentioned above that the encryption key is a hexadecimal character, for example, the encryption key is a, the corresponding binary code is 1011, the character segment bit 6 in the data to be encrypted (the corresponding character segment is 0110), a +6 is greater than 16, 16 should be subtracted, and the result is 1, the encrypted character is 0001, that is, 1 is represented by hexadecimal code. Similarly, the xor operation is also performed by converting the hexadecimal code into the binary code, and then performing the xor operation on each bit of the character to be encrypted by using each bit of the key.
Through the process, the encryption of the data in the data storage bit is completed.
S103: transmitting a transmission sequence in the form of a SHA256 sequence comprising said encrypted data.
After encryption of the data in the data storage bits is completed, a transmission sequence in the form of a SHA256 sequence is sent that includes the encrypted data.
The encryption transmission method based on the SHA256 sequence form data can encrypt the data and reduce the attention of an attacker to the encrypted data.
In addition, as an optional embodiment of the present disclosure, in the above embodiment, after the encryption of the data in the data storage bits is completed, the transmission sequence may be added to a transmission queue including one or more normal SHA256 codes for transmission, that is, the transmission sequence is sent together with the normal SHA256 codes, and since the data structure of the transmission sequence is consistent with the normal SHA256 codes, it is difficult to attract the attention of an attacker. When the transmission sequence needs to be identified from the transmission queue, the common SHA256 codes in the transmission queue may be verified, and when the common SHA256 codes in the transmission queue satisfy (s + leftover)% parity = =0, it may be determined that the corresponding common SHA256 codes as the transmission sequence, where s is the sum of integer values composed of data in data storage bits, data in the data storage bits constitutes one integer value every 4 bits, leftover is an encrypted data check code, and leftover is an encrypted data check complement code. Specifically, the 12 th bit to the 63 th bit of the corresponding data storage bit in the normal SHA256 code may be sequentially combined from low to high into one integer value every 4 bits, so as to form 13 integer values, and then the values are accumulated to obtain s. And recognizing the common SHA256 code meeting the conditions as a transmission sequence, decrypting the data of the data storage bit according to the storage bit of the encryption type, the storage bit of the encryption key, the initial identification bit of the encryption data in the data storage bit and the data stored in the storage bit of the encryption data length, extracting the data to be encrypted, and completing decryption of the transmission sequence.
The method of the present embodiment can achieve similar technical effects as those of the above embodiments, and will not be repeated herein.
It should be noted that for simplicity of description, the above-mentioned method embodiments are described as a series of acts, but those skilled in the art should understand that the present disclosure is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present disclosure. Further, those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily essential to the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
Fig. 2 is a schematic structural diagram of an encryption transmission apparatus based on data in the form of an SHA256 sequence according to a second embodiment of the present disclosure. The encryption transmission device based on the data in the SHA256 sequence form of the embodiment includes:
a data obtaining module 201, configured to obtain data to be encrypted.
The data encryption module 202 is configured to write the data to be encrypted into a data storage bit of a transmission sequence in the SHA256 sequence format, and encrypt the data stored in the data storage bit with an encryption key to generate encrypted data.
A data sending module 203, configured to send a transmission sequence in the form of a SHA256 sequence that includes the encrypted data.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 3 shows a schematic block diagram of an electronic device 300 that may be used to implement embodiments of the present disclosure. As shown, device 300 includes a Central Processing Unit (CPU) 301 that may perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 302 or computer program instructions loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the device 300 can also be stored. The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, or the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (5)
1. An encryption transmission method based on SHA256 sequence form data, characterized by comprising:
acquiring data to be encrypted;
writing the data to be encrypted into data storage bits of a transmission sequence in the form of an SHA256 sequence, wherein n random numbers generated by using a random number generation algorithm are stored in the data storage bits, replacing the random numbers pre-stored in corresponding positions in the data storage bits with numerical values in the data to be encrypted when the data to be encrypted is written into the data storage bits, and encrypting the data stored in the data storage bits by using an encryption key by adopting a plurality of methods to generate encrypted data, wherein different encryption modes correspond to different numerical values, and the method comprises the following steps: the first numerical value is not correspondingly encrypted; the second numerical value correspondingly uses the encryption key to sum the character segments in the data to be encrypted, and 16 is subtracted from the numerical value with the summation result larger than 16 until the summation result is smaller than 16; the third numerical value correspondingly uses the encryption key to perform differencing on the character segments in the data to be encrypted, and 16 is added to the numerical value of which the differencing result is less than 0 until the differencing result is greater than 0; the fourth numerical value correspondingly uses the encryption key to carry out XOR operation on the character segments in the data to be encrypted; the fifth numerical value correspondingly uses the encryption key to perform exclusive or operation on the character segment generated after the character segment in the data to be encrypted is turned over; the sixth numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating characters in the data to be encrypted to the left; the seventh numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating the characters in the data to be encrypted to the right; the character segment is the character segment in the data to be encrypted, and the length of the character segment is the same as that of the encryption key; wherein the transmission sequence further comprises: the data encryption method comprises the following steps that an encrypted data check code storage bit, an encrypted data check complement storage bit, an encryption type storage bit, an encryption key storage bit, an initial identification bit of encrypted data in the data storage bit, and a storage bit of the encrypted data length;
adding the transmission sequence into a transmission queue comprising one or more common SHA256 codes for transmission, and determining that the corresponding common SHA256 code is the transmission sequence when the common SHA256 codes in the transmission queue meet (s + leftover)% parity = =0, wherein s is the sum of integer values formed by data in data storage bits, the data in the data storage bits form an integer value every 4 bits, leftover is an encrypted data check code, and parity is an encrypted data check complement code.
2. The encrypted transmission method according to claim 1, wherein the writing of the data to be encrypted into the data storage bits of the transmission sequence in the form of the SHA256 sequence comprises:
selecting a random number from the data storage bits, recording the initial position of the selected random number in the initial identification bit of the encrypted data in the data storage bits, sequentially writing the characters of the data to be encrypted from the initial position, and continuously writing the incompletely written characters from the initial position of the data storage bits.
3. An apparatus for encrypted transmission of data based on a SHA256 sequence, comprising:
the data acquisition module is used for acquiring data to be encrypted;
the data encryption module is used for writing the data to be encrypted into data storage bits of a transmission sequence in the SHA256 sequence form, n random numbers generated by using a random number generation algorithm are stored in the data storage bits, when the data to be encrypted is written into the data storage bits, the random numbers pre-stored at corresponding positions in the data storage bits are replaced by numerical values in the data to be encrypted, and the data stored in the data storage bits are encrypted by using encryption keys by adopting a plurality of methods to generate encrypted data, wherein different encryption modes correspond to different numerical values, and the data encryption module comprises the following steps: the first numerical value is not encrypted correspondingly; the second numerical value correspondingly uses the encryption key to sum the character segments in the data to be encrypted, and 16 is subtracted from the numerical value with the summation result larger than 16 until the summation result is smaller than 16; the third numerical value correspondingly uses the encryption key to perform difference calculation on the character segments in the data to be encrypted, and 16 is added to the numerical value with the difference calculation result smaller than 0 until the difference calculation result is larger than 0; the fourth numerical value correspondingly uses the encryption key to carry out XOR operation on the character segments in the data to be encrypted; the fifth numerical value correspondingly uses the encryption key to perform exclusive or operation on the character segment generated after the character segment in the data to be encrypted is turned over; the sixth numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating characters in the data to be encrypted to the left; the seventh numerical value corresponds to the digit of the numerical value corresponding to the encryption key in a manner of circularly translating the characters in the data to be encrypted to the right; the character segment is the character segment in the data to be encrypted, and the length of the character segment is the same as that of the encryption key; wherein the transmission sequence further comprises: the data encryption method comprises the following steps that an encrypted data check code storage bit, an encrypted data check complement storage bit, an encryption type storage bit, an encryption key storage bit, an initial identification bit of encrypted data in the data storage bit, and a storage bit of the encrypted data length;
and a data sending module, configured to add the transmission sequence into a transmission queue including one or more common SHA256 codes for transmission, and determine that the corresponding common SHA256 code is the transmission sequence when the common SHA256 codes in the transmission queue satisfy (s + leftover)% parity = =0, where s is a sum of integer values formed by data in data storage bits, data in the data storage bits forms an integer value every 4 bits, leftover is an encrypted data check code, and parity is an encrypted data check complement code.
4. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-2.
5. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111455178.1A CN113872753B (en) | 2021-12-01 | 2021-12-01 | Encryption transmission method and device based on SHA256 sequence form data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111455178.1A CN113872753B (en) | 2021-12-01 | 2021-12-01 | Encryption transmission method and device based on SHA256 sequence form data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113872753A CN113872753A (en) | 2021-12-31 |
CN113872753B true CN113872753B (en) | 2022-05-06 |
Family
ID=78985526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111455178.1A Active CN113872753B (en) | 2021-12-01 | 2021-12-01 | Encryption transmission method and device based on SHA256 sequence form data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113872753B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108023724A (en) * | 2016-11-04 | 2018-05-11 | 北京展讯高科通信技术有限公司 | Data transmission method and device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104683111A (en) * | 2015-03-18 | 2015-06-03 | 中国联合网络通信集团有限公司 | Encryption method and system based on MD5 |
CN111211888B (en) * | 2019-12-23 | 2023-04-18 | 新奇点智能科技集团有限公司 | Data sending method, data receiving method, sending end and receiving end |
US11902559B2 (en) * | 2020-05-04 | 2024-02-13 | Intel Corportation | Detection of video tampering |
CN112134689A (en) * | 2020-09-28 | 2020-12-25 | 中国银行股份有限公司 | Ciphertext generation method and device |
-
2021
- 2021-12-01 CN CN202111455178.1A patent/CN113872753B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108023724A (en) * | 2016-11-04 | 2018-05-11 | 北京展讯高科通信技术有限公司 | Data transmission method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113872753A (en) | 2021-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109150499B (en) | Method and device for dynamically encrypting data, computer equipment and storage medium | |
JP2021513141A (en) | Generation and identification of 2D barcodes | |
CN110266682B (en) | Data encryption method and device, mobile terminal and decryption method | |
US9762384B2 (en) | Generation and verification of alternate data having specific format | |
CN112437060B (en) | Data transmission method and device, computer equipment and storage medium | |
CN112019328B (en) | Encryption method, device, equipment and storage medium of IP address | |
CN106341384A (en) | Methods for facilitating secure communication | |
CN112469036A (en) | Message encryption and decryption method and device, mobile terminal and storage medium | |
CN111191255A (en) | Information encryption processing method, server, terminal, device and storage medium | |
US20200044838A1 (en) | Data encryption method and system using device authentication key | |
CN111865591A (en) | Symmetric encryption method, device, equipment and storage medium | |
CN115603907A (en) | Method, device, equipment and storage medium for encrypting storage data | |
CN112182109A (en) | Distributed data coding storage method based on block chain and electronic equipment | |
CN111865557B (en) | Verification code generation method and device | |
CN112054896A (en) | White box encryption method, device, terminal and storage medium | |
CN113938270A (en) | Data encryption method and device capable of flexibly reducing complexity | |
CN113794706A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN118113254A (en) | Random number seed generation method and device, electronic equipment and medium | |
CN113872753B (en) | Encryption transmission method and device based on SHA256 sequence form data | |
CN116455572A (en) | Data encryption method, device and equipment | |
CN115426111B (en) | Data encryption method and device, electronic equipment and storage medium | |
CN113922972B (en) | Data forwarding method and device based on MD5 identification code | |
CN113343269B (en) | Encryption method and device | |
CN113992345A (en) | Method and device for encrypting and decrypting webpage sensitive data, electronic equipment and storage medium | |
CN109240849B (en) | Data backup method and device and multipoint control unit for video conference system |
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 |