CN106027227A - Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method - Google Patents
Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method Download PDFInfo
- Publication number
- CN106027227A CN106027227A CN201610527205.4A CN201610527205A CN106027227A CN 106027227 A CN106027227 A CN 106027227A CN 201610527205 A CN201610527205 A CN 201610527205A CN 106027227 A CN106027227 A CN 106027227A
- Authority
- CN
- China
- Prior art keywords
- encryption
- symbol
- fermat
- record
- transform
- 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
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
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method. The method comprises seven rounds of encryption; two groups of subkeys are used by each round of the encryption, and the length of the subkeys is equal to the length of a block cipher; fifteen groups of the subkeys are generated by a key extending algorithm selected by a user, and the plaintext length of block encryption is 16 bytes, namely 128 bits; results generated after the seven rounds of the encryption needs to be carried out with a "mixed exclusive or/modular addition" operation with the fifteenth group of the subkeys; each round of the encryption is divided into a confusion layer and a diffusion layer; at the confusion layer, the "mixed exclusive or/modular addition" operation is carried out firstly, then a nonlinear transform is carried out, and at last the "mixed exclusive or/modular addition" operation is carried out again and the results are output to the diffusion layer; and the fast number-theoretic transform whose the length is 16 is adopted by the diffusion layer. According to the Fermat number number-theoretic transform and SAFER cipher algorithm combined block encryption method provided by the invention, on the premise of guaranteeing the encryption security and the high efficiency, the computation complexity is further reduced
Description
Technical field
The present invention relates to a kind of block encryption algorithm, it is possible to realize the encryption method of data or image simply, safely.
Background technology
Block cipher, as an important branch of symmetric cryptography, plays highly important work at information security field
With, the common development promoting block cipher theoretical of research to the design and analysis of block cipher.Its design derives from Shannon
The classic paper Communication Theory of Secret System that 1949 deliver, the research of modern block cipher
Start from 20 century 70 mid-terms, the history of existing more than two decades.Research in early days is entered substantially about data encryption standards (DES)
OK, being proposed need to be to the password of similar DES, such as, LOKI, FEAL etc..Block cipher is theoretical and application develop rapidly benefit
The end of the nineties, the AES of the U.S. plans and the NESSIE plan in Europe at the beginning of 21 century.
SAFER (Secure And Fast Encryption Routine) series of packets cryptographic algorithm includes SAFER K-
64, SAFER K-128, SAFER SK-64, SAFER SK-128, SAFERSK-40, SAFER+ and SAFER++.SAFER series
Password has more following characteristics: (1) they be all the algorithm of byte-oriented, Encrypt and Decrypt and key schedule use all
Being the byte computing to byte, this makes it advantageous in the application of the aspects such as Smart card;(2) round function encrypted uses
" replacement-linear transformation " structure, in iteration each takes turns, the reversible letter first wheel input action one controlled by respective loops
Number S, is then applied to a reversible linear transformation LP;(3) in key schedule, employ " key deviation ", i.e.
To each sub-key plus a constant, it is to avoid produce weak key.
SAFER++ is state-of-the-art algorithm in SAFER series of cryptographic algorithm, has above all of advantage, and
Diffusibility optimum in SAFER series of cryptographic algorithm and minimum complexity, but in the realistic case, it may be desirable to simpler
AES be encrypted application.
Summary of the invention
Cryptographic security, high efficiency and computation complexity cannot be taken into account not in order to overcome existing block cipher
Foot, the present invention provides a kind of under ensureing cryptographic security and high efficiency premise, reduces the Fermat number of computation complexity further
The grouping encryption method that number theoretic transform combines with SAFER cryptographic algorithm.
The technical solution adopted for the present invention to solve the technical problems is:
The grouping encryption method that a kind of Fermat number number theoretic transform combines with SAFER cryptographic algorithm, described block encryption side
Method includes that 7 take turns encryption, and each wheel uses two groups of sub-keys, and the length of sub-key is equal with the length of block cipher;15 groups of sons are close
Key is produced by customer option key expansion algorithm, and the length of the plaintext of block encryption is 16 bytes that is 128;Encryption is taken turns the 7th
The result of rear generation needs to do " mixing XOR/mould to add " computing with the 15th group of sub-key;
Often wheel encryption is divided into and obscures layer and diffusion layer, first passes around " mixing XOR/mould adds " computing obscuring layer, then enters
Line nonlinearity converts, and finally again passes by " hybrid guided mode adds/XOR " computing and outputs results to diffusion layer, and diffusion layer uses length
It it is the quick Fermat number transform of 16.
Further, the result produced after taking turns encryption the 7th needs " to add " with the 15th group of sub-key phase, " adding " operation now
Refer to the 1st, 4,5,8,9,12,13,16 bytes add by bit mould 2, i.e. XOR between byte, the 2nd, 3,6,7,10,11,14,
15 byte moulds 256 add;Owing to transform length is the multiple of 4, the structure of therefore this conversion uses the butterfly structure of radix-4FFT,
Output through Fermat number transform is the output result taking turns encryption.
Preferably, when the figure place inputting data is 8, the check figure of described quick Fermat number transform is 2, and modulus is 257.
Further, described diffusion layer solves Fermat number by the extra method increasing memory space storage record symbol
Conversion overflow problem;
When 256 this value occurs, need the location records symbol of a byte, the 3bits in the middle of location records symbol
For recording the encryption round number i that numerical value occurs, span 1~7, it is 001 with binary representation2To 1112;Rear 4bits remembers
The byte location j that record numerical value occurs, span 0~15, with 00012To 11112Represent the 1st~15 bytes, and with binary system
00002Represent the 16th byte;Record is replaced 256 after numerical value position, and the numerical value of replacement is preset by encryption end,
Span is from 0 to 255.
Further, in described diffusion layer, if repeatedly there are 256 numerical value in an AES, then need multiple continuously
Location records symbol, now with the extreme higher position 1 of location records symbol represent this record symbol be in this AES
Later record symbol, forms record symbol block with it for interval.If this time the most there are not 256 these numbers in AES
Value, then represent with zero record symbol;Zero record symbol has 16 bits and constitutes, and former 4 bits are as zero record symbol
Mark, value of statistical indicant is 10002After, 12bits represents the encryption number of times not occurring 256 numerical value continuously, and span is from 1
To 4095;When 256 numerical value do not have occurrence number to reach 4096 continuously, then zero record symbol of another 16bits is needed to remember
Record;Quickly Fermat number transform is as diffusion layer, needs location records symbol and the support of zero record symbol, during transmission ciphertext, needs
Record symbol section it is connected on ciphertext end, then to need during decoding to carry out according to record symbol section.
The a length of 128bits of described block cipher.
The technology of the present invention is contemplated that: often wheel encryption is divided into and obscures layer and diffusion layer, and total of three step composition one is taken turns and added
Close, represent wheel number to be encrypted with i.The most often take turns data x to be inputted and sub-key K2i-1Do once " mixing XOR/mould adds "
Computing.Then, obtained result uses formula through a nonlinear transformation, the 1st, 4,5,8,9,12,13,16 byte datas
(1), the 2nd, 3,6,7,10,11,14,15 byte datas use formula (2).Finally, by result and the sub-key of nonlinear transformation
K2iPhase " adds ", and adding here refers to that the 1st, 4,5,8,9,12,13,16 byte moulds 256 are added, and the 2nd, 3,6,7,10,11,14,15
Byte adds by bit mould 2, and this computing is referred to as " hybrid guided mode adds/XOR " computing, and acquired results is the output obscuring layer.
Diffusion layer takes the Fermat number Fast transforms of a length of 16.The figure place of input data is 8, can select Fermat number
Conversion modulus M=257, check figure a=2.Owing to transform length is the multiple of 4, therefore the structure of this conversion can use radix-
The butterfly structure of 4FFT is accelerated to calculate speed.Output through Fermat number transform is the output result taking turns encryption.
The result obtained due to Fermat number direct transform is between 0 to 256, and the bit wide of AES only has 8bit.When just
When the number that conversion obtains is equal to 256, spilling can be produced more than bit wide.Record symbol is stored below by the extra memory space that increases
Number method solve this problem.When 256 this value occurs, need the location records symbol of a byte.Location records
3bits in the middle of symbol, for recording the encryption round number i that numerical value occurs, span 1~7, is 001 with binary representation2
To 1112.The byte location j that rear 4bits record numerical value occurs, span 0~15, we are with 00012To 11112Represent the 1st
~15 bytes, and with Binary Zero 0002Represent the 16th byte.Record is replaced 256 after numerical value position, the numerical value of replacement
Being preset by encryption end, span is from 0 to 255.
If 256 numerical value repeatedly occurs in an AES, then need multiple continuous print location records symbol, now with position
The extreme higher position 1 putting record symbol represents that this record symbol is last record symbol in this AES, between with it being
Every forming record symbol block.If this time 256 these numerical value does not the most occur in AES, then represent with zero record symbol,
As Fig. 4 shows the structure of zero record symbol.Zero record symbol has 16 bits and constitutes, and former 4 bits are as zero record symbol
Mark, value of statistical indicant is 10002After, 12bits represents the encryption number of times not occurring 256 numerical value continuously, and span is permissible
From 1 to 4095.When 256 numerical value do not have occurrence number to reach 4096 continuously, then need zero record symbol of another 16bits
Carry out record.Thus, Fermat number transform, as diffusion layer, needs location records symbol and the support of zero record symbol.Transmission ciphertext
Time, need record symbol section to be connected on ciphertext end, then need during decoding to carry out according to record symbol section.
Deciphering is the inverse process of encryption.The first step of deciphering is such as the final step of encryption.Difference is what it was carried out
Computing is " hybrid guided mode adds/XOR " computing.Taking turns decrypting process subsequently into seven, often wheel deciphering first passes through the inverse of Fermat number transform
Conversion.
Beneficial effects of the present invention is mainly manifested in: on the premise of ensureing that cipher round results is good, it is proposed that a kind of ratio
The new block encryption algorithm that the computation complexity of SAFER++ is lower.By the computation complexity of this AES is analyzed,
And randomizing data ability and anti-attack ability are tested, it was demonstrated that it is low good with safety that this algorithm has computation complexity
The feature such as good.
Accompanying drawing explanation
Fig. 1 is the population structure of Safer-Fermat AES, K1,K2,…,K15Son needed for representing often wheel encryption is close
Key.
The one of Fig. 2 Safer-Fermat algorithm takes turns encryption signal, represents and add by bit mould 2 in figure ,+represent mould 256
Adding, ex represents that exponent arithmetic, lg represent logarithm operation.16-FNT represents the Fermat number transform of a length of 16.
Fig. 3 Fermat number transform of the present invention desired position record symbol structure.
Zero record symbol structure needed for Fig. 4 Fermat number transform of the present invention.
Fig. 5 is that the one of Safer-Fermat algorithm takes turns deciphering signal, and symbol "-" represents that mould 256 subtracts.
Fig. 6 be algorithm once encryption with deciphering design sketch, wherein (a) for input data, (b) be the 7th take turns encryption defeated
Go out;(c) be the 7th take turns deciphering output.
Fig. 7 is the success rate test figure of AES.
Fig. 8 is the Randomness test figure of AES.
Fig. 9 is the bright ciphertext independence test figure of AES.
Figure 10 is the diffusibility test figure of AES.
Detailed description of the invention
The invention will be further described below in conjunction with the accompanying drawings.
Reference Fig. 1~Figure 10, the grouping encryption method that a kind of Fermat number number theoretic transform combines with SAFER AES,
Altogether needing 7 to take turns encryption, each wheel uses two groups of sub-keys, and the length of sub-key is equal with the length of block cipher.Sub-key
(K1,K2,…,K15) produced by customer option key expansion algorithm, the present invention use the sub-key identical with SAFER++ generate
Method (see the nonlinear Cryptanalysis of Wu Wenling, Ma Hengtai, Tang Liu English .5 wheel SAFER++. electronic letters, vol, 2003,7:961-
965.).The length of the plaintext of block encryption is 16 bytes that is 128.The result produced after taking turns encryption the 7th needs and sub-key
K15Phase " adds ", " adding " now operation refers to the 1st, 4,5,8,9,12,13,16 bytes add by bit mould 2, i.e. XOR fortune between byte
Calculating, the 2nd, 3,6,7,10,11,14,15 byte moulds 256 add.
The length of the plaintext of block encryption is 16 bytes that is 128.The result produced after taking turns encryption the 7th needs close with son
Key K15Phase " adds ", " adding " now operation refer to sub-key and the 1st, 4,5,8,9,12,13,16 byte datas add by bit mould 2,
I.e. XOR between byte;Sub-key and the 2nd, 3,6,7,10,11,14,15 byte data moulds 256 add.Above-mentioned and K15Operation
Computing is called " mixing XOR/mould adds " computing.
In the present invention, the often wheel AES of new algorithm is as in figure 2 it is shown, represent in figure and add by bit mould 2 ,+represent mould
256 add, and ex represents that exponent arithmetic, lg represent logarithm operation.Exponent arithmetic function and logarithm operation function are unique in encryption round
Nonlinear transformation.If directly doing non-linear function transformation in a program to need to consume substantial amounts of resource.Table look-up so using
The mode of method obtains function return value.The exponential transform obscured in byte and logarithmic transformation can be previously stored, from
And reach the purpose of simplified operation.
We represent encryption round number with i below, and the often wheel encryption of Fig. 2 includes three steps, and wherein obscuring layer is the first two
Step.In each of the steps, it will be assumed that the data of input are x.
Obscure layer: input data x and sub-key K2i-1Do the most aforementioned " mixing XOR/mould adds " computing, then obtained
Result through nonlinear transformation (step one).Wherein the 1st, 4,5,8,9,12,13,16 byte datas are by following non-linear change
Exchange the letters number is tried to achieve:
x→45xMod257 (during x=128, arranges 45128Mod 257=0) (1)
2nd, 3,6,7,10,11,14,15 byte datas are tried to achieve by following non-linear transform function:
x→log45Xmod257 (during x=0, arranges log450mod 257=128) (2)
Finally, by the result of nonlinear transformation and sub-key K2iPhase " adds " (step 2), adding here refer to sub-key with
1st, 4,5,8,9,12,13,16 byte data moulds 256 are added;Sub-key and the 2nd, 3,6,7,10,11,14,15 byte datas by
Bit mould 2 adds, and this computing is referred to as " hybrid guided mode adds/XOR " computing, and acquired results is the output obscuring layer (chaotic layer).
Diffusion layer: take the Fermat number Fast transforms (16-FNT) (step 3) of a length of 16
X in formulanNth data, X is inputted for Fermat number transform modulekKth data are exported for Fermat number transform module.Defeated
The bit wide entering data is 8, can select Fermat number transform modulus M=257, check figure a=2.Due to transform length be 4 times
Number, therefore the structure of this conversion can use the butterfly structure of base 4 (radix-4) FFT to accelerate to calculate speed.Through Fermat number
The output of conversion is the i-th output result taking turns encryption.
The result obtained due to Fermat number direct transform is between 0 to 256, and the bit wide of AES only has 8bit.When just
When the number that conversion obtains is equal to 256, spilling can be produced more than bit wide.Store up below by extra 8 bit storage space that increase
Deposit record symbol to solve this problem.When 256 this value occurs, need the location records symbol of a byte, such as Fig. 3 exhibition
Show the structure of location records symbol.Record symbol value SpFormula is as follows:
Sp=h × 27+i×24+j (4)
In formula, h is end mark flag bit numerical value.3bits in the middle of location records symbol overflows appearance for recording numerical value
Encryption round number i, span 1~7, it is 001 with binary representation2To 1112.Rear 4bits record numerical value overflows the word occurred
Joint position j, span 0~15, we are with 00012To 11112Represent the 1st~15 bytes, and with Binary Zero 0002Represent the
16 bytes.Record is replaced 256 after numerical value position, and the numerical value of replacement is preset by encryption end, and span is from 0
To 255.
Such as the 7th takes turns existence 256 these values in the second byte, then the numerical value of location records symbol is 011100102.As
Really repeatedly there are 256 numerical value in an AES, then need multiple continuous print location records symbol, now with rearmost position record
The extreme higher position 1 of symbol represents that this record symbol is last record symbol in this AES, is formed with it for interval
Record symbol block.If this time 256 these numerical value does not the most occur in AES, then represent with zero record symbol, such as Fig. 4 exhibition
Show the structure of zero record symbol.Zero record symbol has 16 bits and constitutes, and former 4 bits are as the mark of zero record symbol
Will, value of statistical indicant is 10002After, 12bits represents the encryption number of times not occurring 256 numerical value continuously.According to bit wide, take
Value scope can be from 1 to 4095.When 256 numerical value do not have occurrence number to reach 4096 continuously, then need another 16bits's
Zero record symbol carrys out record.Thus, Fermat number transform as diffusion layer, need location records symbol and zero record symbol
Hold.During transmission ciphertext, the application is connected on ciphertext end record symbol section, then needs to carry out according to record symbol section during decoding.
Deciphering is the inverse process of encryption.The first step of deciphering is such as the final step of encryption.Difference is what it was carried out
Computing is " hybrid guided mode adds/XOR " computing.Taking turns decrypting process subsequently into seven, often wheel deciphering first passes through the inverse of Fermat number transform
Conversion.
Taking turns deciphering structure as Fig. 5 illustrates one, deciphering is the inverse process of encryption, and the first step of deciphering is as last in encryption
One step, difference is that its computing carried out is " hybrid guided mode adds/XOR " computing.Symbol "-" in figure represents that mould 256 subtracts.So
Decrypting process is taken turns in rear entrance seven, and often wheel deciphering needs the inverse transformation of Fermat number transform, and transformation for mula is as follows
According to the cryptographic structure of SAFER++, one transformation matrix needs 3 displacements and 16 sub-additions, and one takes turns encryption needs
Wanting 8 transformation matrixs, the most whole ciphering process needs 168 displacements and 896 sub-additions.Quick due to a length of 2 power sides
Fermat number transform can improve speed to use base 2 type FFT form, and can use radix-4FFT during a length of 4 power side
It is accelerated calculating.The addition number of times of the Radix-4FFT of a length of N is Nlog2N, and multiplication number of times mr4For
For Fermat number transform, multiplication can use displacement to replace, so at the Radix-4FFT of a length of 16
In form Fermat number transform, required addition number of times has 64 times, shift count 24 times.Seven take turns encryption needs 448 sub-additions and 168 times altogether
Displacement, complexity is lower than conventional cryptography structure.
Safer-Fermat AES is carried out simulating, verifying, 16 data 1 of a width of 8bit of input bit, 2,3,4,5,
6,7,8,9,10,11,12,13,14,15,16.After seven take turns encryption, encrypted data is 154,184,235,159,55,
113,166,34,183,124,231,100,62,174,201,191.Encrypting and decrypting exports as shown in Figure 6.In the drawings through seven
The deciphering output data of wheel are 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, represent successful decryption.
100 groups of data of stochastic generation, test encryption and decryption success rate, represent correct encryption and decryption with 1, represent with 0 and add
Decryption error.Test result as it is shown in fig. 7, all success.Fig. 8 is that the frequency balance of Safer-Fermat AES is surveyed
Trying, shared by Hamming weight, the average proportions of length of the plaintext is 50.16%, and close to 50%, cipher round results is good.Fig. 9 is invention
The bright ciphertext test independence test of algorithm, vertical coordinate, for taking ratio (occupy proportion), illustrates often to organize bright close in figure
Literary composition Hamming distance accounts for the average proportions 50.13% of one group of length of the plaintext, and close to 50%, the bright ciphertext independence of algorithm is good.
Figure 10 gives its diffusibility test result, vertical coordinate for change ratio (change proportion), figure illustrates each group close
The average proportions 50.224% of literary composition and the Hamming distance of previous group ciphertext with one group of length of the plaintext, close to 50%, algorithm bright
Literary composition diffusibility is good.
Fig. 1 is the population structure of Safer-Fermat AES.Each wheel uses two groups of sub-keys, the length of sub-key
Equal with the length of block cipher.Sub-key (K1,K2,…,K15) produced by customer option key expansion algorithm.Block encryption
Length of the plaintext is 16 bytes that is 128." mixing XOR/mould add " computing i.e. with sub-key K15Phase " adds ", " adding " behaviour now
Refer to the 1st, 4,5,8,9,12,13,16 bytes add by bit mould 2, i.e. XOR between byte, the 2nd, 3,6,7,10,11,
14,15 byte moulds 256 add.
In Fig. 2, represent and add by bit mould 2 ,+representing that mould 256 adds, ex represents that exponent arithmetic, lg represent logarithm operation.Refer to
Number operation function is unique nonlinear transformation in encryption round with logarithm operation function.If directly doing functional transformation in a program
Need to consume substantial amounts of resource.So using the mode of look-up table to obtain function return value.The index obscured in byte and
Logarithm operation can carry out calculated in advance storage, thus reaches the purpose of simplified operation.
Fig. 3 is Fermat number transform desired position of the present invention record symbol structure.Whole record symbol has 8bit bit wide.
3bits in the middle of location records symbol is for recording the encryption round number i that numerical value occurs, span 1~7, with binary representation
It is 0012To 1112.The byte location j that rear 4bits record numerical value occurs, span 0~15, we are with 00012To 11112
Represent the 1st~15 bytes, and with Binary Zero 0002Represent the 16th byte.Record is replaced 256 after numerical value position, replaces
The numerical value changed is preset by encryption end, and span is from 0 to 255.
Fig. 4 is zero record symbol structure needed for algorithm.4 bits were as the mark of zero record symbol in the past, and value of statistical indicant is
10002After, 12bits represents the encryption number of times not occurring 256 numerical value continuously, and span can be from 1 to 4095.When 256
When numerical value does not has occurrence number to reach 4096 continuously, then zero record symbol of another 16bits is needed to carry out record.
One of Safer-Fermat algorithm shown in Fig. 5 takes turns deciphering.Symbol "-" represents that mould 256 subtracts.
Fig. 6 carries out simulating, verifying to Safer-Fermat AES, 16 data 1 of a width of 8bit of input bit, and 2,3,
4,5,6,7,8,9,10,11,12,13,14,15,16.After seven take turns encryption, encrypted data is 154,184,235,
159,55,113,166,34,183,124,231,100,62,174,201,191, deciphering reverts to 1 later, and 2,3,4,5,6,7,
8,9,10,11,12,13,14,15,16。
Fig. 7 is the test of algorithm success rate, and encryption and decryption success rate is tested, represented with 1 by 100 groups of data of stochastic generation
Correct encryption and decryption, represents encryption and decryption mistake with 0.Through testing us it appeared that the success rate of algorithm reaches 100%, demonstrate
The correctness of algorithm
Fig. 8 is algorithmic theory of randomness test." 0 ", " 1 " balance by frequency test test ciphertext.Stochastic inputs is in plain text
10000 groups, then statistics generates the ratio of length of the plaintext shared by the Hamming weight often organizing ciphertext.Through test, Hamming weight with
The average proportions of length of the plaintext is 50.16%.Close to 50%.New AES " 0 ", " 1 " balance are good.Its randomness i.e.
Meet the requirement of general AES.
Fig. 9 is AES bright ciphertext independence test result.Input first group 16 0 in plain text, then constantly to first
Individual byte adds 1, the most at most can obtain 256 groups in plain text.When first character joint is equal to 255, start constantly second word
Joint adds 1.Thus obtained plaintext group has certain statistical property, and statistics is often organized bright ciphertext Hamming distance and accounted for one group of length of the plaintext
Ratio.Through the emulation testing average proportions of 10000 times 50.13%, it was demonstrated that the bright ciphertext independence of this algorithm is good.
Figure 10 is diffusibility test.I.e. test the effect of new algorithm diffusion layer Fermat number transform.From data conversion effective
Property consider, block encryption algorithm should be sensitive to change in plain text, i.e. in plain text snowslide phenomenon.In testing according to block cipher
Avalanche criterion, change the arbitrary bit of clear packets, changing of the only about half of bit of ciphertext block should be caused.Input is initial
In plain text 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16.Certain in the initial 128bit in plain text of the most random change
One bit, generates another group in plain text.Change previous group any bit in plain text the most every time.By each group of ciphertext of statistics with
The Hamming distance of previous group ciphertext and the ratio of one group of length of the plaintext, test diffusibility in plain text.Test through 10000 times,
Ratio is 50.224%.Prove that the plaintext diffusibility of this algorithm is good.
Claims (6)
1. the grouping encryption method that a Fermat number number theoretic transform combines with SAFER cryptographic algorithm, it is characterised in that: described point
Group encryption method includes that 7 take turns encryption, and each wheel uses two groups of sub-keys, and the length of sub-key is equal with the length of block cipher;
15 groups of sub-keys are produced by customer option key expansion algorithm, and the length of the plaintext of block encryption is 16 bytes that is 128;?
7 take turns encryption after produce result need do " mixing XOR/mould to add " computing with the 15th group of sub-key;Often wheel encryption is divided into and obscures layer
With diffusion layer, first pass around " mixing XOR/mould adds " computing obscuring layer, then carry out nonlinear transformation, finally again pass by
" hybrid guided mode adds/XOR " computing also outputs results to diffusion layer, and diffusion layer uses the quick Fermat number transform of a length of 16.
2. the grouping encryption method that Fermat number as claimed in claim 1 number theoretic transform combines with SAFER cryptographic algorithm, it is special
Levy and be: the result produced after taking turns encryption the 7th needs " to add " with the 15th group of sub-key phase, " adding " now operate and refer to the 1st,
4,5,8,9,12,13,16 bytes add by bit mould 2, i.e. XOR between byte, the 2nd, 3,6,7,10,11,14,15 byte moulds
256 add;Owing to transform length is the multiple of 4, the structure of therefore this conversion uses the butterfly structure of radix-4FFT, through Fermat
The output of transformation of variables is the output result taking turns encryption.
3. the grouping encryption method that Fermat number as claimed in claim 2 number theoretic transform combines with SAFER cryptographic algorithm, it is special
Levy and be: when the figure place inputting data is 8, the check figure of described quick Fermat number transform is 2, and modulus is 257.
4. the block encryption side that the Fermat number number theoretic transform as described in one of claims 1 to 3 combines with SAFER cryptographic algorithm
Method, it is characterised in that: described diffusion layer solves Fermat number by the extra method increasing memory space storage record symbol and becomes
Change overflow problem;
When there is 256 this value, needing the location records symbol of a byte, the 3bits in the middle of location records symbol is used for
The encryption round number i that record numerical value occurs, span 1~7, it is 001 with binary representation2To 1112;Rear 4bits records number
The byte location j that value occurs, span 0~15, with 00012To 11112Represent the 1st~15 bytes, and with Binary Zero 0002
Represent the 16th byte;Record is replaced 256 after numerical value position, and the numerical value of replacement is preset by encryption end, value
Scope is from 0 to 255.
5. the grouping encryption method that Fermat number as claimed in claim 4 number theoretic transform combines with SAFER cryptographic algorithm, it is special
Levy and be: in described diffusion layer, if 256 numerical value repeatedly occurs in an AES, then need multiple continuous print location records
With the extreme higher position 1 of location records symbol, symbol, now represents that this record symbol is last record in this AES
Symbol, forms record symbol block with it for interval.If this time the most there are not 256 these numerical value in AES, then with zero note
Record symbol represents;Zero record symbol has 16 bits and constitutes, and former 4 bits are as the mark of zero record symbol, mark
Value is 10002After, 12bits represents the encryption number of times not occurring 256 numerical value continuously, and span is from 1 to 4095;When 256
When numerical value does not has occurrence number to reach 4096 continuously, then zero record symbol of another 16bits is needed to carry out record;Quickly Fermat
Transformation of variables, as diffusion layer, needs location records symbol and the support of zero record symbol, during transmission ciphertext, needs record symbol
Section is connected on ciphertext end, then needs to carry out according to record symbol section during decoding.
6. the block encryption side that the Fermat number number theoretic transform as described in one of claims 1 to 3 combines with SAFER cryptographic algorithm
Method, it is characterised in that: a length of 128bits of described block cipher.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610527205.4A CN106027227A (en) | 2016-07-01 | 2016-07-01 | Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610527205.4A CN106027227A (en) | 2016-07-01 | 2016-07-01 | Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106027227A true CN106027227A (en) | 2016-10-12 |
Family
ID=57106936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610527205.4A Pending CN106027227A (en) | 2016-07-01 | 2016-07-01 | Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106027227A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107516053A (en) * | 2017-08-25 | 2017-12-26 | 四川巧夺天工信息安全智能设备有限公司 | For main control chip PS2251 data ciphering method |
CN108768617A (en) * | 2018-06-06 | 2018-11-06 | 贵州大学 | A kind of holding format encryption method based on legacy packets password |
CN110071927A (en) * | 2019-04-28 | 2019-07-30 | 苏州国芯科技股份有限公司 | A kind of information ciphering method, system and associated component |
CN111694541A (en) * | 2020-05-06 | 2020-09-22 | 常熟理工学院 | Base 32 arithmetic circuit for number theory conversion multiplication |
CN113254378A (en) * | 2021-04-07 | 2021-08-13 | 浙江工业大学 | Circuit breaker communication protection method based on serial port communication |
-
2016
- 2016-07-01 CN CN201610527205.4A patent/CN106027227A/en active Pending
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107516053A (en) * | 2017-08-25 | 2017-12-26 | 四川巧夺天工信息安全智能设备有限公司 | For main control chip PS2251 data ciphering method |
CN107516053B (en) * | 2017-08-25 | 2020-05-15 | 四川巧夺天工信息安全智能设备有限公司 | Data encryption method for main control chip PS2251 |
CN108768617A (en) * | 2018-06-06 | 2018-11-06 | 贵州大学 | A kind of holding format encryption method based on legacy packets password |
CN108768617B (en) * | 2018-06-06 | 2021-02-23 | 贵州大学 | Format-preserving encryption method based on traditional block cipher |
CN110071927A (en) * | 2019-04-28 | 2019-07-30 | 苏州国芯科技股份有限公司 | A kind of information ciphering method, system and associated component |
CN110071927B (en) * | 2019-04-28 | 2021-09-14 | 苏州国芯科技股份有限公司 | Information encryption method, system and related components |
CN111694541A (en) * | 2020-05-06 | 2020-09-22 | 常熟理工学院 | Base 32 arithmetic circuit for number theory conversion multiplication |
CN111694541B (en) * | 2020-05-06 | 2023-04-21 | 常熟理工学院 | Base 32 operation circuit for number theory transformation multiplication |
CN113254378A (en) * | 2021-04-07 | 2021-08-13 | 浙江工业大学 | Circuit breaker communication protection method based on serial port communication |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106027227A (en) | Fermat number number-theoretic transform and SAFER (Secure And Fast Encryption Routine) cipher algorithm combined block encryption method | |
CN103444124B (en) | Cipher processing apparatus, cipher processing method | |
CN102594546A (en) | Message processing module | |
CN103152362B (en) | Based on the large data files encrypted transmission method of cloud computing | |
CN109302280B (en) | AES key expansion method | |
US20020006196A1 (en) | Extended key preparing apparatus, extended key preparing method, recording medium and computer program | |
Mahendran et al. | Generation of key matrix for hill cipher encryption using classical cipher | |
CN107257279A (en) | A kind of clear data encryption method and equipment | |
CN116418481A (en) | Text privacy data double encryption protection method, device and equipment | |
US20020159588A1 (en) | Cryptography with unconditional security for the internet, commercial intranets, and data storage | |
KR20110120837A (en) | A cryptosystem with a discretized chaotic map | |
Dawood et al. | The new block cipher design (Tigris Cipher) | |
US8130956B2 (en) | Efficient and low power encrypting and decrypting of data | |
CN101783728A (en) | Public key encryption method for ergodic matrix over hidden field | |
Courtois | Low-complexity key recovery attacks on GOST block cipher | |
Dömösi et al. | A novel cryptosystem based on abstract automata and Latin cubes | |
Agustini et al. | Modified Vegenere Cipher to Enhance Data Security Using Monoalphabetic Cipher | |
Disina et al. | Enhanced caeser cipher to exclude repetition and withstand frequency cryptanalysis | |
Tarawneh | Cryptography: Recent Advances and Research Perspectives | |
Hussain et al. | Key based random permutation (KBRP) | |
Underwood | Cryptography for Secure Encryption | |
Sekhar et al. | Data Encryption technique using Random number generator | |
Malik | A novel key-based transposition scheme for text encryption | |
Jintcharadze et al. | Implementation and Comparative Analysis of Symmetric Encryption Model Based on Substitution Cipher Techniques | |
RU2254685C2 (en) | Method of data conversion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161012 |