CN104811295A - Side channel energy analysis method for ZUC cryptographic algorithm with mask protection - Google Patents

Side channel energy analysis method for ZUC cryptographic algorithm with mask protection Download PDF

Info

Publication number
CN104811295A
CN104811295A CN201510221360.9A CN201510221360A CN104811295A CN 104811295 A CN104811295 A CN 104811295A CN 201510221360 A CN201510221360 A CN 201510221360A CN 104811295 A CN104811295 A CN 104811295A
Authority
CN
China
Prior art keywords
prime
energy consumption
matrix
energy
value
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
CN201510221360.9A
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.)
State Cryptography Administration Commercial Code Testing Center
Original Assignee
State Cryptography Administration Commercial Code Testing Center
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 State Cryptography Administration Commercial Code Testing Center filed Critical State Cryptography Administration Commercial Code Testing Center
Priority to CN201510221360.9A priority Critical patent/CN104811295A/en
Publication of CN104811295A publication Critical patent/CN104811295A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Respiratory Apparatuses And Protective Means (AREA)

Abstract

The invention discloses a side channel energy analysis method for the ZUC cryptographic algorithm with mask protection. The method includes: (1) establishing an energy consumption matrix E, and preprocessing to obtain an energy consumption matrix E'; (2) selecting left and right S-box output xor values S_XorOutr as attack points to obtain a middle matrix V or respectively adopting Hamming weight and single bits to determine a DPA (differential power analysis) discrimination function D; (3) calculating a simulated energy consumption matrix H and two average energy consumption matrixes D0 and D1; (4) calculating a correlation coefficient matrix R between H and E', and selecting predictive values corresponding to maximum rp,q to obtain correct keys; or determining the correct keys by selecting the predictive values corresponding to maximum delta dpq according to an equation that delta D is equal to D1-D0; (5) sequentially calculating for five times, and repeating the step two to step four to obtain all key information. By the technical scheme, the defect of lack of specific attack methods for the ZUC cryptographic algorithm with mask protection is solved, a novel two-order energy analysis method is provided innovatively, opening up a ZUC cryptographic algorithm attack situation is realized, and expansion of side channel energy analysis means is realized as well.

Description

A kind of Zu Chongzhi cryptographic algorithm to possessing mask protection carries out side channel energy analytical method
Technical field
The invention belongs to cryptographic algorithm technical field of analysis and detection; relate in cryptographic algorithms' implementation, the analysis of side channel energy, crypto module testing process; side channel energy analysis is carried out for the Zu Chongzhi stream cipher algorithm (ZUC) possessing mask safeguard procedures; obtain shielded key k; that is, side channel energy analytical method is carried out to the Zu Chongzhi cryptographic algorithm possessing mask protection.
Background technology
Along with the development of information technology, various cryptographic algorithm is just being widely used in the important departments such as economy, military affairs, administration, the fail safe of protection information.In view of the importance of cryptographic algorithm, the analysis and research that cryptographic algorithm software and hardware realizes (crypto module) have great importance safely to protection information.In recent years, the multiple attack to crypto module is widely known by the people, and all these objects of attacking are all the keys in order to obtain in crypto module.Common attack pattern can be divided into intrusive mood to attack, half intrusive mood is attacked and non-intrusion type is attacked.In recent years, due to non-intrusion type attack in side Multiple Channel Analysis implement convenient, less expensive and be widely used.Side Multiple Channel Analysis can be subdivided into chronometric analysis, energy spectrometer and emi analysis.Side channel energy analysis is wherein one of method the most frequently used in numerous analysis means, and it breaches the analytical model of conventional cipher algorithm, and ability is powerful, implements relatively easy.Side channel energy analysis and utilization crypto module energy ezpenditure and data operation and the correlation between performing; energy leakage function based on cryptographic algorithms' implementation sets up energy model; Using statistics method; the protected key that conjecture and authentication password module use, almost can be used to crack all symmetric cryptographies and public key cryptography.When cracking, tens of energy marks are only needed just can promptly to crack the most of smart cards not having defensive measure within a few minutes.Side channel energy analytical method generally comprises, simple energy analysis (SPA), differential power analysis (DPA), correlation energy analysis (CPA) and higher difference energy spectrometer (HODPA).
The attack of each peaked shapes of energy mark this characteristic different is directly utilized to be called simple power analysis SPA (Simple Power Analysis); When median handled by depending in algorithm implementation according to the energy ezpenditure of encryption device is respectively 0 and 1, the attack method that the difference between corresponding average energy mark carries out key recovery is called that differential power analysis attacks DPA (Differential Power Analysis); If cryptanalysis person utilizes the linear dependence between hypothesis energy ezpenditure and real energy ezpenditure to carry out key recovery, be then correlation energy analytical attack CPA (Correlation Power Analysis); In above-mentioned DPA analyzes, if only make use of a median, be called that single order DPA attacks, if certain utilizing in algorithm computing combines leakage, this combines leakage based on the multiple medians appeared in encryption device, then claim corresponding DPA to attack as high-order DPA analyzes.
In view of current development cryptographic algorithm being carried out to power consumption analysis attack technology, be the challenge that reply energy spectrometer brings, for the defense technique also constantly progress of power consumption analysis attack.The defense technique of anti-power consumption analysis comprises various concealing technology and mask technology, and the target of any defense technique is all make the energy ezpenditure of encryption device not rely on cryptographic algorithm median performed by equipment.
Concealing technology is by energy ezpenditure randomization, make all operations have the modes such as identical energy consumption cut off processed median and plant capacity consume between relation.Adopt the encryption device of concealing technology to perform identical operation with the equipment not adding protection, but therefrom cannot obtain available information.
Mask technology adopts the median handled by randomization encryption device, adds randomized mask to algorithm realization.It can realize in algorithm level, without the need to changing the energy ezpenditure characteristic of encryption device, without dependence between the median making the energy ezpenditure of equipment and performed cryptographic algorithm.
In mask defense schemes, based on one, the median v of algorithm computing is called that the random number m of mask converts, i.e. v m=v*m.Mask results from encryption device inside, and different in implementation each time, and therefore assailant can not know mask.The operation that computing * uses according to cryptographic algorithm usually defines.Therefore, computing * mostly is Boolean XOR computing, mould adds computing or modular multiplication.When mould adds computing and modular multiplication, modulus is selected according to cryptographic algorithm.Usually, mask directly applies to expressly or key.In order to mask type median can be processed and follow the tracks of mask, need to modify to algorithm.The result of encryption is also mask type, in order to obtain ciphertext, needs to eliminate mask at the end of calculating.Keep each median to be in all the time by mask state in computational process, this point is extremely important.Even if some medians obtain based on the middle-value calculating before it, keep above-mentioned character still very important.For above-mentioned reasons, to different medians, often need to adopt different masks respectively.Being in the consideration to realizing performance, a new mask being adopted to each median and uneconomical.Therefore, in order to obtain suitable performance, need the quantity carefully selecting mask.
The mask quantity superposed in algorithm execution route, is called the exponent number of algorithm mask defense schemes, the mask of corresponding exponent number is carried out to the method for energy spectrometer, is called high-order energy energy spectrometer.Single order mask can defend the energy spectrometer of single order, but can not defend secondary energy analysis; Second order mask can defend secondary energy analysis, but can not defend three rank energy spectrometers.Usually consider that defence and the exponential increasing operand analyzed increase, and the restriction of the point of available energy leakage on algorithm structure, usual grouping algorithm realizes accomplishing secondary energy analysis, and corresponding defensive measure also generally only accomplishes that second order mask is defendd.
Below the principle of DPA and CPA is simply introduced.DPA principle is: for the enciphering/deciphering computing of N group plain/cipher text data, obtains N bar energy mark, and energy mark here refers to the energy consumption measurement vector collected in a Password Operations process; To each conjecture key K, produce corresponding median (object of attack), according to median determination choice function; By choice function, energy mark collection is divided into two subsets; Be averaged the energy ezpenditure that two sub-set pairs are answered respectively, and ask poor to two average energy consumption values, this equal value difference is that median that choice function is corresponding is to the impact effect of energy mark.According to statistical theory, if K conjecture is incorrect, when the number N convergence of energy mark is infinitely great, the equal value difference of two subsets will level off to zero; If when K conjecture is correct, certain sampling point in energy mark, will there will be the maximum sharpness (maximum absolute value value) of an equal value difference, can determine correct key by maximum sharpness.CPA principle is: for the enciphering/deciphering computing of N group plain/cipher text data, obtains N bar energy mark; To each conjecture key K, produce corresponding median (object of attack); Energy model is set up according to median; By energy model, median is mapped as simulated energy consumption; Linearly dependent coefficient between computer sim-ulation energy ezpenditure and energy mark, scope is between [-1,1]; Choosing the maximum of absolute value in coefficient correlation, is 1 in theory, but owing to unavoidably there is noise jamming in collecting energy mark process, maximum is less than 1, and conjecture key corresponding to this coefficient correlation maximum is correct key.
Second order DPA/CPA analyzes, carries out preliminary treatment except needing to energy mark, utilizes the number of median different, and it is completely the same that principle and method and single order side channel energy are analyzed.Single order side Multiple Channel Analysis only utilizes a median in algorithm structure, and correspondingly, what second order side Multiple Channel Analysis utilized handled by encryption device two medians to be correlated with combines leakage.
The step of secondary energy analysis generally comprises as follows: select two median u and v, because have employed mask technology, is only mask type median know appear in equipment operating; Record energy mark, and preliminary treatment is carried out to energy mark; Calculate hypothesis median, it is the combination of u and v, and for the attack of boolean's mask, this combination is generally XOR, namely according to certain energy model, w is mapped as hypothesis energy value h; Compare (related operation) hypothesis energy ezpenditure and preliminary treatment energy mark, correct key guesses the maximum of corresponding coefficient correlation.Wherein, crucial 2 for selecting two suitable medians and carrying out preliminary treatment to energy mark.
Namely preliminary treatment is be combined to form new energy consumption values to relevant in energy mark a, b at 2.Usually and do not know the correct time calculating mask median, so a time interval I=t of energy mark can only be guessed r+1..., t r+1, period may includes v m, u mcalculating, therefore need all 2 combinations be applied to by preconditioned functions pr e () in this time interval; Generally preconditioned functions is symmetrical, and the length of pretreated energy mark is l (l-1)/2; Pretreated energy trace description is (pre (t r+1, t r+2), pre (t r+1, t r+3) ..., pre (t r+2, t r+3) ..., pre (t r+l-1, t r+l)); Conventional preconditioned functions is generally: pre (t x, t y)=t xt y(multiplication), pre (t x, t y)=(t x+ t y) 2, pre (t x, t y)=| t x-t y| (subtraction absolute value), (normalization), pre (t x, t y)=t x+ t y, pre (t x, t y)=t x-t ydeng.The result chosen directly affecting attack of preconditioned functions.
Zu Chongzhi set of algorithms (ZUC algorithm) is by the encryption of Chinese scholar autonomous Design and integral algorithm, is recommended as the international encryption of the 3rd cover of 4G radio communication and the candidate algorithm of integrity criteria by international organization 3GPP.Simply introduce this algorithm below: Zu Chongzhi algorithm logic is divided into upper, middle and lower three layers, as shown in Figure 1, upper strata is 16 grades of linear feedback shift registers (LFSR); Middle level is bit recombination (BR); Lower floor is nonlinear function F.(1) LFSR comprises 16 31 bit register element variable s 0, s 1, L, s 15.The operational mode of LFSR has 2 kinds: initialize mode and mode of operation.Under initialize mode, LFSR receives 31 bit words u.U be by nonlinear function F 32 bits export W obtain by giving up significant bits, i.e. u=W > > 1, under initialize mode, LFSR computational process as:
LFSRWithInitialisationMode(u)
{
(1)v=2 15s 15+2 17s 13+2 21s 10+220s 4+(1+2 8)s 0mod(2 31-1);
(2)s 16=(v+u)mod(2 31-1);
(3)if(s 16=0)thens 16=2 31-1;
(4)(s 1,s 2,L,s 15,s 16)→(s 0,s 1,L,s 14,s 15);
}
In the operational mode, LFSR does not receive any input.Its computational process is as follows:
LFSRWithInitialisationMode()
{
(1)s 16=2 15s 15+2 17s 13+2 21s 10+220s 4+(1+2 8)s 0mod(2 31-1);
(2)if(s 16=0)thens 16=2 31-1;
(3)(s 1,s 2,L,s 15,s 16)→(s 0,s 1,L,s 14,s 15);
}
(2) bit recombination (BR) extracts 128 bits and forms 4 32 bit words X from the register cell of LFSR 0, X 1, X 2, X 3.The concrete computational process of BR is as follows:
Bit Reconstruction()
{
(1)X 0=s 15H||s 14L
(2)X 1=s 11L||s 9H
(3)X 2=s 7L||s 5H
(4)X 3=s 2L||s 0H
}
(3) nonlinear function F comprises 2 32 bit mnemon variable R 1and R 2.F is input as 3 32 bit words X 0, X 1, X 2, output is 32 bit words W.The computational process of F is as follows:
F(X0,X1,X2)
{
( 1 ) - - - W = ( X 0 ⊕ R 1 ) + R 2
(2)W 1=R 1+X 1
( 3 ) - - - W 2 = R 2 ⊕ X 2
(4)R 1=S(L 1(W 1L||W 2H))
(5)R 2=S(L 2(W 2L||W 1H))
}
Wherein S is the S box conversion of 32 bits, and 32 bit S boxes are formed by the S box juxtaposition of 4 little 8 × 8, i.e. S=(S 0, S 1, S 2, S 3), wherein S 0=S 2, S 1=S 3.S 0mainly based on lightweight structure tectonic ideology, little S box is adopted to build the method design of large S box.Specifically, S 0inside employs the little S box P of 34 × 4 1, P 2, P 3combine, as shown in Figure 2, wherein m=5.
S 1the design of box is based on finite field gf (2 8) on nonlinear inverse function x -1with linear affine shift design, with the S box design class of AES seemingly.Bottom finite field gf (2 8) adopt primitive polynomial x 8+ x 7+ x 3+ x+1 defines, S 1the mathematic(al) representation of box is: wherein matrix M meets:
M = 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 0 1 C 1 1 0 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1
If the 32 bit input X of S box S and 32 bits export Y and are respectively:
X=x 0||x 1||x 2||x 3
Y=y 0||y 1||y 2||y 3
Wherein x 1and y 1be 8 bit bytes, i=0,1,2,3.Then there is y 1=S i(x j); L 1and L 2be 32 bit linear conversion, be defined as follows:
L 1 ( X ) = X &CirclePlus; ( X < < < 2 ) &CirclePlus; ( X < < < 10 ) &CirclePlus; ( X < < < 18 ) &CirclePlus; ( X < < < 24 )
L 2 ( X ) = X &CirclePlus; ( X < < < 8 ) &CirclePlus; ( X < < < 14 ) &CirclePlus; ( X < < < 22 ) &CirclePlus; ( X < < < 30 )
The secret key loading procedure of Zu Chongzhi algorithm is: the initial key k of 128 bits and the initial vector iv of 128 bits is expanded to 16 31 bit words as LFSR register cell variable s 0, s 1, L, s 15initial condition.If k and iv is respectively k 0|| k 1|| L||k 15and iv 0|| iv 1|| L||iv 15; Wherein k iand iv ibe 8 bit bytes, 0≤i≤15.Key loading procedure is as follows: (1) D is the constant of 240 bits, can be divided into the substring of 16 15 bits as follows: D=d 0|| d 1|| L||d 15, wherein:
d 0=100010011010111 2
d 1=010011010111100 2
d 2=110001001101011 2
d 3=001001101011110 2
d 4=101011110001001 2
d 5=011010111100010 2
d 6=111000100110101 2
d 7=000100110101111 2
d 8=100110101111000 2
d 9=010111100010011 2
d 10=110101111000100 2
d 11=001101011110001 2
d 12=101111000100110 2
d 13=011110001001101 2
d 14=111100010011010 2
d 15=100011110101100 2
(2) to 0≤i≤15, s is had i=k i|| d i|| iv i.
At initial phase, first the initial vector iv of the initial key k of 128 bits and 128 bits is encased in the register cell variable s of LFSR according to aforementioned key charging method 0, s 1, L, s 15in, as the initial state of LFSR, juxtaposition 32 bit mnemon variable R 1and R 2for full O.Then following operation is performed:
Repeat following process 32 times:
(1)Bit Reconstruction();
(2)W=F(X 0,X 1,X 2);
(3)LFSRWithInitialisationMode(W>>1);
First working stage performs following process once, and is given up by the output W of F:
(1)Bit Reconstruction();
(2)F(X 0,X 1,X 2);
(3)LFSRWithWorkMode();
Then key output stage is entered.At key output stage, often run a beat, perform following process once, and export the key word Z of 32 bits:
(1)Bit Reconstruction();
( 2 ) - - - Z = F ( X 0 , X 1 , X 2 ) &CirclePlus; X 3 ;
(3)LFSRWithWorkMode();
At present, utilize side Multiple Channel Analysis (SCA), particularly using the side Energy Analysis for High of energy spectrometer (PA), by setting up Hamming weight model, using first-order difference energy spectrometer (DPA) method can analyze the key of ZUC algorithm.For opposing DPA/CPA analyzes, generally employ mask safeguard procedures protection ZUC cryptographic algorithms' implementation.How for having mask safeguard procedures protection ZUC cryptographic algorithm, to carry out secondary energy analysis be the important research direction that secret key cracks.Therefore, for the ZUC cryptographic algorithm with mask scheme, need badly and propose corresponding effective second order side channel energy analytical method.
Summary of the invention
The object of technical solution of the present invention is to propose a kind of ZUC algorithm for possessing mask protection, utilizes algorithms of different median, carries out second order side channel energy analytical method targetedly and obtains the ZUC algorithm secret key information possessing corresponding mask scheme.
Realizing above-mentioned purpose technical scheme of the present invention is, a kind of Zu Chongzhi cryptographic algorithm to possessing mask protection carries out side channel energy analytical method, and the method comprises the steps:
(1) collecting energy mark is set up energy consumption matrix E and is carried out preliminary treatment and obtains the energy consumption matrix E ' after processing;
(2) ZUC algorithm F function the right and left S box is selected to export XOR value S_XorOut rcalculate as the point of attack and obtain intermediary matrix V or determine DPA distinguishing funotion D by Hamming weight, single-bit respectively;
(3) computer sim-ulation energy consumption matrix H and two average energy consumption matrix D 0and D 1;
(4) the coefficient correlation determination correlation matrix R between computer sim-ulation energy consumption matrix H and energy consumption matrix E ', chooses the maximum r in R p, qcorresponding conjecture value is correct secret key; Or by calculating average energy consumption matrix D 0and D 1difference, obtain average energy consumption difference matrix Δ D=D 1-D 0, select maximum energy consumption equal value difference Δ d pthe conjecture value that q is corresponding is correct secret key;
(5) select S box arithmetic section, carry out 5 successively and take turns computing, the analytical method according to above-mentioned (2)-(4) can obtain all secret key information.
Energy consumption matrix in above-mentioned steps (1) E ( N &times; T ) = e 1 1 L e T 1 M e t n M e 1 N L e T N , Wherein, N is the energy mark number of the ZUC algorithm computing collected, and T is computing time used, it is the energy consumption values that n-th enciphering/deciphering computing produces at moment t; Carrying out pretreated process to energy consumption matrix E is: arrange S box and export the 1st byte and the time gap scope of a jth bytes on energy mark is min-max, wherein, min and max is respectively minimum, maximum time point distance, range=max-min+1, for every bar energy mark, select the u point in min-max scope successively, corresponding power consumption values with one_to_one corresponding carries out preliminary treatment, and preprocess method is subtraction absolute value, multiplication or method for normalizing; Method for normalizing is, as u=min, e 1 &prime; n = ( e 1 n - &Sigma; i = 1 n e 1 i n ) ( e min n - &Sigma; i = 1 n e min i n ) , e 2 &prime; n = ( e 2 n - &Sigma; i = 1 n e 2 i n ) ( e min + 1 n - &Sigma; i = 1 n e min + 1 i n ) , . . . , e T - min + 1 &prime; n = ( e T - min + 1 n = &Sigma; i = 1 n e T - min + 1 i n ) ( e T n - &Sigma; i = 1 n e T i n ) , As u=min+1, the like, wherein, n is energy mark number by analysis, and preliminary treatment obtains new energy consumption matrix E &prime; ( N &times; T &prime; ) = e 1 &prime; 1 L e T &prime; &prime; 1 M e t &prime; n M e 1 &prime; N L e T &prime; &prime; N .
The ZUC algorithm F function the right and left S box as the point of attack is selected to export XOR value in above-mentioned steps (2) r r, 1, R r, 2be respectively the S box output valve before r wheel mask, r is followed successively by 0,1,2,3,4, R r, 1=f 1(iv, k r+9), R r, 2=f 2(iv, k r+5, k r+9), f 1, f 2be respectively F function the right and left S box output function, iv is initial vector; Intermediary matrix V is calculated as: select the secret key k of conjecture respectively r+9, k r+5totally 2 16individual different value, substitutes into S_XorOut rin obtain corresponding intermediary matrix V ( N &times; 2 16 ) = v 0 1 K v 2 16 - 1 1 M v m n M v 0 N L v 2 16 - 1 N , Wherein v m n = f 1 ( iv n , k r + 9 , m 0 ) &CirclePlus; f 2 ( iv n , k r + 5 , m 1 , k r + 9 , m 0 ) , M=(m 0, m 1), k i, jbeing expressed as i-th key conjecture value is j, i.e. j=k i, j, iv nfor known initial vector, m 0, m 1be the random number of 8 these spies; With Hamming weight, the determined DPA distinguishing funotion of single-bit method be respectively: D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) = 1 HW ( S _ Xor Out r ) < 16 0 HW ( S _ XorOut r ) > 16 And wherein, in bit (x, p) (p ∈ { 0,1, L, 31}) i.e. median x, the value 0 or 1 of this spy of p, guesses S_XorOut respectively rin round key (k r+9, k r+5) totally 2 16individual different value, substitutes into then distinguishing funotion is the total number of 1 value n 1 = &Sigma; x = 1 N D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) , The total number of 0 value n 1 = &Sigma; x = 1 N ( 1 - D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) ) .
Emulation energy consumption matrix in above-mentioned steps (3) H ( N &times; 2 8 ) = h 0 1 K h 2 8 - 1 1 M h m n M h 0 N L h 2 8 - 1 N ; Two average energy consumption matrix D 0and D 1computational process is: the middle time point t of energy consumption matrix E ', obtains the total power consumption average of this point two d 0 m &prime; = &Sigma; n = 1 N ( 1 - D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) ) e t &prime; n n 0 With d 1 m &prime; = &Sigma; n = 1 N D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) e t &prime; n n 1 , Wherein, d0 ' mcorresponding time point t conjecture value is m=(m 0, m 1) n 0group energy ezpenditure mean value; D1 ' mcorresponding time point t conjecture value is m=(m 0, m 1) n 1group energy ezpenditure mean value n 0+ n 1=N, asks energy consumption average to time points all in E ', obtains two average energy consumption matrixes
D 0 ( 2 16 &times; T &prime; ) = d 0 0 1 K d 0 0 T M d 0 m &prime; M d 0 2 16 - 1 1 L d 0 2 16 - 1 T &prime; , D 1 ( 2 16 &times; T &prime; ) = d 1 0 1 K d 1 0 T M d 1 m &prime; M d 1 2 16 - 1 1 L d 1 2 16 - 1 T &prime;
Correlation matrix in above-mentioned steps (4) between emulation energy consumption matrix H and energy consumption matrix E ' is R ( 2 16 &times; T &prime; ) = r 0,1 K r 0 , T &prime; M r m , t M r 2 16 - 1,1 1 L r 2 16 - 1 , T &prime; , Wherein, r m , t = &Sigma; n = 1 N [ h m n - h m n &OverBar; ] [ e t &prime; n - e t &prime; n &OverBar; ] &Sigma; n = 1 N [ h m n - h m n &OverBar; ] 2 &Sigma; n = 1 N [ e t &prime; n - e t &prime; n &OverBar; ] 2 , for the mean value that matrix H m arranges, for the mean value that matrix E ' t arranges, choose the maximum in R r p, qcorresponding (k r+9, k r+5) conjecture value (p/2 8, p%2 8) be the correct secret key analyzed and obtain; Calculate average energy consumption matrix D 0and D 1difference, select the equal value difference of maximum energy consumption then corresponding conjecture round key (k r+9, k r+5) conjecture value (p/2 8, p%2 8) be the correct secret key value analyzed and obtain.
The technical scheme of the application has the following advantages, solve the defect that the current ZUC cryptographic algorithms' implementation to having mask safeguard procedures does not have concrete attack method, for ZUC algorithm specific mask protection implementation method, innovatively propose new secondary energy analytical method, open up the new situation that ZUC cryptographic algorithm is attacked, extend the side channel energy analysis means to ZUC algorithm, the method can carry out side channel energy analysis to ZUC cryptographic algorithms' implementation more comprehensively effectively; The method that technical scheme proposes simultaneously is for common mask safeguard procedures, practical, provides reference to existing mask protectiving scheme design.
Accompanying drawing explanation
Fig. 1 is Zu Chongzhi algorithm logic hierarchical chart;
Fig. 2 is S 0box structure construction schematic diagram;
Fig. 3 is the signal of ZUC algorithm single order mask S box defense mechanism;
Fig. 4 is the second order point of attack position signal of the identical protection of ZUC algorithm S box output masking value;
Fig. 5 is the power consumption profile of the identical ZUC algorithm of S box output masking value;
Embodiment
Below technical scheme of the present invention is specifically described, first introducing the simple mask means of defence of single order, in order to save the memory space of S box, accelerating the efficiency of mask, designer can adopt 1 32 bit random i lumber m to carry out mask precomputation to ZUC algorithm F function the right and left S box, exports then the output of 8 S boxes only needs to carry out precomputation 4 S boxes, if make realization more efficient, can make m=(m 0, m 1, m 0, m 1), wherein m 0, m 1be the random number of 8 bits, then only need the preliminary treatment carrying out 2 S boxes.ZUC algorithm single order mask S box defense mechanism signal as shown in Figure 3, the input of limit, left and right S box is respectively S _ in R &prime; = S _ in R &CirclePlus; n , Its output valve respectively R 1 &prime; = R 1 &CirclePlus; m , R 2 &prime; = R 2 &CirclePlus; m , Wherein, m=(m 0, m 1, m 2, m 3), n=(n 0, n 1, n 2, n 3), i is followed successively by 0,1,2,3, x ibe expressed as i-th byte of 32 x.For the mask scheme that above-mentioned S box output masking value is consistent, by the output of new S box carry out XOR cancellation mask, the point of attack that namely r (r is followed successively by 0,1,2,3,4) takes turns is S _ XorOut r = R r , 1 &prime; &CirclePlus; R r , 2 &prime; = R r , 1 &CirclePlus; m &CirclePlus; R r , 2 &CirclePlus; m = R r , 1 &CirclePlus; R r , 2 , Wherein, R r, 1, R r, 2, R r, 1', R r, 2' be respectively r to take turns the forward and backward S box output valve of mask.According to the structure of ZUC algorithm, modern R r, 1=f 1(iv, k r+9), R r, 2=f 2(iv, k r+5, k r+9), f 1, f 2be respectively F function the right and left S box output function, with iv, k r+9, k r+5as parameter, then guess k respectively r+9, k r+5the key value of totally 16, carries out second order DPA/CPA and analyzes acquisition k r+9, k r+5right value; Take turns front 5 respectively and carry out second order side Multiple Channel Analysis, r is followed successively by 0,1,2,3,4, carries out second order DPA/CPA and analyzes 9 the round key bytes obtaining ZUC algorithm.Therefore, for the ZUC algorithm realization that S box output masking value is identical, the XOR S_XorOut that S box can be exported ras the point of attack, carry out the channel energy analysis of second order side.The selection of the concrete point of attack as shown in Figure 4.
By the analysis selected the above-mentioned point of attack, can determine that the Zu Chongzhi cryptographic algorithm to possessing mask protection carries out side channel energy analytical method: collecting energy mark is set up energy consumption matrix E and carried out preliminary treatment and obtains the energy consumption matrix E ' after process; The 5 energy marks of taking turns before initialization are gathered as shown in Figure 5, for 5 taking turns image data, often wheel R respectively before initialization in frame for the ZUC algorithm of the single order that left and right S box output masking value is identical simple mask protection 1, R 2all with identical mask, wherein, the key value of initial input is: k 0 = 00 , k 1 = 11 , k 2 = 22 , k 3 = 33 , k 4 = 44 , k 5 = 55 , k 6 = 66 , k 7 = 77 k 8 = 88 , k 9 = 99 , k 10 = aa , k 11 = bb , k 12 = cc , k 13 = dd , k 14 = ee , k 15 = ff ; Method for normalizing and subtraction absolute value methods is utilized to carry out preliminary treatment to energy consumption matrix respectively; ZUC algorithm F function the right and left S box is selected to export XOR value S_XorOut ras the point of attack, use Hamming weight model, carry out CPA analysis; Adopt preprocess method to be that normalized analysis result is as shown in table 1, when coefficient correlation and maximum correlation coefficient rate value minimum, key conjecture value corresponding to its coefficient correlation maximum is correct key.
Table 1: preliminary treatment is normalized secondary energy analysis result
Same employing preprocess method is that subtraction absolute value methods carries out second order analysis, and experimental result is as shown in table 2, is analyzed as shown in Table 2 also can obtain correct key by secondary energy.
Table 2: when preliminary treatment is subtraction absolute value methods secondary energy analysis result
By the above-mentioned secondary energy analysis to the protection of single order mask, the known the application's of utilization method can go out the key of this protection and two kinds of different Analysis of Pretreatment Methods come to the same thing by successful analysis.
Technique scheme only embodies the optimal technical scheme of technical solution of the present invention, and those skilled in the art all embody principle of the present invention to some variations that wherein some part may be made, and belong within protection scope of the present invention.

Claims (5)

1. carry out a side channel energy analytical method to the Zu Chongzhi cryptographic algorithm possessing mask protection, it is characterized in that, the method comprises the steps:
(1) collecting energy mark is set up energy consumption matrix E and is carried out preliminary treatment and obtains the energy consumption matrix E ' after processing;
(2) ZUC algorithm F function the right and left S box is selected to export XOR value S_XorOut rcalculate as the point of attack and obtain intermediary matrix V or determine DPA distinguishing funotion D by Hamming weight, single-bit respectively;
(3) computer sim-ulation energy consumption matrix H and two average energy consumption matrix D 0and D 1;
(4) the coefficient correlation determination correlation matrix R between computer sim-ulation energy consumption matrix H and energy consumption matrix E ', chooses the maximum r in R p, qcorresponding conjecture value is correct secret key; Or by calculating average energy consumption matrix D 0and D 1difference, obtain average energy consumption difference matrix Δ D=D 1-D 0, select maximum energy consumption equal value difference Δ d p qcorresponding conjecture value is correct secret key;
(5) select S box arithmetic section, carry out 5 successively and take turns computing, the analytical method according to above-mentioned (2)-(4) can obtain all secret key information.
2. the Zu Chongzhi cryptographic algorithm to possessing mask protection according to claim 1 carries out side channel energy analytical method, it is characterized in that, the energy consumption matrix in step (1) E ( N &times; T ) = e 1 1 L e T 1 M e t n M e 1 N L e T N , Wherein, N is the energy mark number of the ZUC algorithm computing collected, and T is computing time used, it is the energy consumption values that n-th enciphering/deciphering computing produces at moment t; Carrying out pretreated process to energy consumption matrix E is: arrange S box and export the 1st byte and the time gap scope of a jth bytes on energy mark is min-max, wherein, min and max is respectively minimum, maximum time point distance, range=max-min+1, for every bar energy mark, select the u point in min-max scope successively, corresponding power consumption values with ---correspondence carries out preliminary treatment, and preprocess method is subtraction absolute value, multiplication or method for normalizing; Method for normalizing is, as u=min, e 2 &prime; n = ( e 2 n - &Sigma; i = 1 n e 2 i n ) ( e min + 1 n - &Sigma; i = 1 n e min + 1 i n ) , . . . , e T - min + 1 &prime; n = ( e T - min + 1 n - &Sigma; i = 1 n e T - min + 1 i n ) ( e T n - &Sigma; i = 1 n e T i n ) , As u=min+1, the like, wherein, n is energy mark number by analysis, and preliminary treatment obtains new energy consumption matrix E &prime; ( N &times; T &prime; ) = e 1 &prime; 1 L e T &prime; &prime; 1 M e t &prime; n M e 1 &prime; N L e T &prime; &prime; N .
3. the Zu Chongzhi cryptographic algorithm to possessing mask protection according to claim 1 carries out side channel energy analytical method, it is characterized in that, selects the ZUC algorithm F function the right and left S box as the point of attack to export XOR value in step (2) r r, 1, R r, 2be respectively the S box output valve before r wheel mask, r is followed successively by 0,1,2,3,4, R r, i=f 1(iv, k r+9), R r, 2=f 2(iv, k r+5,k r+9), f 1, f 2be respectively F function the right and left S box output function, iv is initial vector; Intermediary matrix V is calculated as: select the secret key k of conjecture respectively r+9, k r+5totally 2 16individual different value, substitutes into S_XorOut rin obtain corresponding intermediary matrix V ( N &times; 2 16 ) = v 0 1 K v 2 16 - 1 1 M v m n M v 0 N L v 2 16 - 1 N , Wherein m=(m 0, m 1), k i, jbeing expressed as i-th key conjecture value is j, i.e. j=k i, j, iv " and be known initial vector, m 0, m 1be the random number of 8 bits; With Hamming weight, the determined DPA distinguishing funotion of single-bit method be respectively: D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) = 1 HW ( S _ XorOut r ) < 16 0 HW ( S _ XorOut r ) > 16 And wherein, in bit (x, p) (p ∈ { 0,1, L, 31}) i.e. median x, the value 0 or 1 of p bit, guesses S_XorOut respectively rin round key (k r+9, k r+5) totally 2 16individual different value, substitutes into then distinguishing funotion is the total number of 1 value n 1 = &Sigma; x = 1 N D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) , The total number of 0 value n 1 = &Sigma; x = 1 N ( 1 - D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) ) .
4. the Zu Chongzhi cryptographic algorithm to possessing mask protection according to claim 1 carries out side channel energy analytical method, it is characterized in that, emulation energy consumption matrix in step (3) H ( N &times; 2 8 ) = h 0 1 K h 2 8 - 1 1 M h m n M h 0 N L h 2 8 - 1 N ; Two average energy consumption matrix D 0and D 1computational process is: the middle time point t of energy consumption matrix E ', obtains the total power consumption average of this point two d 0 m t = &Sigma; n = 1 N ( 1 - D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) ) e t &prime; n n 0 With d 1 m t = &Sigma; n = 1 N D ( iv n , k r + 9 , m 0 , k r + 5 , m 1 ) e t &prime; n n 1 , Wherein, corresponding time point t conjecture value is m=(m 0, m 1) n 0group energy ezpenditure mean value; corresponding time point t conjecture value is m=(m 0, m 1) n 1group energy ezpenditure mean value n 0+ n 1=N, asks energy consumption average to time points all in E ', obtains two average energy consumption matrixes D 0 ( 2 16 &times; T &prime; ) = d 0 0 1 K d 0 0 T &prime; M d 0 m t M d 0 2 16 - 1 1 L d 0 2 16 - 1 T &prime; ,
D 1 ( 2 16 &times; T &prime; ) = d 1 0 1 K d 1 0 T &prime; M d 1 m t M d 1 2 16 - 1 1 L d 1 2 16 - 1 T &prime; .
5. the Zu Chongzhi cryptographic algorithm to possessing mask protection according to claim 1 carries out side channel energy analytical method, and it is characterized in that, the correlation matrix in step (4) between emulation energy consumption matrix H and energy consumption matrix E ' is R ( 2 16 &times; T &prime; ) = r 0,1 K r 0 , T &prime; M r m , t M r 2 16 - 1,1 1 L r 2 16 - 1 , T &prime; , Wherein, for the mean value that matrix H m arranges, for the mean value that matrix E ' t arranges, choose the maximum in R r p, qcorresponding (k r+9, k r+5) conjecture value (p/2 8, p%2 8) be the correct secret key analyzed and obtain; Calculate average energy consumption matrix D 0and D 1difference, select the equal value difference of maximum energy consumption then corresponding conjecture round key (k r+9, k r+5) conjecture value (p/2 8, p%2 8) be the correct secret key value analyzed and obtain.
CN201510221360.9A 2015-05-05 2015-05-05 Side channel energy analysis method for ZUC cryptographic algorithm with mask protection Pending CN104811295A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510221360.9A CN104811295A (en) 2015-05-05 2015-05-05 Side channel energy analysis method for ZUC cryptographic algorithm with mask protection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510221360.9A CN104811295A (en) 2015-05-05 2015-05-05 Side channel energy analysis method for ZUC cryptographic algorithm with mask protection

Publications (1)

Publication Number Publication Date
CN104811295A true CN104811295A (en) 2015-07-29

Family

ID=53695814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510221360.9A Pending CN104811295A (en) 2015-05-05 2015-05-05 Side channel energy analysis method for ZUC cryptographic algorithm with mask protection

Country Status (1)

Country Link
CN (1) CN104811295A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547193A (en) * 2016-06-28 2018-01-05 埃沙尔公司 Make replacement operation from the method for side Multiple Channel Analysis
TWI611682B (en) * 2016-06-03 2018-01-11 華邦電子股份有限公司 Cracking devices and methods thereof
US10277392B2 (en) 2016-06-03 2019-04-30 Winbond Electronics Corp. Cracking devices and methods thereof
CN114531232A (en) * 2021-12-31 2022-05-24 南京理工大学 Multichannel bypass signal safety analysis and detection system
CN114785478A (en) * 2022-03-30 2022-07-22 南京航空航天大学 Side channel correlation energy analysis method and system applied to polynomial hardware multiplication
CN114785478B (en) * 2022-03-30 2024-07-09 南京航空航天大学 Side channel correlation energy analysis method and system applied to polynomial hardware multiplication

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571331A (en) * 2012-02-07 2012-07-11 中国科学院软件研究所 Cryptographic algorithm realization protecting method used for defending energy analysis attacks
CN103166752A (en) * 2013-01-25 2013-06-19 国家密码管理局商用密码检测中心 Application for choosing wheel function to perform SM4 cryptographic algorithm side channel energy analysis on attack object
CN103647637A (en) * 2013-11-19 2014-03-19 国家密码管理局商用密码检测中心 Second-order side channel energy analysis method for SM4 algorithm of simple mask
CN103813313A (en) * 2012-11-07 2014-05-21 中国科学院微电子研究所 Hardware realization device of ZUC algorithm and method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571331A (en) * 2012-02-07 2012-07-11 中国科学院软件研究所 Cryptographic algorithm realization protecting method used for defending energy analysis attacks
CN103813313A (en) * 2012-11-07 2014-05-21 中国科学院微电子研究所 Hardware realization device of ZUC algorithm and method thereof
CN103166752A (en) * 2013-01-25 2013-06-19 国家密码管理局商用密码检测中心 Application for choosing wheel function to perform SM4 cryptographic algorithm side channel energy analysis on attack object
CN103647637A (en) * 2013-11-19 2014-03-19 国家密码管理局商用密码检测中心 Second-order side channel energy analysis method for SM4 algorithm of simple mask

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI611682B (en) * 2016-06-03 2018-01-11 華邦電子股份有限公司 Cracking devices and methods thereof
US10277392B2 (en) 2016-06-03 2019-04-30 Winbond Electronics Corp. Cracking devices and methods thereof
CN107547193A (en) * 2016-06-28 2018-01-05 埃沙尔公司 Make replacement operation from the method for side Multiple Channel Analysis
CN114531232A (en) * 2021-12-31 2022-05-24 南京理工大学 Multichannel bypass signal safety analysis and detection system
CN114531232B (en) * 2021-12-31 2024-03-19 南京理工大学 Multichannel bypass signal safety analysis and detection system
CN114785478A (en) * 2022-03-30 2022-07-22 南京航空航天大学 Side channel correlation energy analysis method and system applied to polynomial hardware multiplication
CN114785478B (en) * 2022-03-30 2024-07-09 南京航空航天大学 Side channel correlation energy analysis method and system applied to polynomial hardware multiplication

Similar Documents

Publication Publication Date Title
CN103457719B (en) A kind of side channel energy to SM3 cryptographic algorithm HMAC pattern analyzes method
CN103138917B (en) The Hamming distance model being input as basis with S box carries out SM4 cryptographic algorithm side channel energy analytical method
CN103227717B (en) The input of round key XOR is selected to carry out the method that SM4 cryptographic algorithm side channel energy is analyzed
CN104852795B (en) It is a kind of to take turns ZUC stream cipher algorithm mask means of defence of the output for boolean&#39;s mask
CN103166752B (en) Round function is selected to be the application that object of attack carries out the channel energy analysis of SM4 cryptographic algorithm side
CN103647637B (en) A kind of SM4 algorithm to simple mask carries out second order side channel energy and analyzes method
CN103825722B (en) Second order side channel energy analysis method for SM4 cipher algorithm
CN106788974A (en) Mask S boxes, packet key computing unit, device and corresponding building method
CN1989726A (en) Method and device for executing cryptographic calculation
CN104967509B (en) It is a kind of to take turns ZUC stream cipher algorithm mask means of defence of the output for arithmetic mask
CN103905182B (en) Anti-attack method based on middle data storage position dynamic change and circuit implementation
CN104333447A (en) SM4 method capable of resisting energy analysis attack
CN103532973A (en) Differential power attack testing method for DES (data encryption standard) algorithm circuit
Duan et al. Differential power analysis attack and efficient countermeasures on PRESENT
CN103679008A (en) Efficient secure chip power consumption attack test method
CN104811295A (en) Side channel energy analysis method for ZUC cryptographic algorithm with mask protection
CN104301095A (en) DES round operation method and circuit
CN106656459A (en) Side channel energy analysis method and device for SM3-HMAC
CN104796250A (en) Side channel attack method for implementation of RSA (Rivest, Shamir and Adleman) cipher algorithms M-ary
CN103916236A (en) Power attack prevention method oriented at AES algorithm and circuit achieving method thereof
CN103259647A (en) Encryption system side channel attack test method
CN104811297A (en) Method for modular multiplication remainder input side channel attacks aiming at M-ary implementation of RSA
Luo et al. Cryptanalysis of a chaotic block cryptographic system against template attacks
Gaspar et al. Hardware implementation and side-channel analysis of lapin
CN109936437B (en) power consumption attack resisting method based on d +1 order mask

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150729

RJ01 Rejection of invention patent application after publication