CN115001758A - Short byte message security encryption method based on quantum encryption - Google Patents
Short byte message security encryption method based on quantum encryption Download PDFInfo
- Publication number
- CN115001758A CN115001758A CN202210543145.0A CN202210543145A CN115001758A CN 115001758 A CN115001758 A CN 115001758A CN 202210543145 A CN202210543145 A CN 202210543145A CN 115001758 A CN115001758 A CN 115001758A
- Authority
- CN
- China
- Prior art keywords
- message
- data
- length
- preset
- ciphertext
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 13
- 238000013507 mapping Methods 0.000 claims description 13
- 230000009466 transformation Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013501 data transformation Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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
-
- 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/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0852—Quantum cryptography
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)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Theoretical Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a short byte message safety encryption method based on quantum encryption, which judges the length of a message, and under the condition that the length of the message is smaller than the preset length, the message is regarded as a short byte message, a filling algorithm is randomly selected to expand the message into a pseudo message with the specified length, the length of the pseudo message is expanded and then quantum encryption is carried out, namely the long byte message is subjected to quantum encryption, and the long byte message can avoid the problem that a ciphertext formed after the short byte message is subjected to quantum encryption is easy to be associatively identified, so that the encryption safety of plaintext data is improved.
Description
Technical Field
The invention relates to the technical field of quantum security, in particular to a short byte message security encryption method based on quantum encryption.
Background
Due to the rapid development of the internet, the life of people becomes more convenient and faster, the communication with the outside world is smoother, and people can transmit various files through the network, realize conversation and exchange and the like. With the rapid development of computer networks, a lot of information hidden dangers, especially information security problems, are brought, and the problems exist all the time since the birth of the computer networks, and people are researching various encryption technologies to improve the security of information transmission.
Encryption is the transformation of data into a ciphertext that anyone cannot read without a correct key by performing cryptographic arithmetic, and in order to read the ciphertext, the ciphertext must be transformed into its original form: plaintext; and a double cipher containing a cipher text used to mathematically transform the cipher text is the key. In the case of key encryption, even if a piece of information is intercepted, it cannot be read.
With the advent of quantum computers with subversive improvements in computational speed, quantum cryptography has become a new and unique secure way of encrypting data against quantum computational attacks. Quantum encryption adopts a one-time pad mode based on a quantum network, and the encrypted ciphertext can not be decoded theoretically through the dynamic change of a secret key; however, because the length of the ciphertext after quantum encryption is consistent with the length of the plaintext, and the quantum key is a true random number, if the plaintext is a short message, the formed ciphertext is also short, and if the ciphertext exactly collides with a quantum key which is all 0 or most 0 during quantum encryption, the obtained ciphertext has most contents the same as the plaintext, even the ciphertext is the same as the plaintext, and the ciphertext is easy to be identified in an associative way. Long byte plaintext messages avoid this problem, but are fatal to short byte plaintext messages.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a short byte message security encryption method based on quantum encryption, and solves the problems that in the existing quantum encryption, the probability of identifying a ciphertext encrypted by a short byte message is high, and the ciphertext is not safe enough. The invention effectively makes up the deficiency of quantum encryption in short byte message encryption, adopts short byte message data to expand into pseudo message data with specified length, and then carries out quantum encryption on the pseudo message data, thereby effectively solving the disadvantage of quantum encryption in short byte message encryption and further improving the security of quantum encryption.
The technical scheme is as follows: the invention provides a short byte message security encryption method based on quantum encryption, which comprises the following steps:
(1) the sender and the receiver are both provided with the same preset filling algorithm, and a mapping table for mutual mapping of the data identification and the filling algorithm is established; the sender and the receiver also share a group of key strings;
(2) the sender judges the length of the message to be sent, if the length of the message is greater than or equal to the preset length, a preset identifier is added to the head of the message, the message added with the preset identifier is subjected to quantum encryption through a shared key string to obtain a ciphertext, and the ciphertext is sent to a receiver; if the length of the message is smaller than the preset length, randomly selecting a filling algorithm to expand the message into a pseudo message with the specified length, adding a data identifier corresponding to the filling algorithm at the head of the pseudo message, carrying out quantum encryption on the pseudo message with the added data identifier through a shared key string to obtain a ciphertext, and sending the ciphertext to a receiver;
(3) after receiving the ciphertext, the receiver decrypts by using the shared key string to obtain decrypted data, identifies the head of the decrypted data, and if the identified identifier is a preset identifier, decrypts the data except the preset identifier to obtain final data; if the identified identification is the data identification, extracting a filling algorithm corresponding to the data identification according to the mapping table, and inputting data except the data identification of the decrypted data into the filling algorithm to obtain final data; the final data is the message that the sender needs to send.
Further, the preset filling algorithm is one or more of a DES algorithm, a 3DES algorithm or an AES algorithm.
Further, the preset length is 128 bits, 64 bits or 256 bits.
Further, the length of the preset identifier is the same as the length of the data identifier.
Further, the length of the preset identifier and the length of the data identifier are both 2 bytes.
The invention has the beneficial effects that: according to the invention, by judging the length of the message, the message is considered as a short byte message under the condition that the length of the message is smaller than the preset length, the filling algorithm is randomly selected to expand the message into a pseudo message with the specified length, the length of the pseudo message is expanded and then quantum encryption is carried out, namely the long byte message is subjected to quantum encryption, and the long byte message can avoid the problem that a ciphertext formed after the short byte message is subjected to quantum encryption is easy to associate and identify, so that the encryption safety of plaintext data is improved.
Drawings
FIG. 1 is a schematic diagram of a plaintext header with an appended identification structure;
fig. 2 is a flow chart of quantum cryptography in embodiment 1.
Detailed Description
The invention is further described below with reference to the following figures and examples:
the quantum encryption technology is to obtain a quantum key in a one-time pad mode and then perform exclusive or operation on a plaintext message to obtain a final ciphertext, for a plaintext message which is longer, the ciphertext obtained after quantum encryption is correspondingly very long, and the possibility of being identified is very low, but the plaintext message has uncertainty, the data length of the plaintext message cannot be ensured, and the ciphertext obtained after quantum encryption of a short-byte plaintext message is very short, so that the probability of identifying the ciphertext is very high. Because the quantum key is a true random number, a section of the short byte plaintext message subjected to quantum encryption is just 0, and the ciphertext and the plaintext message obtained after the XOR operation are the same and do not play a role in quantum encryption; even if not exactly 0, the resulting ciphertext is not exactly the same as the plaintext message, but since the plaintext message itself is very short, there is a possibility that it is associatively recognized, for example: the ciphertext formed after encrypting the short byte message quantum is he x o, which can be easily associated as hello. The probability of the short byte plaintext message transmission is not low in practical application, so the invention provides a short byte message security encryption method based on quantum encryption, which is used for solving the problem that a ciphertext formed after the short byte message quantum encryption is easy to be identified by association.
The invention relates to a short byte message security encryption method based on quantum encryption, which comprises the following steps:
(1) the sender and the receiver are both provided with the same preset filling algorithm, and a mapping table for mutual mapping of the data identification and the filling algorithm is established; the preset filling algorithm is one or more of a DES algorithm, a 3DES algorithm or an AES algorithm, and can be other existing filling algorithms; establishing a mapping table as follows: 1 denotes a DES algorithm, 2 denotes a 3DES algorithm, 3 denotes an AES algorithm, etc.; finally, the sender and the receiver also share a group of key strings, and the key strings are used for quantum encryption;
(2) the sender judges the length of the message to be sent so as to determine whether the message is a short byte message or a long byte message, the byte length standard of the measurement message is not fixed, and corresponding adjustment can be preset according to requirements, for example, the preset length is 128bit, 64bit or 256bit, if the length of the message is greater than or equal to the preset length, the message is regarded as a long byte message, a preset identifier is added to the head of the message, the message added with the preset identifier is subjected to quantum encryption through a shared key string to obtain a ciphertext, and the ciphertext is sent to the receiver; if the length of the message is smaller than the preset length, the message is regarded as a short byte message, a filling algorithm is randomly selected to expand the message into a pseudo message with the specified length, the specified length is larger than or equal to the preset length as far as possible, and the pseudo message is only required to be identified and associated difficultly; adding a data identifier corresponding to a filling algorithm at the head of the pseudo message, carrying out quantum encryption on the pseudo message added with the data identifier through a shared key string to obtain a ciphertext, and sending the ciphertext to a receiver;
as shown in fig. 1, the length of the preset identifier is the same as the length of the data identifier, and the length of the preset identifier and the length of the data identifier are both 2 bytes, so that no matter a long-byte message or a short-byte message, a 2-byte identifier needs to be attached to the head of the message, and a receiver only needs to judge whether the 2-byte identifier attached to the head is the preset identifier or the data identifier, so as to know whether the data is expanded.
(3) After receiving the ciphertext, the receiver decrypts by using the shared key string to obtain decrypted data, and identifies the head of the decrypted data, that is, judges whether the head is attached with 2-byte identifier as a preset identifier or a data identifier, if the identified identifier is the preset identifier, the decrypted data except the preset identifier is final data, that is, the message to be sent by the sender; if the identified identification is the data identification, extracting a filling algorithm corresponding to the data identification according to the mapping table, inputting the data except the data identification of the decrypted data into the filling algorithm for reduction, and obtaining the final data which is the message required to be sent by the sender.
Therefore, by judging the length of the message, the message is regarded as a short byte message under the condition that the length of the message is smaller than the preset length, the filling algorithm is randomly selected to expand the message into a pseudo message with the specified length, the length of the pseudo message is expanded and then quantum encryption is carried out, namely the message which is changed into a long byte is subjected to quantum encryption, and the long byte message can avoid the problem that a ciphertext formed after the short byte message is subjected to quantum encryption is easy to associate and recognize, so that the encryption safety of plaintext data is improved.
Example 1
Quantum encryption of a sender:
the sender and receiver need to agree on a shared set of key strings and also agree on the same preset padding algorithm, for example: DES, 3DES, AES algorithm, etc., and establish a mapping table, and ensure that the sender and the receiver have the same mapping table, i.e. what data identifier is agreed to represent what padding algorithm, for example: 1 represents DES algorithm, 2 represents 3DES algorithm, 3 represents AES algorithm, etc., and this data flag appends a length occupying 2 bytes to the header of the message;
after the sender generates the plaintext message to be sent, as shown in fig. 2, the length of the plaintext message needs to be determined first, so as to determine whether the plaintext message is a short byte message or a long byte message. The byte length standard for measuring the plaintext message is not fixed, and may be adjusted accordingly according to the application scenario, where the preset length is 128 bits as an example. A plaintext message smaller than 128 bits is considered a short byte message and larger than 128 bits is considered a long byte message. Because the possibility of identifiable association of the ciphertext after the short byte message quantum encryption is higher, the short byte message is expanded into a pseudo message with a specified length through an agreed preset filling algorithm, and the specified length is larger than or equal to 128 bits as much as possible, namely, the short byte message is converted into an unidentifiable long byte message. The invention takes 128bit as an example, so short byte messages smaller than 128bit need to be converted into a new unidentifiable long byte plaintext message; whereas long byte messages do not need to be processed.
Whether the plaintext message to be sent is a long byte message or a short byte message, a 2-byte identifier needs to be added to the head of the plaintext message, and a preset identifier is added to the head of the message for the long byte message; and randomly selecting a filling algorithm to expand the short byte message into a pseudo message with a specified length, and adding a data identifier corresponding to the filling algorithm at the head of the pseudo message. The reason is as follows: if the 2-byte identifier is not added, the receiver does not know whether the message sent by the sender is a long-byte or a short-byte message, which results in that the receiver cannot judge whether to perform inverse data transformation operation, so that in order to ensure consistency and operability, the 2-byte identifier needs to be added to the header of the long-byte message or the short-byte message. The preset identifier may be: 0, meaning no algorithm is used, no transformation is required; and the data identification may be: 1 denotes a DES algorithm, 2 denotes a 3DES algorithm, 3 denotes an AES algorithm, and the like.
Then quantum encryption is carried out on the long byte message added with the preset identifier through a shared key string to obtain a ciphertext, and the ciphertext is sent to a receiver; or quantum encryption is carried out on the pseudo message added with the data identifier through a shared key string to obtain a ciphertext, and the ciphertext is sent to a receiver;
quantum decryption of a receiver:
after receiving the ciphertext, the receiver decrypts the ciphertext by using the shared key string to obtain decrypted data, and marks the unprocessed decrypted data as C1;
at this time, the header of C1 is attached with 2-byte identification information, the receiver needs to intercept the 2-byte identification information of the header first, and the decrypted data left after the interception is marked as C2. After the 2 bytes of identification information is read, the next operation is determined according to the content of the identification information.
If the identification information is a preset identification, no transformation is performed, an algorithm is not needed, namely, the message is originally a long byte message, and C2 is a message which needs to be sent by a sender; if the identification information is the data identification, extracting a filling algorithm corresponding to the data identification according to the mapping table, and inputting C2 into the filling algorithm for reduction, wherein the obtained data is final data, and the final data is a message required to be sent by the sender. At this point, the receiver acquires the message of the sender.
Claims (5)
1. A short byte message security encryption method based on quantum encryption is characterized by comprising the following steps:
(1) the sender and the receiver are both provided with the same preset filling algorithm, and a mapping table for mutual mapping of the data identification and the filling algorithm is established; the sender and the receiver also share a group of key strings;
(2) the sender judges the length of the message to be sent, if the length of the message is greater than or equal to the preset length, a preset identifier is added to the head of the message, the message added with the preset identifier is subjected to quantum encryption through a shared key string to obtain a ciphertext, and the ciphertext is sent to a receiver; if the length of the message is smaller than the preset length, randomly selecting a filling algorithm to expand the message into a pseudo message with the specified length, adding a data identifier corresponding to the filling algorithm at the head of the pseudo message, carrying out quantum encryption on the pseudo message with the added data identifier through a shared key string to obtain a ciphertext, and sending the ciphertext to a receiver;
(3) after receiving the ciphertext, the receiver decrypts by using the shared key string to obtain decrypted data, identifies the head of the decrypted data, and if the identified identifier is a preset identifier, decrypts the data except the preset identifier to obtain final data; if the identified identification is the data identification, extracting a filling algorithm corresponding to the data identification according to the mapping table, and inputting data except the data identification of the decrypted data into the filling algorithm to obtain final data; the final data is the message that the sender needs to send.
2. The method for safely encrypting the short byte messages based on the quantum encryption as claimed in claim 1, wherein: the preset filling algorithm is one or more of a DES algorithm, a 3DES algorithm or an AES algorithm.
3. The method for safely encrypting the short byte messages based on the quantum encryption as claimed in claim 1, wherein: the preset length is 128 bits, 64 bits or 256 bits.
4. The method for safely encrypting the short byte messages based on the quantum encryption as claimed in claim 1, wherein: the length of the preset mark is the same as that of the data mark.
5. The method for safely encrypting the short byte messages based on the quantum encryption as claimed in claim 4, characterized in that: the length of the preset mark and the length of the data mark are both 2 bytes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210543145.0A CN115001758B (en) | 2022-05-18 | 2022-05-18 | Quantum encryption-based short byte message security encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210543145.0A CN115001758B (en) | 2022-05-18 | 2022-05-18 | Quantum encryption-based short byte message security encryption method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115001758A true CN115001758A (en) | 2022-09-02 |
CN115001758B CN115001758B (en) | 2024-05-07 |
Family
ID=83027380
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210543145.0A Active CN115001758B (en) | 2022-05-18 | 2022-05-18 | Quantum encryption-based short byte message security encryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115001758B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116232762A (en) * | 2023-05-05 | 2023-06-06 | 广东广宇科技发展有限公司 | Encryption data transmission method based on quantum key |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140169555A1 (en) * | 2011-03-25 | 2014-06-19 | Fujitsu Limited | Information processing apparatus, tampering detection apparatus, information processing method, tampering detection method, and computer product |
US20140369498A1 (en) * | 2000-03-29 | 2014-12-18 | Wolfgang Hammersmith | One-time-pad encryption with central key service |
US9614668B1 (en) * | 2016-09-14 | 2017-04-04 | ISARA Corporation | Conversion schemes for cryptography systems |
CN106789053A (en) * | 2016-12-13 | 2017-05-31 | 四川长虹电器股份有限公司 | Random ciphertext generation method and system, decryption method and system |
CN108390860A (en) * | 2018-01-24 | 2018-08-10 | 北京奇艺世纪科技有限公司 | A kind of encryption and decryption method and device of data packet |
US20180337768A1 (en) * | 2017-05-22 | 2018-11-22 | Entit Software Llc | Format preserving encryption with padding |
CN109756326A (en) * | 2017-11-07 | 2019-05-14 | 中兴通讯股份有限公司 | Quantum encryption communication method, equipment and computer readable storage medium |
KR20200067265A (en) * | 2018-09-07 | 2020-06-12 | 고려대학교 산학협력단 | Apparatus and Method for Patterned Cipher Block for Real-Time Data Communication |
-
2022
- 2022-05-18 CN CN202210543145.0A patent/CN115001758B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140369498A1 (en) * | 2000-03-29 | 2014-12-18 | Wolfgang Hammersmith | One-time-pad encryption with central key service |
US20140169555A1 (en) * | 2011-03-25 | 2014-06-19 | Fujitsu Limited | Information processing apparatus, tampering detection apparatus, information processing method, tampering detection method, and computer product |
US9614668B1 (en) * | 2016-09-14 | 2017-04-04 | ISARA Corporation | Conversion schemes for cryptography systems |
CN106789053A (en) * | 2016-12-13 | 2017-05-31 | 四川长虹电器股份有限公司 | Random ciphertext generation method and system, decryption method and system |
US20180337768A1 (en) * | 2017-05-22 | 2018-11-22 | Entit Software Llc | Format preserving encryption with padding |
US11115184B2 (en) * | 2017-05-22 | 2021-09-07 | Micro Focus Llc | Format preserving encryption with padding |
CN109756326A (en) * | 2017-11-07 | 2019-05-14 | 中兴通讯股份有限公司 | Quantum encryption communication method, equipment and computer readable storage medium |
CN108390860A (en) * | 2018-01-24 | 2018-08-10 | 北京奇艺世纪科技有限公司 | A kind of encryption and decryption method and device of data packet |
KR20200067265A (en) * | 2018-09-07 | 2020-06-12 | 고려대학교 산학협력단 | Apparatus and Method for Patterned Cipher Block for Real-Time Data Communication |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116232762A (en) * | 2023-05-05 | 2023-06-06 | 广东广宇科技发展有限公司 | Encryption data transmission method based on quantum key |
Also Published As
Publication number | Publication date |
---|---|
CN115001758B (en) | 2024-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240160792A1 (en) | Cryptographic method for verifying data | |
CN110138795B (en) | Multi-step mixed encryption and decryption method in communication process | |
CN109005027B (en) | Random data encryption and decryption method, device and system | |
US20240250826A1 (en) | Cryptographic method for verifying data | |
CN112929166B (en) | Master station, slave station and data transmission system based on Modbus-TCP protocol | |
CN112653719A (en) | Automobile information safety storage method and device, electronic equipment and storage medium | |
CN117278324B (en) | Message encryption transmission method and system | |
CN114499857B (en) | Method for realizing data correctness and consistency in encryption and decryption of large data quanta | |
CN109005151A (en) | A kind of encryption of information, decryption processing method and processing terminal | |
CN118337498A (en) | Data transmission method based on symmetric key pool | |
CN115001758A (en) | Short byte message security encryption method based on quantum encryption | |
CN112738037B (en) | Data encryption communication method | |
Shirole et al. | Review paper on data security in cloud computing environment | |
CN108494554B (en) | Data symmetric encryption method based on double plaintexts | |
CN116707778A (en) | Data hybrid encryption transmission method and device and electronic equipment | |
CN114615054B (en) | Dynamic encryption transmission method based on code table | |
CN110022213A (en) | A kind of more level of confidentiality processing methods based on quantum key protection computer data | |
CN114978711A (en) | Data transmission method and system for symmetric encryption of dynamic secret key | |
JP2005114870A (en) | Cryptocommunication system | |
Manikandaprabhu et al. | A Review of Encryption and Decryption of Text Using the AES Algorithm | |
Sharma et al. | A performance test on symmetric encryption algorithms-RC2 Vs rijndael | |
CN111310211A (en) | Method for encrypting database by using SM4 algorithm | |
CN113014531B (en) | Method for encrypting and transmitting e-mail data | |
Mohamed | Wireless Communication Systems: Confidentiality: Encryption and Decryption | |
Gan | Review on Cryptography Techniques in Network Security |
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 |