CN109462468A - Data processing method and device - Google Patents
Data processing method and device Download PDFInfo
- Publication number
- CN109462468A CN109462468A CN201710804820.XA CN201710804820A CN109462468A CN 109462468 A CN109462468 A CN 109462468A CN 201710804820 A CN201710804820 A CN 201710804820A CN 109462468 A CN109462468 A CN 109462468A
- Authority
- CN
- China
- Prior art keywords
- result
- encrypted
- byte
- data
- intermediate cryptographic
- 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
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- 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
-
- 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
-
- 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/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
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 a kind of data processing method and device.Wherein, this method comprises: obtaining multiple target components of byte to be encrypted;First logical operation is carried out to multiple target components and byte to be encrypted, obtains the first intermediate cryptographic result;Current location according to locating for each in the first intermediate cryptographic result, redistributes the position of each;Shifting function is carried out to first direction to the first intermediate cryptographic result behind position is redistributed, obtains the second intermediate cryptographic result;Second logical operation is carried out to multiple target components and the second intermediate cryptographic result, obtains the encrypted result of byte to be encrypted.The present invention solve in the prior art for short length data Encryption Algorithm because calculation amount is larger cause waste computing resource the technical issues of.
Description
Technical field
The present invention relates to data processing fields, in particular to a kind of data processing method and device.
Background technique
It is (n >=1) 8*n that current high strength encrypting algorithm (DES, 3DES, AES) mostly, which encrypts byte length to be encrypted,
I.e. 8 multiple, when carrying out corresponding computations, calculation amount is larger.And in embedded practical application, the data of transmission are long
Degree is often and little, and the communication data length as needed for simple action instruction can express clearly in 10 bytes, meanwhile, it is embedded
The performance resource of equipment is also poor in.So if then being needed fills to be encrypted extremely using the above Encryption Algorithm
Specific length (such as 8 integral multiples), wastes communication and system performance resource.
By taking 3DES encryption algorithm common in currently embedded formula industry as an example, the program uses multiple des encryption, by turning
The operation such as change, shift to achieve the purpose that high strength encrypting.Its defect following points: 1. need to encrypt byte to be encrypted as 8
Integral multiple;2. operand is big;3. needing larger memory headroom.The program can waste the calculation resources of equipment as a result, and have longer
Operation time, it is nervous in conjunction with respective resources in Embedded Application, and the demanding feature of timeliness, the program can not fit completely
Answer embedded system application.
Encryption Algorithm in the prior art calculation amount it is larger cause waste computing resource aiming at the problem that, not yet propose at present
Effective solution scheme.
Summary of the invention
The embodiment of the invention provides a kind of data processing method and device, at least to solve in the prior art for shorter
The Encryption Algorithm of length data leads to the technical issues of wasting computing resource because calculation amount is larger.
According to an aspect of an embodiment of the present invention, a kind of data processing method is provided, comprising: obtain byte to be encrypted
Multiple target components;First logical operation is carried out to multiple target components and byte to be encrypted, obtains the first intermediate cryptographic knot
Fruit;Current location according to locating for each in the first intermediate cryptographic result, redistributes the position of each;To redistributing
The first intermediate cryptographic result behind position carries out shifting function to first direction, obtains the second intermediate cryptographic result;To multiple mesh
It marks parameter and the second intermediate cryptographic result carries out the second logical operation, obtain the encrypted result of byte to be encrypted
Further, current location according to locating for each in the first intermediate cryptographic result, redistributes each
Position, comprising: the low four bit address content in the first intermediate cryptographic result is shifted into the address 2*n, by the first intermediate cryptographic result
In Gao Siwei shift to -1 address 2* (n-4), wherein n is the current location in the first intermediate cryptographic result locating for each.
Further, encrypted result is decrypted in decrypting end, wherein the step of encrypted result is decrypted in decrypting end
Include: that third logical operation is carried out to encrypted result and multiple target components, obtains decryption among first as a result, and adjusting first
The position of each data in intermediate decrypted result obtains the second intermediate decrypted result;To the second intermediate decrypted result and multiple
Target component carries out the 4th logical operation, obtains byte to be encrypted.
Further, shifting function is carried out to second direction to the first intermediate decrypted result, wherein second direction and first
It is contrary;Current location according to locating for each in the first intermediate cryptographic result after displacement, redistributes each
Position obtains the second intermediate decrypted result.
Further, current location according to locating for each in the first intermediate cryptographic result after displacement, is redistributed
The position of each, comprising: by the first intermediate cryptographic result after displacement, current location be odd number content shift to (n+1)/
2+4, current location be even address content shift to the address n/2, wherein n be displacement after the first intermediate decrypted result in often
Current location locating for one.
Further, the first object parameter in target component is determined according to position of the byte to be encrypted in data;Root
The second target component in target component is determined according to the preset-key of position and data of the byte to be encrypted in data.
Further, the corresponding location parameter in position of the byte to be encrypted in data and the first preset value are obtained;It determines
Location parameter is first object parameter to the result of the first preset value remainder.
Further, obtain the corresponding location parameter in position in data of the preset-key, byte to be encrypted of data and
Second preset value, wherein the second preset value is the byte number of preset-key;By location parameter to the second preset value remainder, and root
Byte key is found in preset-key according to the result of remainder;Determine that byte key is the second target component.
Further, the first logical operation and the second logical operation are XOR operation.
Further, third logical operation and the 4th logical operation are XOR operation.
According to another aspect of an embodiment of the present invention, a kind of data processing equipment is additionally provided, comprising: obtain module, use
In the multiple target components for obtaining byte to be encrypted;First logical operation module, for multiple target components and word to be encrypted
Section carries out the first logical operation, obtains the first intermediate cryptographic result;Distribution module, for according to every in the first intermediate cryptographic result
Current location locating for one, redistributes the position of each;Shift module, for redistribute behind position first in
Between encrypted result to first direction carry out shifting function, obtain the second intermediate cryptographic result;Second logical operation module, for pair
Multiple target components and the second intermediate cryptographic result carry out the second logical operation, obtain the encrypted result of byte to be encrypted.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, storage medium includes the journey of storage
Sequence, wherein equipment where control storage medium executes the data processing method of above-mentioned any one in program operation.
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, processor is used to run program,
In, program executes the data processing method of above-mentioned any one when running.
In embodiments of the present invention, the multiple target components for obtaining byte to be encrypted, to multiple target components and to be encrypted
Byte carries out the first logical operation, obtains the first intermediate cryptographic as a result, according to locating for each in the first intermediate cryptographic result
The position of each is redistributed in current location, to redistribute the first intermediate cryptographic result behind position to first direction into
Row shifting function obtains the second intermediate cryptographic as a result, carrying out the second logic to multiple target components and the second intermediate cryptographic result
Operation obtains the encrypted result of byte to be encrypted.Above scheme carries out cryptographic calculation based on byte type data, to adapt to
The particularity of embedded communication data solves in the prior art for the Encryption Algorithm of short length data because calculation amount is larger
And lead to the technical issues of wasting computing resource, and then reach and be greatly lowered in ciphering process in performance resource loss and communication
The purpose of the occupied communication resources loss of invalid data.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of data processing method according to an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram for obtaining the first intermediate cryptographic result according to an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of encrypted result for obtaining byte to be encrypted according to an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram for obtaining the first intermediate decrypted result according to an embodiment of the present invention;
Fig. 5 is that a kind of decryption according to an embodiment of the present invention obtains the schematic diagram of byte to be encrypted;And
Fig. 6 is the schematic diagram according to a kind of data processing equipment of the embodiment of the present application.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be byte to be encrypted for distinguishing similar, without being used to describe a particular order or precedence order.It should be understood that this
The data that sample uses are interchangeable under appropriate circumstances, so that the embodiment of the present invention described herein can be in addition to herein
Sequence other than those of diagram or description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
Be to cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units not
Those of be necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for these processes, side
The intrinsic other step or units of method, product or equipment.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of data processing method is provided, it should be noted that in attached drawing
The step of process illustrates can execute in a computer system such as a set of computer executable instructions, although also,
Logical order is shown in flow chart, but in some cases, it can be to be different from shown by sequence execution herein or retouch
The step of stating.
Fig. 1 is the flow chart of data processing method according to an embodiment of the present invention, as shown in Figure 1, this method includes as follows
Step:
Step S102 obtains multiple target components of byte to be encrypted, wherein byte to be encrypted is one in preset data
A or multiple bytes.Specifically, byte is a kind of metering units for meter store capacity, one byte of byte type data
It stores, can be indicated with 8 bits.
In above-mentioned steps, byte to be encrypted is one or more bytes in preset data, and the length of byte is not necessarily to be 8
Multiple, be filled without encrypted byte is treated;Object is byte to be encrypted, i.e., what above-mentioned steps obtained is word to be encrypted
The target component of section.In an alternative embodiment, byte to be encrypted has preset key, and the target of byte to be encrypted is joined
Number can the data according to belonging to byte to be encrypted key obtain.
Step S104 carries out the first logical operation to multiple target components and byte to be encrypted, obtains the first intermediate cryptographic
As a result.
Step S106, current location according to locating for each in the first intermediate cryptographic result, redistributes each
Position.
Specifically, it is above-mentioned each be used to indicate each in the first encrypted result, redistribute the position of each,
It can be according to default rule, the adjustment of position carried out according to each current position.In a kind of optional embodiment
In, the low four bit address content in the first intermediate cryptographic result is shifted into the address 2*n, by the Gao Si in the first intermediate cryptographic result
Position shifts to -1 address 2* (n-4), wherein n is current location locating for each in the first intermediate cryptographic result.
Step S108 carries out shifting function to first direction to the first intermediate cryptographic result behind position is redistributed, obtains
To the second intermediate cryptographic result.
Step S1010 carries out the second logical operation to multiple target components and the second intermediate cryptographic result, obtains to be encrypted
The encrypted result of byte.
Specifically, above-mentioned second logical operation can be identical as the first logical operation, the encrypted result of byte to be encrypted is
The data of decrypting end are finally transmitted to, decrypting end is decrypted to obtain original byte to be encrypted according to encrypted result.
From the foregoing, it will be observed that the above embodiments of the present application obtain multiple target components of byte to be encrypted, to multiple target components
The first logical operation is carried out with byte to be encrypted, obtains the first intermediate cryptographic as a result, according to each in the first intermediate cryptographic result
Current location locating for position, redistributes the position of each, to redistributing the first intermediate cryptographic result behind position to the
One direction carries out shifting function, obtains the second intermediate cryptographic as a result, carrying out to multiple target components and the second intermediate cryptographic result
Second logical operation obtains the encrypted result of byte to be encrypted.Above scheme carries out cryptographic calculation based on byte type data,
To adapt to the particularity of embedded communication data, solve in the prior art for the Encryption Algorithm of short length data because of meter
Calculation amount is larger and leads to the technical issues of wasting computing resource, and then reaches and performance resource loss in ciphering process is greatly lowered
And the purpose for the communication resources loss that invalid data occupies in communication.
Herein it should be noted that the application above scheme can be applied to setting for the treatment process for being related to small amount of data encryption
In standby, such as security protection and field of household appliances, it is common can application product may include: the household electrical appliance remote controller such as air-conditioning and TV
Encryption of communicated data, the encryption of security type wirelessly transmitting data, the transmission data encryption and infrared receipts of smart home class control product
Send out the communication data encryption etc. of equipment room.The high strength encrypting that data are realized with the main control chip by low performance, improves number
According to safety, reduce product cost accordingly.Meanwhile the efficiency of ciphering process is improved, it improves in control process
Real-time.
Optionally, according to the above embodiments of the present application, after the encrypted result for obtaining byte to be encrypted, the above method is also
It include: step S1010, encrypted result is decrypted in decrypting end, wherein the step of encrypted result is decrypted in decrypting end packet
It includes:
Step S1012 carries out third logical operation to encrypted result and multiple target components, obtains decryption knot among first
Fruit, and the position of each data in the first intermediate decrypted result is adjusted, obtain the second intermediate decrypted result.
Specifically, decrypting end has decipherment algorithm corresponding with encryption end.In above-mentioned steps, target component is not to use
In encrypting encrypted result again, and it is used to that encrypted result to be decrypted as parameter.
Specifically, above-mentioned third logical operation can be identical as the first logical operation and the second logical operation.Adjustment first
The position of intermediate result may include displacement and ex-situ operations, corresponding with the method in step 104.
Step S1014 carries out the 4th logical operation to the second intermediate decrypted result and multiple target components, obtains to be encrypted
Byte.
Specifically, above-mentioned 4th logical operation can be with the first logical operation, the second logical operation and third logical operation
It is identical.It is corresponding that the decryption method of above-mentioned decrypting end encrypts the encryption method at end with step S102 into step S108, by upper
Decryption method is stated, original byte to be encrypted can be obtained.
Optionally, the position for adjusting each data in the first intermediate decrypted result obtains decryption among second as a result, packet
It includes:
Step S10121 carries out shifting function to second direction to the first intermediate decrypted result, wherein second direction and the
One is contrary.
Step S10123, current location according to locating for each in the first intermediate cryptographic result after displacement, divides again
With the position of each, the second intermediate decrypted result is obtained.
In an alternative embodiment, by the first intermediate cryptographic result after displacement, current location is the interior of odd number
Appearance shifts to (n+1)/2+4, and current location is that the content of even address shifts to the address n/2, wherein n is among first after shifting
Current location locating for each in decrypted result.
Optionally, according to the above embodiments of the present application, multiple target components of byte to be encrypted are obtained, comprising:
Step S1021 determines the first object parameter in target component according to position of the byte to be encrypted in data.
In above-mentioned steps, since the position of byte each in data is different, made using the position of byte to be encrypted
It for target component, can prevent different bytes to be encrypted that there is identical encrypted result, ensure that byte to be encrypted and encryption are tied
The one-to-one relationship of fruit.
Step S1023 determines that target is joined according to the preset-key of position and data of the byte to be encrypted in the data
The second target component in number.
Similarly, the position using byte to be encrypted in data and data preset-key determine third target component, can
It obtains uniquely, and one-to-one third target component.
Optionally, according to the above embodiments of the present application, target component is determined according to position of the byte to be encrypted in data
In first object parameter, comprising:
Step S10211 obtains the corresponding location parameter in position of the byte to be encrypted in data and the first preset value.
Step S10213 determines that location parameter is first object parameter to the result of the first preset value remainder.
In an alternative embodiment, the data in conjunction with shown in table one are that byte to be encrypted is illustrated with content B,
Content B is 0xC5, and the position in the data is 2, and the first preset value of setting is that 16,2 pairs of 16 remainders obtain first object parameter
It is 2, i.e., 00000010.
Table one
Content | A | B | C | D | E | ...... |
Address | 1 | 2 | 3 | 4 | 5 | ...... |
Optionally, it according to the above embodiments of the present application, is determined in target component according to the preset-key of data and position
Second target component, comprising:
Step S10231 obtains the corresponding location parameter in position of the preset-key, byte to be encrypted of data in data
With the second preset value, wherein the second preset value is the byte number of preset-key.
Step S10233 by location parameter to the second preset value remainder, and is looked into preset-key according to the result of remainder
Find byte key.
Step S10235 determines that byte key is third target component.
In an alternative embodiment, still by taking byte to be encrypted is the content B in table one as an example, number shown by table one
According to preset-key be 6E7D05AA642E, preset-key be 6 bytes, the corresponding location parameter in the position of content B be 2, content B
The corresponding location parameter 2 in position 2 are obtained to 6 remainder of the second preset value, therefore second word can be searched in preset-key
Section is used as byte key, i.e. the second target component is 0x7D.
Optionally, according to the above embodiments of the present application, the first logical operation and the second logical operation are XOR operation.
Optionally, according to the above embodiments of the present application, third logical operation and the 4th logical operation are XOR operation.
In an alternative embodiment, with data instance shown in table one, byte B to be encrypted is 0xC5, data it is pre-
If key is 6E7D05AA642E.The method provided through the foregoing embodiment encrypts content B.
Firstly, obtaining the second intermediate cryptographic of byte to be encrypted as a result, formula bRES=bSEC ⊕ bN_16 ⊕ can be used
BDA0,
Wherein, bRES is the second intermediate cryptographic of byte to be encrypted as a result, bDA0 is byte 0xC5 to be encrypted, and bN_16 is
First object parameter 2, bSEC are the second target component 0x7D, and in this embodiment, the first logical operation is XOR operation, will be to
Encrypted byte, first object parameter and the second target component carry out XOR operation, obtain the second intermediate cryptographic result 0xBA, specifically
Calculating process is as shown in Figure 2.
Then the operation of position is adjusted to the first intermediate cryptographic result, which includes transposition and displacement.
Transposition: being numbered address by 1 from low level, and low four bit address content shifts to the address 2*n.Gao Siwei shifts to 2*
(n-4) -1 address, the result after transposition is as shown in Table 2, rearranges byte content by address after transposition, obtains new content
Value is (1,100 1101).
Table two
Content | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 |
Address | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Change rear address | 7 | 5 | 3 | 1 | 8 | 6 | 4 | 2 |
Displacement: carrying out left 3 positions of cyclic shift for transposition the data obtained, as 0,110 1110 after processing, i.e., among second
Encrypted result is 0x6E.
Finally, regarding the second intermediate cryptographic result 0,110 1110 as object, join with first object parameter 2 and the second target
Number 0x7D carries out exclusive or, specific as shown in Figure 3.Above-mentioned steps through this embodiment, the encryption of available content B (0xC5)
It as a result is 0x11.
In the following, the corresponding decoding process of above-described embodiment is described.
Firstly, obtaining the company target component of encrypted result, wherein bDA is the encrypted result 0x11 of B, first object
Parameter bN_16 is 2%16, and being worth is 2, and the second target component bSEC is from provided 6 byte encryption key 6E7D05AA642E
Choose second byte content, as 0x7D.Exclusive or is carried out to encrypted result and two target components, obtains decryption among second
As a result 0x6E.Specific calculating process is as shown in Figure 4.
Then, one the data obtained of process is subjected to right 3 positions of cyclic shift, is 1,100 1101 after processing, then opened by 1
Begin the address that is numbered from low level, the content of odd address n to be shifted to the address (n+1)/2+4, the content of even address m shifts to m/
2 addresses, the ex-situ operations can be as shown in Table 3, obtain the second intermediate decrypted result 1,011 1010.
Table three
Content | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 |
Address | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
Change rear address | 4 | 8 | 3 | 7 | 2 | 6 | 1 | 5 |
Finally, regarding the second intermediate decrypted result 1,011 1010 as object, join with first object parameter 2 and the second target
Number 0x7D carries out exclusive or, specific as shown in Figure 5.Above-mentioned steps through this embodiment, the corresponding original of available encrypted result
Content B is 0xC5.
Embodiment 2
According to embodiments of the present invention, a kind of data processing equipment is provided, Fig. 6 is a kind of number according to the embodiment of the present application
According to the schematic diagram of processing unit, as shown in connection with fig. 6, which includes:
Module 60 is obtained, for obtaining multiple target components of byte to be encrypted.
First logical operation module 62, for carrying out the first logic to the multiple target component and the byte to be encrypted
Operation obtains the first intermediate cryptographic result.
Distribution module 64 is redistributed every for current location according to locating for each in the first intermediate cryptographic result
One position.
Shift module 66, for carrying out displacement behaviour to first direction to redistributing the first intermediate cryptographic result behind position
Make, obtains the second intermediate cryptographic result.
Second logical operation module 68, for carrying out the to the multiple target component and the second intermediate cryptographic result
Two logical operations obtain the encrypted result of the byte to be encrypted.
Embodiment 3
According to embodiments of the present invention, a kind of storage medium is provided, storage medium includes the program of storage, wherein in journey
Equipment where controlling storage medium when sort run executes the data processing method of above-mentioned any one.
Embodiment 4
According to embodiments of the present invention, a kind of processor is provided, processor is for running program, wherein when program is run
Execute the data processing method of above-mentioned any one.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (13)
1. a kind of data processing method characterized by comprising
Obtain multiple target components of byte to be encrypted;
First logical operation is carried out to the multiple target component and the byte to be encrypted, obtains the first intermediate cryptographic result;
Each the position is redistributed in current location according to locating for each in the first intermediate cryptographic result;
Shifting function is carried out to first direction to the first intermediate cryptographic result behind position is redistributed, obtains the second intermediate cryptographic
As a result;
Second logical operation is carried out to the multiple target component and the second intermediate cryptographic result, obtains the word to be encrypted
The encrypted result of section.
2. the method according to claim 1, wherein according to locating for each in the first intermediate cryptographic result
Current location, redistribute each the position, comprising: by low four bit address in the first intermediate cryptographic result
Content shifts to the address 2*n, the Gao Siwei in the first intermediate cryptographic result is shifted to -1 address 2* (n-4), wherein n is institute
State current location locating for each in the first intermediate cryptographic result.
3. according to the method described in claim 2, it is characterized in that, after the encrypted result for obtaining the byte to be encrypted,
The method also includes: the encrypted result is decrypted in decrypting end, wherein the decrypting end carries out the encrypted result
The step of decryption includes:
Third logical operation is carried out to the encrypted result and the multiple target component, obtains decrypting among first as a result, simultaneously
The position for adjusting each data in the described first intermediate decrypted result obtains the second intermediate decrypted result;
4th logical operation is carried out to the described second intermediate decrypted result and the multiple target component, obtains the word to be encrypted
Section.
4. according to the method described in claim 3, it is characterized in that, adjusting each data in the first intermediate decrypted result
Position, obtain among second decryption as a result, including:
Shifting function is carried out to second direction to the described first intermediate decrypted result, wherein the second direction and described first
It is contrary;
Each the position is redistributed in current location according to locating for each in the first intermediate cryptographic result after displacement
It sets, obtains the second intermediate decrypted result.
5. according to the method described in claim 4, it is characterized in that, according to each in the first intermediate cryptographic result after displacement
Redistribute each the position in locating current location, comprising: by the first intermediate cryptographic result after displacement, when
The content that anteposition is set to odd number shifts to (n+1)/2+4, and current location is that the content of even address shifts to the address n/2, wherein n is
Current location locating for each in the first intermediate decrypted result after displacement.
6. method as claimed in any of claims 1 to 5, which is characterized in that obtain multiple mesh of byte to be encrypted
Mark parameter, comprising:
The first object parameter in the target component is determined in the position in the data according to the byte to be encrypted;
The target component is determined according to the preset-key of position and the data of the byte to be encrypted in the data
In the second target component.
7. according to the method described in claim 6, it is characterized in that, position according to the byte to be encrypted in the data
Determine the first parameter in the target component, comprising:
Obtain position corresponding location parameter and first preset value of the byte to be encrypted in the data;
Determine that the location parameter is the first object parameter to the result of the first preset value remainder.
8. according to the method described in claim 6, it is characterized in that, position according to the byte to be encrypted in the data
The second target component in the target component is determined with the preset-key of the data, comprising:
Obtain the corresponding location parameter in position and of the preset-key, the byte to be encrypted of the data in the data
Two preset values, wherein second preset value is the byte number of the preset-key;
By the location parameter to the second preset value remainder, and found in the preset-key according to the result of remainder
Byte key;
Determine that the byte key is second target component.
9. the method according to claim 1, wherein first logical operation and second logical operation are
XOR operation.
10. according to the method described in claim 3, it is characterized in that, the third logical operation and the 4th logical operation
For XOR operation.
11. a kind of data processing equipment characterized by comprising
Module is obtained, for obtaining multiple target components of byte to be encrypted;
First logical operation module, for carrying out the first logical operation to the multiple target component and the byte to be encrypted,
Obtain the first intermediate cryptographic result;
Distribution module is redistributed described for current location according to locating for each in the first intermediate cryptographic result
The position of each;
Shift module is obtained for carrying out shifting function to first direction to redistributing the first intermediate cryptographic result behind position
To the second intermediate cryptographic result;
Second logical operation module, for carrying out the second logic to the multiple target component and the second intermediate cryptographic result
Operation obtains the encrypted result of the byte to be encrypted.
12. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment perform claim require any one of 1 to 10 described in data processing method.
13. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit require any one of 1 to 10 described in data processing method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710804820.XA CN109462468B (en) | 2017-09-06 | 2017-09-06 | Data processing method and device |
PCT/CN2018/079772 WO2019047503A1 (en) | 2017-09-06 | 2018-03-21 | Data processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710804820.XA CN109462468B (en) | 2017-09-06 | 2017-09-06 | Data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109462468A true CN109462468A (en) | 2019-03-12 |
CN109462468B CN109462468B (en) | 2021-05-28 |
Family
ID=65606174
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710804820.XA Active CN109462468B (en) | 2017-09-06 | 2017-09-06 | Data processing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109462468B (en) |
WO (1) | WO2019047503A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110837510A (en) * | 2019-11-13 | 2020-02-25 | 北京深演智能科技股份有限公司 | Data processing method, device, storage medium and processor |
CN111400738A (en) * | 2020-03-19 | 2020-07-10 | 杭州趣维科技有限公司 | Data encryption method in multidimensional table look-up mode |
CN114254367A (en) * | 2021-12-27 | 2022-03-29 | 中国电信股份有限公司 | Data encryption method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1672352A (en) * | 2002-05-23 | 2005-09-21 | 爱特梅尔股份有限公司 | Advanced encryption standard (AES) hardware cryptographic engine |
CN101013938A (en) * | 2007-01-12 | 2007-08-08 | 广州市诚毅科技软件开发有限公司 | Encryption method of block cipher |
CN102932135A (en) * | 2012-10-25 | 2013-02-13 | 福建升腾资讯有限公司 | 3DES (triple data encrypt standard) encryption method |
EP3032524A1 (en) * | 2014-05-21 | 2016-06-15 | Fuji Electric Co., Ltd. | Information-processing device, program, and recording medium |
CN106407127A (en) * | 2015-07-31 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Data encryption method and apparatus |
CN107038383A (en) * | 2016-02-03 | 2017-08-11 | 华为技术有限公司 | A kind of method and apparatus of data processing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100544250C (en) * | 2007-07-13 | 2009-09-23 | 南京邮电大学 | Encryption and Decryption Method of Network Information Broadcasting |
-
2017
- 2017-09-06 CN CN201710804820.XA patent/CN109462468B/en active Active
-
2018
- 2018-03-21 WO PCT/CN2018/079772 patent/WO2019047503A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1672352A (en) * | 2002-05-23 | 2005-09-21 | 爱特梅尔股份有限公司 | Advanced encryption standard (AES) hardware cryptographic engine |
CN101013938A (en) * | 2007-01-12 | 2007-08-08 | 广州市诚毅科技软件开发有限公司 | Encryption method of block cipher |
CN102932135A (en) * | 2012-10-25 | 2013-02-13 | 福建升腾资讯有限公司 | 3DES (triple data encrypt standard) encryption method |
EP3032524A1 (en) * | 2014-05-21 | 2016-06-15 | Fuji Electric Co., Ltd. | Information-processing device, program, and recording medium |
CN106407127A (en) * | 2015-07-31 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Data encryption method and apparatus |
CN107038383A (en) * | 2016-02-03 | 2017-08-11 | 华为技术有限公司 | A kind of method and apparatus of data processing |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110837510A (en) * | 2019-11-13 | 2020-02-25 | 北京深演智能科技股份有限公司 | Data processing method, device, storage medium and processor |
CN111400738A (en) * | 2020-03-19 | 2020-07-10 | 杭州趣维科技有限公司 | Data encryption method in multidimensional table look-up mode |
CN111400738B (en) * | 2020-03-19 | 2023-05-02 | 杭州小影创新科技股份有限公司 | Data encryption method adopting multidimensional table look-up mode |
CN114254367A (en) * | 2021-12-27 | 2022-03-29 | 中国电信股份有限公司 | Data encryption method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109462468B (en) | 2021-05-28 |
WO2019047503A1 (en) | 2019-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10909532B2 (en) | POS system with white box encryption key sharing | |
CN104410616B (en) | data encryption, decryption, transmission method and system | |
CN110661620B (en) | Shared key negotiation method based on virtual quantum link | |
KR101834504B1 (en) | Apparatus and method for encrypting and decrypting | |
US10148427B2 (en) | Information processing apparatus, method for processing information, and medium | |
JP2017519457A (en) | Device for determining the shared key | |
CN103905183B (en) | Method for improving safety of communication transmission of embedded encryption chip | |
CN109462468A (en) | Data processing method and device | |
WO2021129470A1 (en) | Polynomial-based system and method for fully homomorphic encryption of binary data | |
CN105723647A (en) | System for sharing a cryptographic key | |
KR101095386B1 (en) | Cryptographic System Using Discrete Chaotic Functions | |
CN107852324A (en) | For encrypting the method and encryption node of message | |
CN106452752B (en) | Method, system and the client of Modify password, server and smart machine | |
KR101914453B1 (en) | Apparatus and method for encryption | |
CN104023009A (en) | Web system license verification mechansim | |
US20160191234A1 (en) | Information processing apparatus, program, and recording medium | |
EP3238365A1 (en) | Cryptographic system and method | |
CN109361717A (en) | Encrypted content file method, apparatus and electronic equipment | |
JP2017167390A (en) | Information processing device, information processing method, and program | |
KR20160063902A (en) | Security communication method and apparatus | |
KR20190049875A (en) | How to respond to DCA attacks of degree 2 or higher in table-based implementations | |
CN104462994A (en) | Data encryption and decryption operation method | |
CN108322303A (en) | A kind of data transmission method | |
JP2021047371A (en) | Information processing device, information processing method and program | |
CN104408374B (en) | A kind of file encrypting method applied to data collection task 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 |