CN105897404A - Hashing method based on delay generator - Google Patents

Hashing method based on delay generator Download PDF

Info

Publication number
CN105897404A
CN105897404A CN201610374498.7A CN201610374498A CN105897404A CN 105897404 A CN105897404 A CN 105897404A CN 201610374498 A CN201610374498 A CN 201610374498A CN 105897404 A CN105897404 A CN 105897404A
Authority
CN
China
Prior art keywords
message
state
function
delay generator
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.)
Pending
Application number
CN201610374498.7A
Other languages
Chinese (zh)
Inventor
梁英宏
刘义春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Finance And Economics University
Guangdong University of Business Studies
Original Assignee
Guangdong Finance And Economics University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Finance And Economics University filed Critical Guangdong Finance And Economics University
Priority to CN201610374498.7A priority Critical patent/CN105897404A/en
Publication of CN105897404A publication Critical patent/CN105897404A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic 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/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Abstract

The invention discloses a message hashing method based on a feedback stepping delay generator. A message hashing process comprises a message filling stage, a message injecting stage, a message confusing stage and a message outputting stage; data is processed by adopting a round function in the message injecting stage, the message confusing stage and the message outputting stage; due to the round function, a message is subjected to feedback stepping, cyclic shift and the like by alternatively adopting a m- sequence delay generator based on a linear feedback function; and a variable-length and collision-resistant message hash value can be rapidly obtained. According to the message hashing method disclosed by the invention, the message hash value having the random length can be obtained; the linear complexity is relatively high; an algorithm is simple in structure; and hardware implementation is easily carried out.

Description

A kind of ashing technique based on delay generator
Technical field
The invention belongs to field of information encryption, particularly to a kind of message hashes method based on delay generator.
Background technology
Data integrity is an importance of data safety.Hashing technique is the pass of protection data integrity Key technology.The most general data hash technology such as MD5, SHA-1, RIPEMD etc. are based primarily upon MD4 Algorithm, uses compression function that the packet of regular length is carried out the process of many wheel compression, it is thus achieved that dissipating of fixed length Train value.But in recent years, the data hash scheme of above-mentioned international standard is cracked by China's cryptologist, its Availability is faced with formidable challenges.
Linear feedback shift register is made up of n the binary depositor connected and 1 feedback function network. The state of each moment shift register is as the input of feedback function, and its output feeds back to first order displacement and posts Storage is to form the state of subsequent time, and the function of shift register is shifted conversion by its state and determines, And its state transfer conversion is determined by feedback Boolean function completely.Delay generator is that a class is based on this The shift register of former multinomial linear feedback, by one group of delay generator is combined, can be significantly Improve system linearity complexity, effectively take precautions against various cryptanalysises and malicious attack.
Summary of the invention
Present invention is primarily targeted at the shortcoming overcoming prior art with not enough, it is provided that a kind of new message dissipates Row scheme, it can carry out uni-directional hash process based on delay generator to message, to ensure the complete of data Property and identifiability, and have and realize advantage simple, that processing speed is fast.
In order to achieve the above object, the present invention is by the following technical solutions:
A kind of ashing technique based on delay generator of the present invention, message hashes process is filled by message, message Inject, message obscures and message exports 4 stages composition, specifically includes following step:
S1, pending message sequence is carried out message filling, and alternately use based on linear feedback function prolonging One round function of generator structure late;
S2, respectively round function is applied to message and injects stage, message and obscure stage and message output stage, Message carries out feed back stepping, cyclic shift processes, and quickly obtains variable length, crash-resistant message Hash value.
As preferred technical scheme, in step S1, the method that described message is filled is by pending message sequence Row fill times number length to 16, and the multiple of i.e. 512 is long, and concrete grammar is: if message sequence length Multiple equal to 16, it is not necessary to add;The most first add one 1, be subsequently filled several 0 so that whole Individual message string is times number length of 16.
As preferred technical scheme, in step s 2, the method that message is injected is following many wheels iteration:
For i=0to np-1
S ← S ⊕ F I ( p 16 i , p 16 i + 1 , p 16 i + 2 , ... , p 16 i + 15 )
S←R(S)
Wherein S is state value, stores pilot process data, and each state is 512, each state Initial value is all 0;FI is injection function;R is round transformation function;Iteration wheel number npFor the message word after filling Sequence length is divided by 16.
As preferred technical scheme, described injection function FI uses linear feedback shift, i.e. uses based on line Property feedback function xi=xi-11+xi-13+xi-14+xi-16Delay generator by message word sequence { p16i,p16i+1,p16i +2,…,p16i+15Feed back stepping 16 times.
As preferred technical scheme, in the injection stage i-th takes turns, to message word sequence { p16i,p16i+1,p16i +2,…,p16i+15Use after injection function FI processes, will gained 16 word length message after feedback stepping 16 times Word sequence and state S carry out saving as state S after XOR by turn.
As preferred technical scheme, in step s 2, described message obscures stage employing round function R to front State S that face generates carries out n furtherbRound transformation:
For i=0to nb-1:S ← R (S)
Typically, nbValue 16.
As preferred technical scheme, in step s 2, described message output stage output noDisappearing of individual word length Breath hashed value, process is as follows:
For i=0to no:
①S←R(S)
2. take each the 1st word taking turns state S and constitute addition hash value sequence;
Wherein R is round transformation function.
As preferred technical scheme, in step S1, described round function R is made up of following three steps:
First it is linear feedback shift: use based on linear feedback function xi=xi-10+xi-12+xi-15+xi-16 Delay generator carry out previous step computing gained state S feeding back stepping 16 times, gained sequence still saves as shape State S;
2. next to that cyclic shift transform: to state S={x0,x1,x2,…,x14,x15In }, each word, presses Rotation transformation xi=xi> > > (i (i+1)/2mod 32) carry out step-by-step cyclic shift, still saves as state S;
It is linear feedback shift the most again: use based on linear feedback function xi=xi-8+xi-9+xi-11+xi-16's Delay generator is by S={x0,x1,x2,…,x14,x15Feed back stepping 16 times, still save as state S after sequence.
The present invention compared with prior art, has the advantage that and beneficial effect:
1, the present invention use linear feedback delay generator construct Hash scheme, execution efficiency, security performance and Hardware is carried out performance and is better than using the Hash scheme of traditional method structure.
2, the present invention uses delay generator based on m-sequence to combine for round function, there is good puppet The characteristics such as stochastic pattern, higher linear complexity, algorithm structure is simple, it is easy to hardware realizes.
3, the present invention can generate the message Hash value of multiple length of any 32 as required.
Accompanying drawing explanation
Fig. 1 is the system flow chart of the present invention.
Fig. 2 is linear feedback shift 1 schematic diagram of the present invention.
Fig. 3 is the round transformation structure chart of the present invention.
Fig. 4 is linear feedback shift 2 schematic diagram of the present invention.
Fig. 5 be the present invention cyclic shift transform schematic diagram.
Fig. 6 is linear feedback shift 3 schematic diagram of the present invention.
Detailed description of the invention
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but the embodiment party of the present invention Formula is not limited to this.
Embodiment
In view of most cell phone apparatus, PDA and smart card etc. are 32 bit processors, this embodiment is assumed Each message word is 32.
Implementation process of the present invention includes that message is filled, message is injected, message is obscured and 4 rank of hashed value output Section.The present invention performs flow process as shown in Figure 1.
1, message fills the stage
Pending message sequence is filled times number length to 16, that is the multiple of 512 by message padding scheme Long.The such as message string to a length of 1000 words, needs to fill to 1008 words.
Fill method is: if the multiple that message sequence length is equal to 16, be not required to be filled with;The most first add Add a position 1, be subsequently filled several positions 0 so that whole message string is times number length of 16, that is disappears The integral multiple of breath data bit a length of 512.The such as message string to a length of 1000 words, needs to fill 10000000000000000000000000000000、00000000000000000000000000000000、 00000000000000000000000000000000、00000000000000000000000000000000、 00000000000000000000000000000000、00000000000000000000000000000000、 00000000000000000000000000000000,00000000000000000000000000000000 etc. 8 words.
Message sequence after filling isWherein npIt is 512 clear datas The quantity of block.
The message sequence of 1000 words above, long 1008 words, altogether n after fillingp=63 data blocks.
2, message injects the stage
During hash operations, each 512 (i.e. 16 32 words) of intermediate operations are referred to as one State, is designated as S=S={x0,x1,x2,…,x14,x15, each xiIt is 32 words.
It is following many wheels iteration for individual message injecting scheme:
For i=0to np-1
S ← S ⊕ F I ( p 16 i , p 16 i + 1 , p 16 i + 2 , ... , p 16 i + 15 )
S←R(S)
Wherein S is the state value of storage hashing pilot process data, and each state is 512 (or 16 Individual 32 words), the initial value of each state is all 0;FI is injection function;R is round transformation function;Iteration Wheel number npFor the message word length after filling divided by 16.
Wherein injection function FI uses based on linear feedback Function generator xi=xi-11+xi-13+xi-14+xi-16Delay send out Raw to message word sequence { p16i,p16i+1,p16i+2,…,p16i+15Press word feedback stepping 16 times.Used delay The linear feedback shift 1 of generator is as shown in Figure 2.
In the injection stage i-th takes turns, to message word sequence { p16i,p16i+1,p16i+2,…,p16i+15Use and inject letter Number is after FI process, gained 16 word length message word sequence after feedback stepping 16 times and state S are carried out by Position saves as state S after carrying out XOR.
Wherein round function R structure chart is as shown in Figure 3.Round transformation constitutes as follows:
First, use based on linear feedback function xi=xi-10+xi-12+xi-15+xi-16Delay generator to upper One step computing gained state S is carried out by word feedback stepping 16 times, and gained sequence still saves as state S.Here institute Use the linear feedback shift 2 of delay generator as shown in Figure 4.
2. secondly, to state S={x0,x1,x2,…,x14,x15Each word in }, by cyclic shift transform xi=xi> > > (i (i+1)/2mod 32) carry out step-by-step cyclic shift, still saves as state S.Cyclic shift transform is such as Shown in accompanying drawing 5.
The most again, use based on linear feedback function xi=xi-8+xi-9+xi-11+xi-16Delay generator will S={x0,x1,x2,…,x14,x15Linear feedback presses word stepping 16 times, still saves as state S.Use and postpone to occur The linear feedback shift 3 of device is as shown in Figure 6.
If there being special safety requirements, in round function, linear feedback stepping number of times can increase as required, As increased to 24 times, 32 times by 16 times.Delay generator can use similar based on linear feedback function Delay generator, such as xi=xi-11+xi-12+xi-13+xi-16Or xi=xi-8+xi-11+xi-13+xi-14+xi-15+xi-16
3, message obscures the stage
The round function R state to above generating is used to carry out many round transformations further:
For i=0to 15:S ← R (S)
If there being special safety requirements, round function is also added to 24 and takes turns even 32 and take turns, it may be assumed that
For i=0to 23:S ← R (S)
Or
For i=0to 31:S ← R (S)
4, the hash output stage
The output stage exports the message Hash value of 256, and process is as follows:
For i=0to 7:
①S←R(S)
2. take each the 1st word taking turns state S and constitute addition hash value sequence.
It is constructed so as to out the message Hash value of 256 word lengths.
Equally, such as 4 available 128 hashed values of above-mentioned circulation, 5 available 160 hash are circulated Value, circulates 6 available 192 hashed values, circulates 7 available 224 hashed values, circulates 12 times Available 384 hashed values, circulate n time and may make up arbitrary n*32 position hashed value.
Above-described embodiment is the present invention preferably embodiment, but embodiments of the present invention are not by above-mentioned reality Execute the restriction of example, the change made under other any spirit without departing from the present invention and principle, modification, Substitute, combine, simplify, all should be the substitute mode of equivalence, within being included in protection scope of the present invention.

Claims (8)

1. an ashing technique based on delay generator, it is characterised in that message hashes process is filled out by message Fill, message is injected, message is obscured and message exports 4 stages composition, specifically includes following step:
S1, pending message sequence is carried out message filling, and alternately use based on linear feedback function prolonging One round function of generator structure late;
S2, respectively round function is applied to message and injects stage, message and obscure stage and message output stage, Message carries out feed back stepping, cyclic shift processes, and quickly obtains variable length, crash-resistant message Hash value.
Ashing technique based on delay generator the most according to claim 1, it is characterised in that step In S1, described message fill method be by pending message sequence fill to 16 times number length, i.e. 512 The multiple of position is long, and concrete grammar is: if the multiple that message sequence length is equal to 16, it is not necessary to would add;No The most first add one 1, be subsequently filled several 0 so that whole message string is times number length of 16.
Ashing technique based on delay generator the most according to claim 1, it is characterised in that in step In rapid S2, the method that message is injected is following many wheels iteration:
For i=0 to np-1
S ← S ⊕ F I ( p 16 i , p 16 i + 1 , p 16 i + 2 , ... , p 16 i + 15 )
S←R(S)
Wherein S is state value, stores pilot process data, and each state is 512, each state Initial value is all 0;FI is injection function;R is round transformation function;Iteration wheel number npFor the message word after filling Sequence length is divided by 16.
Ashing technique based on delay generator the most according to claim 3, it is characterised in that described Injection function FI uses linear feedback shift, i.e. uses based on linear feedback function xi=xi-11+xi-13+xi-14+ xi-16Delay generator by message word sequence { p16i,p16i+1,p16i+2,…,p16i+15Feed back stepping 16 times.
Ashing technique based on delay generator the most according to claim 3, it is characterised in that at note Enter during the stage i-th takes turns, to message word sequence { p16i,p16i+1,p16i+2,…,p16i+15Injection function FI is used to enter After row processes, gained 16 word length message word sequence after feedback stepping 16 times and state S are carried out XOR by turn After save as state S.
Ashing technique based on delay generator the most according to claim 3, it is characterised in that in step In rapid S2, described message is obscured stage employing round function R state S to above generating and is carried out n furtherb Round transformation:
For i=0 to nb-1:S ← R (S)
Typically, nbValue 16.
Ashing technique based on delay generator the most according to claim 1, it is characterised in that in step In rapid S2, described message output stage output noThe message Hash value of individual word length, process is as follows:
For i=0 to no:
①S←R(S)
2. take each the 1st word taking turns state S and constitute addition hash value sequence;
Wherein R is round transformation function.
Ashing technique based on delay generator the most according to claim 1, it is characterised in that step In S1, described round function R is made up of following three steps:
First it is linear feedback shift: use based on linear feedback function xi=xi-10+xi-12+xi-15+xi-16 Delay generator carry out previous step computing gained state S feeding back stepping 16 times, gained sequence still saves as shape State S;
2. next to that cyclic shift transform: to state S={x0,x1,x2,…,x14,x15In }, each word, presses Rotation transformation xi=xi> > > (i (i+1)/2mod 32) carry out step-by-step cyclic shift, still saves as state S;
It is linear feedback shift the most again: use based on linear feedback function xi=xi-8+xi-9+xi-11+xi-16's Delay generator is by S={x0,x1,x2,…,x14,x15Feed back stepping 16 times, still save as state S after sequence.
CN201610374498.7A 2016-05-30 2016-05-30 Hashing method based on delay generator Pending CN105897404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610374498.7A CN105897404A (en) 2016-05-30 2016-05-30 Hashing method based on delay generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610374498.7A CN105897404A (en) 2016-05-30 2016-05-30 Hashing method based on delay generator

Publications (1)

Publication Number Publication Date
CN105897404A true CN105897404A (en) 2016-08-24

Family

ID=56709673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610374498.7A Pending CN105897404A (en) 2016-05-30 2016-05-30 Hashing method based on delay generator

Country Status (1)

Country Link
CN (1) CN105897404A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559458A (en) * 2013-10-09 2014-02-05 广州华迅网络科技有限公司 Method and system for acquiring data hashes

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559458A (en) * 2013-10-09 2014-02-05 广州华迅网络科技有限公司 Method and system for acquiring data hashes

Similar Documents

Publication Publication Date Title
CN103825723B (en) A kind of encryption method and device
CN103559458B (en) Data hash acquisition methods and system thereof
CN104270247B (en) Suitable for the efficient general Hash functions authentication method of quantum cryptography system
CN108964872B (en) Encryption method and device based on AES
Kuznetsov et al. Performance of hash algorithms on gpus for use in blockchain
CN110071794B (en) AES algorithm-based information encryption method, system and related components
KR20170067133A (en) Hardware assisted fast pseudorandom number generation
CN109450632B (en) Key recovery method based on white-box block cipher CLEFIA analysis
JP2010049037A (en) Device for generating hash value
CN103019648A (en) True random number generator with digital post-processing circuit
EP3384406A1 (en) Combining hashes of data blocks
US10536264B2 (en) Efficient cryptographically secure control flow integrity protection
Li et al. Keyed hash function based on a dynamic lookup table of functions
Smart et al. Hash functions, message authentication codes and key derivation functions
CN112152784A (en) Parallel processing techniques for hash-based signature algorithms
CN111478766B (en) Method, device and storage medium for realizing block cipher MEG
Tsai et al. A study on secret image sharing
Huang et al. Security analysis of image encryption based on twodimensional chaotic maps and improved algorithm
CN105897404A (en) Hashing method based on delay generator
CN114826560B (en) Lightweight block cipher CREF implementation method and system
Rastaghi An efficient CCA2-secure variant of the McEliece cryptosystem in the standard model
CN114911455A (en) High-speed pseudo-random number generation method based on FPGA and high-speed pseudo-random number generator
ALattar et al. A new block cipher algorithm that adopts the magic square of the fifth order with messages of different lengths and multi-function in GF (28)
Naito et al. LM-DAE: low-memory deterministic authenticated encryption for 128-bit security
Chen et al. Research on data encryption techniques for distributed interactive simulation network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160824