CN115001758B - Quantum encryption-based short byte message security encryption method - Google Patents

Quantum encryption-based short byte message security encryption method Download PDF

Info

Publication number
CN115001758B
CN115001758B CN202210543145.0A CN202210543145A CN115001758B CN 115001758 B CN115001758 B CN 115001758B CN 202210543145 A CN202210543145 A CN 202210543145A CN 115001758 B CN115001758 B CN 115001758B
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.)
Active
Application number
CN202210543145.0A
Other languages
Chinese (zh)
Other versions
CN115001758A (en
Inventor
董晓哲
杨鸽
徐静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Matrix Time Digital Technology Co Ltd
Original Assignee
Matrix Time Digital 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 Matrix Time Digital Technology Co Ltd filed Critical Matrix Time Digital Technology Co Ltd
Priority to CN202210543145.0A priority Critical patent/CN115001758B/en
Publication of CN115001758A publication Critical patent/CN115001758A/en
Application granted granted Critical
Publication of CN115001758B publication Critical patent/CN115001758B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • 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/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0852Quantum cryptography

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & 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 comprises the steps of judging the length of a message, and regarding the message as a short byte message under the condition that the length of the message is smaller than a preset length, randomly selecting a filling algorithm to expand the message into a pseudo message with a designated length, carrying out quantum encryption after the length of the pseudo message is expanded, namely carrying out quantum encryption on the message which becomes a long byte, wherein the long byte message can avoid the problem that ciphertext formed after the quantum encryption of the short byte message is easy to be associatively identified, thereby improving the encryption safety of plaintext data.

Description

Quantum encryption-based short byte message security encryption method
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
The rapid development of the Internet makes the life of people more convenient and smoother, and the communication with the outside world is more and smoother, and people can transmit various files through the network, realize dialogue communication and the like. With the rapid development of computer networks, many information hidden dangers, especially information security problems, are brought about at the same time, and the problems have been existed from the birth of computer networks, and people are researching various encryption technologies to improve the security of information transmission.
Encryption is to convert data into ciphertext which cannot be read by anyone without a correct key through cryptographic arithmetic, and in order to read ciphertext, the ciphertext must be converted into its original form: a plaintext; while a double cipher containing a key for mathematically converting the ciphertext is a key. In the case of key encryption, even if a piece of information is intercepted, the information cannot be read.
With the advent of quantum computers with subversion improvements in computation speed, quantum encryption has become a new and unique way of secure encryption that can resist quantum computing attacks. The quantum encryption adopts a one-time encryption mode based on a quantum network, so that encrypted ciphertext cannot be theoretically decrypted through dynamic change of a secret key; however, since 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 very short message, the formed ciphertext is too short, and if the quantum key is just bumped into a section of all 0 or most 0 quantum key during quantum encryption, the obtained ciphertext is the same as most of the plaintext, even the ciphertext is the same as most of the plaintext, and the ciphertext is easy to be associatively identified. A long byte plaintext message can avoid such a problem, but is very fatal for a short byte plaintext message.
Disclosure of Invention
The invention aims to: the invention aims to provide a short byte message security encryption method based on quantum encryption, which solves the problems that the probability of identifying ciphertext encrypted by the short byte message in the existing quantum encryption is very high and the security is not enough. The invention effectively makes up the defect of quantum encryption in short-byte message encryption, adopts short-byte message data to be expanded into pseudo-message data with appointed 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 mutually mapping 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 mark is added to the head of the message, the message with the added preset mark 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, randomly selecting a filling algorithm to expand the message into a pseudo message with a designated length, adding a data identifier corresponding to the filling algorithm to 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 firstly decrypts the ciphertext by using the shared key string to obtain decrypted data, identifies the head of the decrypted data, and if the identified identification is a preset identification, the data of the decrypted data except the preset identification is final data; if the identified identifier is the data identifier, extracting a filling algorithm corresponding to the data identifier according to the mapping table, inputting the data except the data identifier of the decrypted data into the filling algorithm, and obtaining the data which is the 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 mark is the same as the length of the data mark.
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: the invention judges the length of the message, namely the message is regarded as a short byte message under the condition that the length of the message is smaller than the preset length, then randomly selects the filling algorithm to expand the message into the pseudo message with the appointed length, and performs quantum encryption after the length of the pseudo message is expanded, 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 ciphertext formed after the quantum encryption of the short byte message is easy to be associatively identified, thereby improving the encryption security of plaintext data.
Drawings
FIG. 1 is a schematic diagram of a plaintext header attachment identification structure;
fig. 2 is a flow chart of example 1 quantum cryptography.
Detailed Description
The invention is further described below with reference to the accompanying drawings and examples:
The quantum encryption technology is to obtain a quantum key in a one-time pad mode and then conduct exclusive-or operation on a plaintext message to obtain a final ciphertext, and for a plaintext message with a relatively long size, the ciphertext after quantum encryption is correspondingly long, the possibility of being identified is extremely low, but the plaintext message itself has uncertainty, the data length of the plaintext message cannot be ensured, and the ciphertext obtained by quantum encryption of a plaintext message with a short byte is also very short, so that the probability of being identified is very high. Because the quantum key is a true random number, a section for quantum encryption of a plaintext message of a short byte is just 0, so that the obtained ciphertext is identical to the plaintext message after exclusive-or operation, and the quantum encryption function is not realized; even if it is 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 quantum encryption of the short byte message is he, which is easily associatively referred to as hello. The probability of occurrence of the condition of short byte plaintext message transmission in practical application is not low, so the invention provides a short byte message security encryption method based on quantum encryption, which is used for solving the problem that ciphertext formed after the short byte message quantum encryption is easy to be associatively identified.
The invention discloses 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 mutually mapping 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; and establishing a mapping table such as: 1 represents a DES algorithm, 2 represents a 3DES algorithm, 3 represents an AES algorithm, etc.; finally, the sender and the receiver also share a set of key strings, which 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 message is not fixed, the message can be preset to be correspondingly adjusted according to the requirement, for example, the preset length is 128 bits, 64 bits or 256 bits, if the length of the message is greater than or equal to the preset length and is regarded as the long byte message, the preset identifier is added to the head of the message, the message with the added 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 and is regarded as a short byte message, randomly selecting a filling algorithm to expand the message into a pseudo message with a specified length, wherein the specified length is as large as possible and is equal to the preset length, and the pseudo message is not easy to identify and associate as long as the fact that the pseudo message is satisfied; adding a data identifier corresponding to a filling algorithm to 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;
As shown in fig. 1, the length of the preset identifier is the same as that 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 the message is a long byte message or a short byte message, a 2-byte identifier needs to be added to the header of the message, and a receiver only needs to judge whether the 2-byte identifier added to the header is the preset identifier or the data identifier, so that whether the data is expanded or not can be known.
(3) After receiving the ciphertext, the receiver firstly decrypts the ciphertext by using the shared key string to obtain decrypted data, and identifies the head of the decrypted data, namely judges whether the identification of the head added with 2 bytes is a preset identification or a data identification, and if the identified identification is the preset identification, the data of the decrypted data except the preset identification is final data, namely the message to be sent by the sender; and if the identified identifier is the data identifier, extracting a filling algorithm corresponding to the data identifier according to the mapping table, inputting the data except the data identifier of the decrypted data into the filling algorithm for restoration, wherein the obtained data is final data, and the final data is a message to be sent by a 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 message is expanded into a pseudo message with the specified length by a random selection filling algorithm, 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 ciphertext formed after the quantum encryption of the short byte message is easy to be associatively identified, so that the encryption security of plaintext data is improved.
Example 1
Sender quantum encryption:
The sender and the receiver need to agree on a shared set of key strings first, and also agree on the same preset filling algorithm, for example: DES,3DES, aes algorithm, etc., and builds a mapping table, and ensures that the sender and the receiver have the same part of such mapping table, which is what data identifier represents what filling algorithm, for example: 1 represents DES algorithm, 2 represents 3DES algorithm, 3 represents AES algorithm, etc., and this data identification adds a length of 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 of the plaintext message is not fixed, and can be correspondingly adjusted according to the application scene, and the preset length is 128 bits in this embodiment. A plaintext message is less than 128 bits as a short byte message and greater than 128 bits as a long byte message. Because the identifiable association possibility 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 a preset agreed filling algorithm, and the specified length is as large as 128 bits or more as possible, namely the short-byte message is transformed into an unidentifiable long-byte message. The invention takes 128 bits as an example, so that short byte messages smaller than 128 bits need to be converted into a new unidentifiable long byte plaintext message; while 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 is required to be added to the head of the plaintext message, and a preset identifier is added to the head of the plaintext message; the short byte message randomly selects a filling algorithm to expand the message into a pseudo message with a designated length, and adds a data identifier corresponding to the filling algorithm to the head of the pseudo message. The reason for this is: if the 2-byte identifier is not added, the receiver does not know whether the message transmitted by the sender is long-byte or short-byte, which results in that the receiver cannot determine whether to inversely transform the data, so that in order to ensure consistency and operability, whether the message is a long-byte message or a short-byte message, the 2-byte identifier needs to be added to the header of the message. The preset identifier may be: 0, indicating that no algorithm is used, no transformation is required; and the data identification may be: 1 represents a DES algorithm, 2 represents a 3DES algorithm, 3 represents an AES algorithm, and the like.
Then carrying out quantum encryption on the long byte message with the preset identifier through a shared key string to obtain a ciphertext, and sending the ciphertext to a receiver; or 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;
and (5) quantum decryption at a receiving party:
After receiving the ciphertext, the receiver firstly 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 bytes of identification information, the receiver needs to intercept the 2 bytes of identification information of the header first, and the decrypted data left after interception is marked as C2. After reading the 2-byte identification information, 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, and an algorithm is not needed, namely the message is originally a long-byte message, and C2 is the message which needs to be sent by the sender; if the identification information is the data identification, extracting a filling algorithm corresponding to the data identification according to the mapping table, and restoring the C2 input filling algorithm, wherein the obtained data is final data, and the final data is a message to be sent by a sender. So far, the receiver has acquired the message of the sender.

Claims (1)

1. A method for secure encryption of a short byte message based on quantum encryption, the method comprising the steps of:
(1) The sender and the receiver are both provided with the same preset filling algorithm, and a mapping table for mutually mapping 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 mark is added to the head of the message, the message with the added preset mark 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, randomly selecting a filling algorithm to expand the message into a pseudo message with a designated length, adding a data identifier corresponding to the filling algorithm to 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 firstly decrypts the ciphertext by using the shared key string to obtain decrypted data, identifies the head of the decrypted data, and if the identified identification is a preset identification, the data of the decrypted data except the preset identification is final data; if the identified identifier is the data identifier, extracting a filling algorithm corresponding to the data identifier according to the mapping table, inputting the data except the data identifier of the decrypted data into the filling algorithm, and obtaining the data which is the final data; the final data is the information which needs to be sent by the sender;
wherein, the preset filling algorithm is one or more of DES algorithm, 3DES algorithm or AES algorithm;
The preset length is 128 bits, 64 bits or 256 bits;
The length of the preset mark is the same as that of the data mark;
the specified length is greater than or equal to a preset length;
The length of the preset mark and the length of the data mark are both 2 bytes.
CN202210543145.0A 2022-05-18 2022-05-18 Quantum encryption-based short byte message security encryption method Active CN115001758B (en)

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 CN115001758A (en) 2022-09-02
CN115001758B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116232762B (en) * 2023-05-05 2023-08-01 广东广宇科技发展有限公司 Encryption data transmission method based on quantum key

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
US11115184B2 (en) * 2017-05-22 2021-09-07 Micro Focus Llc Format preserving encryption with padding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9450749B2 (en) * 2000-03-29 2016-09-20 Wolfgang S. Hammersmith One-time-pad encryption with central key service
JP5641133B2 (en) * 2011-03-25 2014-12-17 富士通株式会社 Information processing apparatus, falsification detection apparatus, information processing method, falsification detection method, information processing program, and falsification detection program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN115001758A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US7305548B2 (en) Using atomic messaging to increase the security of transferring data across a network
US8687800B2 (en) Encryption method for message authentication
CN105376261B (en) Encryption method and system for instant messaging message
CN109005027B (en) Random data encryption and decryption method, device and system
US7894608B2 (en) Secure approach to send data from one system to another
CN110138795B (en) Multi-step mixed encryption and decryption method in communication process
CN112165443A (en) Multi-key information encryption and decryption method and device and storage medium
CN117278324B (en) Message encryption transmission method and system
US9300469B2 (en) Secure computing system, secure computing method, secure computing apparatus, and program therefor
CN114499857B (en) Method for realizing data correctness and consistency in encryption and decryption of large data quanta
CN115001758B (en) Quantum encryption-based short byte message security encryption method
CN112948867A (en) Method and device for generating and decrypting encrypted message and electronic equipment
CN112929166B (en) Master station, slave station and data transmission system based on Modbus-TCP protocol
CN112738037B (en) Data encryption communication method
CN113965382A (en) Tamper-proof method for bidding supervision list data encryption algorithm
CN116707778A (en) Data hybrid encryption transmission method and device and electronic equipment
CN112637442B (en) Method and device for encrypting circulating images by cloud server and local end
CN114978711A (en) Data transmission method and system for symmetric encryption of dynamic secret key
JP2005114870A (en) Cryptocommunication system
JPH08204701A (en) Electronic mail cipher communication system and cipher communication method
CN113852456A (en) Image encryption system based on Matlab chaotic mapping and feature extraction
CN112788046A (en) Method and system for encrypting transmission information
CN112069472A (en) User login authentication method and system
CN111131158A (en) Single byte symmetric encryption and decryption method, device and readable medium
CN113014531B (en) Method for encrypting and transmitting e-mail data

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