CN111431716A - Data transmission method and device, computer equipment and storage medium - Google Patents

Data transmission method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111431716A
CN111431716A CN202010236912.4A CN202010236912A CN111431716A CN 111431716 A CN111431716 A CN 111431716A CN 202010236912 A CN202010236912 A CN 202010236912A CN 111431716 A CN111431716 A CN 111431716A
Authority
CN
China
Prior art keywords
data
bit string
string
bit
fibonacci
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
Application number
CN202010236912.4A
Other languages
Chinese (zh)
Other versions
CN111431716B (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.)
Zhuo Erzhi Lian Wuhan Research Institute Co Ltd
Original Assignee
Zhuo Erzhi Lian Wuhan Research Institute 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 Zhuo Erzhi Lian Wuhan Research Institute Co Ltd filed Critical Zhuo Erzhi Lian Wuhan Research Institute Co Ltd
Priority to CN202010236912.4A priority Critical patent/CN111431716B/en
Publication of CN111431716A publication Critical patent/CN111431716A/en
Application granted granted Critical
Publication of CN111431716B publication Critical patent/CN111431716B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application relates to a data transmission method, a data transmission device, computer equipment and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining plaintext data to be transmitted and public key data sent by a data receiving party, encoding the plaintext data to be transmitted into a Fibonacci-system bit string by adopting a preset Fibonacci encoder, carrying out truncation processing on the bit string to obtain a truncated bit string with the same length as the bit string, wherein the truncated bit string can be used for decrypting the bit string, encrypting the truncated bit string according to the public key data to obtain an encrypted truncated bit string, and transmitting the encrypted truncated bit string and the bit string to the data receiving party. The application also relates to a data transmission method, a data transmission device, computer equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining private key data, a bit string and an encrypted bit string, decrypting the encrypted bit string according to the private key data, and converting the bit string into plaintext data according to the decrypted bit string. By adopting the method, the safety of data transmission can be improved, the operation time can be shortened, and the consumption of hardware resources can be reduced.

Description

Data transmission method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data transmission method and apparatus, a computer device, and a storage medium.
Background
With the rapid development of electronic information technology and internet technology, data is widely transmitted over the internet, and the security problem of information becomes a focus of attention of people. Data transmission also puts higher demands on data encryption technology.
For example, in the field of the internet of things, especially the simple design of the internet of things protocol such as wireless sensor network L ORA and the like, the data encryption operation consumes a large amount of computing resources and time due to the limitation of processor computing power bottleneck and memory capacity, so that the data transmission mode mostly adopts plaintext transmission, and the fixed binary coding form is not safe while the plaintext transmission causes great network security risk.
Therefore, the current data transmission mode has the problem of low safety.
Disclosure of Invention
In view of the above, it is necessary to provide a data transmission method, an apparatus, a computer device, and a storage medium capable of improving security in response to the above technical problem.
A method of data transmission, the method comprising:
acquiring plaintext data to be transmitted and public key data sent by a data receiver;
encoding plaintext data to be transmitted into a bit string of a Fibonacci system by adopting a preset Fibonacci encoder;
bit cutting processing is carried out on the bit string to obtain a bit cutting string with the same length as the bit string, and the bit cutting string can be used for decrypting the bit string;
encrypting the truncated string according to the public key data to obtain an encrypted truncated string;
and transmitting the encrypted bit interception string and the bit string to a data receiving party.
In one embodiment, encoding plaintext data to be transmitted into a bit string using a preset fibonacci encoder comprises:
traversing the Fibonacci number sequence, and expressing plaintext data to be transmitted as the sum of the dissimilar Fibonacci numbers to obtain a Fibonacci expression, wherein the Fibonacci expression carries the position information of each Fibonacci number in the Fibonacci number sequence;
and mapping each Fibonacci number in the Fibonacci expression into a bit string according to the position information.
In one embodiment, truncating the bit string to obtain a truncated string with the same length as the bit string includes:
traversing the bit string;
and when traversing to the cut-off bit, setting the cut-off bit to be 1, otherwise, setting the cut-off bit to be 0, wherein the cut-off bit represents the last bit of the bit string corresponding to the single coded data.
In one embodiment, transmitting the encrypted bit truncated string and the bit string to the data receiving side includes:
and transmitting the encrypted bit interception string and the bit string to a data receiving side in a streaming mode.
In one embodiment, the encoding rules of the preset fibonacci encoder are non-unique.
A data transmission apparatus, the apparatus comprising:
the basic data acquisition module is used for acquiring plaintext data to be transmitted and public key data sent by a data receiver;
the data encoding module is used for encoding plaintext data to be transmitted into a Fibonacci binary bit string by adopting a preset Fibonacci encoder;
the data truncation module is used for truncating the bit string to obtain a truncation bit string with the same length as the bit string, and the truncation bit string can be used for decrypting the bit string;
the data encryption module is used for encrypting the truncated string according to the public key data to obtain an encrypted truncated string;
and the data transmission module is used for transmitting the encrypted bit interception string and the bit string to a data receiving party.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring plaintext data to be transmitted and public key data sent by a data receiver;
encoding plaintext data to be transmitted into a bit string of a Fibonacci system by adopting a preset Fibonacci encoder;
bit cutting processing is carried out on the bit string to obtain a bit cutting string with the same length as the bit string, and the bit cutting string can be used for decrypting the bit string;
encrypting the truncated string according to the public key data to obtain an encrypted truncated string;
and transmitting the encrypted bit interception string and the bit string to a data receiving party.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring plaintext data to be transmitted and public key data sent by a data receiver;
encoding plaintext data to be transmitted into a bit string of a Fibonacci system by adopting a preset Fibonacci encoder;
bit cutting processing is carried out on the bit string to obtain a bit cutting string with the same length as the bit string, and the bit cutting string can be used for decrypting the bit string;
encrypting the truncated string according to the public key data to obtain an encrypted truncated string;
and transmitting the encrypted bit interception string and the bit string to a data receiving party.
In the data transmission method, the device, the computer equipment and the storage medium, different from a conventional binary coding mode, a preset Fibonacci encoder is adopted to encode plaintext data to be transmitted into a Fibonacci binary bit string, so that one number or character to be encoded has multiple encoding modes, the bit string is truncated to obtain a truncated bit string, the truncated bit string is encrypted, and data transmission is performed.
A method of data transmission, the method comprising:
acquiring private key data and a bit string and an encrypted bit string sent by a data sender;
decrypting the encrypted bit string according to the private key data to obtain a decrypted bit string;
converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by a data transmitting party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data transmitting party according to public key data, the bit truncation string is obtained by truncating the bit string by the data transmitting party, and the public key data corresponds to the private key data.
A data transmission apparatus, the apparatus comprising:
the data acquisition module is used for acquiring private key data, and a bit string and an encrypted bit string sent by a data sender;
the data decryption module is used for decrypting the encrypted bit truncation string according to the private key data to obtain a decrypted bit truncation string;
the data conversion module is used for converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by a data transmitting party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data transmitting party according to public key data, the bit truncation string is obtained by truncating the bit string by the data transmitting party, and the public key data corresponds to the private key data.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring private key data and a bit string and an encrypted bit string sent by a data sender;
decrypting the encrypted bit string according to the private key data to obtain a decrypted bit string;
converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by a data transmitting party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data transmitting party according to public key data, the bit truncation string is obtained by truncating the bit string by the data transmitting party, and the public key data corresponds to the private key data.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring private key data and a bit string and an encrypted bit string sent by a data sender;
decrypting the encrypted bit string according to the private key data to obtain a decrypted bit string;
converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by a data transmitting party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data transmitting party according to public key data, the bit truncation string is obtained by truncating the bit string by the data transmitting party, and the public key data corresponds to the private key data.
The data transmission method, the data transmission device, the computer equipment and the storage medium acquire the private key data and the bit string and the encrypted bit string transmitted by the data transmitting party, decrypt the encrypted bit string according to the private key data to obtain the decrypted bit string, and convert the bit string into decimal data according to the bit string to obtain plaintext data. According to the scheme, the bit string is obtained by encoding through the Fibonacci encoder, so that one number or character to be encoded has multiple encoding modes, the data transmission safety is improved, the bit string in the Fibonacci system can be quickly restored into plaintext data by taking the truncated string as a key, the operation time is shortened while safe transmission is achieved, and the consumption of hardware resources is reduced.
Drawings
FIG. 1 is a diagram of an exemplary data transmission method;
FIG. 2 is a flow diagram illustrating a method for data transmission according to one embodiment;
FIG. 3 is a detailed flow chart of a data transmission method according to an embodiment;
FIG. 4 is a flow chart illustrating a data transmission method according to another embodiment;
FIG. 5 is a block diagram showing the construction of a data transmission apparatus according to another embodiment;
FIG. 6 is a block diagram showing the construction of a data transmission apparatus according to another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The data transmission method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the data sender (preset fibonacci encoder) 102 communicates with the data receiver 104 (preset fibonacci encoder) via a network. Specifically, when the data sender 102 and the data receiver 104 establish a connection, the data receiver 104 sends its own public key data to the data sender 102, the data sender 102 receives the public key data and obtains plaintext data to be transmitted (which may be internet of things data), a preset fibonacci encoder is used to encode the plaintext data to be transmitted into a fibonacci-based bit string, then the bit string is truncated to obtain a truncated bit string (containing truncation information) which is as long as the bit string and can be used to decrypt the bit string, the truncated bit string is encrypted according to the public key data to obtain an encrypted truncated bit string, and then the encrypted truncated bit string and the bit string are transmitted to the data receiver 104, so that the data receiver 104 decrypts the received data to obtain plaintext data (internet of things data) to complete data transmission. The data sender 102 and the data receiver 104 may be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.
In one embodiment, as shown in fig. 2, a data transmission method is provided, which is described by taking the method as an example of being applied to a data sender (terminal) in fig. 1, and includes the following steps:
step 202, plaintext data to be transmitted and public key data sent by a data receiver are obtained.
By plain text, it is meant words (or strings) without encryption, which in a communication system may be a bit stream, such as text, bitmaps, digitized speech or digitized video images, etc. Plaintext may be generally simply considered as a meaningful set of characters or bits, or a message that can be obtained through some published encoding standard. In this embodiment, the data to be transmitted, i.e., the unencrypted data, can be regarded as plaintext data. The Public Key and the Private Key are a Key pair (i.e., a Public Key and a Private Key) obtained by an algorithm, the Public Key is a Public part of the Key pair, and the Private Key is an unpublished part. The public key is typically used to encrypt session keys, verify digital signatures, or encrypt data that can be decrypted with a corresponding private key. For example, encrypting data with a public key necessitates decryption with the private key, and if encrypting with the private key, also must decrypt with the public key, otherwise decryption will not succeed. In specific implementation, when the data sender 102 (taking the internet of things device terminal as an example) and the data receiver 104 (taking the server gateway as an example) establish connection, the server gateway sends its own public key data to the internet of things device terminal, and meanwhile, the processor of the internet of things device terminal acquires sensor data to be transmitted and collected by the sensor in real time.
And step 204, encoding the plaintext data to be transmitted into a Fibonacci binary bit string by adopting a preset Fibonacci encoder.
A fibonacci number, also known as a golden section number series, also known as a rabbit number series, refers to a number series in which 1,2,3,5,8,13,21,34, … … are mathematically defined in a recursive manner such that F (1) ═ 1, F (2) ═ 1, F (N) ═ F (N-1) + F (N-2) (N ≧ 3, N ∈ N), characterized in that each term is equal to the sum of the first two terms, starting with item 3.
And step 206, performing truncation processing on the bit string to obtain a bit truncation string with the same length as the bit string, wherein the bit truncation string can be used for decrypting the bit string.
In this embodiment, the bit string includes 0 and 1. The truncated string is a character string that is equal in length to the bit string and also includes only 0 and 1. In this embodiment, the truncation process means that when it is detected that a certain position marks the end of the coding sequence corresponding to a certain integer and the coding sequence of the next integer starts, the character string at the current position is set to 1, otherwise, the character string is set to 0. Thereby, a truncated string is obtained. The coding sequences corresponding to different integers can be distinguished according to the bit truncation string.
And step 208, encrypting the truncated string according to the public key data to obtain an encrypted truncated string.
After the truncated string is obtained, in order to improve the security of data transmission, the truncated string is encrypted according to the public key data of the data receiving side, and an encrypted truncated string is obtained. The bit interception information is used as a key, so that an attacker can hardly crack the bit string under the condition that the attacker does not acquire the bit interception information even though the bit string is stolen.
Step 210, transmitting the encrypted bit-truncated string and the bit string to a data receiving side.
With the above embodiment, after the encrypted truncated bit string and the bit string are obtained, the encrypted truncated bit string and the bit string are transmitted to the data receiving side, so that the data receiving side can decrypt the encrypted truncated bit string with its own private key, obtain truncated information (truncated bit string), and perform recovery of the fibonacci bit string from the truncated bit string into decimal original data. Specifically, the encrypted bit truncated string and the bit string may be transmitted to the data receiving side in a streaming manner. And the data is transmitted in a streaming mode, so that the time consumption of data transmission can be greatly shortened. It is understood that, in other embodiments, other data transmission manners may also be adopted, which is not limited herein, as the case may be.
In the data transmission method, different from a conventional binary coding mode, a preset Fibonacci encoder is adopted to encode plaintext data to be transmitted into a Fibonacci binary bit string, so that one number or character to be encoded has multiple coding modes, an intercept bit string is obtained by intercepting the bit string, the intercept bit string is encrypted, and data transmission is performed, so that even if an attacker steals the Fibonacci binary bit string, the Fibonacci binary coding modes are various, and under the condition that the attacker does not know intercept information, the probability of violently cracking the plaintext is extremely low according to the thought of permutation and combination, and therefore, the data transmission safety can be improved.
In one embodiment, as shown in FIG. 3, step 204 comprises: and 224, traversing the Fibonacci number sequence, representing the plaintext data to be transmitted as the sum of the dissimilar Fibonacci numbers to obtain a Fibonacci expression, carrying the position information of each Fibonacci number in the Fibonacci number sequence by the Fibonacci expression, and mapping each Fibonacci number in the Fibonacci expression into a bit string according to the position information.
In particular implementations, the encoding process using a fibonacci encoder may include:
s1, traversing the fibonacci number sequence {0,1,1,2,3,5,8,13,21,34,55,89 … }, and expressing an integer N to be transmitted (i.e., to be transmitted) as the sum of the mutually-different r fibonacci numbers, resulting in a fibonacci expression:
Figure BDA0002431304830000081
Figure BDA0002431304830000082
wherein k is1、k2、…krRepresenting the position information of the Fibonacci number in the Fibonacci number sequence;
s2, Fibona according to position informationMapping the contract number to a bit string (Binary Sequence) composed of 0,1, i.e. the k-th bit string1,k2,…,krPosition 1, the remaining positions 0, resulting in a fibonacci-scale bit string. For example, the process of converting integers 17 and 20 using a fibonacci data coder involves (note that in the binary conversion, the right side is low, and the right is read to the left, and the first number 0 in the fibonacci number sequence represents F0The next 1 bit represents F1): first, when the integer 17 is expressed as the sum of the mutually different fibonacci numbers, there are: 17-1 +3+13, the resulting fibonacci expression is 17-F1+F4+F7Correspondingly, the 1 st, 4 th and 7 th positions of the subscript positions (starting from the 0 th position) are set to 1, and the remaining positions are 0, so that the fibonacci bit string of the integer 17 is 01001001. The integer 20 may represent 20 ═ 2+5+13, and the corresponding fibonacci expression is 20 ═ F3+F5+F7Correspondingly, the 3 rd, 5 th and 7 th positions of the subscript positions (from the 0 th position) are set to 1, and the remaining positions are 0, so that the fibonacci bit string that yields the integer 20 is 00010101.
Figure BDA0002431304830000083
In this embodiment, the design principle of the fibonacci encoder includes: (1) "100" (low on the right) can be converted to "011"; (2) because F0The lowest position may be 0 or 1, so that 0 is the lowest position; (3) due to F1=F2Thus, if the fibonacci expression is to be incremented by 1, the number 1 can be generated at bit 1 and also at bit 2. Therefore, the codes formed by the Fibonacci encoder are not unique, and the diversity of the codes is increased. For example, a sensor data stream collected by an internet of things device is: 70, 105, 98, 111, 110, 97, 99, 99, 105, and the number N is assumed to have a CountFibExp(N) (i.e., the encoding scheme of the Fibonacci encoder), then CountFibExp(70)=20,CountFibExp(105)=30,CountFibExp(98)=30,CountFibExp(111)=28,CountFibExp(110)=20,CountFibExp(97)=24,CountFibExp(99) Thus, the sensor data stream has a code type of 20 × 30 × 30 × 28 × 20 × 24 × 24 × 24 × 30 4180377600000, wherein the data stream 70, 105, 98, 111, 110, 97, 99, 99, 105 corresponds to a bit string having the longest code length, and is [1,0,0,0, 0,1,0,0,0,0,0,0,0,1,0,0, 0,0,0,0,0,0,0,0,0,0,0]. In the embodiment, the Fibonacci encoder is adopted for encoding, so that one number has multiple encoding modes, and according to the idea of permutation and combination, the encoding mode of one data stream is not only a traditional mode, and multiple encoding modes are evolved, so that the cracking difficulty is increased undoubtedly, and the qualitative leap is realized.
In one embodiment, step 206 includes: step 226, traversing the bit string, setting the cut-off position to 1 when traversing to the cut-off position, otherwise setting the cut-off position to 0, wherein the cut-off position represents the last bit of the bit string corresponding to the single encoded data.
In a specific implementation, the method includes traversing a bit string encoded by a fibonacci encoder, and when traversing to a position where encoding of a next integer is to begin, which represents that encoding of a certain integer is finished (i.e., a last bit of a bit string corresponding to the integer), marking the position as a cut-off bit, and at a corresponding cut-off position 1, remaining positions are 0, the above manner may be summarized as that at a last position 1, remaining positions are 0, which represent a bit string corresponding to a certain encoded data. Thus, the bit-truncated string of the longest length bit string of the data stream 70, 105, 98, 111, 110, 97, 99, 99, 105 mentioned in the above embodiments is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,01,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]. In this embodiment, the bit string is truncated, and the truncation information is used as a key, so that if plaintext data is desired, the bit string and the bit string must be acquired at the same time, and even if an attacker steals the bit string, the attacker cannot easily break the bit string without the bit string, thereby improving the security of data transmission.
In one embodiment, as shown in fig. 4, a data transmission method is provided, which is described by taking the method as an example applied to the data receiver (terminal) in fig. 1, and includes the following steps:
step 302, obtaining the private key data and the bit string and the encrypted bit string sent by the data sender.
The private key refers to the private part of data that is not disclosed to the outside in the above-mentioned key pair with the public key. The private key is known only by itself, and only the corresponding private key can decrypt the data encrypted by the public key. In this embodiment, after a data receiving party performs a series of processing on data to be transmitted based on a fibonacci encoder to obtain a corresponding bit string and an encrypted truncated bit string, the private key data is obtained to perform data decryption.
And step 304, decrypting the encrypted truncated bit string according to the private key data to obtain a decrypted truncated bit string.
Since the encrypted bit string sent by the data sending party is encrypted based on the public key data of the data receiving party, the encrypted bit string can be decrypted by using the private key data of the data receiving party to obtain the original bit string. For example, the data sender encrypts the bit string S with the public key PK of the data receiver to obtain the encrypted bit string EPK(S), the data receiver uses its own private key SK to decrypt DSK(EPK(S)). S, the truncated string S is obtained.
Step 306, converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by a data transmitting party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data transmitting party according to public key data, the bit truncation string is obtained by truncating the bit string by the data transmitting party, and the public key data corresponds to the private key data.
Still taking 70, 105, 98, 111, 110, 97, 99, 99, 105 as an example for the data transport stream, after decrypting the truncated string S, based on the bit string F, the fibonacci decimal conversion may be performed segment by segment with the truncated string being an identifier of a single encoded data, and the plaintext data, i.e. the above-mentioned data transport stream 70, 105, 98, 111, 110, 97, 99, 99, 105, may be recovered.
In the data transmission method, private key data, a bit string and an encrypted bit string sent by a data sender are obtained, the encrypted bit string is decrypted according to the private key data to obtain a decrypted bit string, and the bit string is converted into decimal data according to the bit string to obtain plaintext data. According to the method, the bit string is obtained by encoding through the Fibonacci encoder, so that one number or character to be encoded has multiple encoding modes, the data transmission safety is improved, the bit string in the Fibonacci system can be quickly restored into plaintext data by taking the truncated string as a key, the operation time is shortened while the transmission is safe, and the consumption of hardware resources is reduced.
In order to more clearly describe the data transmission method provided by the present application, an example is described below, where a data sender takes an internet of things device terminal as an example, a data receiver takes a server gateway as an example, data to be transmitted takes sensor data as an example, and the server gateway and the internet of things device terminal send their own public key data to the internet of things device terminal when establishing a connection:
firstly, acquiring sensor data to be transmitted and public key data sent by a server gateway by an Internet of things equipment terminal;
secondly, the terminal of the equipment of the internet of things encodes the sensor data into a bit string F of a Fibonacci system by adopting a Fibonacci encoder (namely, each sensor data is expressed as the sum of mutually different Fibonacci numbers, namely
Figure BDA0002431304830000111
Figure BDA0002431304830000112
Will bit string kth1,k2,…,krPosition 1, the remaining positions 0, resulting in bit string F);
thirdly, the Internet of things equipment terminal performs truncation processing on the bit string F (corresponding to a cut-off position 1 and other positions 0), and generates a truncation string S with the length equal to that of the bit string F (set as n);
fourthly, the Internet of things equipment encrypts S by using the public key PK of the server gateway to obtain an encrypted bit interception string EPK(S), and reacting EPK(S) sending to a receiving party;
step four, the server gateway receives the information to EPK(S) and decrypts D with its own private key SKSK(EPK(S)) ═ S, obtain the truncated information S;
fifthly, the Internet of things equipment terminal MCU sends a bit string F (under the condition that conditions allow, the bit string F can also be sent to the server gateway together with the encrypted bit string);
and sixthly, the server gateway recovers the Fibonacci binary bit string F as the decimal real sensor data according to the truncation information string S.
According to the above situation, if an attacker steals the fibulacci binary bit string F, and if the attacker wants to divide the bit string into k number bits without knowing the truncation information, there will be some bit strings according to the idea of permutation and combination
Figure BDA0002431304830000113
In this case, k may have different values. Then, the probability that the correct plaintext is obtained by brute force cracking F is:
Figure BDA0002431304830000121
in this way, the method adopts the Fibonacci encoder to encode the bit string and adopts the bit truncation string as the key, thereby doubly ensuring the data security, shortening the operation time and reducing the consumption of hardware resources.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a data transmission apparatus including: a basic data obtaining module 510, a data encoding module 520, a data truncating module 530, a data encrypting module 540, and a data transmitting module 550, wherein:
a basic data obtaining module 510, configured to obtain plaintext data to be transmitted and public key data sent by a data receiver;
a data encoding module 520, configured to encode plaintext data to be transmitted into a bit string in a fibonacci scale by using a preset fibonacci encoder;
a data truncating module 530, configured to perform truncating processing on the bit string to obtain a truncated bit string with the same length as the bit string, where the truncated bit string may be used to decrypt the bit string;
the data encryption module 540 is configured to encrypt the truncated string according to the public key data to obtain an encrypted truncated string;
and a data transmission module 550, configured to transmit the encrypted bit truncated string and the bit string to a data receiving side.
In one embodiment, the data encoding module 520 is further configured to traverse the fibonacci number sequence, represent plaintext data to be transmitted as a sum of mutually different fibonacci numbers, obtain a fibonacci expression, carry position information of each fibonacci number in the fibonacci number sequence, and map each fibonacci number in the fibonacci expression into a bit string according to the position information.
In one embodiment, the data truncating module 530 is further configured to traverse the bit string, and when the bit string is traversed to the truncating bit, the truncating bit is set to 1, otherwise, the bit string is set to 0, and the truncating bit represents a last bit of the bit string corresponding to the single encoded data.
In one embodiment, the data transmission module 550 is further configured to stream the encrypted bit-truncated string and the bit string to a data receiving side.
For specific limitations of the data transmission device, reference may be made to the above limitations of the data transmission method, which are not described herein again. The modules in the data transmission device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 6, there is provided a data transmission apparatus including: a data acquisition module 610, a data decryption module 620 and a data conversion module 630, wherein:
the data obtaining module 610 is configured to obtain private key data, and a bit string and an encrypted bit string sent by a data sender;
the data decryption module 620 is configured to decrypt the encrypted bit string according to the private key data to obtain a decrypted bit string;
and a data conversion module 630, configured to convert the bit string into decimal data according to the bit string to obtain plaintext data.
For specific limitations of the data transmission device, reference may be made to the above limitations of the data transmission method, which are not described herein again. The modules in the data transmission device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data transmission method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: acquiring plaintext data to be transmitted and public key data sent by a data receiving party, encoding the plaintext data to be transmitted into a Fibonacci-system bit string by adopting a preset Fibonacci encoder, carrying out truncation processing on the bit string to obtain a truncated bit string with the same length as the bit string, wherein the truncated bit string can be used for decrypting the bit string, encrypting the truncated bit string according to the public key data to obtain an encrypted truncated bit string, and transmitting the encrypted truncated bit string and the bit string to the data receiving party; in other embodiments, the processor when executing the computer program may further perform the steps of: the method comprises the steps of obtaining private key data, a bit string and an encrypted bit string sent by a data sending party, decrypting the encrypted bit string according to the private key data to obtain a decrypted bit string, and converting the bit string into decimal data according to the bit string to obtain plaintext data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and traversing the Fibonacci number sequence, expressing the plaintext data to be transmitted as the sum of the mutually-different Fibonacci numbers to obtain a Fibonacci expression, carrying the position information of each Fibonacci number in the Fibonacci number sequence by the Fibonacci expression, and mapping each Fibonacci number in the Fibonacci expression into a bit string according to the position information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: traversing the bit string;
and when traversing to the cut-off bit, setting the cut-off bit to be 1, otherwise, setting the cut-off bit to be 0, wherein the cut-off bit represents the last bit of the bit string corresponding to the single coded data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and transmitting the encrypted bit interception string and the bit string to a data receiving side in a streaming mode.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring plaintext data to be transmitted and public key data sent by a data receiving party, encoding the plaintext data to be transmitted into a Fibonacci-system bit string by adopting a preset Fibonacci encoder, carrying out truncation processing on the bit string to obtain a truncated bit string with the same length as the bit string, wherein the truncated bit string can be used for decrypting the bit string, encrypting the truncated bit string according to the public key data to obtain an encrypted truncated bit string, and transmitting the encrypted truncated bit string and the bit string to the data receiving party; in other embodiments, the computer program when executed by the processor may further perform the steps of: the method comprises the steps of obtaining private key data, a bit string and an encrypted bit string sent by a data sending party, decrypting the encrypted bit string according to the private key data to obtain a decrypted bit string, and converting the bit string into decimal data according to the bit string to obtain plaintext data.
In one embodiment, the computer program when executed by the processor further performs the steps of: and traversing the Fibonacci number sequence, expressing the plaintext data to be transmitted as the sum of the mutually-different Fibonacci numbers to obtain a Fibonacci expression, carrying the position information of each Fibonacci number in the Fibonacci number sequence by the Fibonacci expression, and mapping each Fibonacci number in the Fibonacci expression into a bit string according to the position information.
In one embodiment, the computer program when executed by the processor further performs the steps of: traversing the bit string;
and when traversing to the cut-off bit, setting the cut-off bit to be 1, otherwise, setting the cut-off bit to be 0, wherein the cut-off bit represents the last bit of the bit string corresponding to the single coded data.
In one embodiment, the computer program when executed by the processor further performs the steps of: and transmitting the encrypted bit interception string and the bit string to a data receiving side in a streaming mode.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of data transmission, the method comprising:
acquiring plaintext data to be transmitted and public key data sent by a data receiver;
encoding the plaintext data to be transmitted into a bit string of a Fibonacci system by adopting a preset Fibonacci encoder;
performing truncation processing on the bit string to obtain a truncated string with the same length as the bit string, wherein the truncated string can be used for decrypting the bit string;
encrypting the bit-truncated string according to the public key data to obtain an encrypted bit-truncated string;
and transmitting the encrypted bit interception string and the bit string to the data receiving side.
2. The method of claim 1, wherein encoding the plaintext data to be transmitted into a bit string using a pre-set Fibonacci encoder comprises:
traversing a Fibonacci number sequence, and representing the plaintext data to be transmitted as the sum of the dissimilar Fibonacci numbers to obtain a Fibonacci expression, wherein the Fibonacci expression carries the position information of each Fibonacci number in the Fibonacci number sequence;
and mapping each Fibonacci number in the Fibonacci expression into a bit string according to the position information.
3. The method of claim 1, wherein the truncating the bit string to obtain a truncated string with a length equal to the bit string comprises:
traversing the bit string;
and when traversing to a cut-off bit, setting the cut-off bit to be 1, otherwise, setting the cut-off bit to be 0, wherein the cut-off bit represents the last bit of a bit string corresponding to the single coded data.
4. The method according to claim 1, wherein the sending the encrypted bit truncated string and the bit string to the data receiving side comprises:
and transmitting the encrypted bit interception string and the bit string to a data receiving side in a streaming mode.
5. The method according to any of claims 1 to 4, wherein the coding rules of the preset Fibonacci encoder are non-unique.
6. A method of data transmission, the method comprising:
acquiring private key data and a bit string and an encrypted bit string sent by a data sender;
decrypting the encrypted bit truncation string according to the private key data to obtain a decrypted bit truncation string;
converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by the data sending party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data sending party according to public key data, the bit truncation string is obtained by truncating the bit string by the data sending party, and the public key data corresponds to the private key data.
7. A data transmission apparatus, characterized in that the apparatus comprises:
the basic data acquisition module is used for acquiring plaintext data to be transmitted and public key data sent by a data receiver;
the data encoding module is used for encoding the plaintext data to be transmitted into a Fibonacci binary bit string by adopting a preset Fibonacci encoder;
the data truncation module is used for performing truncation processing on the bit string to obtain a truncation string with the same length as the bit string, and the truncation string can be used for decrypting the bit string;
the data encryption module is used for encrypting the bit string according to the public key data to obtain an encrypted bit string;
and the data transmission module is used for transmitting the encrypted bit interception string and the bit string to the data receiving party.
8. A data transmission apparatus, characterized in that the apparatus comprises:
the data acquisition module is used for acquiring private key data, and a bit string and an encrypted bit string sent by a data sender;
the data decryption module is used for decrypting the encrypted bit interception string according to the private key data to obtain a decrypted bit interception string;
the data conversion module is used for converting the bit string into decimal data according to the bit string to obtain plaintext data;
the bit string is obtained by encoding plaintext data to be transmitted by the data sending party by adopting a preset Fibonacci encoder, the encrypted bit truncation string is obtained by encrypting the bit truncation string by the data sending party according to public key data, the bit truncation string is obtained by truncating the bit string by the data sending party, and the public key data corresponds to the private key data.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202010236912.4A 2020-03-30 2020-03-30 Data transmission method and device, computer equipment and storage medium Active CN111431716B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010236912.4A CN111431716B (en) 2020-03-30 2020-03-30 Data transmission method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010236912.4A CN111431716B (en) 2020-03-30 2020-03-30 Data transmission method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111431716A true CN111431716A (en) 2020-07-17
CN111431716B CN111431716B (en) 2021-03-16

Family

ID=71549251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010236912.4A Active CN111431716B (en) 2020-03-30 2020-03-30 Data transmission method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111431716B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202548A (en) * 2020-12-07 2021-01-08 卓尔智联(武汉)研究院有限公司 Stream encryption key stream generation method, device, circuit and encryption method
CN112231740A (en) * 2020-12-10 2021-01-15 卓尔智联(武汉)研究院有限公司 Data encryption method, data decryption method, data encryption device, computer device, and medium
CN112235319A (en) * 2020-12-09 2021-01-15 卓尔智联(武汉)研究院有限公司 Data encryption and decryption method and device and encryption and decryption circuit
CN112468993A (en) * 2020-09-25 2021-03-09 北京大唐高鸿数据网络技术有限公司 Message sending method, message receiving method, device and equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758756A (en) * 2005-11-03 2006-04-12 浙江大学 Method and device for binary coding wait coding data
US20060170577A1 (en) * 2005-02-01 2006-08-03 Hitachi Global Storage Technologies Netherlands, B.V. Techniques for using interleaved encoders to obtain modulation constraints
US20070157067A1 (en) * 2006-01-04 2007-07-05 Hitachi Global Technologies Netherlands, B.V. Techniques for reducing error propagation using modulation codes having a variable span
CN101601087A (en) * 2006-11-16 2009-12-09 弗劳恩霍夫应用研究促进协会 The equipment that is used for Code And Decode
CN104954124A (en) * 2014-03-28 2015-09-30 华为技术有限公司 Encryption and decryption data processing method, device and system
CN107231354A (en) * 2017-06-02 2017-10-03 四川铭扬通信科技有限公司 The data transmission method and system of a kind of data transmission unit
CN107276744A (en) * 2017-05-27 2017-10-20 上海斐讯数据通信技术有限公司 A kind of file storage encryption method and system
CN108337087A (en) * 2018-02-06 2018-07-27 南京晓庄学院 Diffie-Hellman Encryption Algorithm based on crypto vector and Fibonacci matrix

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060170577A1 (en) * 2005-02-01 2006-08-03 Hitachi Global Storage Technologies Netherlands, B.V. Techniques for using interleaved encoders to obtain modulation constraints
CN1758756A (en) * 2005-11-03 2006-04-12 浙江大学 Method and device for binary coding wait coding data
US20070157067A1 (en) * 2006-01-04 2007-07-05 Hitachi Global Technologies Netherlands, B.V. Techniques for reducing error propagation using modulation codes having a variable span
CN101601087A (en) * 2006-11-16 2009-12-09 弗劳恩霍夫应用研究促进协会 The equipment that is used for Code And Decode
CN104954124A (en) * 2014-03-28 2015-09-30 华为技术有限公司 Encryption and decryption data processing method, device and system
CN107276744A (en) * 2017-05-27 2017-10-20 上海斐讯数据通信技术有限公司 A kind of file storage encryption method and system
CN107231354A (en) * 2017-06-02 2017-10-03 四川铭扬通信科技有限公司 The data transmission method and system of a kind of data transmission unit
CN108337087A (en) * 2018-02-06 2018-07-27 南京晓庄学院 Diffie-Hellman Encryption Algorithm based on crypto vector and Fibonacci matrix

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHMUEL T.KLEIN: "Fast Decoding of Fibonacci Encoded Texts", 《2007 DATA COMPRESSION CONFERENCE》 *
白晓玺: "斐波那契数列在二进制编码上的应用", 《决策与信息》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468993A (en) * 2020-09-25 2021-03-09 北京大唐高鸿数据网络技术有限公司 Message sending method, message receiving method, device and equipment
CN112468993B (en) * 2020-09-25 2023-07-04 中信科智联科技有限公司 Message sending method, message receiving method, device and equipment
CN112202548A (en) * 2020-12-07 2021-01-08 卓尔智联(武汉)研究院有限公司 Stream encryption key stream generation method, device, circuit and encryption method
CN112235319A (en) * 2020-12-09 2021-01-15 卓尔智联(武汉)研究院有限公司 Data encryption and decryption method and device and encryption and decryption circuit
CN112231740A (en) * 2020-12-10 2021-01-15 卓尔智联(武汉)研究院有限公司 Data encryption method, data decryption method, data encryption device, computer device, and medium
CN112231740B (en) * 2020-12-10 2021-03-16 卓尔智联(武汉)研究院有限公司 Data encryption method, data decryption method, data encryption device, computer device, and medium

Also Published As

Publication number Publication date
CN111431716B (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN111431716B (en) Data transmission method and device, computer equipment and storage medium
CN111464296B (en) Sequence cipher generation method, data encryption method and data decryption method
EP3178190B1 (en) Encoder, decoder and method
CN105426709A (en) JPEG image information hiding based private information communication method and system
EP3195519B1 (en) Encoder, decoder and methods employing partial data encryption
WO2009066313A2 (en) Method and system for encryption of data
CN114244507B (en) Quantum direct communication method, device, equipment and system based on single-path transmission
CN109547663B (en) Improved LSB image steganography method combined with cryptography
WO2019169878A1 (en) User privacy-protective position information publishing system
US8458452B1 (en) System and method for encryption and decryption of data transferred between computer systems
WO2021196960A1 (en) Encrypted video call method and apparatus, and device and storage medium
CN111277605B (en) Data sharing method and device, computer equipment and storage medium
CN113518244B (en) Digital television signal data transmission method and device based on substitute text combination
CN102238150A (en) Form registration method and server
CN112637442B (en) Method and device for encrypting circulating images by cloud server and local end
CN111654362B (en) Improved method of WEP (web-defined Power-Endoctrine) encryption algorithm
WO2017030117A1 (en) Communication data encryption/decryption method and system
Qu et al. Reversible data hiding in encrypted images based on prediction and adaptive classification scrambling
Lotlikar et al. Image steganography and cryptography using three level password security
Abdelmged et al. A Combined approach of steganography and cryptography technique based on parity checker and huffman encoding
Kumari et al. One time pad encryption technique in cryptography
CN113221131B (en) LWE-based QR code encryption and decryption method
TW201929477A (en) Encryption method and decryption method
Yi et al. Reversible data hiding method in encrypted images using secret sharing and Huffman coding
CN109962776B (en) Encryption method and decryption method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant