Detailed Description
The invention is further illustrated in detail in the following examples:
before a specific encryption scheme is given, a description is first given of a pseudo-addition operation: affine plane FP 2Two points with different x coordinates can uniquely determine the Weierstrass equation Y on the plane2=X3+a4X+a6Wherein X, Y are variables, a4、a6Is domain FpP is a large prime number. If the cubic curve it determines is an elliptic curve, the coordinates of their addition points are determined entirely by themselves.
The invention utilizes the property to define a new operation: and (5) false addition.
Let P1=(x1,y1),P2=(x2,y2) Is an affine plane FP 2Two upper points, and x1≠x2The pseudo-addition operation is defined as follows:
1、P1+P2=P3=(x3,y3) Wherein x3,y3Satisfies the following formula:
2、-P1=(x1,-y1)
3、P1-P2=P1+(-P2)
let P, Q be affine planes FP 2And x is not the same, then P and Q uniquely define an affine curve E (P, Q): y is2=X3+ aX + b, such that P, Q are points on the affine curve, where a, b are the fields FpIs uniquely defined by points P and Q of different x-coordinates, FPIs a finite field of P elements, P being a prime number and P being a point whose two coordinates are FPOf (1). Here, a double-point operation is defined for all non-singular point additions on the curve E (P, Q), which is exactly the same as the double-point operation formula for an elliptic curve:
let curve E (P, Q): y is2=X3+aX+b,P1=(x1,y1) Is a non-singular point on the curve, then 2P ═ x3,y3) Wherein:
x3=λ2-2x1
y3=λ(x1-x3)-y1
<math> <mrow> <mi>λ</mi> <mo>=</mo> <mfrac> <mrow> <msubsup> <mrow> <mn>3</mn> <mi>x</mi> </mrow> <mn>1</mn> <mn>2</mn> </msubsup> <mo>+</mo> <mi>a</mi> </mrow> <mrow> <mn>2</mn> <msub> <mi>y</mi> <mn>1</mn> </msub> </mrow> </mfrac> </mrow> </math>
if 4a3+27b2Not equal to 0modp, the curve is an elliptic curve, the pseudo-addition operation defined above, "+" is the addition of points of the elliptic curve, all rational points on the elliptic curve form a group under the operation of "+" and point multiplication, the point 0 at infinity is the zero point, and "-" is the inverse operation of "+"; if 4a3+27b2When the curve is singular and has only one singular point, all the non-singular points on the curve also form a group under the operations of "+" and multiple point, the point 0 at infinity is the zero point, and "-" is the inverse operation of "+".
The operation property shows that: if and only if P, Q are all non-singular points on E (P, Q) and R (═ P + Q), P, Q are different in x coordinates two by two, Q (R-P) can be found from R (═ P + Q) and P without knowing the specific equation of PQ determined by P, Q, noting that R, P, Q are different in x coordinates two by two and P is all non-singular points, so that the probability of P, Q being all non-singular points is at least 1-6/(P-1), where P is a large prime number, that is, two points P, Q, R + Q whose x coordinates are different, from each other, another point can be calculated from any two points in 1-6/(P-1) probability. The characteristic is the biggest difference from the traditional elliptic curve cryptosystem.
Setting E:Y2=X3+ aX + b is the finite field FpElliptic curve of (A), E (F)p) All F's referring to EpRational points and 0. For E (F)p) If the smallest integer n exists at any point P, so that nP is 0, and n is called the order of point P, then point P may generate an n-order cyclic group. The elliptic curve public key cryptosystem is mostly constructed on a cyclic group generated by points with large prime numbers in order, and the points are called base points. Unless otherwise specified, the following description shall be made without exception to the case where a point on a curve is represented by a capital letter, a small-case letter represents an element on a finite field, x (P), y (P) represent an x coordinate and a y coordinate of the point P, the addition between the different points is the above-mentioned pseudo addition, and the point multiplication is a point multiplication defined on an elliptic curve.
Setting the system parameters as (P, a, b, P, n), wherein P is a large prime number and is determined by the required safety intensity, namely a safety parameter lambda; a, b are finite fields FpDetermines an elliptic curve E: y is2=X3+ aX + b. F with P being EpThe rational point is that the order is n, which is a large prime number and is comparable to the size of p. Each user A has its own user parameters (SK)a,PKa)=(da,Qa) Wherein Q isa=daP,daIs a positive integer less than n, daAnd QaCalled user a's private and public keys, respectively, the public key is public and can be known to anyone, while the private key is private and is only known to user a himself. H (), F (), G (), are all {0, 1}λ→{0,1}λλ' is any integer satisfying 1/2λ′Is a negligible function of λ, where λ' is not made λ/4. In the implementation of the scheme, in order to reduce the possibility of data out-of-range, the maximum 8 bits of each Hash function value are forced to be 0.
If user B wants to send a message m e {0, 1}λ-λ′For user A, user B performs the following encryption operations:
firstly, randomly selecting an integer k, wherein k is more than 1 and less than n; then calculating the Hash function value F (k) of k, F (k) times point F (k) of elliptic curve point Pk) P is denoted as C1Point Q of an elliptic curveaF (k) times the point F (k) Qa(ii) a Then, λ '0 s are added after m to obtain m', that is, m ═ m | |0λ′(ii) a Calculating the Hash function value G (k) of k if F (k) QaX (F (k)) Qa) Returning to reselect the integer k if m' G (k); finally, the ciphertext C ═ C is calculated1,C2)=(C1,F(k)Qa+ (m ' G (k), H (m' G (k)) k), if affine plane point C2Belongs to the set { m' G (k) }, x (F (k) Qa) And returning to reselect the integer k; otherwise, the ciphertext C is output.
After receiving the ciphertext C sent by the user B method, the user A carries out the following decryption operation to recover the plaintext m:
1. first, an elliptic curve point C is calculated1D ofaMultiple point daC1Denoted as Q ', if x (Q') ═ x (C)2) Refusing to receive;
2. recalculating point C on the affine plane2Q' is (M, r), M and r are both finite fields FpWherein, if M ═ x (C)2) Or x (Q'), deny reception;
3. further calculating H (M) r as f;
4. if F (f) times the point F (f) P of the elliptic curve point P is the elliptic curve point C1And the last lambda 'bit of M g (f) is 0, then the first lambda-lambda' bit of plaintext M g (f) is received; otherwise, the receiving is refused.
The following is a mathematical proof of high security obtained by encrypting data using the present invention:
suppose the order of the elliptic curve group is approximately p and there is half m such that m3+ am + b is the quadratic residue modulo p, the following conclusion states that the probability of returning a1 during encryption is small.
Lesion 1. for randomly chosen k and m, x (kQ)a) The probability of m is at most 2/p.
Theorem 2. let R ═ kP + (m, hash (m) k), where x (kP) ≠ m, then the probability of x (R) ∈ { m, x (kP) } is negligible.
Proving that if kP is (c, d), then d2=c3+ ac + b, c, d is completely determined by k. Hereinafter, Hash () is abbreviated as h (). If x (r) ═ m, from the pseudo-additive equation:
<math> <mrow> <mi>m</mi> <mo>=</mo> <msup> <mrow> <mo>(</mo> <mfrac> <mrow> <mi>h</mi> <mrow> <mo>(</mo> <mi>m</mi> <mo>)</mo> </mrow> <mo>⊕</mo> <mi>k</mi> <mo>-</mo> <mi>d</mi> </mrow> <mrow> <mi>m</mi> <mo>-</mo> <mi>c</mi> </mrow> </mfrac> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mo>-</mo> <mi>m</mi> <mo>-</mo> <mi>c</mi> </mrow> </math>
using the relation d2=c3+ ac + b may replace d in the above formula to give the following formula:
(h(m)k)4+(h(m)k)2(6m2c-4m3+2ac+2b)-4(h(m)k)(c3+ac+b)
+4m6-12m5c-9m2c2-4m3(ac+b)+6m2(ac+b)+a2c2+b2+2abc=0
if the probability that the above formula is established for a given k is not negligible, the Hash function h (right) satisfies the above formula with the non-negligible probability, and if the k is fixed, the Hash function e satisfying the above formula takes m as an unknown number, and an original image of e can be obtained by solving the six-order equation, that is, if the probability that the above formula is established for the given k is not negligible, the Hash function h (right) does not satisfy the requirement of unidirectionality, so that the probability that the above formula is established for any k is negligible, and the probability that x (r) ═ m is negligible. If x (r) ═ c, the same can be said:
(h(m)k)2+c3+ac+b-m3-2m2c+3mc2)2=4(h(m)k)2(c3+ac+b)
since the Hash function h () is one-way, the probability that the above equation holds is negligible. The probability of x (R) e { m, x (kP) } is negligible from the above.
The above introduction explains that: the probability of 1 returned by the encryption process is negligible, and both encryption and decryption only need two times of multiplication and one pseudo addition of elliptic curve points, so that the method can be considered as follows: the encryption method adopted by the invention is effective, and the rationality is obvious. Referring to the IEEE P1363 standard, if a point compression technique is used, the system produces ciphertext with three times the plaintext expansion, i.e., ciphertext size is three times the plaintext size.
Based on the fact that the pseudo-addition of two different points does not depend on the curve, the method changes the plaintext embedding mode in the ElGamal encryption system, namely embedding m into the points (m ' G (k)), H (m' G (k)) k) instead of embedding the points into the points on the elliptic curve determined by the system parameters. This makes plaintext embedding very natural and simple. In addition, the system also has the following characteristics: it can verify the validity of the ciphertext through the 4 th step in the decryption process, which makes it very difficult to forge the legal ciphertext (unless by selecting the plaintext); it uses different elliptic curve groups to operate. I.e. an elliptic curve determined by the system parameters, and F (k) QaAnd (m ' g (k), H (m' g (k) k) a curve is determined, which varies with m and k, and it is impossible to know the elliptic curve group in which the current operation is located unless the private key of user a is known.
The encryption time complexity of the encryption system is 2 scalar multiplications, which is equivalent to the efficiency of the ElGamal system; the time complexity of decryption with verification is 2 scalar multiplications, which are one more scalar multiplication than the ElGamal system. Without verification, the efficiency is comparable. If a point compression technique is used, it has a 3x plaintext expansion. For convenience of description, only the regime where the base domain is characterized by a large prime number is given here, and when the characteristic is 2, the description of the pseudo-additive regime is extremely similar.
The encryption scheme is a variation of the ElGamal scheme, and its security is based on the elliptic curve to compute the diffie-hellman problem (ECCDHP). The method provides a very concise plaintext embedding mode, and can verify the legality of a ciphertext, so that higher-level security is provided. Under the random oracle model, the cryptosystem is proven to be semantically secure under adaptive chosen ciphertext (IND-CCA 2).
Under the random oracle model (random oracle model), it is demonstrated that if the elliptic curve computational diffie-hellman problem (ECCDHP) is difficult to solve, the cryptosystem is semantically secure under an adaptive choice ciphertext attack (IND-CCA2), which may be more secure than PSEC-1 since the proof is based on ECCDHP. The method is not a mixed encryption system, the operation of the method only comprises multiplication, pseudo-addition operation and hash functions of elliptic curve points, and a symmetrical encryption system does not need to be applied. The encryption system utilizes a brand-new pseudo-addition operation to embed the plaintext into the x coordinate of the midpoint of the affine plane, provides a very simple plaintext embedding mode and can verify the legality of the ciphertext.
In the implementation of this cryptosystem, the first thing to face is the problem of the choice of system parameters (P, a, b, P, n). From a security point of view, to combat some known attack algorithms, special restrictions may be made on the system parameters:
1.n>2160and is
2. The elliptic curves are non-supersingular, i.e. p divides p +1- # E (F) unequallyp);
3. The order n of the base point P is not divided by Pk-1 (1. ltoreq. k. ltoreq. C), in practice usually C20;
4. elliptic curves are non-anomalous (non-anomallous), i.e. # E (F)p)≠p。
This embodiment takes the base domain FpFor the finite field proposed by the standard ieee p1363, the Hash functions G (), F (), and H (), are SHA1 and force the highest 8 bits of the Hash function value to be 0, and the number of bits of the large prime p to be λ. The parameters a and b of the elliptic curve are randomly selected, the order of the elliptic curve is calculated by utilizing an SEA algorithm, and then the elliptic curve meeting the requirements is used as a system parameter. In the specific implementation of the present invention, an elliptic curve point addition algorithm, a pseudo addition algorithm, an elliptic curve point doubling algorithm, and scalar multiplication of elliptic curve points are required, and each algorithm is given below one by one.
The pseudo-addition algorithm is the same as the point addition algorithm of two points with different x coordinates of the elliptic curve, so that the pseudo-addition algorithm is not separately listed.
In a specific embodiment of the present invention, the key generation process is as follows:
1. randomly selecting an integer dA,1<dA< n, calculating Q by using NAF coding and scalar multiplication algorithmA=dAP;
2. Will dAAs a private key, QAAs a public key.
The specific encryption steps are as follows: grouping message data m according to 3 lambda/41m2...mdEncrypting one packet at a time, for example: the message m of a packet is transmitted after being encrypted.
2.1 finding the public Key QA;
2.2 selecting a random number k, wherein k is more than 1 and less than n;
2.3 calculate f — SHA1 (k);
2.4 calculating fP by using NAF coding and scalar multiplication algorithm and recording as C1;
2.5 converting m into the Domain element m' ═ m | | |0λ/4;
2.6 use NAF coding and scalar multiplication algorithm to calculate fQAAs Q ', if x (Q'), etc2.2 at m' f;
2.7 calculate Q ' + (m ' f, SHA1(m ' f) k) as C using the dot-and-dot algorithm2If x (C)2) X (Q ') and m' f are different two by two, encrypted data (C) is transmitted1,C2) Otherwise, return to 2.2.
And (3) decryption process: receiving encrypted data (C)1,C2) Then, the following decryption process is implemented:
3.1 calculate the point Q'd using NAF coding and scalar multiplication algorithmsAC1If x (Q') is equal to x (C)2) Refusing to receive;
3.2 computing (M, r) ═ C by using the dot-addition algorithm2-Q', if M is equal to x (C)2) Or x (Q') refuses to receive;
3.3 calculate k — SHA1(M) r;
3.4 calculate f — SHA1 (k);
3.5 calculation of M' ═ M f
3.6 calculation with NAF coding and scalar multiplication algorithm, if fP equals C1And the last lambda/4 bit of m 'is 0, then the first 3/4 bits of m' are received; otherwise, the receiving is refused.
The above point addition algorithm is as follows:
when encrypting a data, for the input elliptic curve y2=x3+ ax + b, and a point P on the curve0=(x0,y0) And point P1=(x1,y1);
A1 if P0When it is 0, the point P is output2Is namely P1
A2 if P1When it is 0, the point P is output2Is namely P0
A3 if x0≠x1
A3.1 calculating λ←(y0-y1)/(x0-x1) mod p; means that (y0-y1)/(x0-x1) mod p is assigned to λ;
a3.2 executing step A7
A4 if y0≠y1Output P2←O
A5 if y00, output P2←O
A6, calculate λ ← (3 x)2+a)/(2y1)mod p
A7, calculating x2←λ2-x0-x1 mod p
A8, calculating y2←(x1-x2)λ-y1 mod p
A9, output P2←(x2,y2)
Note: if the point P is to be decreased, the point P is (x, y) if the point P is to be increased.
The above-mentioned ellipse curve upper multiple point algorithm is as follows:
inputting: point P (X) on elliptic curve E, E1,Y1,Z1),P≠O
And (3) outputting: (X)3,,Y3,Z3)=2P
B1, calculating lambda1←3X1 2+aZ1 4;
B2, calculating Z3←2Y1Z1
B3, calculating lambda2,←4X1Y1 2;
B4, calculating X3←λ1 2-2λ2;
B5, calculating lambda3←8Y1 4;
B6, calculating Y3←λ1(λ2-X3)-λ3;
B7, output (X)3,Y3,Z3)
The NAF coding algorithm described above is as follows:
inputting: integer number of <math> <mrow> <mi>k</mi> <mo>=</mo> <msubsup> <mi>Σ</mi> <mrow> <mi>j</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>l</mi> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <msub> <mi>k</mi> <mi>j</mi> </msub> <msup> <mn>2</mn> <mi>j</mi> </msup> <mo>,</mo> <msub> <mi>k</mi> <mi>j</mi> </msub> <mo>∈</mo> <mo>{</mo> <mn>0,1</mn> <mo>}</mo> <mo>.</mo> </mrow> </math>
And (3) outputting: NAF <math> <mrow> <mi>k</mi> <mo>=</mo> <msubsup> <mi>Σ</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mi>l</mi> </msubsup> <msub> <mi>s</mi> <mi>i</mi> </msub> <msup> <mn>2</mn> <mi>i</mi> </msup> <mo>,</mo> <msub> <mi>s</mi> <mi>i</mi> </msub> <mo>∈</mo> <mo>{</mo> <mo>-</mo> <mn>1,0,1</mn> <mo>}</mo> </mrow> </math>
C1、c0←0,kl←0,kl+1←0;
C2、j←0
C3. If j ≠ l +1
C3.2 calculation of sj←kj+cj-2cj+1
C3.3 calculation of j ═ j +1
C3.4 transfer to step 3
C4, output(s)lsl-1,...,s1,s0)2
The NAF scalar multiplication algorithm described above is as follows:
inputting: NAF(s) of a point P, integer k on the elliptic curvelsl-1,...,s1,s0)2,sl=1;
And (3) outputting: q ═ kP;
D1、Q←O;
D2、j←l;
d3, if j ≠ -1
D3.1 computing Q ← 2Q
D3.2 if sjCalculate Q ← Q + P ═ 1
D3.3 if sjComputing Q ← Q + P ═ 1
D3.4 calculation of j ═ j-1
D3.5 transfer to step 3
D4, output Q.
The above algorithms give a specific embodiment of the elliptic curve cryptosystem described in the present invention, and a set of experimental data obtained by running in this manner is given below, wherein each data is expressed in hexadecimal notation.
System parameters:
λ:192
p:fffffffffffffffffffffffffffffffeffffffffffffffff
a:fffffffffffffffffffffffffffffffefffffffffffffffc
b:02d5134233c1f7f4f50706f02882d85e767294c7230612c2
P.x:df00000129200001db000001ffbe800169ea40011de3ec01
P.y:46b19ab9a84501afc6c94ce6fb9ae8f21a93fedb9ec6881f
n:fffffffffffffffffffffffe75432f994b9b16ef54c39393
dA:83cedad356f4f6cf573ff873b789add938df2ec7d5d2753b
QA.x:1f18bcacb74087835ae629a87968f0d57adb39110ec1fd70
QAy: 53b96505a207de2442510c7f01c80c4cffcdaf40099fa0a1 encrypted:
m:00000000000000000313233343536373839
m’:00000000000000000313233343536373839000000000000
k:9296decb12fc6d896ffd58ade5b03a3f1e235d0556e3f57d
f:09cf3ae17aad817332dd1e4fe8d41c50d8b7ee7152ac5b6
C1.x:362b32f9f9b3c21c1df13631ea7155f23d04d4853ce048db
C1.y:f7cbaa643bccce14f252660b0104542f86a8a5f89f7c1c5
fQA.x:fa529d8354bbb6bd3289b906f1b3337914628f6cf75a354c
fQA.y:91f142b803c9ba20ece5012f02bc9511cb4412b881bbbd7a
m’f:09cf3ae17aad817331ce3d7cab877f235b27ee7152ac5b6
SHA1(m’f)k:
92d183184e2365cc9b2673ddc3f49bf2a3c57cb6b5c3ea36
C2.x:6edaa4c686f938464514b379720f10dd4ba8a353e1a9e6de
C2y: after decryption of 2f47f3be8875cc0417fbfacf87993ea4893595ddf610b 43:
Q′.x:fa529d8354bbb6bd3289b906f1b3337914628f6cf75a354c
Q′.y:91f142b803c9ba20ece5012f02bc9511cb4412b881bbbd7a
M:09cf3ae17aad817331ce3d7cab877f235b27ee7152ac5b6
r:92d183184e2365cc9b2673ddc3f49bf2a3c57cb6b5c3ea36
SHA1(M):0475dd35cdf0845f4db2b702644a1cdbde621b3e3201f4b
k:9296decb12fc6d896ffd58ade5b03a3f1e235d0556e3f57d
f=SHA1(k):09cf3ae17aad817332dd1e4fe8d41c50d8b7ee7152ac5b6
m’f:00000000000000000313233343536373839000000000000
fP.x:362b32f9f9b3c21c1df13631ea7155f23d04d4853ce048db
fP.y:f7cbaa643bccce14f252660b0104542f86a8a5f89f7c1c5
m:00000000000000000313233343536373839;
in a computer using the INTEL corporation pentium iv 1.7G microprocessor, 256M internal memory, and in the context of WINDOWS98 operating system, the system over a finite field with feature p and feature 2 is implemented in the ANSIC programming language, where p is 2
192-2
64+1,F
2mM 193, generating a polynomial f (x) x
193+x
15+ 1; the efficiency achieved is shown in the following table:
content providing method and apparatus |
*Fp |
Fp |
*F2m |
F2m |
Key generation |
1.21 |
5.43 |
0.67 |
2.48 |
Encryption |
6.70 |
10.95 |
3.29 |
5.43 |
ECES encryption |
6.76 |
10.53 |
3.20 |
5.26 |
Decryption |
6.50 |
11.57 |
3.12 |
5.42 |
Decryption (without verification) |
5.26 |
5.95 |
2.59 |
2.45 |
ECES decryption |
5.51 |
5.48 |
2.62 |
2.53 |
Multiplying by one |
1.20 |
5.32 |
0.65 |
2.39 |
Each index in the table is the speed of executing 1000 times, and the unit is second; the index under the column x is the allowable pre-processing speed.
If F
pThe above operations are written in assembly language, the multiplication speed of 192-bit points is 1.81 seconds (1000 times), and the table below lists p ═ 2
256The following speed was performed 1000 times in seconds:
content providing method and apparatus |
ANSI C | Assembling |
Key generation |
2.25 |
0.93 |
Encryption |
18.93 |
6.35 |
Decryption |
18.64 |
6.35 |
Decryption (without verification) |
16.2 |
5.43 |
The encryption/decryption efficiency realized by the single chip microcomputer with the model number of MCS51 is shown in the following table, wherein the MCS51 is configured in a main memory: 256B internal RAM, 64KB external RAM, 64KB program area rom clock frequency: 1M clock period/sec (crystal frequency: 12 MHz). Take F
p,p=2
192-2
64-1 and F
2mM is 193 and its generator polynomial is x
193+x
15+1。
Function(s) |
Fp(second/time) |
F2m(second/time) |
Key generation |
4.89 |
4.34 |
Encryption |
25.32 |
20.84 |
ECES encryption |
25.19 |
20.74 |
Decryption (without verification) |
20.43 |
16.21 |
ECES decryption |
20.42 |
16.21 |
Decryption (with storage) |
25.33 |
20.10 |
Multiplication (with prestore) |
4.77 |
4.32 |
Multiplication (without prestore) |
19.96 |
16.4 |
Note: fpThe external RAM occupies 1.5K, the ROM occupies 9K programs, and 6K pre-stored values; f2mOccupies: 2K (with pre-storage)/1.2K (without pre-storage), ROM occupancy: 7K program, 6K pre-stored value.
In the following, a detailed proof that the encryption system is semantically secure under the adaptive selection of the ciphertext is given.
Definition of one, safety
It is assumed that U is a probability algorithm,then A (x)1,x2,..; r) represents the input as x1,x2,., the output of algorithm A when the random number is r; y ← A (x)1,x2,..) denotes random selection of r, let y equal to A (x)1,x2,..; r); if r is present, then A (x)1,x2,..; r) is y, then y is A (x)1,x2,..); and if S is a finite set, x ← S shows that x is randomly selected from the set S according to uniform distribution, and if a is neither a set nor an algorithm, x ← a shows that the value of a is given to x.
Definition 1. the public key encryption system is a triplet consisting of algorithms: PE ═ g (KG, Enc, Dec), where
KG: the key generation algorithm is a probability algorithm, and the input is a security parameter 1λ(lambda belongs to N), and the output is a pair of public and private keys (pk, sk);
enc: the encryption algorithm is a probability algorithm, and the input is a public key pk and a plaintext x ∈ {0, 1}*And the output is a ciphertext y;
and Dec: the decryption algorithm is a deterministic algorithm, the input is a private key sk and a ciphertext y, and the output is a plaintext x e from {0, 1}*Or special characters *, which indicate that the input ciphertext is not a valid ciphertext, i.e., there is no x e {0, 1}*So that its ciphertext is y.
For any public-private key pair (pk, sk) and any plaintext x ∈ {0, 1} resulting from the key generation algorithm*If y is Encpk(x) The output of (1) must have Decsk(y) x. Since the public key encryption system needs to ensure the security of the information that is actually transmitted, the above three algorithms (KG, Enc, Dec) are all polynomial time algorithms with security parameters as scales.
The definition of security of the public key cryptosystem may first consider an attacker's possible attack targets (gold) and possible attack models (attack model), respectively, and then give a definition of various levels of security by combining the attack models and the attack targets.
Depending on different attack targets, security analysis of the system mainly considers one-way (OW), Semantic Security (SS), indistinguishable property of ciphertext (IND) and non-extensibility (NM). Simply, unidirectional means that the corresponding plaintext x ═ Dec is obtained from the target ciphertext ysk(y) is very difficult; semantically safe means that any information of the corresponding plaintext x is infeasible to calculate from the target ciphertext y; the indistinguishability of the ciphertext means that it is known that two plaintexts and a ciphertext corresponding to a plaintext cannot be determined which plaintext corresponds to the ciphertext. The indistinguishability and semantic security of the ciphertext can be considered as the improvement of unidirectional concepts, the concepts are all covered in the traditional security requirements, the unidirectional concept is the minimum requirement of the security of an encryption system, and if the system is that the ciphertext is indistinguishable or the semantic security is safe, the system is unidirectional, so that the property of any unidirectional concept is not discussed in the text. The non-expansibility is to obtain another different ciphertext y ' from the target ciphertext y, so that a ' meaningful relation ' (for example, x ' is x +1) exists between the corresponding ciphertexts x and x ', and the idea of preventing the ciphertext from being tampered in reality is improved.
The attack model expresses the ability of an attacker, and can be divided into a Choice Plaintext Attack (CPA), a non-adaptive choice ciphertext attack (CCA 1) and an adaptive choice ciphertext attack (CCA 2). The CPA gives an attacker the right of freely selecting a plaintext and obtaining a corresponding ciphertext, and for a public key encryption system, the attacker knows a public key, namely, the attacker has the ability of selecting a plaintext to attack; the formal definition of CCA1 is given by two-bit learners Naor and Yung, where an attacker has access to the decryption oracle (the external device is the decryption algorithm) in addition to knowing the public key, but the attacker only has the right to access the decryption oracle before getting the target ciphertext (non-adaptive means that access to the decryption oracle is not dependent on the target ciphertext), by its very nature, non-adaptive choice ciphertext attacks are also known as midnight attacks (midnight attacks) or lunchtime attacks (lunchmidnight-break attacks); the CCA2 is proposed by two-bit learners Rackoff and Simon, where an attacker has both knowledge of the public key and access to the decryption oracle, and is unrestricted in its access to the decryption oracle, even if the attacker still has access to the decryption oracle after obtaining the target ciphertext, but he cannot take the target ciphertext itself as an input to the decryption oracle (adaptive means that access to the decryption oracle is dependent on the target ciphertext).
Combining the attack targets and attack models described above, various security definitions can be obtained, and only indistinguishable formal definitions are given below, which include the highest level of security — the semantically secure IND-CCA2 under adaptive selection cipher text.
According to the fact that an attacker U has different inputs at different stages, the attacker U can be regarded as two probability algorithms (U)1,U2) Wherein U is1And U2The effect of (c) depends on the target of the attacker. In the definition of the indistinguishability of the ciphertext, the algorithm U1Has an input of pk and an output of (x)0,x2S), the first two terms are two plain texts with the same length, and s is the information that an attacker wants to keep; from x0,x1Randomly selects one of them to be marked as xbThe challenge ciphertext y is xbAlgorithm U2Is (x)0,x1S) and the challenge cryptogram y it attempts to output the correct b.
Definition 2(IND-CPA, IND-CCA1, IND-CCA2) assuming that PE ═ (KG, Enc, Dec) is a public key cryptosystem, a ═ is (a ═ a1,A2) Is an attacker, H (.) is a random oracle, let us say for any of atk e { cpa, cca1, cca2} and any of λ e N
<math> <mrow> <msubsup> <mi>Adv</mi> <mrow> <mi>PE</mi> <mo>,</mo> <mi>A</mi> </mrow> <mrow> <mi>ind</mi> <mo>-</mo> <mi>atk</mi> </mrow> </msubsup> <mrow> <mo>(</mo> <mi>λ</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>Pr</mi> <mo>[</mo> <mi>Ex</mi> <msubsup> <mi>p</mi> <mrow> <mi>PE</mi> <mo>,</mo> <mi>A</mi> </mrow> <mrow> <mi>ind</mi> <mo>-</mo> <mi>atk</mi> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mrow> <mo>(</mo> <mi>λ</mi> <mo>)</mo> </mrow> <mo>=</mo> <mn>1</mn> <mo>]</mo> <mo>-</mo> <mi>Pr</mi> <mo>[</mo> <mi>E</mi> <msubsup> <mi>xp</mi> <mrow> <mi>PE</mi> <mo>,</mo> <mi>A</mi> </mrow> <mrow> <mi>ind</mi> <mo>-</mo> <mi>atk</mi> <mo>-</mo> <mn>0</mn> </mrow> </msubsup> <mrow> <mo>(</mo> <mi>λ</mi> <mo>)</mo> </mrow> <mo>=</mo> <mn>1</mn> <mo>]</mo> </mrow> </math>
Wherein b belongs to {0, 1}, and the experiment Exp is definedPE,A ind-atk-d(lambda) is
<math> <mrow> <mrow> <mo>(</mo> <mi>pk</mi> <mo>,</mo> <mi>sk</mi> <mo>)</mo> </mrow> <mover> <mo>←</mo> <mi>R</mi> </mover> <mi>KG</mi> <mrow> <mo>(</mo> <mi>λ</mi> <mo>)</mo> </mrow> <mo>;</mo> </mrow> </math>
<math> <mrow> <mrow> <mo>(</mo> <msub> <mi>x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi>x</mi> <mn>1</mn> </msub> <mo>,</mo> <mi>s</mi> <mo>)</mo> </mrow> <mo>←</mo> <msubsup> <mi>A</mi> <mn>1</mn> <mrow> <msub> <mi>O</mi> <mn>1</mn> </msub> <mrow> <mo>(</mo> <mo>·</mo> <mo>)</mo> </mrow> <mo>,</mo> <mi>H</mi> <mrow> <mo>(</mo> <mo>·</mo> <mo>)</mo> </mrow> </mrow> </msubsup> <mrow> <mo>(</mo> <mi>pk</mi> <mo>)</mo> </mrow> <mo>;</mo> </mrow> </math>
y←Encpk(xb);
<math> <mrow> <mi>d</mi> <mo>←</mo> <msubsup> <mi>A</mi> <mn>2</mn> <mrow> <msub> <mi>O</mi> <mn>2</mn> </msub> <mrow> <mo>(</mo> <mo>·</mo> <mo>)</mo> </mrow> <mo>,</mo> <mi>H</mi> <mrow> <mo>(</mo> <mo>·</mo> <mo>)</mo> </mrow> </mrow> </msubsup> <mrow> <mo>(</mo> <msub> <mi>x</mi> <mn>0</mn> </msub> <mo>,</mo> <msub> <mi>x</mi> <mn>1</mn> </msub> <mo>,</mo> <mi>s</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>;</mo> </mrow> </math>
Return d。
If atk ═ cpa, O1(.)=*,O2(.) ═ *; if atk is cca1, O1(.)=Decsk(.),O2(.) ═ *; if atk is cca2, O1(.)=Desk(.),O2(.)=Decsk(.); also requires | x0|=|x1I, Algorithm A2The plaintext of y cannot be obtained with the decryption oracle. If there is an Exp for an attacker A of any polynomial timePE,A ind-atk(. cndot.) is a negligible function, the public key cryptosystem PE is said to be secure in the IND-ATK sense.
Second, safety analysis
From the system perspective, the operation of the invention is based on different elliptic curve groups, and the plus has almost no combination law (for example, affine plane R)2The above three points P ═ 1, 2, Q ═ 2, 3, R ═ 3, 1, and from the pseudo-additive formula, (P + Q) + R ═ 2, 1) + (3, 1) ═ 1, -1, and P + (Q + R) ═ 1, 2) + (-1, -9) ═ 121/4, -1303/8. ) Therefore, it is very difficult to obtain R (m) ciphertext from m ciphertext, where R is a non-trivial relationship, i.e. intuitively, the system has non-extended property, which is the most obvious difference from ElGamal system and is a reason for the improvement of security. The use of a Hash function further enhances the security of the regime. This section will prove that the regime is IND-CCA2 safe. For convenience, the encryption system is abbreviated as pi hereinafter.
Theorem 1. under ECCDHP refractory conditions, II is IND-CCA2 safe.
Prove that an attacker A ═ A (A) in the sense that Pi exists IND-CCA21,A2) A accesses the corresponding records of random oracles G (), H (), and F (), referred to as the G-table, H-table, and F-table, respectively, denoted as τG={(gi,Gi)},τH={(hi,Hi)},τF={(fi,Fi) Their lengths (number of visits) are q respectivelyG,qH,qFAnd (4) showing. The solution algorithm B for ECCDHP can be constructed as follows. Let the inputs of B be P, Q ═ aP, and Y ═ bP, for the purpose of calculating R ═ abP.
B takes P and Q as A1Input call of A1Due to A1A random oracle and a decryption oracle may be accessed, so B needs to emulate the random oracle and the decryption oracle. Let A1Querying a random oracle G (·) for G, and if G is in a query record, taking a corresponding output value in the record as a response to A; otherwise, randomly selecting the number in the value field as the pair A1K and the random number are added to the record as a pair of input and output. B mimics the actions of random oracle H (and F) in the same way as G (are modeled). Let A1Accessing y ═ C to the decryption oracle1,C2) If present in the G-, F-and H-tables, respectively (G)i,Gi),(f1,F1),(hj,Hj) Satisfy f1=gi,F1P=C1,C2=F1Q+(hj,Hjf1) Calculating M ═ hjGiIf the low λ 'bit of M is 0, the high λ - λ' bit of M is output as a plaintext output, and otherwise, the dummy string * is output. In A1At the time of stopping, A is not provided1Has an output of (m)0,m1,s)。
B random selection of C2 *∈{0,1}2λLet y*=(C1 *=Y,C2 *) B will be (m)0,m1,s,y*) As A2Input of, call A2It mimics the process of decrypting oracle and random oracle as above.
After a is discontinued, B picks randomly (H, H) from the H-table, if t is present so that R ═ C2 *- (h, t) belongs to E, and then R is output; otherwise, selecting (H, H) from the H-table again; if the above relation does not exist in the H-table, a point of E is randomly output as R.
Hereinafter, F ═ logPY,(s*,t*)=C2 *-F × Q, H × s, k × t × H (H). By using the equation of E and the pseudo-additive formula, C can be known2 *- (h, t) ∈ E is a six-degree equation for t with at most six solutions, let AskH denote the event: if a accesses H to H (, B outputs the probability of correct ECDH solution <math> <mrow> <msup> <mi>ϵ</mi> <mo>′</mo> </msup> <mo>≥</mo> <mfrac> <mrow> <mi>Pr</mi> <mo>[</mo> <mi>AskH</mi> <mo>]</mo> </mrow> <msub> <mrow> <mn>6</mn> <mi>q</mi> </mrow> <mi>H</mi> </msub> </mfrac> <mo>.</mo> </mrow> </math>
To ensure a correct invocation of A, firstly B must correctly mimic the decryption oracle, and secondly B must ensure that the target ciphertext y*And (4) legality. Bad means that the response to decrypt oracle is incorrect or y*Not a legitimate ciphertext. Let A succeed with a probability of (1+ ε)/2, if B correctly calls A, because y*And m0,m1Completely irrelevant, so the probability that A outputs the correct result is 1/2
(1+ε)/2≤1/2(1-Pr[Bad])+Pr[Bad],
Pr Bad not less than epsilon can be obtained. It is obvious that
Pr[AskH]≥Pr[AskH∧Bad]=Pr[Bad]-Pr[Bad∧﹁AskH]≥ε-Pr[Bad|﹁AskH]
Bad may only occur if a accesses k (denoted AskK) to G (·) or F (·) or the response to decrypt oracle is incorrect (denoted DBad), i.e., Bad is not accessed to H (·), i.e., Bad
Pr[Bad|﹁AskH]≤Pr[AskK|﹁AskH]+Pr[DBad|﹁AskH∧﹁AskK]
If H is not visited, then H (H) is completely random, so k t H (H) is completely random, so k is not visited more than (q)G+qF)/2λI.e. by
<math> <mrow> <mi>Pr</mi> <mo>[</mo> <mi>AskK</mi> <mo>|</mo> <mo>⫬</mo> <mi>AskH</mi> <mo>]</mo> <mo>≤</mo> <mfrac> <mrow> <msub> <mi>q</mi> <mi>G</mi> </msub> <mo>+</mo> <msub> <mi>q</mi> <mi>F</mi> </msub> </mrow> <msup> <mn>2</mn> <mi>λ</mi> </msup> </mfrac> <mo>.</mo> </mrow> </math>
The following discussion is based on the premise that k, h are not visited.
Suppose the input of A to the decryption oracle is y (C)1,C1) Let F be logPC1,(s,t)=C2-FQ,k=H(s)t,h=s,Pr′[.]=Pr[·|﹁AskH∧﹁AskK]。
If h and k are both inquired, the output result is certain correct; if h is queried but k is not queried to G (. or F.), the output result is a null string, if the result is not true, then y must be a legitimate ciphertext, as discussed in the following cases: since h is queried, k is determined, and k is random, so the probability of k is no greater than 2-λWhen the probability that y is a legal ciphertext under the condition that k is at most 1, the probability that the simulated response is wrong is not more than 2-λ(ii) a If k ≠ k @, and k has no access to G (·), y being a legitimate ciphertext means that the low λ' bit of s G (k) is 0, since k ≠ k @, and k has no access to G (·), the probability of y being a legitimate ciphertext is not greater than 2-λ′(ii) a If k ≠ and k has no access to F (), y is a legitimate ciphertext meaning F (k) ═ logpC1Since k ≠ and k has no access to F (.), y is of legitimate ciphertextProbability not greater than 2-λ(ii) a If h is not queried, the output result is a null string, if the result is not true, y must be a legal ciphertext, i.e., F (k) logPC1And the low λ' bit of s g (k) is 0, if h ═ h, h (h) is completely random because h is also not queried; if k ≠ k, since h is not queried, so H (h) is completely random; therefore, h (h) is completely random under the condition that h is not queried, and k is t h (h) is completely random, so f (k) is logPC1Has a probability of not more than 2-2S G (k) has a probability of 0 being not more than 2-λ′Then the probability of a simulated answer error is no greater than 2 without h being visited-λ。
By combining the above analyses, Pr [ DBad | AskK | AskH |)]≤3qD/2λ+qD/2λThen, then
<math> <mrow> <mi>Pr</mi> <mo>[</mo> <mi>Bad</mi> <mo>|</mo> <mo>⫬</mo> <mi>AskH</mi> <mo>]</mo> <mo></mo> <mo>≤</mo> <mfrac> <mrow> <msub> <mi>q</mi> <mi>G</mi> </msub> <mo>+</mo> <msub> <mi>q</mi> <mi>F</mi> </msub> <mo>+</mo> <mn>3</mn> <msub> <mi>q</mi> <mi>D</mi> </msub> </mrow> <msup> <mn>2</mn> <mi>λ</mi> </msup> </mfrac> <mo>+</mo> <mfrac> <msub> <mi>q</mi> <mi>D</mi> </msub> <msup> <mn>2</mn> <msup> <mi>λ</mi> <mo>′</mo> </msup> </msup> </mfrac> </mrow> </math>
<math> <mrow> <mi>Pr</mi> <mo>[</mo> <mi>AskH</mi> <mo>]</mo> <mo>≥</mo> <mi>ϵ</mi> <mo>-</mo> <mi>Pr</mi> <mo>[</mo> <mi>Bad</mi> <mo>|</mo> <mo>⫬</mo> <mi>AskH</mi> <mo>]</mo> <mo>≥</mo> <mi>ϵ</mi> <mo>-</mo> <mrow> <mo>(</mo> <mfrac> <mrow> <msub> <mi>q</mi> <mi>G</mi> </msub> <mo>+</mo> <msub> <mi>q</mi> <mi>F</mi> </msub> <mo>+</mo> <mn>3</mn> <msub> <mi>q</mi> <mi>D</mi> </msub> </mrow> <msup> <mn>2</mn> <mi>λ</mi> </msup> </mfrac> <mo>+</mo> <mfrac> <msub> <mi>q</mi> <mi>D</mi> </msub> <msup> <mn>2</mn> <msup> <mi>λ</mi> <mo>′</mo> </msup> </msup> </mfrac> <mo>)</mo> </mrow> </mrow> </math>
So B outputs the probability of correct ECDH solution
<math> <mrow> <msup> <mi>ϵ</mi> <mo>′</mo> </msup> <mo>≥</mo> <mfrac> <mrow> <mi>Pr</mi> <mo>[</mo> <mi>AskH</mi> <mo>]</mo> </mrow> <msub> <mrow> <mn>6</mn> <mi>q</mi> </mrow> <mi>H</mi> </msub> </mfrac> <mo>≥</mo> <mfrac> <mi>ϵ</mi> <msub> <mrow> <mn>6</mn> <mi>q</mi> </mrow> <mi>H</mi> </msub> </mfrac> <mo>-</mo> <mfrac> <mrow> <msub> <mi>q</mi> <mi>G</mi> </msub> <mo>+</mo> <msub> <mi>q</mi> <mi>F</mi> </msub> <mo>+</mo> <mn>3</mn> <msub> <mi>q</mi> <mi>D</mi> </msub> </mrow> <mrow> <msub> <mrow> <mn>6</mn> <mi>q</mi> </mrow> <mi>H</mi> </msub> <msup> <mn>2</mn> <mi>λ</mi> </msup> </mrow> </mfrac> <mo>-</mo> <mfrac> <msub> <mi>q</mi> <mi>D</mi> </msub> <mrow> <msub> <mrow> <mn>6</mn> <mi>q</mi> </mrow> <mi>H</mi> </msub> <msup> <mn>2</mn> <msup> <mi>λ</mi> <mo>′</mo> </msup> </msup> </mrow> </mfrac> </mrow> </math>
From the above equation, if epsilon is not negligible, epsilon' must not be negligible, and if the operation time of a is t, the operation time of B is t ═ t + qHtfWherein t isfIs shown in FpThe time required to solve the six-order equation above, it is clear that if A is polynomial time, then B must also be polynomial time, from the above it is known that if n is not IND-CCA2 safe, then ECCDHP can be solved, which is contradictory, so in the case of ECCDHP refractory, n is IND-CCA2 safe.
Finally, it should be noted that: the above embodiments are only used to illustrate the present invention and do not limit the technical solutions described in the present invention; thus, while the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted; all such modifications and variations are intended to be included herein within the scope of this disclosure and the present invention and protected by the following claims.