CN108075879A - The method, apparatus and system of a kind of data encryption and decryption - Google Patents
The method, apparatus and system of a kind of data encryption and decryption Download PDFInfo
- Publication number
- CN108075879A CN108075879A CN201610990502.2A CN201610990502A CN108075879A CN 108075879 A CN108075879 A CN 108075879A CN 201610990502 A CN201610990502 A CN 201610990502A CN 108075879 A CN108075879 A CN 108075879A
- Authority
- CN
- China
- Prior art keywords
- data
- binary
- information
- encryption
- leaf node
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses the method, apparatus and system of a kind of data encryption and decryption.This method includes:Generation is for the encrypted binary tree of data;First ergodic sequence and the second ergodic sequence are generated based on binary tree;Determine the information of at least one leaf node storage in binary tree as key;Binary-tree coding generation cipher key encryption information based at least one leaf node;The information of each leaf node storage in key is converted to binary system to obtain binary keys and data to be transmitted is converted to binary system data to be transmitted;Binary keys and binary system data to be transmitted are carried out according to predetermined encryption algorithm encryption data is calculated;The first ergodic sequence, the second ergodic sequence, cipher key encryption information and encryption data are sent to the receiving terminal of data to be transmitted.The method of data encryption and decryption disclosed by the invention can improve the security of data transmission.
Description
Technical field
The invention belongs to field of communication technology more particularly to the method, apparatus and system of a kind of data encryption and decryption.
Background technology
With the development of Internet technology, more and more information datas are transmitted by network, how to ensure data
Transmission security problem becomes increasingly conspicuous.At present people are usually encrypted the data of transmission in data transmission, are protected with this
Demonstrate,prove the security of data transmission.There are many kinds of available data Encryption Algorithm, wherein a kind of common data encryption algorithm be based on
The Encryption Algorithm of binary tree.The prior art is when with Encryption Algorithm based on binary tree, based on wanting encrypted data configuration two
Fork tree makes the content of data store on the leaf node of binary tree, clear data thus is converted into ciphertext data, ciphertext data
Formation be structures shape by binary tree, the binary tree information of generation is then transferred to receiving terminal.Due to the prior art
Middle clear data is stored in the binary tree of generation, and all or part of clear data certainly will be included in the binary tree information of transmission, this
Encryption data is just made to be easy to be cracked, reduces the security of data transmission.
The content of the invention
An embodiment of the present invention provides the method, apparatus and system of a kind of data encryption and decryption, can solve transmission and use
All or part of clear data is contained in encrypting plaintext data binary tree information, encryption data is caused to be easy to be cracked,
The problem of reducing the security of data transmission.
In a first aspect, the present invention provides a kind of method of data encryption, including:
Generation is for the encrypted binary tree of data;
First ergodic sequence and the second ergodic sequence are generated based on binary tree, wherein, pass through the first ergodic sequence and second
Ergodic sequence can reduce binary tree;
Determine the information of at least one leaf node storage in binary tree as key;
Binary-tree coding generation cipher key encryption information based at least one leaf node;
The information of each leaf node storage in key is converted into binary system and obtains binary keys and will be to be transmitted
Data are converted to binary system data to be transmitted;
Binary keys and binary system data to be transmitted are carried out according to predetermined encryption algorithm encryption data is calculated;
The first ergodic sequence, the second ergodic sequence, cipher key encryption information and encryption are sent to the receiving terminal of data to be transmitted
Data.
With reference to first aspect, in the first embodiment of first aspect, in the connecing to the data to be transmitted
Receiving end sends first ergodic sequence, second ergodic sequence, key encryption confidential information and the encryption data
Before, the method further includes:
Generation includes at least two different data packets of the first data packet and the second data packet, and described at least two is different
Data packet carry the cipher key encryption information and the encryption data, and first data packet includes the described first traversal sequence
Row, second data packet include second ergodic sequence;
The receiving terminal to the data to be transmitted sends first ergodic sequence, second ergodic sequence, institute
Stating cipher key encryption information and the encryption data includes:
Send at least two different data packet to the receiving terminal, wherein send respectively first data packet and
Second data packet.
With reference to first aspect, in second of embodiment of first aspect, based at least one leaf node
Binary-tree coding generation cipher key encryption information includes:
Information based at least one leaf node storage puts in order at least one leaf node
Binary-tree coding is arranged to obtain the cipher key encryption information.
With reference to first aspect, in the third embodiment of first aspect, each leaf node storage in the key
Information put in order it is identical with the information sorting of each leaf node storage in the binary keys;
It is described according to predetermined encryption algorithm calculate by the binary keys and the binary system data to be transmitted
Include to encryption data:
By the binary system data to be transmitted according to the row of the information that each leaf node stores in the binary keys
Row sequentially according to predetermined encryption algorithm calculate successively with the information of each leaf node storage in the binary keys
To the encryption data.
With reference to first aspect or any embodiment of first aspect, in the 4th kind of embodiment of first aspect,
The predetermined encryption algorithm includes exclusive or algorithm.
Second aspect, the present invention provides a kind of method of data deciphering, including:
Receive data to be transmitted transmitting terminal send the first ergodic sequence, the second ergodic sequence, cipher key encryption information and
Encryption data;
Binary tree is drawn based on the first ergodic sequence and the reduction of the second ergodic sequence;
Binary tree and cipher key encryption information based on reduction determine to include at least one leaf node storage in binary tree
The key of information;
The information of each leaf node storage in key is converted into binary system and obtains binary keys;
The binary system for binary keys and encryption data according to default decipherment algorithm be calculated after decryption is to be passed
It is corresponding with the predetermined encryption algorithm that data to be transmitted is encrypted in transmitting terminal to preset decipherment algorithm for transmission of data;
Binary system data to be transmitted after decryption is converted into data to be transmitted.
With reference to second aspect, in the first embodiment of second aspect, the transmitting terminal for receiving data to be transmitted
The first ergodic sequence, the second ergodic sequence, key information and the encryption data sent includes:
At least two different data packets for including the first data packet and the second data packet that the transmitting terminal is sent are received,
Wherein, described at least two different data packets carry the cipher key encryption information and the encryption data, and first number
According to including the first ergodic sequence, second data packet includes second ergodic sequence, first data packet and described
The second data packet transmitting terminal is sent respectively.
With reference to second aspect, in second of embodiment of second aspect, the binary tree based on reduction and described
The key that cipher key encryption information determines to include the information of at least one leaf node storage in the binary tree includes:
Binary tree and the cipher key encryption information based on reduction determine each leaf section in the key and the key
The information of point storage puts in order.
It is described by the binary keys and described in the third embodiment of second aspect with reference to second aspect
Encryption data includes according to the binary system data to be transmitted that default decipherment algorithm be calculated after decrypting:
The information that the encryption data is stored according to each leaf node in the binary keys puts in order, according to
The secondary information with each leaf node storage in the binary keys is carried out according to default decipherment algorithm after decryption is calculated
Binary data;Alternatively,
The encryption data is suitable according to the reversed arrangement of the information that each leaf node stores in the binary keys
Sequence carries out that solution is calculated successively according to default decipherment algorithm with the information of each leaf node storage in the binary keys
Binary data after close.
With reference to the third embodiment of second aspect, in the 4th kind of embodiment of second aspect, when by described two
System key and the encryption data according to default decipherment algorithm be calculated the binary system data to be transmitted after decrypting
Step uses the encryption data is suitable according to the reversed arrangement of the information that each leaf node stores in the binary keys
Sequence carries out that solution is calculated successively according to default decipherment algorithm with the information of each leaf node storage in the binary keys
During the execution method of the binary data after close, the default decipherment algorithm includes XOR operation.
With reference to second aspect or any embodiment of second aspect, in the 5th kind of embodiment of second aspect,
The default decipherment algorithm and predetermined encryption algorithm inverse operation each other.
The third aspect, the present invention provides a kind of device of data encryption, including:
Binary tree generation unit, for generating for the encrypted binary tree of data;
Sequence generating unit generates the first ergodic sequence and the second ergodic sequence for being based on binary tree, wherein, by the
One ergodic sequence and the second ergodic sequence can reduce binary tree;
Determination unit, for determining the information of at least one leaf node storage in binary tree as key;
Cipher key encryption information generation unit, for based on the generation key encryption of the binary-tree coding of at least one leaf node
Information;
Converting unit obtains binary password for the information of each leaf node storage in key to be converted to binary system
Key and data to be transmitted is converted into binary system data to be transmitted;
Computing unit, for according to predetermined encryption algorithm calculate by binary keys and binary system data to be transmitted
To encryption data;
Transmitting element adds for sending the first ergodic sequence, the second ergodic sequence, key to the receiving terminal of data to be transmitted
Confidential information and encryption data.
With reference to the third aspect, in the first embodiment of the third aspect, further include:
Packet generation unit, for generating at least two different data for including the first data packet and the second data packet
Bag, described at least two different data packets carry the cipher key encryption information and the encryption data, and first data
Include the first ergodic sequence, second data packet includes second ergodic sequence;
The transmitting element is specifically used for sending at least two different data packet to the receiving terminal, wherein distinguishing
Send first data packet and second data packet.
With reference to the third aspect, in second of embodiment of the third aspect, the cipher key encryption information generation unit tool
Body is used for put in order at least one leaf node two of the information based at least one leaf node storage
Fork tree-encoding is arranged to obtain the cipher key encryption information.
With reference to the third aspect, in the third embodiment of the third aspect, each leaf node storage in the key
Information put in order it is identical with the information sorting of each leaf node storage in the binary keys;
The computing unit is specifically used for the binary system data to be transmitted according to each leaf in the binary keys
The information of child node storage puts in order with the information of each leaf node storage in the binary keys successively according to pre-
If Encryption Algorithm carries out that the encryption data is calculated.
With reference to the third aspect or any embodiment of the third aspect, in the 4th kind of embodiment of the third aspect,
The predetermined encryption algorithm includes exclusive or algorithm.
Fourth aspect, the present invention provides a kind of device of data deciphering, including:
Receiving unit, for receiving the first ergodic sequence of the transmitting terminal of data to be transmitted transmission, the second ergodic sequence, close
Key encryption information and encryption data;
Binary tree reduction unit draws binary tree for being based on the first ergodic sequence and the reduction of the second ergodic sequence;
Determination unit determines to include at least one leaf in binary tree for the binary tree based on reduction and cipher key encryption information
The key of the information of child node storage;
Binary Conversion unit, for by the information of each leaf node storage in key be converted to binary system obtain two into
Key processed;
Computing unit, for binary keys and encryption data to be carried out according to default decipherment algorithm after decryption is calculated
Binary system data to be transmitted, preset decipherment algorithm it is opposite with the predetermined encryption algorithm that data to be transmitted is encrypted in transmitting terminal
It should;
Date Conversion Unit, for the binary system data to be transmitted after decrypting to be converted to data to be transmitted.
With reference to first aspect, in the first embodiment of first aspect, the receiving unit is specifically used for receiving institute
State at least two different data packets for including the first data packet and the second data packet of transmitting terminal transmission, wherein, it is described at least
Two different data packets carry the cipher key encryption information and the encryption data, and first data packet includes first pass
Sequence is gone through, second data packet includes second ergodic sequence, and first data packet and second data packet are institute
State what transmitting terminal was sent respectively.
With reference to first aspect, in second of embodiment of first aspect, the determination unit is specifically used for based on also
Former binary tree and the cipher key encryption information determines the information of each leaf node storage in the key and the key
It puts in order.
With reference to first aspect, in the third embodiment of first aspect, the computing unit is specifically used for by described in
The information that encryption data is stored according to each leaf node in the binary keys put in order successively with the binary system
In key the information of each leaf node storage according to default decipherment algorithm be calculated binary data after decryption or
The reversed arrangement order for the information that person stores the encryption data according to each leaf node in the binary keys is successively
It is carried out with the information of each leaf node storage in the binary keys according to default decipherment algorithm after decryption is calculated
Binary data.
The third embodiment with reference to first aspect, in the 4th kind of embodiment of first aspect, when the calculating
Unit is specifically used for the reversed row according to the information that each leaf node stores in the binary keys by the encryption data
Information of the row order successively with each leaf node storage in the binary keys according to default decipherment algorithm calculate
During binary data after to decryption, the default decipherment algorithm includes XOR operation.
With reference to first aspect or any embodiment of first aspect, in the 5th kind of embodiment of first aspect,
The default decipherment algorithm and predetermined encryption algorithm inverse operation each other.
5th aspect, the present invention provides a kind of system of data encryption and decryption, including the number as described in the third aspect
According to encrypted device and the device of the data deciphering as described in fourth aspect.
The present invention provides a kind of method, apparatus and system of data encryption and decryption, the hair of data to be transmitted in the present invention
Sending end generation is for the encrypted binary tree of data and can reducing the first ergodic sequence and the second ergodic sequence of binary tree
The receiving terminal of data to be transmitted is sent to, what receiving terminal can be generated according to two ergodic sequence accurate reproduction transmitting terminals of reception
Binary tree ensures the accuracy decrypted to data to be transmitted after encryption;Transmitting terminal and receiving terminal are at least one leaf in binary tree
After the information of child node storage is converted to binary keys for key, transmitting terminal is by binary keys with being converted to binary treat
Encryption data is calculated according to predetermined encryption algorithm in transmission data, and receiving terminal is by binary keys and encryption data according to default
Decipherment algorithm be calculated the binary system data to be transmitted of decryption, and so binary tree is combined with binary arithmetic operation and is treated
It transmits data and carries out encryption and decryption, improve the complexity of encryption and decryption, make the security higher of data transmission;Transmitting terminal is in binary tree
Data to be transmitted is encrypted in the information of at least one leaf node storage, but what is sent to receiving terminal is based at least one
A leaf node binary-tree coding generation key information, receiving terminal according to key information can determine to data to be transmitted into
The information of row encryption leaf node storage, can't directly transmit so between transmitting terminal and receiving terminal and data to be transmitted is added
The information of decryption, but transmit to the further encrypted key information of the information of data encrypting and deciphering to be transmitted, it is treated so as to improve
The security of the information transmission of data encrypting and deciphering is transmitted, and then improves the security of data transmission.And it is being sent in the present invention
When end and receiving terminal carry out data transmission, the information of the data to be transmitted of unencryption is will not relate to, encryption data is avoided and holds very much
The problem of being easily cracked, reducing data transmission security.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, it will make below to required in the embodiment of the present invention
Attached drawing is briefly described, it should be apparent that, drawings described below is only some embodiments of the present invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 shows the schematic flow chart of the method for data encryption according to an embodiment of the invention;
Fig. 2 shows the schematic diagram of the binary tree generated in the method for data encryption shown in Fig. 1;
Fig. 3 shows the schematic flow chart of the method for the data encryption of another embodiment according to the present invention;
Fig. 4 shows the schematic flow chart of the method for data deciphering according to another embodiment of the present invention;
Fig. 5 shows the schematic block diagram of the device of data encryption according to an embodiment of the invention;
Fig. 6 shows the schematic block diagram of the device of the data encryption of another embodiment according to the present invention;
Fig. 7 shows the schematic block diagram of the device of data deciphering according to another embodiment of the present invention;
Fig. 8 shows the schematic block diagram of the system of data encryption and decryption according to embodiments of the present invention.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without creative efforts belong to the scope of protection of the invention.
The feature and exemplary embodiment of various aspects of the invention is described more fully below.In following detailed description
In, it is proposed that many details, in order to provide complete understanding of the present invention.But to those skilled in the art
It will be apparent that the present invention can be implemented in the case of some details being not required in these details.Below to implementing
The description of example is used for the purpose of by showing that the example of the present invention is better understood from the present invention to provide.The present invention never limits
In any concrete configuration set forth below and algorithm, but cover under the premise of without departing from the spirit of the present invention element,
Any modification, replacement and the improvement of component and algorithm.In the case where there is no conflict, in the embodiment and embodiment in the application
Feature can be mutually combined.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
When the embodiment of the present invention is suitable for data transmission, to the scene of Data Encryption Transmission to be transmitted.Data to be transmitted
After transmitting terminal is encrypted data to be transmitted by the method for data encryption in the embodiment of the present invention, the reception of data to be transmitted
End is decrypted encryption data according to the information that transmitting terminal is sent by the method for data deciphering in the embodiment of the present invention, finally
Draw accurate data to be transmitted.
Fig. 1 shows the schematic flow chart of the method 100 of data encryption according to an embodiment of the invention.Such as Fig. 1 institutes
Show, this method 100 can be used for the transmitting terminal of data to be transmitted, comprise the following steps:S110 is generated for encrypted to data
Binary tree;S120 generates the first ergodic sequence and the second ergodic sequence based on binary tree;S130 is determined at least one in binary tree
The information of a leaf node storage is as key;S140, the binary-tree coding generation key based at least one leaf node add
Confidential information;S150, by the information of each leaf node storage in the key be converted to binary system obtain binary keys and
Data to be transmitted is converted into binary system data to be transmitted;S160, by binary keys and binary system data to be transmitted according to pre-
If Encryption Algorithm carries out that encryption data is calculated;S170 sends the first ergodic sequence, second to the receiving terminal of data to be transmitted
Ergodic sequence, cipher key encryption information and encryption data.
In step s 110, transmitting terminal can generate one for the encrypted binary tree of data at random.For example, such as Fig. 2
It is shown, be the embodiment of the present invention for the binary tree generated to data encryption, binary tree is compiled using Huffman encoding huffman
Code, to all nodes, if there is left child, the branch that left child is directed toward to it is encoded to 0, is encoded to if it is directed toward right child branch
1。
In the step s 120, a unique binary tree can be reduced by the first ergodic sequence and the second ergodic sequence
(for the binary tree of transmitting terminal generation), i.e., can basis after receiving terminal receives the first ergodic sequence and the second ergodic sequence
First ergodic sequence and the second ergodic sequence draw the binary tree of transmitting terminal generation.Skilled person will appreciate that binary tree passes through
Different traversal modes draws different ergodic sequences, and traversal mode includes:Preamble ergodic sequence, inorder traversal, postorder
Ergodic sequence and by layer ergodic sequence, in the various ergodic sequences of binary tree, preamble ergodic sequence, inorder traversal combination
It can uniquely determine out a binary tree, postorder traversal sequence and can uniquely determine out a y-bend by the combination of layer ergodic sequence
Tree, thus in this step the first ergodic sequence and the second ergodic sequence can be preamble ergodic sequence, inorder traversal or
For postorder traversal sequence, by sequence ergodic sequence.For example, binary tree as shown in Figure 2, inorder traversal are
DHBIEAFJCG, preamble ergodic sequence are ABDHEICFJG, if other equipment obtains the middle sequence time of binary tree shown in Fig. 2
Sequence (DHBIEAFJCG) and preamble ergodic sequence (ABDHEICFJG) are gone through, then can draw binary tree shown in Fig. 2.
In step s 130, determine that the information stored in binary tree at least one leaf node is used as to data to be transmitted
Encrypted key.For example, the information of leaf node GIJH storages in binary tree shown in Fig. 2 is selected in the embodiment of the present invention as secret
Key.
In step S140, added based on the binary-tree coding generation key of the step S130 at least one leaf nodes determined
After the information that confidential information, i.e. step 130 are determined to store at least one leaf node is as key, these leaves determined
Node corresponding binary tree on binary tree compiles the cipher key encryption information for key.Due to the leaf node for binary tree,
Binary-tree coding is unique, so in binary tree and binary tree is determined after the binary-tree coding of leaf node, Ke Yiwei
One determines leaf node.For example, the information that leaf node GIJH is stored in binary tree shown in Fig. 2 is selected in the embodiment of the present invention
As key, the corresponding binary-tree coding difference of each leaf node:The binary-tree coding of G is 11, the binary-tree coding of I is 010,
The binary-tree coding of J is 101, the binary-tree coding of H is 001, then cipher key encryption information is (11 010 101 001).
In step S150, since binary calculating is simple and convenient to operate, so this step is by key and number to be transmitted
It is calculated again according to conversion binary system.Key and data to be transmitted are switched to binary method in this step not limit, example
Can such as be converted by correlation function, key GIJH be converted to the binary keys that are drawn after binary system for (01100111,
01101001,01101010,01101000).
In step S160, predetermined encryption algorithm can be specifically exclusive or algorithm etc., not do herein to pre-set
It limits.
In the embodiment of the present invention data to be transmitted transmitting terminal generate for the encrypted binary tree of data and can also
The first ergodic sequence and the second ergodic sequence of former binary tree are sent to the receiving terminal of data to be transmitted, allow receiving terminal according to
The binary tree of the two ergodic sequence accurate reproduction transmitting terminals generation received, it is accurate to ensure to decrypt data to be transmitted after encryption
Property;Transmitting terminal is converted to after binary system using the information of at least one leaf node storage in binary tree as key with being converted to
Binary data to be transmitted carries out that encryption data is calculated according to predetermined encryption algorithm, so transports binary tree and binary system
Calculation is combined carries out encryption and decryption to data to be transmitted, improves the complexity of encryption and decryption, makes the security higher of data transmission;It sends
End is using the information of at least one leaf node storage in binary tree as key, but what is sent to receiving terminal is based on each in key
The binary-tree coding generation cipher key encryption information of leaf node, allows receiving terminal to be determined according to cipher key encryption information to be passed
Transmission of data be encrypted leaf node storage information, so between transmitting terminal and receiving terminal can't direct transmission key,
But transmission is to the further encrypted cipher key encryption information of key, so as to improve the information transmission to data encrypting and deciphering to be transmitted
Security, and then improve the security of data transmission.And in the present invention when transmitting terminal and receiving terminal carry out data transmission, no
The information of the data to be transmitted of unencryption can be related to, encryption data is avoided and be easy to be cracked, reduce data transmission security
The problem of.
Fig. 3 shows the schematic flow chart of the method 100 of the data deciphering of another embodiment according to the present invention, Fig. 3 institutes
Show embodiment and embodiment illustrated in fig. 1 difference lies in, in the method 100 before step S170, can also carry out step S180,
Generation includes at least two different data packets of the first data packet and the second data packet;Then step S170 can be performed specifically
For:At least two different data packets are sent to receiving terminal.
Wherein, at least two different data packets carry cipher key encryption information and encryption data, and the first data packet includes
First ergodic sequence, the second data packet include the second ergodic sequence.Transmitting terminal will be sent to receiving terminal in step S180
First ergodic sequence, the second ergodic sequence, cipher key encryption information and encryption data generation include the first data packet and the second data
At least two data packets of bag, wherein, the first data packet includes the first ergodic sequence, the second data packet includes the second traversal sequence
Row, cipher key encryption information can be carried with encryption data in any one data packet of at least two data packets.
In step S171, the first data packet and the second data packet are sent respectively.Transmitting terminal sends at least two to receiving terminal
, it is necessary to send the first data packet and the second data packet respectively during a data packet, the first ergodic sequence and the second traversal thus are avoided that
When sequence is sent together, the first ergodic sequence and the second ergodic sequence are intercepted and captured simultaneously by illegal person, and then avoid the first traversal sequence
The binary tree for restoring and being generated in step S110 is trapped when row and the second ergodic sequence simultaneous transmission, encryption data is caused to be broken
It translates, improves the security of data transmission.
It should be noted that it can be simultaneously but logical that transmitting terminal sends the first data packet and the mode of the second data packet respectively
Different passage is crossed to send, can also transmitting terminal successively send twice.The first ergodic sequence sent in S171 and second time
It goes through after sequence can also be encrypted and retransmits, further improve the security of data transmission.
It is understood that step S140 can be performed specifically is:Step S141 is stored based at least one leaf node
Putting in order for information the binary-tree coding of at least one leaf node is arranged to obtain cipher key encryption information.
Wherein, the information that at least one leaf node stores in step S141 is the letter of each leaf node storage in key
Breath, the binary-tree coding of at least one leaf node are the binary-tree coding for each leaf node for forming key.
It should be noted that when the information structure that key is stored by multiple leaf nodes, different putting in order can structure
Into different keys, if the information arrangement order of each leaf node storage is different in key, can cause to treat in step S160
Obtain different when encryption data is encrypted as a result, then needing the binary-tree coding of each leaf node in cipher key encryption information
The information arrangement sequence consensus to put in order with each leaf node storage in key, in order to which transmitting terminal sends out cipher key encryption information
After giving receiving terminal, receiving terminal can be determined each in key according to the binary-tree coding of each leaf node in cipher key encryption information
Leaf node storage information and according in cipher key encryption information the binary-tree coding of each leaf node put in order it is definite
Go out the information arrangement order of each leaf node storage in key, and then uniquely determine out the key of transmitting terminal generation, guarantee pair adds
The accuracy of ciphertext data decryption.
It is understood that in the method 100, in key the information of each leaf node storage put in order with two into
The information sorting of each leaf node storage is identical in key processed;Step S160 can be performed specifically as step S161, by two into
Data to be transmitted processed and the information of each leaf node storage in binary keys are calculated successively according to predetermined encryption algorithm
Obtain encryption data.
Wherein, the information of each leaf node storage in key is converted into binary system in step S150 and obtains binary system
It, can be using the information of each leaf node storage in binary keys as an entirety and binary system in step S160 after key
Data to be transmitted is calculated, can also be to be passed with binary system successively by the information of each leaf node storage in binary keys
Transmission of data is calculated.When by binary system data to be transmitted successively with the information of each leaf node storage in binary keys into
When row calculates, putting in order for the information of each leaf node storage stores with each leaf node in binary keys in key
Information sorting it is identical, then perform step S161.So after transmitting terminal performs step S170, receiving terminal can be according to transmission
The information that end is sent determines the key that data to be transmitted is encrypted, and then stored according to each leaf node in key
The putting in order of information determine transmitting terminal when performing step S161 binary system data to be transmitted with it is each in binary keys
The order that the information of leaf node storage is calculated, in order to correctly decrypt data to be transmitted.
Specifically, with drawn in step S150 binary keys (01100111,01101001,01101010,
01101000) exemplified by carrying out XOR operation with binary system data to be transmitted, the calculating process of step S161 is:(binary system is to be passed
Transmission of data) 01100111 ⊕ of ⊕, 01101001 ⊕, 01101010 ⊕ 01101000.
Need to illustrate must be, in step S160 by the information of each leaf node storage in binary keys successively with two into
Data to be transmitted processed is calculated, that is, draws encryption data after having carried out multiple calculating, can improve the complexity of encryption data,
The possibility that encryption data is cracked is reduced, improves the security of data transmission.
Need to illustrate must in the embodiment shown in fig. 1, before step S170 is performed, encryption data can be converted
For the unprocessed form of data to be transmitted, the encryption data of the unprocessed form of data to be transmitted is then converted into step S170
It is sent to receiving terminal.Before step S110 is performed, transmitting terminal can also send communication request to receiving terminal, be received receiving
The confirmation at end performs step S110 after replying.
Fig. 4 shows the schematic flow chart of the method 200 of data deciphering according to another embodiment of the present invention.Such as figure
Shown in 4, this method 200 can be used for the receiving terminal of data to be transmitted, comprise the following steps:S210 receives data to be transmitted
The first ergodic sequence, the second ergodic sequence, cipher key encryption information and the encryption data that transmitting terminal is sent;S220, based on first pass
It goes through sequence and the reduction of the second ergodic sequence draws binary tree;S230, binary tree and the cipher key encryption information based on reduction are true
Surely the key of the information of at least one leaf node storage in the binary tree is included;S240, by each leaf in the key
The information of node storage is converted to binary system and obtains binary keys;S250, by the binary keys and the encryption data
It carries out that the binary system data to be transmitted after decrypting is calculated according to default decipherment algorithm;S260, by two after the decryption into
Data to be transmitted processed is converted to the data to be transmitted.
In step S210, the first ergodic sequence of transmitting terminal transmission, the second traversal sequence in receiving terminal receiving step S170
Row, cipher key encryption information and encryption data.Wherein, the first ergodic sequence and the second ergodic sequence are passing through step for transmitting terminal
It is drawn again by step S120 after S110 generation binary trees, cipher key encryption information draws for transmitting terminal by step S140
, encryption data is that transmitting terminal is being drawn by step S160.
In step S220, since transmitting terminal is in the first ergodic sequence and the second ergodic sequence drawn by step S120
The binary tree of a unique binary tree, i.e. transmitting terminal generation can be obtained, so receiving terminal passes through the first traversal in this step
Sequence and the second ergodic sequence reduction binary tree, in order to determine key based on binary tree.
In step S230, since cipher key encryption information is the binary-tree coding of at least one leaf node in binary tree,
So it can determine which includes in cipher key encryption information based on the binary tree drawn in cipher key encryption information and step S210
The binary-tree coding of a little leaf nodes, these leaf nodes form key.
In step S240, after key is determined, by the information of each leaf node storage in key be converted to two into
Binary keys are made, are calculated by binary system, calculating process is simple and convenient to operate.
In step s 250, the predetermined encryption algorithm phase that decipherment algorithm is encrypted data to be transmitted with transmitting terminal is preset
It is corresponding.Transmitting terminal draws encryption to binary system data to be transmitted and binary keys in step S160 according to predetermined encryption algorithm
Data, receiving terminal needs to show that binary system is to be passed according to default decipherment algorithm according to binary keys and encryption data in this step
Transmission of data so predetermined encryption algorithm should be corresponded with default decipherment algorithm, so just can guarantee that receiving terminal is decrypted
The binary system data to be transmitted gone out be correct.The correspondence that predetermined encryption algorithm is answered with default decipherment algorithm can include
It is a variety of, for example, default decipherment algorithm and predetermined encryption algorithm inverse operation each other, default decipherment algorithm are with predetermined encryption algorithm
The identical algorithm such as exclusive or.
It is binary system data to be transmitted due to being drawn in step S250, so by two in this step in step S260
System data to be transmitted is converted to the unprocessed form of data to be transmitted to get the number to be transmitted that transmitting terminal will be transmitted to receiving terminal is gone out
According to.
Since transmitting terminal generation can reduce the first ergodic sequence and the second traversal sequence of binary tree in the embodiment of the present invention
Row are sent to receiving terminal, so the y-bend that receiving terminal can be generated according to two ergodic sequence accurate reproduction transmitting terminals of reception
Tree ensures the accuracy decrypted to data to be transmitted after encryption;Receiving terminal is determined to include at least one leaf node storage
The key of information, and be converted to the binary system for according to default decipherment algorithm be calculated decryption after binary system with ciphertext data
Binary tree so with binary arithmetic operation is combined and carries out encryption and decryption to data to be transmitted, improves answering for decryption by data to be transmitted
Miscellaneous degree makes the security higher of data transmission;Receiving terminal receives the cipher key encryption information that transmitting terminal is sent, and is encrypted and believed according to key
The information that can determine data to be transmitted to be encrypted leaf node storage is ceased, so between transmitting terminal and receiving terminal simultaneously
Will not direct transmission key, but transmit to the further encrypted cipher key encryption information of key, so as to improve to data to be transmitted
The security of the information transmission of encryption and decryption, and then improve the security of data transmission.And in transmitting terminal and reception in the present invention
When end carries out data transmission, the information of the data to be transmitted of unencryption is will not relate to, encryption data is avoided and is easy to be cracked,
The problem of reducing data transmission security.
It is understood that in method 200, step S260, which can be performed specifically, is:Step S261 receives transmitting terminal hair
That send includes at least two different data packets of the first data packet and the second data packet.
In step S261, at least two different data packets carry cipher key encryption information and encryption data, and the first number
According to the first ergodic sequence is included, the second data packet includes the second ergodic sequence, the first data packet and the second data packet to send
What end was sent respectively.Receiving terminal receives the first data packet and the second data packet that transmitting terminal is sent respectively, thus is avoided that first pass
It goes through sequence and the second ergodic sequence to transmit in transmitting terminal and receiving terminal together, sequence and the second traversal sequence can be gone through to avoid first pass
Row are intercepted and captured simultaneously by illegal person, and then are avoided being trapped when the first ergodic sequence and the second ergodic sequence simultaneous transmission and restored step
The binary tree generated in rapid S110, causes encryption data to be decrypted, improves the security of data transmission.
It should be noted that key information and encryption data that receiving terminal receives can pass through the first information or the second information
It carries.Terminate in S261 and step S262 the first information and the second information can also encrypted information, further improve data
The security of transmission.
It is understood that step S230 can be performed specifically is:Step S231, binary tree and key based on reduction add
Confidential information determines putting in order for the information that each leaf node stores in key and key.
Wherein, when the information structure that key is stored by multiple leaf nodes, different putting in order can form different
Key if the information arrangement order of each leaf node storage is different in key, can cause in step S160 to be-encrypted data
Obtained when being encrypted it is different as a result, then in cipher key encryption information the binary-tree coding of each leaf node the expression that puts in order
The information arrangement order of each leaf node storage, receiving terminal are needed according to each leaf node in cipher key encryption information in key
Binary-tree coding determines the information that each leaf node stores in key and according to each leaf node in cipher key encryption information
The information arrangement order of each leaf node storage in key is determined in putting in order for binary-tree coding, and then is uniquely determined and set out
The key of sending end generation, ensures the accuracy to encryption data decryption.
For example, obtaining binary tree as shown in Figure 2 in the embodiment of the present invention, cipher key encryption information is (11 010 101
001) it, then can draw and form the leaf node of key as G, I, J, H, the order of each leaf node is GIJH in key.
It is understood that in method 200, step S250, which can be performed specifically, is:Step S251, by encryption data root
According in binary keys the information of each leaf node storage put in order successively with each leaf node in binary keys
The information of storage be calculated binary data after decryption or by encryption data according to two according to default decipherment algorithm
In system key the reversed arrangement order of the information of each leaf node storage successively with each leaf node in binary keys
The information of storage carries out that the binary data after decrypting is calculated according to default decipherment algorithm.
Wherein, in step S160 can using the information of each leaf node storage in binary keys as an entirety with
Binary system data to be transmitted is calculated, can also by the information of each leaf node storage in binary keys successively with two into
Data to be transmitted processed is calculated.When what binary system data to be transmitted was stored successively with each leaf node in binary keys
When information is calculated, after transmitting terminal performs step S170, receiving terminal can be determined to treat according to the information that transmitting terminal is sent
The key that transmission data are encrypted, and then determine to set out according to the putting in order for information that each leaf node stores in key
Sending end binary system data to be transmitted and information of each leaf node storage in binary keys when performing step S161 carry out
The order of calculating, then in step S251 the information that receiving terminal is stored according to each leaf node in binary keys arrangement
The reversed arrangement of order or the information stored according to each leaf node in binary keys sequentially successively with binary keys
In the information of each leaf node storage according to default decipherment algorithm be calculated binary data after decryption, in order to
Correctly decrypt data to be transmitted.
It should be noted that when step S250 is used encryption data in step S251 according to each leaf in binary keys
The information that the reversed arrangement order of the information of child node storage stores successively with each leaf node in binary keys is according to pre-
If decipherment algorithm carries out that the binary data after decrypting is calculated, presetting decipherment algorithm includes XOR operation.Step S251
It waits, can be determined according to default decipherment algorithm according to the information that each leaf node stores in binary keys upon execution
It puts in order according further to the reversed arrangement order of the information of each leaf node storage in binary keys to be calculated, example
Such as, if default decipherment algorithm is XOR operation, step S251 needs what is stored according to each leaf node in binary keys
The reversed arrangement of information sequentially carries out computing;It is and suitable for the arrangement of the information of each leaf node storage in binary keys
Ordered pair result of calculation does not have an influential default decipherment algorithm, in step S251 can by arbitrarily select it is a kind of in a manner of perform.
Specifically, with drawn in step S240 binary keys (01100111,01101001,01101010,
01101000) exemplified by obtaining binary system data to be transmitted with encryption data progress XOR operation, the calculating process of step S161 is:
01101000 ⊕ of (encryption data) ⊕, 01101010 ⊕, 01101001 ⊕ 01100111, then obtain binary system data to be transmitted.
Need to illustrate must be, in the embodiment depicted in figure 2, if transmitting terminal is to be transmitted by being sent in step S170
The encryption data of the unprocessed form of data, then before step S250 is performed, receiving terminal is needed the original lattice of data to be transmitted
The encryption data of formula is converted to binary encryption data, is then performing step S250.Before step S210 is performed, if
Receiving terminal receives the communication request that band transmitting terminal is sent, and receiving terminal can send confirmation to transmitting terminal and reply, in order to send
End, which continues to execute, marries her flow.
Fig. 5 shows the schematic block diagram of the device 300 of data encryption according to an embodiment of the invention.As shown in figure 5,
The device 300 includes:
Binary tree generation unit 310, for generating for the encrypted binary tree of data;
Sequence generating unit 320 generates the first ergodic sequence and the second ergodic sequence for being based on the binary tree,
In, the binary tree can be reduced by first ergodic sequence and second ergodic sequence;
Determination unit 330, for determining the information of at least one leaf node storage in the binary tree as key;
Cipher key encryption information generation unit 340, for being generated based on the binary-tree coding of at least one leaf node
Cipher key encryption information;
Converting unit 350 obtains two for the information of each leaf node storage in the key to be converted to binary system
System key and data to be transmitted is converted into binary system data to be transmitted;
Computing unit 360, for the binary keys and the binary system data to be transmitted to be calculated according to predetermined encryption
Method carries out that encryption data is calculated;
Transmitting element 370, for sending first ergodic sequence, described second to the receiving terminal of the data to be transmitted
Ergodic sequence, the cipher key encryption information and the encryption data.
Fig. 6 shows the schematic block diagram of the device of the data encryption of another embodiment according to the present invention.As shown in fig. 6,
Described device 300 further includes:
Packet generation unit 380 includes at least two different of the first data packet and the second data packet for generating
Data packet, described at least two different data packets carry the cipher key encryption information and the encryption data, and described first
Data packet includes the first ergodic sequence, and second data packet includes second ergodic sequence;
The transmitting element 370 is specifically used for sending at least two different data packet to the receiving terminal, wherein
First data packet and second data packet are sent respectively.
It is understood that the cipher key encryption information generation unit 340 is specifically used for based at least one leaf
Node storage information put in order the binary-tree coding of at least one leaf node is arranged to obtain it is described close
Key encryption information.
It is understood that the information that each leaf node stores in the key puts in order and the binary password
The information sorting of each leaf node storage is identical in key.
The computing unit 360 is specifically used for the binary system data to be transmitted according to each in the binary keys
The information of leaf node storage put in order the information stored with each leaf node in the binary keys successively according to
Predetermined encryption algorithm carries out that the encryption data is calculated.
Wherein, the predetermined encryption algorithm includes exclusive or algorithm.…
During device 300 according to embodiments of the present invention may correspond to according to embodiments of the present invention in the method for data encryption
Executive agent, and above and other operation and/or function of the modules in device 300 is respectively in order to realize data encryption
In each method corresponding flow, for sake of simplicity, details are not described herein.
The device 300 of data to be transmitted is generated for the encrypted binary tree of data and can in the embodiment of the present invention
It reduces the first ergodic sequence of binary tree and the second ergodic sequence is sent to the receiving terminal of data to be transmitted, allow receiving terminal root
According to the binary tree that two ergodic sequence accurate reproduction devices 300 of reception generate, ensure what data to be transmitted after encryption was decrypted
Accuracy;Device 300 is converted to after binary system using the information of at least one leaf node storage in binary tree as key with turning
Binary data to be transmitted is changed to carry out that encryption data is calculated according to predetermined encryption algorithm, so by binary tree with two into
Computing processed is combined carries out encryption and decryption to data to be transmitted, improves the complexity of encryption and decryption, makes the security higher of data transmission;
Device 300 is using the information of at least one leaf node storage in binary tree as key, but what is sent to receiving terminal is based on close
The binary-tree coding generation cipher key encryption information of each leaf node, allows receiving terminal to be determined according to cipher key encryption information in key
The information of leaf node storage is encrypted to data to be transmitted, so can't directly be passed between device 300 and receiving terminal
Defeated key, but transmit to the further encrypted cipher key encryption information of key, so as to improve the letter to data encrypting and deciphering to be transmitted
The security of transmission is ceased, and then improves the security of data transmission.And data are carried out in device 300 and receiving terminal in the present invention
During transmission, the information of the data to be transmitted of unencryption is will not relate to, encryption data is avoided and is easy to be cracked, data is reduced and passes
The problem of defeated security.
Fig. 7 shows the schematic block diagram of the device 400 of data deciphering according to another embodiment of the present invention.Such as Fig. 7 institutes
Show, which includes:
Receiving unit 410, for receiving the first ergodic sequence of the transmitting terminal of data to be transmitted transmission, the second traversal sequence
Row, cipher key encryption information and encryption data;
Binary tree reduction unit 420 draws binary tree for being based on the first ergodic sequence and the reduction of the second ergodic sequence;
Determination unit 430 determines to include the binary tree for the binary tree based on reduction and the cipher key encryption information
In the storage of at least one leaf node information key;
Binary Conversion unit 440, for the information of each leaf node storage in the key to be converted to binary system
Obtain binary keys;
Computing unit 450, based on the binary keys and the encryption data are carried out according to default decipherment algorithm
The binary system data to be transmitted after being decrypted is calculated, the default decipherment algorithm adds data to be transmitted with the transmitting terminal
Close predetermined encryption algorithm is corresponding;
Date Conversion Unit 460, for the binary system data to be transmitted after the decryption to be converted to the number to be transmitted
According to.
It is understood that the receiving unit 410 includes the first data specifically for what the reception transmitting terminal was sent
At least two different data packets of bag and the second data packet, wherein, described at least two different data packets carry described close
Key encryption information and the encryption data, and first data packet includes the first ergodic sequence, second data packet includes
Second ergodic sequence, first data packet and the second data packet transmitting terminal are sent respectively.
It is understood that the determination unit 430 is specifically used for the binary tree based on reduction and key encryption letter
Breath determines putting in order for the information that each leaf node stores in the key and the key.
It is understood that the computing unit 450 is specifically used for the encryption data according to the binary keys
In each leaf node storage information put in order successively with each leaf node stores in the binary keys letter
Breath be calculated binary data after decryption or by the encryption data according to described two according to default decipherment algorithm
In system key the reversed arrangement order of the information of each leaf node storage successively with each leaf in the binary keys
The information of node storage carries out that the binary data after decrypting is calculated according to default decipherment algorithm.
Wherein, when the computing unit is specifically used for the encryption data according to each leaf in the binary keys
The reversed arrangement order of the information of node storage successively with the information that each leaf node in the binary keys stores according to
When default decipherment algorithm carries out that the binary data after decrypting is calculated, the default decipherment algorithm includes XOR operation.Institute
State default decipherment algorithm and predetermined encryption algorithm inverse operation each other.
During device 400 according to embodiments of the present invention may correspond to according to embodiments of the present invention in the method for data deciphering
Executive agent, and above and other operation and/or function of the modules in device 400 is respectively in order to realize data deciphering
In each method corresponding flow, for sake of simplicity, details are not described herein.
Since transmitting terminal generation can reduce the first ergodic sequence and the second traversal sequence of binary tree in the embodiment of the present invention
Row are sent to device 400, so the y-bend that device 400 can be generated according to two ergodic sequence accurate reproduction transmitting terminals of reception
Tree ensures the accuracy decrypted to data to be transmitted after encryption;Device 400 is determined to include at least one leaf node storage
The key of information, and be converted to the binary system for according to default decipherment algorithm be calculated decryption after binary system with ciphertext data
Binary tree so with binary arithmetic operation is combined and carries out encryption and decryption to data to be transmitted, improves answering for decryption by data to be transmitted
Miscellaneous degree makes the security higher of data transmission;Device 400 receives the cipher key encryption information that transmitting terminal is sent, and is encrypted according to key
Information can determine data to be transmitted is encrypted the information of leaf node storage, so transmitting terminal and device 400 it
Between can't direct transmission key, but transmit to the further encrypted cipher key encryption information of key, so as to improve to be transmitted
The security of the information transmission of data encrypting and deciphering, and then improve the security of data transmission.And in the present invention in transmitting terminal and
When device 400 carries out data transmission, will not relate to the information of the data to be transmitted of unencryption, avoid encryption data be easy to by
The problem of cracking, reducing data transmission security.
Fig. 8 shows a kind of system 500 of data encryption and decryption according to embodiments of the present invention, as shown in figure 8, this is
System 500 includes the device 300 of data encryption as shown in Figure 5 and the device 400 of data deciphering as shown in Figure 6.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description is
The specific work process of system, device and unit, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection domain subject to.
Claims (23)
1. a kind of method of data encryption, including:
Generation is for the encrypted binary tree of data;
First ergodic sequence and the second ergodic sequence are generated based on the binary tree, wherein, by first ergodic sequence and
Second ergodic sequence can reduce the binary tree;
Determine the information of at least one leaf node storage in the binary tree as key;
Binary-tree coding generation cipher key encryption information based at least one leaf node;
The information of each leaf node storage in the key is converted into binary system and obtains binary keys and will be to be transmitted
Data are converted to binary system data to be transmitted;
The binary keys and the binary system data to be transmitted are carried out according to predetermined encryption algorithm encryption number is calculated
According to;
First ergodic sequence, second ergodic sequence, the key are sent to the receiving terminal of the data to be transmitted to add
Confidential information and the encryption data.
2. according to the method described in claim 1, send first traversal in the receiving terminal to the data to be transmitted
Before sequence, second ergodic sequence, key encryption confidential information and the encryption data, the method further includes:
Generation includes at least two different data packets of the first data packet and the second data packet, described at least two different numbers
Carry the cipher key encryption information and the encryption data according to bag, and first data packet include first ergodic sequence,
Second data packet includes second ergodic sequence;
The receiving terminal to the data to be transmitted sends first ergodic sequence, second ergodic sequence, described close
Key encryption information and the encryption data include:
At least two different data packet is sent to the receiving terminal, wherein sending first data packet and described respectively
Second data packet.
3. according to the method described in claim 1, the binary-tree coding generation key based at least one leaf node adds
Confidential information includes:
The y-bend to put in order at least one leaf node of information based at least one leaf node storage
Tree-encoding is arranged to obtain the cipher key encryption information.
4. according to the method described in claim 1, in the key information of each leaf node storage put in order and institute
The information sorting for stating each leaf node storage in binary keys is identical;
It is described the binary keys and the binary system data to be transmitted according to predetermined encryption algorithm be calculated plus
Ciphertext data includes:
The binary system data to be transmitted is suitable according to the arrangement of the information that each leaf node stores in the binary keys
Institute is calculated according to predetermined encryption algorithm successively in sequence and the information of each leaf node storage in the binary keys
State encryption data.
5. method according to any one of claim 1 to 4, the predetermined encryption algorithm includes exclusive or algorithm.
6. a kind of method of data deciphering, including:
Receive the first ergodic sequence, the second ergodic sequence, cipher key encryption information and encryption that the transmitting terminal of data to be transmitted is sent
Data;
Binary tree is drawn based on the first ergodic sequence and the reduction of the second ergodic sequence;
Binary tree and the cipher key encryption information based on reduction determine to include at least one leaf node in the binary tree and deposit
The key of the information of storage;
The information of each leaf node storage in the key is converted into binary system and obtains binary keys;
The binary keys and the encryption data according to default decipherment algorithm be calculated to the binary system after decryption
Data to be transmitted, the default decipherment algorithm are opposite with the predetermined encryption algorithm that data to be transmitted is encrypted in the transmitting terminal
It should;
Binary system data to be transmitted after the decryption is converted into the data to be transmitted.
7. according to the method described in claim 6, the transmitting terminal for receiving data to be transmitted send the first ergodic sequence, the
Two ergodic sequences, key information and encryption data include:
At least two different data packets for including the first data packet and the second data packet that the transmitting terminal is sent are received,
In, described at least two different data packets carry the cipher key encryption information and the encryption data, and first data
Include the first ergodic sequence, second data packet includes second ergodic sequence, first data packet and described the
The two data packets transmitting terminal is sent respectively.
8. according to the method described in claim 6, described determine to include based on the binary tree of reduction and the cipher key encryption information
The key of the information of at least one leaf node storage includes in the binary tree:
Binary tree and the cipher key encryption information based on reduction determine that each leaf node is deposited in the key and the key
The information of storage puts in order.
9. according to the method described in claim 8, it is described by the binary keys and the encryption data according to default decryption
The binary system data to be transmitted that algorithm be calculated after decrypting includes:
The information that the encryption data is stored according to each leaf node in the binary keys puts in order, successively with
The information of each leaf node storage carries out that two after decrypting are calculated according to default decipherment algorithm in the binary keys
Binary data;Alternatively,
The reversed arrangement order for the information that the encryption data is stored according to each leaf node in the binary keys, according to
The secondary information with each leaf node storage in the binary keys is carried out according to default decipherment algorithm after decryption is calculated
Binary data.
10. it according to the method described in claim 9, is calculated when by the binary keys and the encryption data according to default decryption
The step of method carries out that the binary system data to be transmitted after decrypting is calculated is used the encryption data according to the binary system
In key the reversed arrangement order of the information of each leaf node storage successively with each leaf node in the binary keys
It is described default when the information of storage according to default decipherment algorithm carries out that the execution method of the binary data after decrypting is calculated
Decipherment algorithm includes XOR operation.
11. the method according to any one of claim 6 to 9, the default decipherment algorithm and the predetermined encryption algorithm
Inverse operation each other.
12. a kind of device of data encryption, including:
Binary tree generation unit, for generating for the encrypted binary tree of data;
Sequence generating unit generates the first ergodic sequence and the second ergodic sequence for being based on the binary tree, wherein, pass through institute
The binary tree can be reduced by stating the first ergodic sequence and second ergodic sequence;
Determination unit, for determining the information of at least one leaf node storage in the binary tree as key;
Cipher key encryption information generation unit, for based on the generation key encryption of the binary-tree coding of at least one leaf node
Information;
Converting unit obtains binary password for the information of each leaf node storage in the key to be converted to binary system
Key and data to be transmitted is converted into binary system data to be transmitted;
Computing unit, based on the binary keys and the binary system data to be transmitted are carried out according to predetermined encryption algorithm
Calculation obtains encryption data;
Transmitting element, for sending first ergodic sequence, the second traversal sequence to the receiving terminal of the data to be transmitted
Row, the cipher key encryption information and the encryption data.
13. device according to claim 12, further includes:
Packet generation unit, for generating at least two different data packets for including the first data packet and the second data packet,
Described at least two different data packets carry the cipher key encryption information and the encryption data, and the first data packet bag
The first ergodic sequence is included, second data packet includes second ergodic sequence;
The transmitting element is specifically used for sending at least two different data packet to the receiving terminal, wherein sending respectively
First data packet and second data packet.
14. device according to claim 12, the cipher key encryption information generation unit is specifically used for based on described at least
The putting in order for information of one leaf node storage to the binary-tree coding of at least one leaf node arrange
To the cipher key encryption information.
15. device according to claim 14, in the key information of each leaf node storage put in order with
The information sorting of each leaf node storage is identical in the binary keys;
The computing unit is specifically used for the binary system data to be transmitted according to each leaf section in the binary keys
Putting in order for the information of point storage adds with the information of each leaf node storage in the binary keys according to default successively
Close algorithm carries out that the encryption data is calculated.
16. according to claim 12-15 any one of them devices, the predetermined encryption algorithm includes exclusive or algorithm.
17. a kind of device of data deciphering, including:
Receiving unit adds for receiving the first ergodic sequence of the transmitting terminal of data to be transmitted transmission, the second ergodic sequence, key
Confidential information and encryption data;
Binary tree reduction unit draws binary tree for being based on the first ergodic sequence and the reduction of the second ergodic sequence;
Determination unit determines to include at least one in the binary tree for the binary tree based on reduction and the cipher key encryption information
The key of the information of a leaf node storage;
Binary Conversion unit, for by the information of each leaf node storage in the key be converted to binary system obtain two into
Key processed;
Computing unit, for carrying out the binary keys and the encryption data according to default decipherment algorithm solution is calculated
Binary system data to be transmitted after close, the default decipherment algorithm are encrypted data to be transmitted with the transmitting terminal default
Encryption Algorithm is corresponding;
Date Conversion Unit, for the binary system data to be transmitted after the decryption to be converted to the data to be transmitted.
18. device according to claim 17, the receiving unit is specifically used for receiving including for the transmitting terminal transmission
At least two different data packets of the first data packet and the second data packet, wherein, described at least two different data packets are taken
With the cipher key encryption information and the encryption data, and first data packet includes the first ergodic sequence, second number
It is sent respectively for the transmitting terminal according to second ergodic sequence, first data packet and second data packet is included
's.
19. device according to claim 17, the determination unit is specifically used for binary tree based on reduction and described close
Key encryption information determines putting in order for the information that each leaf node stores in the key and the key.
20. device according to claim 19, the computing unit is specifically used for the encryption data according to described two
In system key the information of each leaf node storage put in order successively with each leaf node in the binary keys
The information of storage be calculated binary data after decryption or by the encryption data root according to default decipherment algorithm
According to the information of each leaf node storage in the binary keys reversed arrangement order successively in the binary keys
The information of each leaf node storage carries out that the binary data after decrypting is calculated according to default decipherment algorithm.
21. according to claim 17-20 any one of them devices, when the computing unit is specifically used for the encryption data
The reversed arrangement order of the information stored according to each leaf node in the binary keys successively with the binary keys
In the information of each leaf node storage when according to default decipherment algorithm be calculated the binary data after decryption, it is described
Default decipherment algorithm includes XOR operation.
22. according to claim 17-20 any one of them devices, the default decipherment algorithm and the predetermined encryption algorithm are mutual
For inverse operation.
23. a kind of system of data encryption and decryption includes the dress of such as claim 12 to 16 any one of them data encryption
Put and as claim 17 to 22 any one of them data deciphering device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610990502.2A CN108075879B (en) | 2016-11-10 | 2016-11-10 | Data encryption and decryption method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610990502.2A CN108075879B (en) | 2016-11-10 | 2016-11-10 | Data encryption and decryption method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108075879A true CN108075879A (en) | 2018-05-25 |
CN108075879B CN108075879B (en) | 2021-03-09 |
Family
ID=62154504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610990502.2A Active CN108075879B (en) | 2016-11-10 | 2016-11-10 | Data encryption and decryption method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108075879B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109495446A (en) * | 2018-10-02 | 2019-03-19 | 复旦大学 | Order-preserving Encryption Algorithm based on balanced sorting tree storage organization |
CN109787755A (en) * | 2018-12-14 | 2019-05-21 | 魏勇 | A kind of key generation method, key generating device and electronic equipment |
CN110213228A (en) * | 2019-04-25 | 2019-09-06 | 平安科技(深圳)有限公司 | A kind of method, apparatus, storage medium and the computer equipment of certification communication |
CN110414567A (en) * | 2019-07-01 | 2019-11-05 | 阿里巴巴集团控股有限公司 | Data processing method, device and electronic equipment |
CN110492992A (en) * | 2019-07-22 | 2019-11-22 | 哈尔滨工程大学 | A kind of data encryption and transmission method based on radio RF recognition technology |
CN115361680A (en) * | 2022-10-20 | 2022-11-18 | 华信咨询设计研究院有限公司 | Medical insurance data intelligent sharing and exchanging system |
CN117668886A (en) * | 2024-01-25 | 2024-03-08 | 南通云链通信息科技有限公司 | Secure storage method for applet development data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7095850B1 (en) * | 2000-09-29 | 2006-08-22 | Cisco Technology, Inc. | Encryption method and apparatus with forward secrecy and random-access key updating method |
US20080013739A1 (en) * | 2006-06-29 | 2008-01-17 | Samsung Electronics Co., Ltd. | Method of and device for updating group key |
CN101582760A (en) * | 2008-05-16 | 2009-11-18 | 中国科学院研究生院 | Key encrypting and storing method based on tree structure |
CN103414552A (en) * | 2013-07-31 | 2013-11-27 | 深圳信息职业技术学院 | Method and device for encrypting and decrypting by using binary tree traversal mode |
CN105245315A (en) * | 2015-10-27 | 2016-01-13 | 成都卫士通信息产业股份有限公司 | Method and system for information secrecy storage by encoding |
-
2016
- 2016-11-10 CN CN201610990502.2A patent/CN108075879B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7095850B1 (en) * | 2000-09-29 | 2006-08-22 | Cisco Technology, Inc. | Encryption method and apparatus with forward secrecy and random-access key updating method |
US20080013739A1 (en) * | 2006-06-29 | 2008-01-17 | Samsung Electronics Co., Ltd. | Method of and device for updating group key |
CN101582760A (en) * | 2008-05-16 | 2009-11-18 | 中国科学院研究生院 | Key encrypting and storing method based on tree structure |
CN103414552A (en) * | 2013-07-31 | 2013-11-27 | 深圳信息职业技术学院 | Method and device for encrypting and decrypting by using binary tree traversal mode |
CN105245315A (en) * | 2015-10-27 | 2016-01-13 | 成都卫士通信息产业股份有限公司 | Method and system for information secrecy storage by encoding |
Non-Patent Citations (1)
Title |
---|
王玉琼: "一种改进的数据加密解密算法", 《阜阳职业技术学院学报》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109495446A (en) * | 2018-10-02 | 2019-03-19 | 复旦大学 | Order-preserving Encryption Algorithm based on balanced sorting tree storage organization |
CN109495446B (en) * | 2018-10-02 | 2020-12-22 | 复旦大学 | Order-preserving encryption algorithm based on balanced ordering tree storage structure |
CN109787755A (en) * | 2018-12-14 | 2019-05-21 | 魏勇 | A kind of key generation method, key generating device and electronic equipment |
CN109787755B (en) * | 2018-12-14 | 2021-11-12 | 魏勇 | Key generation method, key generation device and electronic equipment |
CN110213228A (en) * | 2019-04-25 | 2019-09-06 | 平安科技(深圳)有限公司 | A kind of method, apparatus, storage medium and the computer equipment of certification communication |
CN110213228B (en) * | 2019-04-25 | 2021-09-07 | 平安科技(深圳)有限公司 | Method, device, storage medium and computer equipment for authenticating communication |
CN110414567A (en) * | 2019-07-01 | 2019-11-05 | 阿里巴巴集团控股有限公司 | Data processing method, device and electronic equipment |
CN110492992A (en) * | 2019-07-22 | 2019-11-22 | 哈尔滨工程大学 | A kind of data encryption and transmission method based on radio RF recognition technology |
CN115361680A (en) * | 2022-10-20 | 2022-11-18 | 华信咨询设计研究院有限公司 | Medical insurance data intelligent sharing and exchanging system |
CN115361680B (en) * | 2022-10-20 | 2023-02-17 | 华信咨询设计研究院有限公司 | Medical insurance data intelligent sharing and exchanging system |
CN117668886A (en) * | 2024-01-25 | 2024-03-08 | 南通云链通信息科技有限公司 | Secure storage method for applet development data |
CN117668886B (en) * | 2024-01-25 | 2024-04-12 | 南通云链通信息科技有限公司 | Secure storage method for applet development data |
Also Published As
Publication number | Publication date |
---|---|
CN108075879B (en) | 2021-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108075879A (en) | The method, apparatus and system of a kind of data encryption and decryption | |
US10536269B2 (en) | Method and system for authentication and preserving the integrity of communication, secured by secret sharing | |
CN113259329B (en) | Method and device for data careless transmission, electronic equipment and storage medium | |
CN110011995B (en) | Encryption and decryption method and device in multicast communication | |
WO1990009009A1 (en) | Data carrier and data communication apparatus using the same | |
JP2011130120A (en) | Quantum public key cryptosystem, key generation device, encryption device, decoder, key generating method, encryption method, and decoding method | |
EP3987711B1 (en) | Authenticated lattice-based key agreement or key encapsulation | |
CN105208028B (en) | Data transmission method and related device and equipment | |
US20190268145A1 (en) | Systems and Methods for Authenticating Communications Using a Single Message Exchange and Symmetric Key | |
WO2013139380A1 (en) | Updating key information | |
KR102172181B1 (en) | Apparatus and Method for Patterned Cipher Block for Real-Time Data Communication | |
JPH0918469A (en) | Equipment and system for cipher communication and ciphering device | |
Zhao et al. | Security analysis of a password-based authentication protocol proposed to IEEE 1363 | |
US11563566B2 (en) | Key splitting | |
JPH09312643A (en) | Key sharing method and ciphering communication method | |
CN114499857A (en) | Method for realizing data correctness and consistency in big data quantum encryption and decryption | |
CN114362928B (en) | Quantum key distribution and reconstruction method for multi-node encryption | |
CN107070637A (en) | A kind of data encryption/decryption method of overlapping packet | |
JP2009088641A (en) | Transmission reception method, communication system and transmitter | |
CN114765543A (en) | Encryption communication method and system of quantum cryptography network expansion equipment | |
Ain | A novel approach for secure multi-party secret sharing scheme via quantum cryptography | |
CN114465708B (en) | Privacy data processing method, device, system, electronic equipment and storage medium | |
CN106453319A (en) | Data transmission system and method based on security module | |
EP3457601B1 (en) | A method for sending digital data over a number of channels | |
CN111526131B (en) | Anti-quantum-computation electronic official document transmission method and system based on secret sharing and quantum communication service station |
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 |