Background technology
Along with the appearance of global IT wave, information security and network security are subjected to people's attention day by day.That the application of information security and network security technology has been deep into is large-scale, critical operation system such as EFT and POS machine system (electronic fund transfer and point of salessystems) etc.Yet for for the system of low capacity memory device, because the restriction of computing capability and the physical characteristic that the storage device medium can not be stored big data, these The Application of Technology are restricted.
Public key algorithm is that Difte and Hellman proposed in 1976.They utilize a kind of special mathematic(al) manipulation, and power operation proposes the key distribution protocol based on a discrete logarithm difficult problem.The user carries out Montgomery Algorithm twice, just can obtain a relative side's identical key.Because this conversion is unidirectional, so can't be used for encryption and decryption.
In U.S. Pat 4,218, in 582, Hellman and Merkle utilize the result of Difte and Hellman to propose a kind of method of eliminating secure infomation passageway.1978, Rivest, Shanir and Adleman propose public key encryption algorithm RSA, also propose digital signature simultaneously, i.e. Dian Ziqianming notion.Their United States Patent (USP) that has been this algorithm application, and obtain the authorization, the patent No. is US 4,405,829.This algorithm is to utilize two big prime numbers to multiply each other, and draws a modulus N, gets a PKI e, calculates private key d by these two big prime numbers then, open PKI e and modulus N.Like this,, then only need carry out Montgomery Algorithm to message M, obtain ciphertext C with modulus N and PKI e if user A will be that e and modulus are the user B transmission message M of N to PKI.After user B received ciphertext C, d was decrypted with private key.The reverse computing of said process just in time can be used for doing electronic signature, and with integrality, confirmability and the non-repudiation of acknowledgement message M, one people knows because private key d has only user B.
Because the size of key of public key cryptography is huge, public key cryptography is not expected always in Verification System on the card.In U.S. Pat 4,438, in 824, Mueller-Schloer has proposed an authentication system with the way of additional data card.In this system, a plurality of terminals link to each other with the security service station, and each terminal all has CPU, internal memory, a card reader and closes digital-to-analogue.CPU is by closing the encryption and decryption of digital-to-analogue control data.And the work at security service station is also similar, verifies with this, this system is compatible simultaneously Data Encryption Standard algorithm DES and public key encryption algorithm RSA.
But commercial, this system is not accepted by EFT and POS machine system so far yet.Because these systems adopt the very little magnetic stripe card of capacity to make storage medium, store private identify (PIN), with the legitimacy of authenticated user identity.At the end of the eighties and the beginning of the nineties, people begin to seek to solve key variable are stored in way on the low capacity storage medium.
In U.S. Pat 4,408, in 203, Canpbell has proposed one and has solved the method scheme with the algorithm of symmetric cryptography (private key password).In addition, in U.S. Pat 4,423, in 287, Zeidler solves the authenticating user identification problem of EFT and POS machine system with the method for a secondary key.Because be subjected to the capacity limit of magnetic stripe card, people's (comprising Canpbell and Zeidler) fail that all the time safer RSA is applied to EFT and POS machine system gets on.
At present the RSA of safety closes the integer that digital-to-analogue is 1024 bits, and 3 magnetic tracks on the magnetic stripe card of mechanisms such as bank can only be deposited the information of 316,160 and 432 bits, and this is that close digital-to-analogue, PKI, the private key of 1024 bits all is far from being enough for length.U.S. Pat 4,736, though 423 disclose the algorithm of one 400 bit, but because the limitation of this algorithm itself, this algorithm can't be generalized on the RSA that length is 1024 bits, and the little finger of toe technology of counting attack did not occur at that time, and in today, this method may be unsafe fully.
So to the application of common key cryptosystem, depend primarily on the development of two factors, promptly or jumbo memory technology occurs, or find a kind of technology that reduces the key memory space in bank or financial sector.Because the limitation of memory technology, main outlet are the technology that development reduces the key memory space.From angle practical and safety, this is again a pair of contradiction.Therefore not only key generation technique that safety but also key memory space the are little most important thing especially.
Summary of the invention
The technical problem to be solved in the present invention is to propose a kind of method that reduces RSA key variable storage space, promptly reduces the algorithm in RSA key variable storage space.This method is a technology that generates not only safety, key memory space but also little key, following advantage is arranged: can be for using small-capacity memory, the Electronic Finance system of magnetic stripe card is used for the required high strength password of authentication, discriminating and message authentication as generations such as EFT and POS machine systems.
The present invention makes above-mentioned technical problem be resolved by the following technical solutions.According to the characteristics that present EFT and POS machine system carry out authentication with magnetic stripe card, for satisfying the requirement of RSA fail safe: the length of RSA key variable should be 3072 bits, and wherein, PKI PK, private key SK and modulus N respectively account for 1024 bits; Key: PKI PK and private key SK should be able to resist the little finger of toe number and attack.The authentication information that technical scheme of the present invention will be stored in 106 bits on the magnetic stripe card earlier is divided into 9 variablees, and wherein the length of two variablees is respectively 16 and 20 bits, and the length of remaining variables is 10 bits; The algorithm that then utilizes technical scheme of the present invention to provide generates described 9 variablees and obtains two big prime P and Q; Product with two big prime P and Q can obtain modulus N=P*Q and two key K P that can resist the attack of little finger of toe number: PKI PK and private key SK.To sum up, technical scheme of the present invention is utilized modulus N, PKI PK and private key SK, two big prime P and Q, and the relation between 9 variable threes, and generating the length summation is 9 variablees of 106 bits.Technical scheme of the present invention reduces to the memory space of rsa cryptosystem system key variable that it can be used in memory capacity is that the magnetic stripe card of 106 bits is as the degree in the systems such as the EFT of authenticating user identification and POS machine.
About the authentication of EFT and POS machine system, RSA realizes with public key algorithm, need use the technology of the memory space that reduces key variable, and three main bodys of this technology is subscriber card (CARD), terminal (EFT) and host process center (HPC) respectively.
Suppose that the user registers in bank or other financial institution, then he has a basic number of the account (PAN).And the user inserts when information is read on the card of terminal, and the identification card number (PIN) that the user only need import the individual confirms the basic number of the account (PAN) of oneself.If PIN and PAN check correctly, then system will start business service.
But user's authentication is actually the individual subscriber identity information that utilizes on the card: personal key KP, wait as RSA by cryptographic algorithm and to protect.
Fig. 1 has explained the application of RSA system in EFT and POS machine system.The capacity of magnetic stripe card can not be stored the RSA key variable of safe enough, becomes a urgent problem.Before explaining the method that reduces RSA key variable storage space in detail, look at the structure of whole system first.
At first, establish user's identity ID
i, personal key KP
iAnd modulus N
iAll be read into terminal EFT, and individual's identification card number PIN
iAlso read in terminal EFT, at this moment user's identity information ID
iIdentity information TID with terminal
jBe sent to host process center HPC.
Then, host process center HPC produces random number T by randomizer (GEN RN)
1, and be sent to terminal EFT, then terminal EFT is with random number T
1TRM does concatenation operation with business need message, simultaneously also individual's identification card number PIN
iWith personal key KP
iDo mould 2 and add computing, produce private key SK
iUse private key SK
iAnd modulus N
iTo business need message TRM ‖ random number T
1Do decrypt operation, obtain dSK
i(TRM, T
1).Terminal EFT produces random number T by the randomizer of oneself
2, with it and dSK
i(TRM, T
1) send to host process center HPC together.
In the HPC of host process center, by the subscriber identity information ID of terminal EFT transmission
i, terminal identity information TID
j, find user's individual's identification card number PAN
i, modulus N
iWith PKI PK
i, use PKI PK
iAnd modulus N
iTo dSK
i(TRM, T
1) carry out encryption, recover business need message TRM and random number T
1'.If random number T
1'=random number T
1, then by checking, continue, otherwise the refusal business need.Checking above supposing is passed through, then the host process center HPC modulus N of bank
bWith private key SK
bTo random number T
2Be decrypted processing, with dSK
b(T
2) send back to terminal EFT.Fig. 2 and Fig. 3 are respectively deciphering and ciphering process.
At last, terminal EFT is with the dSK that receives
b(T
2) the disclosed modulus N of usefulness bank
bWith PKI PK
bCarry out encryption.If encrypted result is T
2', just in time with original T
2Unanimity, then authenticated user is a validated user, and by business need message TRM transacting business.
The operation of said system is enough can store N with the capacity of card (CARD)
iAnd KP
iFor prerequisite.Since magnetic stripe card capacity little, have no idea they are directly stored on the magnetic stripe card, so the present invention utilizes certain precomputation with N
iAnd KP
iThe compression capacity of being stored in be on the magnetic stripe card of 106 bits, make magnetic stripe card can with above-mentioned system's coupling.
It below is to utilize the information that is stored in 106 bits on the magnetic stripe card to produce the RSA key variable of safe enough: modulus N
iWith personal key KP
i
106 bits shown in Figure 4 are divided into 9 groups of variable: D
1..., D
9, all variablees are all stored with binary form.Wherein, D
2And D
9Length be respectively 20 and 16 bits, the length of remaining variables is 10 bits.
Now specify technical scheme of the present invention in conjunction with Fig. 5 a and Fig. 5 b.
A kind of method that reduces RSA key variable storage space is characterized in that, the concrete operations step:
The first step is chosen variables D
1, make Z=2
488-2D
1+ 1 is a prime number that length is 488 bits, will utilize Z to produce other parameter below, and used computing and symbol thereof are enumerated as follows:
OR: binary number ' or ' computing,
Mod: the modular arithmetic of number,
[K]: be no more than the maximum integer of K,
A*b: expression a and b's multiplies each other,
L (Q): get two of Q and advance the left side 373 bits of expression, promptly preceding 373 bits constitute a new number,
Other computing of below not enumerating is common integer arithmetic;
(annotate: variables D
1Generate, its length is 10 bits.)
Second step was chosen D
2, D
3,
"=(the X that makes P
1) OR (2
487+ 1) is a prime number that length is 488 bits;
(annotate: variables D
2And D
3Generate variables D
2And D
3Length be respectively 20 and 10 bits.)
The 3rd step was chosen D
4, make P '=2 (D
4+ 2
10) "+1 is a prime number that length is 500 bits to P;
(annotate: variables D
4Generate, its length is 10 bits.)
The 4th step was chosen D
5, make P=2 (D
5+ 2
10) P '+1 is a prime number that length is 512 bits;
(annotate: variables D
5Generate, its length is 10 bits.)
The 5th step was calculated X
2=[2
1024/ P], with X
2Last pressure of binary representation change 1 into, X
3
The 6th step was chosen D
6, "=2 (D that make Q
6+ 2
10) X
3+ 1 is a prime number that length is 488 bits;
(annotate: variables D
6Generate, its length is 10 bits.)
The 7th step was chosen D
7, make Q '=2 (D
7+ 2
10) "+1 is a prime number that length is 500 bits to Q;
(annotate: variables D
7Generate, its length is 10 bits.)
The 8th step was chosen D
8, make Q=2 (D
8+ 2
10) Q '+1 is a prime number that length is 512 bits;
(annotate: variables D
8Generate, its length is 10 bits.)
The 9th step was calculated modulus N=P*Q, and this moment, the length of N was 1024 bits;
The tenth step was chosen D
9, calculate d=2
374+ 2 (D
9+ L (Q))+1, make e 〉=2 of e*d ≡ 1 mod (P-1) in (Q-1)
17+ 1;
(annotate: variables D
9Generate, its length is 16 bits.E and d are called encryption exponent and decryption exponent.In the method for attacking the rsa cryptosystem system now, if decryption exponent d<N
0.365, the rsa cryptosystem system is broken easily.N
0.365<2
374So the d that chooses here is greater than 2
374Be safe.Meanwhile, also be unsafe about less encryption exponent e, so the e that chooses necessary 〉=2
17+ 1.)
The 11 step made PKI PK=e, private key SK=d, and this moment, the length of PKI PK and private key SK was 1024 bits;
The 12 goes on foot so far variables D
1, D
2, D
3, D
4, D
5, D
6, D
7, D
8And D
9All generate, wherein, variables D
2And D
9Length be respectively 20 and 16 bits, remaining length is 10 bits.
With variables D
1, D
2, D
3, D
4, D
5, D
6, D
7, D
8And D
9The length that is stored on the magnetic stripe card is on the memory space of 106 bits.
The magnetic stripe card of recording with method of the present invention is particularly suitable for and system's couplings such as EFT and POS machine, for systems such as EFT and POS machine provide not only safe but also can resist authenticating user identification or the authentification of message that the little finger of toe number is attacked.
The advantage of method of the present invention:
1, because the data length that is used for authentication or data authentication that method of the present invention generates is 106 bits,, this method carries out among the EFT and POS machine system of authentication with magnetic stripe card at present so being suitable for use in.
2, the length that generates of method of the present invention is after the data of the authentication of 106 bits or data authentication are read in EFT and POS machine system, EFT and POS machine system can produce modulus N, PKI PK and the private key SK that length is 1024 bits, and PKI PK and private key SK can resist the little finger of toe number and attack, in other words, this method can produce can resist the attack of little finger of toe number, the modulus N that can not be decomposed, PKI PK and private key SK again.
Above-mentioned performance has increased substantially present EFT and the authentication fail safe of POS machine system and the popularity of application.
Embodiment
The method in the minimizing RSA key variable storage space that illustrates in detail in the superincumbent summary of the invention is exactly embodiment.
Operation principle.
Can realize by precomputation in the said process.At present, existing a lot of algorithms that detect the integer disposition are so above-mentioned operating procedure all is attainable.
The data of 106 bits by prior precomputation and the inverse process of aforesaid operations step can recover modulus N, key K P easily: PKI PK and private key SK.Known: authenticating user identification data, its length are 106 bits, and 9 groups of variable: D
1, D
2, D
3, D
4, D
5, D
6, D
7, D
8And D
9Below be to recover modulus N, key K P: the process of PKI PK and private key SK:
1、Z=2
488-2D
1+1
With D
1The substitution following formula gets Z.
2、
With D
2, D
3With Z substitution following formula, get X
1
3、P″=(X
1)OR(2
487+1)
With X
1The substitution following formula gets P ".
4、P′=2(D
4+2
10)P″+1
With D
4" the substitution following formula gets P ' to and P.
5、P=2(D
5+2
10)P′+1
With D
5And P ' substitution following formula, get P.
6、X
2=[2
1024/P]
7、
8、Q″=2(D
6+2
10)X
3+1
With D
6And X
3The substitution following formula gets Q ".
9、Q′=2(D
7+2
10)Q″+1
With D
7" the substitution following formula gets Q ' to and Q.
10、Q=2(D
8+2
10)Q′+1
With D
8And Q ' substitution following formula, get Q.
11、N=P*Q
With P and Q substitution following formula, get N.
12、d=2
374+2(D
9+L(Q))+1
With D
9And L (Q) substitution following formula, get d.
13、e*d≡1?mod(P-1)(Q-1)
With d, P and Q substitution following formula get e.
14、PK=e,SK=d
So far, the modulus that recovers, PKI and private key are respectively N, PK and SK, modulus N, the length of PKI PK and private key SK is 1024 bits.