CN101848079B - Perturbation method and encryption method for character-oriented sequence with memory - Google Patents
Perturbation method and encryption method for character-oriented sequence with memory Download PDFInfo
- Publication number
- CN101848079B CN101848079B CN 201010194826 CN201010194826A CN101848079B CN 101848079 B CN101848079 B CN 101848079B CN 201010194826 CN201010194826 CN 201010194826 CN 201010194826 A CN201010194826 A CN 201010194826A CN 101848079 B CN101848079 B CN 101848079B
- Authority
- CN
- China
- Prior art keywords
- word
- value
- mnemon
- key stream
- sequence
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
The present invention relates to a kind of character-oriented, the sequence perturbation motion method with memory and encryption methods, belong to information processing and transmission field. Its perturbation motion method are as follows: 1) preset 2m memory unit and assign initial value; 2) each word xi of input is successively carried out: a) takes the value h of xi high m bit; If the content yh of h unit, output word
B) the value t of the low m bit of xi is taken; Content yt exclusive or by xi through S box transformed value and t unit, as a result updates yt; By updated yt through S box transformed value and yh exclusive or, yh is as a result updated; 3) using the word zi being sequentially output as the key stream sequence after upsetting. This encryption method are as follows: 1) message sender generates key stream; Then it by itself and origination message step-by-step exclusive or, encrypts origination message and sends it to message receiver; 2) message receiver generates key stream; Then itself and the encryption message step-by-step exclusive or received, decryption encryption message obtain origination message. The present invention improves encryption software and realizes speed, and safety is stronger.
Description
Technical field
The present invention relates to the method for a kind of communication and processing, relate to or rather sequence perturbation motion method and the encryption method of a kind of character-oriented, band memory.Employing is based on the mixed type band memory logic of whole word operation, to strengthen the anti-analytic intensity of stream cipher algorithm.
Background technology
Cryptographic technique is with a long history; at first for the protection of military and diplomatic correspondence safety, still, universal along with communication network and computer network; the application of contemporary cryptology no longer is confined to politics, military affairs and diplomatic, and its commercial value and social value have obtained widely approval.Maintaining secrecy is cryptographic core, is the utility that acquired information is maintained secrecy and encrypt.
Cryptographic algorithm is divided into public key algorithm and private key cryptographic algorithm.The private key cryptographic algorithm is divided into again block cipher and stream cipher algorithm.Block cipher generally carries out block encryption to message, and a larger message blocks is once encrypted in the algorithm operation.Stream cipher algorithm generally with the key of a weak point, with specific key stream generating algorithm, generates the key stream sequence suitable with the message-length that will encrypt, key stream sequence and plaintext step-by-step XOR is reached the purpose of encryption.And deciphering side generates same key stream sequence, with the ciphertext XOR, can obtain expressly.So the key of stream cipher algorithm is fast key stream generating algorithm of design safety.Traditional every operation of key stream generating algorithm once only produces the key stream of a bit.
To the attack of stream cipher algorithm, mainly be the safety defect of seeking the key stream sequence at present, reach the recovery encryption key, or key stream sequence and true random sequence are distinguished, or attempt generating the purpose of key stream sequence.Main attack method has Algebraic Attacks, distinguishing attack, conjecture to determine attack, correlation attack, differential attack etc.From design angle, what be difficult to resist most is distinguishing attack, and to this analysis based on statistics of stream cipher algorithm, its success or failure depend on the design of key stream sequence formation logic to a great extent.
The art generally believes, adopting band memory logic in the cryptographic algorithm is to strengthen a kind of basic measures of key stream formation logic, it can strengthen the performance that algorithm is resisted linear distinguishing attack and difference analysis, and therefore the reasonable utilization of band memory logic is likely the optimal selection of opposing distinguishing attack.
Along with the high speed development of communication network and computer network, the key stream generating method that traditional operation once generates a bit can not satisfy needs, especially the software realization aspect on the realization speed.Some word-oriented key stream generating methods are devised gradually.I.e. operation once generates the key word of some bits, forms the key stream sequence by key word.For example SNOW3G algorithm, Rabbit algorithm.
In stream cipher design, whole word band memory logic has been become in recent years main flow design philosophy as the nonlinear transformation assembly.Make a general survey of present published stream cipher algorithm, the application of whole word band memory logic begins to take shape, and shows a variety of whole word memory forms.For example: the RC4 algorithm is a kind of to stir the whole word band memory of type logic as the algorithm of core in fact.The so-called finite automata that adopts among the SNOW is in fact the whole word band memory of a kind of cumulative type of complexity logic.
Patent CN1829142A has invented a kind of new " based on byte manipulation, to be with memory as the sequence upset method of feature ".The method allows the key stream sequence take byte as unit, by the again output take byte as unit behind the disarrangement device.This disarrangement device is a whole word band memory nonlinear logic of strengthening character string, has the feature that stirs type and cumulative type band memory logic concurrently.It is characterized in that comprising:
Steps A presets 2
mIndividual mnemon, 0,1,2 ..., 2
m-1, deposit a byte content in each mnemon;
Step B is to the byte sequence of input
x=(x
0, x
1...) in each byte x
i, be done as follows:
A) get x
iThe value h of high m bit, h is less than 2
mValue;
B) behind known h, with the content y in h the mnemon
hWith input byte x
iCarry out xor operation, the byte z of output after upsetting
i, namely
C) upgrade mnemon, take out h the content y in the mnemon
hThe value t of low m bit, t also is less than 2
mValue.Behind known t, with the content y in h the mnemon
hBe updated to
With the content y in t the mnemon
tBe updated to
Namely
Wherein S represents a non-linear function transformation, is a displacement from the byte to the byte.
The value of described m is 3 or 4 or 5 or 6.
The sequence upset method of this invention when design is remembered logic based on the band of byte input and output, whole word arithmetic, has reasonably strengthened the mnemon scale, has strengthened the performance of this memory logic aspect anti-linearity and difference analysis.
But, the sequence that above-mentioned sequence perturbation motion method generates, balance is bad, i.e. each element value skewness in element value space in the sequence that generates after disturbance of random sequence.This will be so that the sequence of output has very large safety defect.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, sequence perturbation motion method and the encryption method of a kind of character-oriented, band memory is provided.This sequence perturbation motion method that is to say to allow sequence input take word as unit based on whole word operation, take the band memory as feature, by the again output take word as unit behind the disarrangement device of a band memory.In the stream cipher design, by setting up this disarrangement device, improve randomness and the anti-analysis ability of key stream sequence.
If no special instructions, the word of mentioning among the present invention is the n bit words.
In order to reach the foregoing invention purpose, this method comprises 2
mIndividual mnemon, a S box.The input word sequence, the word sequence of output after upsetting is characterized in that comprising:
Step B is to the word sequence of input
x=(x
0, x
1...) in each word x
i, be done as follows:
A) get x
iThe value h of high m bit;
B) behind known h, with the content y in h the mnemon
hWith input word x
iCarry out xor operation, the word z of output after upsetting
i, namely
C) upgrade mnemon, get x
iThe value t of low m bit.Behind known t, calculate first
Namely use
Upgrade the value of t mnemon.Calculate again
Namely with the y that had been updated
tAfter the effect of S box with y
hXOR upgrades the value of h mnemon.Wherein S represents an orthomorphic permutation from the word to the word.S (x
i), S (y
t) respectively with x
i, y
tBe input, calculate the functional value of S, the input and output of this nonlinear function are a n bit words.
Among described steps A, the B, n gets 8 usually, also can be 6,4.
In the described steps A, initially preset described 2 with the initial key of cryptographic algorithm or initial vector or random value or certain group constant
mThe content of each mnemon in the individual mnemon.
Among the described step a, get x
iThe value h of high m bit, be to x
iDo the operation of the n-m position that moves to right, i.e. h=x
i>>(n-m);
Among the described step c, get x
iThe value t of low m bit, be to x
iDo mould 2
mOperation, i.e. t=x
iMod 2
m
Among the described step c, use x
iValue and y through the conversion of S box
tXOR is used for upgrading the content of t mnemon;
Among the described step c, use the content of t the mnemon that has been updated through value and the y of the conversion of S box
hXOR is used for upgrading the content of h mnemon;
Among the described step c, the content of removing t, h mnemon is updated, and all the other mnemon contents are constant.Behind word of every output, generally to upgrade 2
mIn the individual mnemon two, but twice situation also can appear same mnemon upgraded sometimes.
The value of described m is the integer between 1 to n-1;
It is orthomorphic permutation that described S box requires, namely function S (x) and
It all is displacement.
Another object of the present invention is to provide a kind of encryption method, utilize key stream sequence provided by the invention, clear data stream is word for word encrypted, stream cipher arithmetic structural representation of the present invention as shown in Figure 2.
A kind of encryption method, its step comprises:
1) message sender generates key stream according to encryption key and initial vector, and the method that generates key stream is as follows:
1-1) utilize linear feedback shift register to generate source sequence;
1-2) choose some words from source sequence, input a nonlinear transformation unit, export a word;
1-3) with the random source sequence method of reinforcement of the present invention to step 1-2) word that generates carries out conversion;
1-4) with step 1-3) output and word XOR of shift register generate the key stream word.
Repeat above-mentioned 4 steps, can obtain key stream word sequence.
2) key stream that obtains and origination message step-by-step XOR are realized origination message is encrypted, and encrypting messages are sent to message receiver;
3) message receiver has the decruption key identical with encryption key and initial vector, utilizes step 1) generate the method for key stream, obtain key stream;
4) key stream that obtains and encrypting messages step-by-step XOR are realized the deciphering to encrypting messages, obtain origination message.
Described step 1-2) the nonlinear transformation unit in is usually selected finite state machine or is not realized with the nonlinear function of memory.
The scale of mnemon has material impact to algorithm security, and sequence upset method of the present invention has been improved the bad defective of sequence balance after original technology disturbance.When the method is remembered logic in design based on the band of whole word input, the whole word arithmetic of output, reasonably strengthen the scale of mnemon, strengthened the performance of this memory logic aspect anti-algebraical sum difference analysis, and the sequence of output has had good balance.Compare with single-bit band memory logic, remember logic based on the band of word and not only be easy to strengthen the scale of mnemon, and on application efficiency, can significantly improve.The sequence method of upseting of the mixed type band memory logic based on whole word operation of the present invention comprises transforming function transformation function and S box, and it is exported by word after utilizing transforming function transformation function and S box to upset to each word of inputting again.Article one, the relatively more fragile key stream sequence of anti-analysis ability is passed through its upset, and sequence complexity can be enhanced.Why saying that this class band memory logic is mixed type, is because it has the double grading that cumulative type band memory logic box stirs type band memory logic concurrently.This scheme can be used for the design of stream cipher algorithm and Hash function easily.
Compared with prior art, the good effect that has of the present invention is:
Sequence perturbation motion method of the present invention has improved the unbalanced problem of sequence after original technology disturbance.Encryption method of the present invention is word for word encrypted clear-text message, has improved the software of encrypting and has realized speed.The key stream sequence has stronger fail safe through upsetting.
Description of drawings
Fig. 1 is n=8, and the m=4 time series is upset schematic diagram;
Fig. 2 is the stream cipher arithmetic structural representation.
Embodiment
When implementing technical scheme of the present invention, at first, select suitable n, m.Generally, n is even number, and m gets n/2.Secondly, select the good orthomorphic permutation of algebraically, difference, linear behavio(u)r as the S box.The S box can be regarded as system key, also can not maintain secrecy.
Enforcement can be divided into two basic steps:
Steps A is to 2
mThe content of individual mnemon
Initialize.Application mode according to concrete can be provided by basic key or the initial vector of cryptographic algorithm, also can be by presetting with random number or certain group constant.
Step B is to the input word sequence
x=(x
0, x
1...) in each word x
i, be done as follows:
a)h=x
i>>(n-m);
B) output
Below, by reference to the accompanying drawings 1, it is that 4 o'clock embodiment is illustrated that n is got 8, m value.Input this moment, output and mnemon are the byte of 8 bits.If list entries x, output sequence z.
The S box is chosen as follows:
61 | 97 | FF | E9 | 66 | 56 | F1 | F3 | 54 | 72 | CC | 4D | 85 | 52 | 7A | 70 |
D0 | 2E | 4C | 58 | BE | 88 | 7F | 5A | 2F | 1B | 47 | AF | 9B | D5 | BF | 81 |
C3 | 4E | 86 | 2D | 6A | 9C | CE | 20 | 2B | 53 | 6D | FD | 3C | BC | 33 | 22 |
F7 | 59 | C9 | 63 | 6E | 8D | DD | F2 | E3 | 1A | 75 | DA | 13 | 1D | 68 | 42 |
A4 | 3F | B7 | 46 | 90 | 12 | 73 | EB | FA | F6 | 09 | 40 | A5 | E0 | B4 | B1 |
51 | 8E | 06 | 34 | 7D | DF | 99 | 6F | AA | 0B | 80 | 95 | 25 | EA | 87 | CD |
DC | 0C | 43 | FB | A7 | BD | 9E | FC | EE | 9F | 74 | B6 | CF | EF | 16 | 0F |
78 | D1 | 92 | 64 | D6 | 84 | 48 | 41 | 08 | 60 | 5D | 2A | B8 | 4F | E2 | 69 |
01 | C1 | 31 | 5F | 62 | 49 | B2 | 93 | 00 | CB | 04 | 18 | 07 | 71 | 17 | E4 |
AC | 8B | B0 | 7E | F8 | 44 | 5B | AD | 98 | A0 | 27 | 4B | 3A | B5 | F0 | 83 |
F9 | 14 | E7 | 23 | 77 | D2 | 10 | AE | B3 | 36 | 30 | 3B | 1C | 03 | 82 | 38 |
0E | 7B | 50 | A6 | 1F | 7C | CA | C2 | 02 | 2C | A9 | 8A | 39 | 15 | F4 | D9 |
A3 | 55 | 32 | 96 | C8 | 8C | C0 | 05 | 67 | 1E | EC | 19 | 29 | 89 | F5 | 21 |
37 | BB | E1 | 57 | A2 | C7 | E6 | 8F | AB | 91 | 35 | 28 | D3 | D7 | 79 | BA |
A1 | 6C | B9 | DE | A8 | 5E | FE | 6B | C5 | ED | 65 | 9A | 45 | C6 | C4 | 9D |
94 | 24 | 0D | 0A | E5 | 76 | 3D | E8 | 26 | 5C | D4 | 4A | D8 | 11 | DB | 3E |
Annotate: numeral is 16 systems and represents in the form.
When m=4, have 16 mnemons, establish 16 mnemons and by random initializtion be:
(0xea,0x63,0xe6,0x57,0xa8,0xd6,0x54,0x2e,0x17,0x4f,0x98,0x40,0x2b,0xfd,0xc1,0x9a)。
As
x=(0x4a, 0x77 ...).
x
0=0x4a, h=4, then first byte of output is
T=10 calculates
Then the 10th mnemon is updated to 0x91, and the 4th mnemon is updated to 0x23.At this moment, 16 mnemons are updated to:
(0xea,0x63,0xe6,0x57,0x23,0xd6,0x54,0x2e,0x17,0x4f,0x91,0x40,0x2b,0xfd,0xc1,0x9a)。
After byte of every output, generally to upgrade two in 16 mnemons, but twice situation sometimes also can occur same mnemon upgraded.Primary renewal meeting this moment is upgraded for the second time to cover.
Then the 7th mnemon is updated to 0x60, and at this moment, 16 mnemons are updated to:
(0xea,0x63,0xe6,0x57,0x23,0xd6,0x54,0x60,0x17,0x4f,0x91,0x40,0x2b,0xfd,0xc1,0x9a)。
Claims (9)
1. the sequence perturbation motion method that character-oriented, band are remembered the steps include:
To the content initialize of each mnemon, store a n bit words;
M, n are natural number; The value of m is the integer between 1 to n-1;
2) for each the word x in the key stream sequence of input
iCarry out successively following steps:
A) get current word x
iThe value h of high m bit; Wherein each word is the n bit words;
B) utilize the content y of h mnemon
hWith input word x
iCarry out xor operation, the word z of output after upsetting
i
C) get current word x
iThe value t of low m bit;
D) with current word x
iThrough the value of S box conversion and the content y of t mnemon
tCarry out XOR, and upgrade y with its Output rusults
t
E) with steps d) y that upgraded
tValue and described y through the conversion of S box
hXOR, and upgrade y with its Output rusults
h
The word z that 3) will export successively
iAs the key stream sequence after upsetting.
2. the method for claim 1 is characterized in that according to the initial key of cryptographic algorithm or the initial vector content initialize to each mnemon.
3. the method for claim 1 is characterized in that utilizing random number to the content initialize of each mnemon.
4. the method for claim 1 is characterized in that described step a), gets current word x
iThe method of value h of high m bit be: to x
iDo the operation of the n-m position that moves to right.
5. the method for claim 1 is characterized in that described step c) in, current word x got
iThe method of value t of low m bit be: to x
iDo mould 2
mComputing.
6. the method for claim 1 is characterized in that described S box is orthomorphic permutation.
7. an encryption method the steps include:
1) message sender generates key stream according to initial key and initial vector;
2) message sender is realized the key stream and the origination message step-by-step XOR that obtain origination message is encrypted, and encrypting messages is sent to message receiver;
3) message receiver utilizes initial key and initial vector, generates key stream;
4) message receiver is realized the deciphering to encrypting messages with the key stream that generates and the encrypting messages step-by-step XOR that receives, and obtains origination message;
Wherein, the method for described generation key stream is: preset 2
mIndividual mnemon
To the content initialize of each mnemon, store a n bit words, m, n are natural number, the value of m is the integer between 1 to n-1; Utilize linear feedback shift register to generate source sequence, and from the source sequence of each generation, choose nonlinear transformation unit of some word inputs, export a word x
iThen to the word x of each output
iCarry out successively following steps: a) get current word x
iThe value h of high m bit; B) utilize the content y of h mnemon
hWith input x
iCarry out xor operation, the word z of output after upsetting
iC) get current word x
iThe value t of low m bit; D) with current word x
iThrough the value of S box conversion and the content y of t mnemon
tCarry out XOR, and upgrade y with its Output rusults
tE) with steps d) y that upgraded
tValue and described y through the conversion of S box
hXOR, and upgrade y with its Output rusults
hF) with the z that exports
iGenerate the key stream word with a word XOR of shift register; At last, the key stream word according to successively output obtains the key stream sequence.
8. method as claimed in claim 7 is characterized in that described nonlinear transformation unit is finite state machine or not with the nonlinear function of memory.
9. method as claimed in claim 7 is characterized in that described S box is orthomorphic permutation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010194826 CN101848079B (en) | 2010-05-28 | 2010-05-28 | Perturbation method and encryption method for character-oriented sequence with memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010194826 CN101848079B (en) | 2010-05-28 | 2010-05-28 | Perturbation method and encryption method for character-oriented sequence with memory |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101848079A CN101848079A (en) | 2010-09-29 |
CN101848079B true CN101848079B (en) | 2013-02-06 |
Family
ID=42772547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010194826 Expired - Fee Related CN101848079B (en) | 2010-05-28 | 2010-05-28 | Perturbation method and encryption method for character-oriented sequence with memory |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101848079B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9448959B2 (en) * | 2012-10-05 | 2016-09-20 | Analog Devices, Inc. | Two-wire communication protocol engine |
CN104821873B (en) * | 2015-04-20 | 2018-07-03 | 上海春魁信息技术有限公司 | A kind of implementation method of cryptosecurity |
CN108599941A (en) * | 2018-04-28 | 2018-09-28 | 陶宁宇 | Random asymmetries expand byte encryption of communicated data method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1770680A (en) * | 2005-10-17 | 2006-05-10 | 浙江大学 | Output-cryptograph mixed feedback chaos stream cipher encrypting and decrypting method |
CN101268692A (en) * | 2005-04-26 | 2008-09-17 | 皇家飞利浦电子股份有限公司 | A device for and a method of processing an encrypted data stream for trick play |
CN101848078A (en) * | 2010-04-30 | 2010-09-29 | 中国科学院软件研究所 | Perturbation method and encryption method for key stream sequence |
-
2010
- 2010-05-28 CN CN 201010194826 patent/CN101848079B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101268692A (en) * | 2005-04-26 | 2008-09-17 | 皇家飞利浦电子股份有限公司 | A device for and a method of processing an encrypted data stream for trick play |
CN1770680A (en) * | 2005-10-17 | 2006-05-10 | 浙江大学 | Output-cryptograph mixed feedback chaos stream cipher encrypting and decrypting method |
CN101848078A (en) * | 2010-04-30 | 2010-09-29 | 中国科学院软件研究所 | Perturbation method and encryption method for key stream sequence |
Also Published As
Publication number | Publication date |
---|---|
CN101848079A (en) | 2010-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Aljawarneh et al. | A resource-efficient encryption algorithm for multimedia big data | |
Chen et al. | Double-blockchain assisted secure and anonymous data aggregation for fog-enabled smart grid | |
CN101764686B (en) | Encryption method for network and information security | |
CN105049401B (en) | A kind of safety communicating method based on intelligent vehicle | |
Wang et al. | Cryptanalysis and improvement on a block cryptosystem based on iteration a chaotic map | |
CN101741560B (en) | Integral nonlinear mapping-based hash function constructing method | |
CN104333446B (en) | A kind of novel ultra-light magnitude QTL block cipher implementation method | |
CN104065474B (en) | Novel low-resource efficient lightweight Surge block cipher implementation method | |
CN102185692A (en) | Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm | |
CN102356597A (en) | A method for secure communication in a network, a communication device, a network and a computer program therefor | |
CN107070630A (en) | A kind of fast and safely hardware configuration of aes algorithm | |
CN103634101A (en) | Encryption processing method and encryption processing equipment | |
Rhouma et al. | Cryptanalysis of a spatiotemporal chaotic image/video cryptosystem | |
CN101848081A (en) | S box and construction method thereof | |
CN104410490B (en) | The method of non-linear extruding protection password S boxes | |
CN107257279A (en) | A kind of clear data encryption method and equipment | |
CN101848078A (en) | Perturbation method and encryption method for key stream sequence | |
Mousavi et al. | Security of Internet of Things using RC4 and ECC algorithms (case study: smart irrigation systems) | |
CN101841415A (en) | Word-oriented key stream generating method and encrypting method | |
CN113078997A (en) | Terminal protection method based on lightweight cryptographic algorithm | |
CN101826959B (en) | Byte-oriented key stream generation method and encryption method | |
Fadhil et al. | A new lightweight AES using a combination of chaotic systems | |
CN101848079B (en) | Perturbation method and encryption method for character-oriented sequence with memory | |
CN105049204A (en) | Lightweight stream cipher technology VHC based on CTR mode and block cipher VH | |
Murtaza et al. | Parallelized key expansion algorithm for advanced encryption standard |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130206 |