Physical attack method, medium, device and system for elliptic curve digital signature

Through the transformation of the lattice basis reduction algorithm and the LWE/SVP problem, the discontinuous bit information of the elliptic curve digital signature system is used to solve the problem of insufficient information utilization in the existing technology and improve the physical attack capability and security assessment of ECDSA.

CN115801264BActive Publication Date: 2024-09-13NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211244166.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2024-09-13
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

When the existing technology performs physical attacks on the elliptic curve digital signature system ECDSA, it cannot fully utilize the discontinuous multi-segment bit information output by the pseudo-random generator, resulting in information waste and limited attack feasibility.

Method used

The lattice basis reduction algorithm is used to intercept the discontinuous bit fragment information of pseudo-random numbers through side channel attacks, construct LWE or SVP problems, and use in-depth research solution methods to evaluate the physical security of ECDSA.

Benefits of technology

It realizes a wider range of side channel attacks on ECDSA, makes full use of discontinuous bit information, reduces the waste of attack data, and provides stronger physical attack feasibility and security assessment capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801264B
    Figure CN115801264B
Patent Text Reader

Abstract

The present invention discloses a physical attack method, medium, device and system for elliptic curve digital signature, which belongs to the field of cryptographic security technology, and includes the steps of: launching a more extensive physical attack on a pseudo-random generator, intercepting multiple discontinuous bit segments through side channel attack detection, and using a lattice basis reduction algorithm to obtain a private key or evaluate the amount of calculation for obtaining a private key. On the one hand, the present invention can be regarded as a physical attack method for ECDSA, and on the other hand, the ability of ECDSA to resist side channel attacks can be evaluated according to the complexity of the corresponding lattice basis reduction algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cryptographic security technology, and more specifically, to a physical attack method, medium, device, and system for elliptic curve digital signatures. Background Art

[0002] Elliptic curve cryptography has important applications in real network communications. The Elliptic Curve Digital Signature Algorithm (ECDSA) based on elliptic curves has become a standard issued by organizations such as NIST [1], ANSI [2], and [3]. Physical attacks on the pseudo-random generator of ECDSA can leak some random number bits, and then by solving the corresponding Hidden Number Problem (HNP), the private key of ECDSA can be obtained, thus posing a serious threat to the security of this digital signature system. The HNP refers to recovering the private key based on partial high-order bit information of the affine function value of the private key in a certain residue ring. Currently, the main methods for solving the HNP are the lattice reduction algorithm [4] and the Bleichenbacher algorithm [5]. Among them, the lattice reduction method requires less collected information, and the prerequisite conditions for the attack are relatively weak. Using the lattice reduction algorithm to crack the HNP plays an important role in the physical security of cryptography, and its computational complexity is an important reference index for measuring the resistance of some cryptographic systems to side-channel attacks.

[0003] Existing technologies for physically attacking ECDSA using the HNP problem mainly use the pseudo-random number to leak consecutive high-order (several) bits [4], so it may not be possible to fully use the side-channel information obtained by physical detection. When obtaining more output signal segments of the pseudo-random generator through physical attacks such as power consumption, or when the intercepted output bit positions of the pseudo-random generator are not regular enough, the existing above-mentioned technologies do not support analyzing all the information obtained by physical attack detection.

[0004] The main specific background technologies involved are as follows:

[0005] 1. The Elliptic Curve Digital Signature Algorithm (ECDSA)

[0006] The system parameters of the ECDSA signature system include a selected elliptic curve and a base point G of order q on this curve. Randomly select a positive integer d as the private key for signing (0 ≤ d < q), and calculate the d - multiple point [d]G of the base point G as the corresponding public key. Given the hash value h of a certain message m, the signature process is as follows: The signer first generates a random number w satisfying, and then calculates the x - coordinate of the k - multiple point [k]G of the base point G to calculate r′ = x([k]G), and then calculates

[0007] s = w -1 ·(h + d·r′) mod q, #(1)

[0008] Finally, the signature (r′, s) of message m is obtained.

[0009] 2. Hidden Number Problem (HNP)

[0010] remember is a residue class ring of base point order q. Let is an unknown variable (hidden number). Uniformly distributed numbers α1, α2, ..., α n , β1, β2, ..., β n And calculate γ i ≡α i x0+β i (mod q), 1≤i≤n. HNP refers to the given base point order q and α1, α2, ..., α n and γ1,γ2,...,γ n The high order bits of x0 are obtained. At present, the lattice basis reduction method for solving HNP mainly includes first converting it into a learning with errors (LWE) problem, then using Kannan embedding to convert it into a unique shortest vector (uSVP) in the lattice, and finally building a suitable lattice model and solving it using the lattice basis reduction algorithm [4].

[0011] 3. Learning with Errors (LWE)

[0012] Here, the learning with errors (LWE) problem [5] refers to: given the modulus q, dimension d, and the residue class ring A distribution χ on , input n LWE samples, find The secret vector s in . Given the modulus q, dimension d, and The uniformly distributed secret vector s in , an LWE sample includes A vector a is randomly selected uniformly from<a,s> +e)mod q, where e is a sample from the random distribution χ.

[0013] Prior Art References

[0014] [1]National Institute of Standards and Technology,FIPS186-4DigitalSignature Standard(DSS),July 2013,

[0015] https: / / csrc.nist.gov / publications / detail / fips / 186 / 4 / final

[0016] [2]ANSI X9.62-1998Public Key Cryptography For The Financial ServicesIndustry:The Elliptic Curve Digital Signature Algorithm(ECDSA)

[0017] [3]ANSI X9.62:2005Public key cryptography for the financial servicesindustry-the elliptic curve digital signature algorithm(ECDSA),AmericanBankers Association,November 16,

[0018] 2005,https: / / webstore.ansi.org / Standards / ASCX9 / ansix9621998#PDF[4]Albrecht,M.R.,Heninger,N.(2021).On Bounded Distance Decoding with Predicate:Breaking the“Lattice Barrier”for the Hidden Number Problem.

[0019] In:Canteaut,A.,Standaert,FX.(eds)Advances in Cryptology–EUROCRYPT2021.EUROCRYPT 2021.Lecture Notes in Computer Science,vol 12696.Springer,Cham.

[0020] https: / / doi.org / 10.1007 / 978-3-030-77870-5_19

[0021] [5]Benger,N.,van de Pol,J.,Smart,N.P.,Yarom,Y.:“ooh aah...just alittle bit":

[0022] A small amount of side channel can go a long way.In:Batina,L.,Robshaw,M.(eds.)CHES2014.LNCS,vol.8731,pp.75-92.Springer,Heidelberg

[0023] (Sep 2014)

[0024] [6] O. Regev. On lattices, learning with errors, random linear codes, and cryptography. Journal of the ACM, 56(6):34, 2009. Preliminary version in STOC2005. Summary of the invention

[0025] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a physical attack method, medium, device and system for elliptic curve digital signature. The present invention launches a more extensive physical attack on the pseudo-random generator, detects and intercepts discontinuous multiple bit segments, and uses a lattice basis reduction algorithm to obtain a private key or evaluate the amount of calculation required to obtain a private key. On the one hand, the present invention can be regarded as a physical attack method for ECDSA, and on the other hand, the ability of ECDSA to resist side channel attacks can be evaluated according to the complexity of the corresponding lattice basis reduction algorithm.

[0026] The object of the present invention is achieved through the following solutions:

[0027] A physical attack method for elliptic curve digital signature, comprising the following steps:

[0028] S1: Input the ECDSA base order q, measure the number of bits m of the base order q, and determine the possible range of pseudo-random number bit detection for physical attacks;

[0029] S2: Determine the bit segment position set and S for attacking the pseudo-random generator; mark the bit position from 0 from the low bit to the high bit of the data, and a bit segment position [i, j) refers to the set of bit marks {i, i+1, ..., j-1};

[0030] S3: Obtain the ECDSA message hash value h and its signature information (r′, s), and intercept the pseudo-random number w used in the signature generation process in the bit segment position set and the bit segment of S through a side channel attack; a pseudo-random number is denoted as b and b=b0+2b1+2 2 b2+…+2 m-1 b m-1, where b0, b1, ..., b m-1 ∈{0,1}, specifies the bit segment position [i,j), then the notation bits(b,i,j) represents the bit segment (b j-1 , b j-2 , ..., b i );

[0031] S4: Based on the data obtained in step S3, calculate a sample A, including α = (r′·s -1 )mod q, β=-(h·s -1 ) mod q and a pseudo-random number of bit segments bits(w, i, j), where the bit segment position [i, j) traverses all the bit segment positions in S;

[0032] S5: Repeat steps S3 and S4 until enough samples A1, A2, ..., A are obtained. n ;

[0033] S6: Based on the acquired samples A1, A2, ..., A n , use the lattice basis reduction algorithm to solve the private key or evaluate the complexity according to the required lattice basis reduction algorithm calculation amount;

[0034] S7: Output the private key or the required computation amount, and end.

[0035] Further, in step S6, the method of solving the private key by using the lattice basis reduction algorithm or evaluating the complexity according to the computational complexity of the required lattice basis reduction algorithm comprises the following sub-steps:

[0036] S61, input the base point order q, obtain n samples A k =(α k , β k , bits(w,i,j)),k=1,2,…,n;

[0037] S62, let the unknown bit segment position set in the pseudo-random number be S R ={[i k , j k ): k = 1, 2, ..., r};

[0038] S63, calculate S R The length of each bit segment position in and find the maximum value among them, that is, calculate c for k = 1, 2, ..., r k =j k -i k , and c max =max 1≤k≤r c k ;

[0039] S64. Construct a matrix \(A\) with \(r\) rows and \(r + 1\) columns, where the element in the \(k\)-th row and the 1st column is where if \(i\) k -c max +c k \(< 0\), then \(\bmod q\) refers to the multiplicative inverse in the residue class ring of ; the element in the \(k\)-th row and the \((k + 1)\)-th column of the matrix \(A\) is the base point order \(q\); the other elements of the matrix \(A\) are 0; the matrix \(A\) is in the form of:

[0040]

[0041] S65. Use the lattice basis reduction algorithm for the column vectors of \(A\) to calculate a short vector \(v\) of length \(r\) short and an element \(\lambda\) in the residue class ring such that \(\lambda\cdot A[:,1]\equiv v\) short \(\bmod q\), where \(A[:,1]\) represents the first column of the matrix \(A\); that is, in the sense of the operations of the residue class ring , the short vector \(v\) short is equal to the first column of the matrix \(A\) multiplied by \(\lambda\); denote \(v\) short \(=(d_1,d_2,\cdots,d\) r ) T , that is, the \(k\)-th row coordinate of \(v\) short is \(d\) k ;

[0042] S66. Construct an instance of the learning with errors (LWE) problem, with modulus \(q\), secret dimension 1, and the error distribution approximately regarded as a sub-Gaussian distribution with an expected value of 0 and a standard deviation of , and there are \(n\) LWE samples in total. The \(k\)-th sample is the data pair \((\lambda\cdot\alpha\) k \(\bmod q,b\) k ), where:

[0043]

[0044] Here, for the integer \(b\) and the \(m\)-bit segment position \([i,j)\), the integer \(b\) satisfies \(0\leq b\lt q\) and \(b = b_0+2b_1+2\) 2 b_2+\cdots+2\) m-1 b\) m-1 , where \(b_0,b_1,\cdots,b\) m-1 \(\in\{0,1\}\), and \(e(b,i,j)\) represents the integer \(2\) 0 b\) i +2\) 1 b\) i+1 +\cdots+2\) j-i-1 b\) j-1 ;

[0045] S67, solving the problem instance in step S66 according to the method for solving the LWE problem, or evaluating the complexity of the problem instance in step S66 according to the method for evaluating the computational complexity of the LWE problem.

[0046] Further, in step S6, the method of solving the private key by using the lattice basis reduction algorithm or evaluating the complexity according to the computational complexity of the required lattice basis reduction algorithm comprises the following sub-steps:

[0047] SS61, input base point order q, obtain n samples A l =(α l , β l , bits(w l ,i,j)),l=1,2,…,n;

[0048] SS62, the unknown bit segment position set in the pseudo-random number is S R ={[i k , j k ): k = 1, 2, ..., r};

[0049] SS63, calculate S R The length of each bit segment position in , that is, calculate c for k = 1, 2, ..., r k =j k -i k ;

[0050] SS64, traversal l = 1, 2, ..., n, according to the lth discontinuous multi-segment bit leakage hidden number problem sample A l ,calculate:

[0051]

[0052] SS65, remember the vector of length r-1:

[0053]

[0054] Construct a block matrix M with 2+nr rows and 2+nr columns:

[0055]

[0056] Among them, the 1st row and 1st column are 1; for l=1,2,...,n, the sub-matrix from the 2nd+(l-1)(r-1)th to 1+l(r-1)th row and the 2nd+(l-1)(r-1)th to 1+l(r-1)th column is a unit matrix of size (r-1)×(r-1), and the 1st row and 1st column are a l, the 1+n(r-1)+lth row and 2+(l-1)(r-1) to 1+l(r-1)th column is a 1×(r-1) size sub-matrix C, the 1+n(r-1)+lth row and 1+n(r-1)+lth column is q, the 1+n(r-1)+lth row and 2+nrth column is b l ; The 2+nrth row and 2+nrth column are 1; the rest of the elements are 0;

[0057] SS66, use the lattice basis reduction algorithm to calculate the short vector for the column vector of the matrix M, and record the first coordinate η1 and the second + nr coordinate η nr+2 If η nr+2 The absolute value of is equal to 1, then calculate x0 = -η1·η nr+2 And output the private key x0; otherwise fail;

[0058] SS67, obtain x0 as the private key output, obtain the information corresponding to the real cryptographic problem, or give the computational amount of the matrix M lattice basis reduction algorithm as the computational amount for solving the private key x0.

[0059] Further, in step S3, the side channel attack means includes power consumption side channel attack means.

[0060] Furthermore, in step S67, the method for solving the LWE problem adopts an existing method.

[0061] Furthermore, in step S67, the method for evaluating the computational complexity of the LWE problem adopts an existing method.

[0062] Furthermore, in step SS67, the information in the actual password question includes a private key.

[0063] A readable storage medium stores a computer program, wherein the computer program is loaded by a processor and executes any of the above methods.

[0064] A computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is loaded by the processor, the method described in any one of the above items is executed.

[0065] A physical attack system for elliptic curve digital signature includes the computer device as described above.

[0066] The beneficial effects of the present invention include:

[0067] Compared with the existing physical attack technology of elliptic curve digital signature system, the positive effect of the present invention is: the present invention proposes a physical attack method of elliptic curve digital signature based on lattice reduction algorithm, and its main advantages are:

[0068] (1) It allows for more flexible side-channel attacks on the pseudo-random generator used in the cryptographic system. The bit positions detected by physical attacks are wider and are no longer limited to fixed detection of continuous high-order bits of pseudo-random numbers. Therefore, physical attacks are more feasible.

[0069] (2) The technical solution of the present invention through the lattice reduction algorithm can make full use of the discontinuous multi-segment bit fragment information of the pseudo-random number intercepted by the physical attack. Compared with the traditional hidden number problem method that can only use the high-order continuous bit fragments of the pseudo-random number, it can make more full use of the information detected by the physical attack and greatly reduce the waste of the intercepted data.

[0070] (3) Through the technical solution of the lattice reduction algorithm of the present invention, the ECDSA cracking problem of intercepting discontinuous multiple bit segments of pseudo-random numbers is converted into an LWE problem or an SVP problem. By utilizing in-depth research and extensive results of LWE or SVP solution methods, more quantifiable information can be provided for evaluating the physical security of ECDSA and achieving security. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0072] Figure 1 is a flowchart of the steps of the method according to the embodiment of the present invention;

[0073] Figure 2 This is a flow chart of an implementation method of step six in the method of the embodiment of the present invention;

[0074] Figure 3 This is another implementation flow chart of step six in the method of the embodiment of the present invention. DETAILED DESCRIPTION

[0075] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.

[0076] In order to solve the problems in the background, the inventors of the present invention have found through creative thinking that in existing similar works, in most cases, physical attacks can only obtain high-order bit information of the pseudo-random generator through side channel attacks. This information can be used as an integer linear constraint on the private key, which has the following shortcomings: (1) If the physical attack is required to just intercept the high-order bits of the pseudo-random number, then a certain degree of limitation on the side channel attack is formed; (2) If the information obtained by the physical attack pseudo-random generator is more and more complex, such as obtaining discontinuous bit substring information of the pseudo-random number through the side channel attack, then the analysis of the existing attack has not yet utilized the bit information of these intermediate segments and low-order segments, which results in a waste of information intercepted by the physical attack. Therefore, the present invention believes that it is necessary to provide an ECDSA attack method that intercepts and utilizes multiple segments of bit information of pseudo-random numbers.

[0077] The present invention aims to solve the following technical problems in terms of physical attacks on elliptic curve digital signature systems: allowing side channel attacks on pseudo-random generators to intercept bit information at any position, no longer limited to using only the high-order bits of the pseudo-random numbers for detection of leakage, but detecting discontinuous multiple segments of bit information of the intercepted pseudo-random numbers, and obtaining private key information using a lattice reduction algorithm based on the intercepted pseudo-random number bit information, to physically attack the elliptic curve digital signature system or to evaluate the ability of the elliptic curve digital signature system to resist physical attacks.

[0078] In a further inventive concept, the present invention provides a physical attack method for elliptic curve digital signatures based on a lattice basis reduction algorithm, which intercepts discontinuous multiple bit fragment information of a pseudo-random generator through a side channel attack, and uses the lattice basis reduction algorithm to solve the private key information or estimate the computational complexity of solving the private key.

[0079] Example 1

[0080] The technical solution adopted by the present invention to solve the above technical problems is: a physical attack method for elliptic curve digital signature based on lattice reduction algorithm, comprising the following steps:

[0081] Step 1: Input the ECDSA base order q, measure the number of bits m of the base order q, and determine the possible range of pseudo-random number bit detection for physical attacks.

[0082] Step 2: Determine the bit segment position set and S for attacking the pseudo-random generator. Mark the bit positions from 0 from low to high bits of the data. A bit segment position [i, j) refers to the set of bit labels {i, i+1, ..., j-1}.

[0083] Step 3: Obtain the ECDSA message hash value h and its signature information (r′, s), and intercept the bit fragments of the pseudo-random number w used in the signature generation process in the bit fragment position set and S through side channel attacks such as power consumption. A pseudo-random number is denoted as b and b=b0+2b1+2 2 b2+…+2 m-1 b m-1 , where b0, b1, ..., b m-1 ∈{0,1}, specifies the bit segment position [i,j), then the notation bits(b,i,j) represents the bit segment (b j-1 , b j-2 , ..., b i ).

[0084] Step 4: Based on the data obtained in step 3, calculate a sample A, including α = (r′·s -1 )mod q, β=-(h·s -1 ) mod q and a number of pseudo-random bit fragments bits(w, i, j), where the bit fragment position [i, j) traverses all bit fragment positions in S.

[0085] Step 5: Repeat steps 3 and 4 until enough samples A1, A2, ..., A are obtained. n .

[0086] Step 6: Based on the acquired samples A1, A2, ..., A n , use the lattice basis reduction algorithm to solve the private key or evaluate the complexity according to the computational complexity of the required lattice basis reduction algorithm.

[0087] Step 7: Output the private key or the required computation amount. End.

[0088] Example 2

[0089] A physical attack method for elliptic curve digital signature based on lattice reduction algorithm (the above step 6) may also include the following steps:

[0090] Step 1: Input the base point order q and obtain n samples A k =(α k , β k , bits(w,i,j)),k=1,2,...,n.

[0091] Step 2: Let the unknown bit segment position set in the pseudo-random number be S R ={[i k , j k ): k = 1, 2, ..., r}.

[0092] Step 3: Calculate SR the lengths of the bit segments in each and find the maximum among them, that is, calculate c for k = 1, 2,..., r k = j k - i k , and c max = max 1≤k≤r c k .

[0093] Step 4: Construct an r×(r + 1) matrix A, where the element in the k-th row and the 1st column is Here if i k - c max + c k < 0, then refers to the multiplicative inverse in the residue class ring in ; the element in the k-th row and the (k + 1)-th column of matrix A is the base point order q; the other elements of matrix A are 0. Matrix A is in the form of

[0094]

[0095] Step 5: Use the lattice basis reduction algorithm for the column vectors of A to calculate a short vector v of length r short and an element λ in the residue class ring such that λ·A[:, 1] ≡ Vshort mod q, where A[:, 1] represents the first column of matrix A. That is, in the arithmetic sense of the residue class ring , the short vector V short is equal to the first column of matrix A multiplied by λ. Denote v short = (d1, d2,..., d r ) T , that is, the k-th row coordinate of v short is d k .

[0096] Step 6: Construct an instance of the Learning With Errors (LWE) problem, with modulus q, secret dimension 1, and the error distribution can also be approximately regarded as a (sub) Gaussian distribution with an expected value of 0 and a standard deviation of , and there are n LWE samples in total. The k-th sample is the data pair (λ·α k mod q, b k ), where

[0097]

[0098] Here for the integer b and the m-bit segment position [i, j), the integer b satisfies 0 ≤ b < q and b = b0 + 2b1 + 2 2 b2 + … + 2m-1 b m-1 , where b0, b1, …, b m-1 ∈{0,1}, e(b,i,j) represents the integer 2 0 b i +2 1 b i+1 +…+2 j-i-1 b j-1 .

[0099] Step 7: Solve the above problem instance according to the existing method for solving the LWE problem, or evaluate the complexity of the above problem instance according to the existing method for evaluating the computational complexity of the LWE problem.

[0100] Example 3

[0101] A physical attack method for elliptic curve digital signature based on lattice reduction algorithm (the above step 6) may also include the following steps:

[0102] Step 1: Input the base point order q and obtain n samples A l =(α l , β l , bits(w l , i, j)), l=1,2,…,n.

[0103] Step 2: Let the unknown bit segment position set in the pseudo-random number be S R ={[i k , j k ): k = 1, 2, ..., r}.

[0104] Step 3: Calculate S R The length of each bit segment position in , that is, calculate c for k = 1, 2, ..., r k =j k -i k .

[0105] Step 4: Traverse l=1, 2, ..., n, and according to the lth discontinuous multi-segment bit leakage hidden number problem sample A l ,calculate

[0106]

[0107] Step 5: Remember the vector of length r-1

[0108]

[0109] Construct a block matrix M with 2+nr rows and 2+nr columns

[0110]

[0111] The first row and the first column are 1; for l=1, 2, ..., n, the sub-matrix from the 2nd+(l-1)(r-1)th to 1+l(r-1)th row and the 2nd+(l-1)(r-1)th to 1+l(r-1)th column is a unit matrix of size (r-1)×(r-1), and the 1st row and the 1st column are a l , the 1+n(r-1)+lth row and 2+(l-1)(r-1) to 1+l(r-1)th column is a 1×(r-1) size sub-matrix C, the 1+n(r-1)+lth row and 1+n(r-1)+lth column is q, the 1+n(r-1)+lth row and 2+nrth column is b l ; The 2+nrth row and 2+nrth column are 1; the rest of the elements are 0.

[0112] Step 6: Use the lattice basis reduction algorithm to calculate the short vector for the column vector of the above matrix M. Record the first coordinate η1 and the second + nr coordinate η nr+2 If η nr+2 The absolute value of is equal to 1, then calculate x0 = -η1·η nr+2 And output the private key x0; otherwise fail.

[0113] Step 7: Get x0 as the private key output, obtain the information corresponding to the actual cryptographic problem (such as the private key, etc.), or give the computational amount of the matrix M lattice basis reduction algorithm as the computational amount for solving the private key x0.

[0114] In other embodiments of the present invention, a readable storage medium is provided, in which a computer program is stored. The computer program is loaded by a processor and executes the method described in any one of Embodiments 1 to 3.

[0115] In other embodiments of the present invention, a computer device is further provided. The computer device includes a processor and a memory. A computer program is stored in the memory. When the computer program is loaded by the processor and the method described in any one of Embodiments 1 to 3 is executed.

[0116] In other embodiments of the present invention, a physical attack system for elliptic curve digital signature is also provided, including the computer device in the above embodiment.

[0117] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.

[0118] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.

[0119] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0120] The parts not involved in the present invention are the same as the prior art or can be implemented by using the prior art.

[0121] The above technical solution is only one implementation mode of the present invention. For those skilled in the art, it is easy to make various types of improvements or modifications based on the application methods and principles disclosed in the present invention, and it is not limited to the method described in the above specific implementation mode of the present invention. Therefore, the method described above is only preferred and does not have a restrictive meaning.

[0122] In addition to the above examples, those skilled in the art may obtain other embodiments based on the above disclosure or by using the knowledge or technology in the related field to make changes. The features of each embodiment may be interchangeable or replaced. The changes and modifications made by those skilled in the art do not depart from the spirit and scope of the present invention and should be within the scope of protection of the claims attached to the present invention.

Claims

1. A physical attack method for elliptic curve digital signature, characterized in that: The following steps are involved: S1: Input the ECDSA base order q, measure the number of bits m of the base order q, and determine the possible range of pseudo-random number bit detection for physical attacks; S2: Determine the bit segment position set S for attacking the pseudo-random generator; mark the bit positions from 0 from the low bit to the high bit of the data, and a bit segment position [i, j) refers to the set of bit marks {i, i+1, ..., j-1}; S3: Get the ECDSA message hash value h and its signature information (r′, s), and intercept the pseudo-random number w used in the signature generation process in the bit segment position set and the bit segment of S through a side channel attack; a pseudo-random number is denoted as b and b=b0+2b1+2 2 b2+…+2 m-1 b m-1 , where b0, b1, …, b m-1 ∈{0,1}, specifies the bit segment position [i,j), then the notation bits(b,i,j) represents the bit segment (b j-1 ,b j-2 ,…,b i ); S4: Based on the data obtained in step S3, calculate a sample A, including α=(r ′ ·s -1 )mod q, β=-(h·s -1 )modq and a number of pseudo-random bit fragments bits(w,i,j), where the bit fragment position [i,j) traverses all the bit fragment positions in S; S5: Repeat steps S3 and S4 until enough samples A1, A2, ..., A are obtained. n ; S6: Based on the acquired samples A1, A2, ..., A n , use the lattice basis reduction algorithm to solve the private key or evaluate the complexity according to the required lattice basis reduction algorithm calculation amount; S7: Output the private key or the required amount of calculation, and end; In step S6, the method of solving the private key by using the lattice basis reduction algorithm or evaluating the complexity according to the computational complexity of the required lattice basis reduction algorithm includes the following sub-steps: S61, input the base point order q, obtain n samples A k =(α k ,β k ,bits(w,i,j)),k=1,2,…,n; S62, let the unknown bit segment position set in the pseudo-random number be S R ={[i k ,j k ):k=1,2,…,r}; S63, calculate S R The length of each bit segment position in and find the maximum value among them, that is, calculate c for k = 1, 2, ..., r k =j k -i k , and c max =max 1≤k≤r c k ; S64, construct a matrix A with r rows and r+1 columns, whose element in the kth row and the first column is Here if i k -c max +c k <0, then The residual ring middle The multiplicative inverse element of the matrix A; the element in the kth row and k+1th column of the matrix A is the base point order q; the other elements of the matrix A are 0; the matrix A is in the form of: S65, use the lattice basis reduction algorithm to calculate the short vector v of length r for the column vector of A short With the remainder class ring The element λ in satisfies λ·A[:,1]≡v short mod q, where A[:,1] denotes the first column of the matrix A; that is, in the remainder class ring In the operational sense, the short vector v short It is equal to the first column of matrix A multiplied by λ; let v short =(d1,d2,…,d r ) T , that is, v short The kth row coordinate is d k ; S66, construct an instance of the LWE problem with error learning, the modulus is q, the dimension of the secret is 1, and the error distribution is approximately regarded as 0 with an expected value and a standard deviation of There are n LWE samples in total, of which the kth sample is a data pair (λ·α k mod q,b k ),in: For an integer b and an m-bit segment position [i, j), the integer b satisfies 0 ≤ b < q and b = b0 + 2b1 + 2 2 b2 + … + 2 m- 1 b m-1 , where b0, b1, …, b m-1 ∈ {0, 1}, and e(b, i, j) represents the integer 2 0 b i + 2 1 b i+1 + … + 2 j-i-1 b j-1 ; S67, solving the problem instance in step S66 according to the method for solving the LWE problem, or performing complexity evaluation on the problem instance in step S66 according to the method for evaluating the computational complexity of the LWE problem; Alternatively, in step S6, the method of solving the private key using the lattice basis reduction algorithm or evaluating the complexity according to the computational complexity of the required lattice basis reduction algorithm comprises the following sub-steps: SS61, input base point order q, obtain n samples A l =(α l ,β l ,bits(w l ,i,j)), l=1,2,…,n; SS62, the unknown bit segment position set in the pseudo-random number is S R ={[i k ,j k ):k=1,2,…,r}; SS63, calculate S R The length of each bit segment position in , that is, calculate c for k = 1, 2, ..., r k =j k -i k ; SS64, traversing l = 1, 2, ..., n, according to the lth discontinuous multi-segment bit leakage hidden number problem sample A l ,calculate: SS65, remember the vector of length r-1: Construct a block matrix M with 2+nr rows and 2+nr columns: Among them, the 1st row and 1st column are 1; for l=1,2,…,n, the sub-matrix from the 2nd+(l-1)(r-1)th to 1+l(r-1)th row and the 2nd+(l-1)(r-1)th to 1+l(r-1)th column is a unit matrix of size (r-1)×(r-1), and the 1st row and 1st column are a l , the 1+n(r-1)+lth row and 2+(l-1)(r-1) to 1+l(r-1)th column is a 1×(r-1) size sub-matrix C, the 1+n(r-1)+lth row and 1+n(r-1)+lth column is q, the 1+n(r-1)+lth row and 2+nrth column is b l ; The 2+nrth row and 2+nrth column are 1; the rest of the elements are 0; SS66, for the column vector of matrix M, use the lattice basis reduction algorithm to calculate the short vector, record the first coordinate η1 of the short vector, the second + nr coordinate η nr+2 If η nr+2 The absolute value of is equal to 1, then calculate x0 = -η1·η nr+2 And output the private key x0; otherwise fail; SS67, obtain x0 as the private key output, obtain the information corresponding to the real cryptographic problem, or give the computational amount of the matrix M lattice basis reduction algorithm as the computational amount for solving the private key x0.

2. The physical attack method of elliptic curve digital signature according to claim 1, characterized in that: In step S3, the side channel attack means includes power consumption side channel attack means.

3. The physical attack method of elliptic curve digital signature according to claim 1, characterized in that: In step SS67, the information in the actual cryptographic question includes a private key.

4. A readable storage medium, characterized in that: A computer program is stored in a readable storage medium, and the computer program is loaded by a processor to execute the method according to any one of claims 1 to 3.

5. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein a computer program is stored in the memory. When the computer program is loaded by the processor, the method according to any one of claims 1 to 3 is executed.

6. A physical attack system for elliptic curve digital signature, characterized in that: Comprising the computer device as claimed in claim 5.