CN117611162A - Transaction authentication method and device based on elliptic curve cryptography algorithm - Google Patents

Transaction authentication method and device based on elliptic curve cryptography algorithm Download PDF

Info

Publication number
CN117611162A
CN117611162A CN202311621241.3A CN202311621241A CN117611162A CN 117611162 A CN117611162 A CN 117611162A CN 202311621241 A CN202311621241 A CN 202311621241A CN 117611162 A CN117611162 A CN 117611162A
Authority
CN
China
Prior art keywords
user
signature
digital certificate
digital
transaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311621241.3A
Other languages
Chinese (zh)
Inventor
王佳音
蒋晓晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311621241.3A priority Critical patent/CN117611162A/en
Publication of CN117611162A publication Critical patent/CN117611162A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3252Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using DSA or related signature schemes, e.g. elliptic based signatures, ElGamal or Schnorr schemes

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a transaction authentication method and a transaction authentication device based on elliptic curve cryptography algorithm, which can be used in the financial field or other technical fields, and the method comprises the following steps: acquiring a digital certificate verification request sent by a first user, wherein the digital certificate verification request comprises a digital certificate of a second user, when the second user carries out a transaction with the first user, the second user sends the digital certificate to the first user, the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate comprises a signature of the authentication center; the digital certificate is verified by verifying the validity of the signature in the digital certificate, and a verification result is generated. The invention can effectively improve the efficiency of transaction authentication and is beneficial to improving the performance and speed of network transaction.

Description

Transaction authentication method and device based on elliptic curve cryptography algorithm
Technical Field
The invention relates to the technical field of transaction security, in particular to a transaction authentication method and device based on elliptic curve cryptography algorithm.
Background
With the development of online banking, the security problem of the core problem transaction is highlighted, so how to construct a secure transaction mode is also the most worry problem of each party, and the key to solve the problem is to use a secure electronic payment mode.
At present, the secure electronic transaction protocol SET is one of the most commonly used modes at present, the secure electronic transaction protocol SET uses a public key encryption algorithm RSA to authenticate both communication parties, uses a symmetric encryption method to encrypt and transmit information, and uses a HASH algorithm to identify the authenticity of a message. However, the current SET protocol has a great disadvantage: the RSA algorithm is slow to process because it takes too long to calculate. A typical SET transaction process requires 9 times of verifying the electronic certificate, 6 times of verifying the digital signature, 7 times of delivering the certificate, 5 times of signing, 4 times of symmetric encryption and 4 times of asymmetric encryption, and the whole transaction process may take 1.5-2 minutes. How to improve the efficiency of transaction authentication is a technical problem which needs to be solved in the prior art.
Disclosure of Invention
The invention provides a transaction authentication method and device based on elliptic curve cryptography algorithm in order to solve at least one technical problem in the background art.
To achieve the above object, according to one aspect of the present invention, there is provided a transaction authentication method based on elliptic curve cryptography algorithm, the method comprising:
acquiring a digital certificate verification request sent by a first user, wherein the digital certificate verification request comprises a digital certificate of a second user, when the second user carries out a transaction with the first user, the second user sends the digital certificate to the first user, the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate comprises a signature of the authentication center;
the digital certificate is verified by verifying the validity of the signature in the digital certificate, and a verification result is generated.
Optionally, the transaction authentication method based on elliptic curve cryptography algorithm further includes:
receiving a digital certificate application of the second user, wherein the digital certificate application comprises: personal identity information of the second user and a public key of the second user;
generating a signature according to the digital certificate application, a preset elliptic curve encrypted parameter set T and a hash function H, wherein the parameter set T= (p, a, b, G, n, H), p is the domain order, a and b are coefficients of an elliptic curve, G is a base point, n is the base point G order, and H is a remainder factor;
and generating a digital certificate corresponding to the second user according to the signature, the personal identity information and the public key.
Optionally, the generating a signature according to the digital certificate application, the preset elliptic curve encrypted parameter set T and the hash function H specifically includes:
selecting a random number k, wherein 1< k < n;
calculating kg= (x, y), then calculating r=x mod n, and re-calculating r if the calculated r=0;
calculating a message digest e=h (id+ksp), then calculating s=k-1 (e+rk) (mod n), and re-calculating the message digest e if the calculated s=0, wherein ID is the personal identity information, ksp is the public key;
a signature (r, s) is generated.
Optionally, the verifying the digital certificate by verifying the validity of the signature in the digital certificate specifically includes:
verifying whether r and s in the signature are integers between [1, n-1 ];
if not, confirming that the signature is invalid;
if yes, the information abstract e=h (id+ksp) is calculated, and w=s is calculated -1 (mod n), calculate U 1 =ew (mod n), calculate U 2 =rw (mod n), calculate x=u 1 G+U 2 Q=(X 1 ,Y 1 ) And calculating v=x 1 mod n, wherein q=pksp;
if v=r, the signature is confirmed to be valid, and if v+.r, the signature is confirmed to be invalid.
Optionally, the transaction authentication method based on elliptic curve cryptography algorithm further includes:
when the second user carries out transaction with the first user, the second user generates a digital signature according to transaction information and the digital signature is generated according to the digital signatureSigning and generating random symmetric key K 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 Generating a digital envelope, and transmitting the encrypted information and the digital envelope to the first user;
the first user calculates a symmetric key K according to the digital envelope and the signature private key thereof 1 Using a symmetric key K 1 And decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature.
Optionally, the second user generates a digital signature according to the transaction information, and generates a random symmetric key K according to the digital signature 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 The method for generating the digital envelope specifically comprises the following steps:
the second user generates a double abstract e according to the transaction order information OI and the transaction account information PI 1 =h (H (OI) +h (PI)), H being a hash function;
the second user generates a random key pair (K 1 ,X 1 ) Wherein X is 1 =(x 1 ,y 1 ) Then calculate r 1 =x 1 e 1 (mod n),s 1 =K 1 -1 (e 1 +r 1 SS PV ) (mod n) generating a digital signature s= (r 1 ,s 1 ) Where n is the order of the base point G of elliptic curve encryption, SS PV A private signature key for the second user;
the second user is based on the symmetric key K 1 Encrypting transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user to obtain encryption information D;
the second user generates a random key pair (k ', y '), calculates i=k ' AE PU ,X’=(x’,y’)=k’G,j=x’K 1 Generating a digital envelope E= (i, j), AE PU And G is the base point of elliptic curve encryption for the signature public key of the first user.
Optionally, the first user is based on the numberLetter envelope and its signature private key to calculate symmetric key K 1 Using a symmetric key K 1 Decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature, specifically comprising:
the first user uses his own signature private key AE PV Decrypting the digital envelope E to obtain a symmetric key K ', and then obtaining (x', y ') from the symmetric key K', thereby calculating the symmetric key K 1 =j/x’;
The first user uses a symmetric key K 1 Decrypting the encryption information D to obtain the transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user;
the first user verifies the digital certificate of the second user through an authentication center;
the first user verifies r in the digital signature S 1 Sum s 1 Whether or not they are all [1, n-1]]An integer between;
if not, confirming that the digital signature S is invalid;
if yes, calculate double abstract e 1 =h (H (OI) +h (PI)), w is calculated 1 =s 1 -1 (mod n), calculate U 3 =e 1 w 1 (mod n), calculate U 4 =r 1 w 1 (mod n), calculate x=u 3 G+U 4 Q=(X 2 ,Y 2 ) And calculating V 1 =X 2 mod n, wherein q=pksp, p being the order of the domain, ksp being the public key of the second user;
if V 1 =r 1 The digital signature S is validated, if V 1 ≠r 1 The digital signature S is confirmed to be invalid.
To achieve the above object, according to another aspect of the present invention, there is provided a transaction authentication device based on elliptic curve cryptography algorithm, the device comprising:
a digital certificate verification request receiving unit, configured to obtain a digital certificate verification request sent by a first user, where the digital certificate verification request includes a digital certificate of a second user, and when the second user performs a transaction with the first user, the second user sends a digital certificate of the second user to the first user, where the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate includes a signature of the authentication center;
a digital certificate verification unit for verifying the digital certificate by verifying the validity of the signature in the digital certificate, and generating a verification result
To achieve the above object, according to another aspect of the present invention, there is also provided a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above-mentioned transaction authentication method based on elliptic curve cryptography algorithm when the computer program is executed.
To achieve the above object, according to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon a computer program/instruction which, when executed by a processor, implements the steps of the above-described transaction authentication method based on elliptic curve cryptography algorithm.
To achieve the above object, according to another aspect of the present invention, there is also provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the above-described transaction authentication method based on elliptic curve cryptography algorithm.
The beneficial effects of the invention are as follows:
the embodiment of the invention generates the digital certificate of the user to carry out transaction authentication through the elliptic curve cryptography algorithm, and compared with the public key encryption algorithm RSA used in the existing secure electronic transaction protocol SET, the elliptic curve cryptography algorithm has the advantage that the time required for calculation is obviously reduced under the same security level, so that the invention can effectively improve the efficiency of transaction authentication and is beneficial to improving the performance and speed of network transaction.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of a transaction authentication method based on elliptic curve cryptography algorithm according to an embodiment of the present invention;
FIG. 2 is a flow chart of a certification authority generating digital certificates in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of a first user interacting with a second user in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of the relationship of transaction participants according to an embodiment of the invention;
FIG. 5 is a block diagram of a transaction authentication device based on elliptic curve cryptography algorithm according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It is noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and in the foregoing figures, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The invention will be described in detail below with reference to the drawings in connection with embodiments.
It should be noted that, in the technical scheme of the application, the acquisition, storage, use, processing and the like of the data all conform to the relevant regulations of national laws and regulations.
It should be noted that, the transaction authentication method and device based on elliptic curve cryptography algorithm of the present invention can be used in the financial field, and also can be used in any field other than the financial field, and the application field of the transaction authentication method and device based on elliptic curve cryptography algorithm of the present invention is not limited.
Elliptic curve cryptography:
projection plane P 2 k Homogeneous expression E above:
Y 2 Z+a 1 XYZ+a 3 YZ 2 =X 3 +a 2 X 2 Z+a 4 XZ 2 +a 6 Z 3
wherein a is 1 ,a 2 ,a 3 ,a 4 ,a 6 ∈F q ,F q Is a finite field. If the elliptic curve eigenvalues are not equal to 2 and 3, the general form of the elliptic curve can be reduced to: y is Y 2 =X 3 +aX+b,Δ=4a 3 +27b 2 Not equal to 0, where a, b e F q
The encryption principle of elliptic curve cryptography is based on the difficulty of elliptic curve discrete logarithm problem over finite field: given a prime number P and an elliptic curve E, for q=kp, it is difficult to find a positive integer k smaller than P in the case of a straight P, Q.
The elliptic curve over the finite field and the parameter T are defined as a six-tuple: t= (p, a, b, G, n, h).
G (xCG, yG) is a base point on the elliptic curve, g+.0; let ng=0 the smallest positive integer n be the order of point C; the integer h is a cofactor, which is the integer part of the division of the number m of all points on the elliptic curve with n. From the above parameters, an elliptic curve can be uniquely determined. Randomly determining an integer k between [1, n-1] and calculating q=kp, thereby determining a key pair (k, Q), wherein: k is a private key and needs to be kept secret, and Q is a public key and needs to be disclosed; and T is also fully disclosed.
The authentication Center (CA) selects an elliptic curve E on the finite field GF (p), selects a point G on E (a, b) (GF (p)), determines parameters T (p, a, b, G, n, H), and selects a secure Hash function H, T, H for disclosure.
Fig. 1 is a flowchart of a transaction authentication method based on an elliptic curve cryptography algorithm according to an embodiment of the present invention, as shown in fig. 1, in an embodiment of the present invention, the transaction authentication method based on an elliptic curve cryptography algorithm includes step S101 and step S102. The implementation subjects of step S101 and step S102 are authentication Centers (CA).
Step S101, a digital certificate verification request sent by a first user is obtained, wherein the digital certificate verification request comprises a digital certificate of a second user, when the second user carries out a transaction with the first user, the second user sends the digital certificate to the first user, the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate comprises a signature of the authentication center;
step S102, verifying the digital certificate by verifying the validity of the signature in the digital certificate, and generating a verification result.
Fig. 4 is a schematic diagram of the relationship between transaction participants according to an embodiment of the present invention, as shown in fig. 4, in the present invention, when a second user and a first user conduct a transaction, the second user sends his own digital certificate CAs to the first user, and the first user can verify the digital certificate CAs of the second user through the authentication center CA, and after the verification passes, the transaction can be continued.
In the invention, the authentication center generates the digital certificate of each user according to the elliptic curve cryptography algorithm and verifies the digital certificate, and compared with the public key encryption algorithm RSA used in the existing secure electronic transaction protocol SET, the elliptic curve cryptography algorithm has the advantage that the time required for calculation is obviously reduced under the same security level, so that the invention can effectively improve the efficiency of generating and verifying the digital certificate and is beneficial to improving the performance and speed of network transaction.
As shown in fig. 2, in one embodiment of the present invention, the transaction authentication method based on elliptic curve cryptography algorithm further includes steps S201 to S203. The implementation subject of step S201 to step S203 is an authentication Center (CA).
Step S201, receiving a digital certificate application of the second user, where the digital certificate application includes: personal identity information of the second user and a public key of the second user.
In the invention, the personal identity information of the second user is assumed to be ID, the public key of the second user is Ksp, and the second user sends the ID and the Ksp to the authentication center CA to apply for the digital certificate.
Step S202, generating a signature according to the digital certificate application, a preset elliptic curve encrypted parameter set T and a hash function H, where the parameter set t= (p, a, b, G, n, H), p is a field order, a and b are coefficients of an elliptic curve, G is a base point, n is a base point G order, and H is a remainder factor.
Step S203, generating a digital certificate corresponding to the second user according to the signature, the personal identity information and the public key.
In one embodiment of the present invention, the signature generating step S202 includes:
selecting a random number k, wherein 1< k < n;
calculating kg= (x, y), then calculating r=x mod n, and re-calculating r if the calculated r=0;
calculating a message digest e=h (id+ksp), then calculating s=k-1 (e+rk) (mod n), and re-calculating the message digest e if the calculated s=0, wherein ID is the personal identity information, ksp is the public key;
a signature (r, s) is generated.
In one embodiment of the present invention, the verifying the digital certificate by verifying the validity of the signature in the digital certificate in step S102 specifically includes:
verifying whether r and s in the signature are integers between [1, n-1 ];
if not, confirming that the signature is invalid;
if yes, the information abstract e=h (id+ksp) is calculated, and w=s is calculated -1 (mod n), calculate U 1 =ew (mod n), calculate U 2 =rw (mod n), calculate x=u 1 G+U 2 Q=(X 1 ,Y 1 ) And calculating v=x 1 mod n, wherein q=pksp;
if v=r, the signature is confirmed to be valid, and if v+.r, the signature is confirmed to be invalid.
As shown in fig. 3, in one embodiment of the present invention, the transaction authentication method based on elliptic curve cryptography algorithm of the present invention further includes step S301 and step S302.
Step S301, when the second user transacts with the first user, the second user generates a digital signature according to the transaction information, and generates a random symmetric key K according to the digital signature 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 And generating a digital envelope, and transmitting the encrypted information and the digital envelope to the first user.
Step S302, the first user calculates a symmetric key K according to the digital envelope and the private signature key thereof 1 Using a symmetric key K 1 And decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature.
In the present invention, the second user's signature certificate is set as (SS PU ,SS PV ) Wherein the SS PU To sign public keys, SSs PV To sign the private key, the first user's signature certificate is (AE PU ,AE PV ),AE PU For signing public key, AE PV Is a private key for signature. When the second user and the first user conduct a transaction, the transaction information must be digitally signed and the symmetric key used encrypted to produce a digital envelope. The first user needs to verify the digital signature and decrypt the digital envelope, and can continue the transaction after the digital signature passes the verification.
In one embodiment of the present invention, the second user in the step S301 generates a digital signature according to the transaction information, and generates a random symmetric key K according to the digital signature 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 The method for generating the digital envelope specifically comprises the following steps:
the second user generates a double abstract e according to the transaction order information OI and the transaction account information PI 1 =h (H (OI) +h (PI)), H being a hash function;
the second user generates a random key pair (K 1 ,X 1 ) Wherein X is 1 =(x 1 ,y 1 ) Then calculate r 1 =x 1 e 1 (mod n),s 1 =K 1 -1 (e 1 +r 1 SS PV ) (mod n) generating a digital signature s= (r 1 ,s 1 ) Where n is the order of the base point G of elliptic curve encryption, SS PV A private signature key for the second user;
the second user is based on the symmetric key K 1 Encrypting transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user to obtain encryption information D;
the second user generates a random key pair (k ', y '), calculates i=k ' AE PU ,X’=(x’,y’)=k’G,j=x’K 1 Generating a digital envelope E= (i, j), AE PU G is the base of elliptic curve encryption for the public signature key of the first userAnd (5) a dot.
In one embodiment of the present invention, the first user in step S302 calculates the symmetric key K according to the digital envelope and the private signature key 1 Using a symmetric key K 1 Decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature, specifically comprising:
the first user uses his own signature private key AE PV Decrypting the digital envelope E to obtain a symmetric key K ', and then obtaining (x', y ') from the symmetric key K', thereby calculating the symmetric key K 1 =j/x’;
The first user uses a symmetric key K 1 Decrypting the encryption information D to obtain the transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user;
the first user verifies the digital certificate of the second user through an authentication center;
the first user verifies r in the digital signature S 1 Sum s 1 Whether or not they are all [1, n-1]]An integer between;
if not, confirming that the digital signature S is invalid;
if yes, calculate double abstract e 1 =h (H (OI) +h (PI)), w is calculated 1 =s 1 -1 (mod n), calculate U 3 =e 1 w 1 (mod n), calculate U 4 =r 1 w 1 (mod n), calculate x=u 3 G+U 4 Q=(X 2 ,Y 2 ) And calculating V 1 =X 2 mod n, wherein q=pksp, p being the order of the domain, ksp being the public key of the second user;
if V 1 =r 1 The digital signature S is validated, if V 1 ≠r 1 The digital signature S is confirmed to be invalid.
In order to realize the transaction authentication method based on the elliptic curve cryptography algorithm, the invention also provides a transaction authentication system, which comprises: basic blocks such as left-right shift of long integers, addition, subtraction, modular multiplication, inverse elements, etc.; the second layer establishes elliptic curve addition, multiplication and other modules, establishes elliptic curve based on the two modules, establishes elliptic curve cipher system with DES and other modules, and stores private key in DES encryption after public key is generated; the uppermost layer is based on an elliptic curve cryptography to realize the core functions of encryption and decryption of a public key, generation and authentication of a digital signature, encryption and decryption of an electronic envelope, generation and authentication of a digital certificate and the like in a SET CA system.
Table 1 below shows the time for authentication with elliptic curve cryptography ECC and RSA algorithm, respectively, at the same encryption strength, and it can be seen that the ECC algorithm is significantly more efficient than the RSA algorithm.
Function of 160-bit ECC 1024 bit RSA
Time consuming key pair generation 3.8 ms 4708.3 ms
Signature time consuming 2.1 ms 228.4 ms
Authentication is time consuming 9.9 ms 112.7 ms
Time consuming key exchange 7.3 ms 1654.0 ms
TABLE 1 time consuming comparison of ECC and RSA algorithms
From the above embodiments, the present invention proposes a SET CA authentication scheme based on an elliptic curve cryptography algorithm ECC, so as to improve efficiency and enable instant secure electronic transaction to be a viable scheme; and on the basis, the CA system for realizing the online banking transaction. Along with the increasing wide of online banking transactions, the invention has wider market prospect and practical value.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
Based on the same inventive concept, the embodiment of the invention also provides a transaction authentication device based on the elliptic curve cryptography algorithm, which can be used for realizing the transaction authentication method based on the elliptic curve cryptography algorithm described in the above embodiment, as described in the following embodiments. Since the principle of solving the problem of the transaction authentication device based on the elliptic curve cryptography algorithm is similar to that of the transaction authentication method based on the elliptic curve cryptography algorithm, the embodiment of the transaction authentication device based on the elliptic curve cryptography algorithm can be referred to the embodiment of the transaction authentication method based on the elliptic curve cryptography algorithm, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a transaction authentication device based on an elliptic curve cryptography algorithm according to an embodiment of the present invention, and as shown in fig. 5, in one embodiment of the present invention, the transaction authentication device based on an elliptic curve cryptography algorithm includes:
a digital certificate verification request receiving unit 1, configured to obtain a digital certificate verification request sent by a first user, where the digital certificate verification request includes a digital certificate of a second user, and when the second user performs a transaction with the first user, the second user sends a digital certificate of the second user to the first user, where the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate includes a signature of the authentication center;
a digital certificate verification unit 2 for verifying the digital certificate by verifying the validity of the signature in the digital certificate, and generating a verification result
In one embodiment of the present invention, the transaction authentication device based on elliptic curve cryptography algorithm of the present invention further comprises:
the digital certificate application acquisition unit is configured to receive a digital certificate application of the second user, where the digital certificate application includes: personal identity information of the second user and a public key of the second user;
the signature generation unit is used for generating a signature according to the digital certificate application, a preset elliptic curve encrypted parameter set T and a hash function H, wherein the parameter set T= (p, a, b, G, n, H), p is the order of a domain, a and b are coefficients of an elliptic curve, G is a base point, n is the order of the base point G, and H is a remainder factor;
and the digital certificate generation unit is used for generating a digital certificate corresponding to the second user according to the signature, the personal identity information and the public key.
In one embodiment of the present invention, the signature generation unit is specifically configured to:
selecting a random number k, wherein 1< k < n;
calculating kg= (x, y), then calculating r=x mod n, and re-calculating r if the calculated r=0;
calculating a message digest e=h (id+ksp), then calculating s=k-1 (e+rk) (mod n), and re-calculating the message digest e if the calculated s=0, wherein ID is the personal identity information, ksp is the public key;
a signature (r, s) is generated.
In one embodiment of the present invention, the digital certificate verification unit 2 is specifically configured to:
verifying whether r and s in the signature are integers between [1, n-1 ];
if not, confirming that the signature is invalid;
if yes, the information abstract e=h (id+ksp) is calculated, and w=s is calculated -1 (mod n), calculate U 1 =ew (mod n), calculate U 2 =rw (mod n), calculate x=u 1 G+U 2 Q=(X 1 ,Y 1 ) And calculating v=x 1 mod n, wherein q=pksp;
if v=r, the signature is confirmed to be valid, and if v+.r, the signature is confirmed to be invalid.
In one embodiment of the present invention, the transaction authentication device based on elliptic curve cryptography algorithm of the present invention further comprises:
a first processing unit, applied to the second user, for generating a digital signature according to transaction information when the second user performs a transaction with the first user, and generating a random symmetric key K according to the digital signature 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 Generating a digital envelope, and transmitting the encrypted information and the digital envelope to the first user;
a second processing unit, applied to the first user, for calculating a symmetric key K according to the digital envelope and the signature private key of the first user 1 Using a symmetric key K 1 And decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature.
In one embodiment of the present invention, the first processing unit is specifically configured to:
generating a double digest e from transaction order information OI and transaction account information PI 1 =h (H (OI) +h (PI)), H being a hash function;
generating a random key pair (K 1 ,X 1 ) Wherein X is 1 =(x 1 ,y 1 ) Then calculate r 1 =x 1 e 1 (mod n),s 1 =K 1 -1 (e 1 +r 1 SS PV ) (mod n) generating a digital signature s= (r 1 ,s 1 ) Where n is the order of the base point G of elliptic curve encryption, SS PV A private signature key for the second user;
according to the symmetric key K 1 Encrypting transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user to obtain encryption information D;
generating a random key pair (k ', y '), calculating i=k ' AE PU ,X’=(x’,y’)=k’G,j=x’K 1 Generating a digital envelope E= (i, j), AE PU And G is the base point of elliptic curve encryption for the signature public key of the first user.
In one embodiment of the present invention, the second processing unit is specifically configured to:
using a signature private key AE of the first user PV Decrypting the digital envelope E to obtain a symmetric key K ', and then obtaining (x', y ') from the symmetric key K', thereby calculating the symmetric key K 1 =j/x’;
By means of a symmetric key K 1 Decrypting the encryption information D to obtain the transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user;
verifying the digital certificate of the second user through an authentication center;
verifying r in digital signature S 1 Sum s 1 Whether or not they are all [1, n-1]]An integer between;
if not, confirming that the digital signature S is invalid;
if yes, calculate double abstract e 1 =h (H (OI) +h (PI)), w is calculated 1 =s 1 -1 (mod n), calculate U 3 =e 1 w 1 (mod n), calculate U 4 =r 1 w 1 (mod n), calculate x=u 3 G+U 4 Q=(X 2 ,Y 2 ) And calculating V 1 =X 2 mod n,Wherein q=pksp, p being the order of the domain, ksp being the public key of the second user;
if V 1 =r 1 The digital signature S is validated, if V 1 ≠r 1 The digital signature S is confirmed to be invalid.
The above embodiment shows that the SET CA authentication device based on the elliptic curve cryptography algorithm ECC is provided, so as to improve the efficiency, make the instant secure electronic transaction a viable scheme, and have wider market prospects and practical values along with the increasing wide online banking transactions.
To achieve the above object, according to another aspect of the present application, there is also provided a computer apparatus. As shown in fig. 6, the computer device includes a memory, a processor, a communication interface, and a communication bus, where a computer program executable on the processor is stored on the memory, and when the processor executes the computer program, the steps in the method of the above embodiment are implemented.
The processor may be a central processing unit (Central Processing Unit, CPU). The processor may also be any other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof.
The memory is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and units, such as corresponding program units in the above-described method embodiments of the invention. The processor executes the various functional applications of the processor and the processing of the composition data by running non-transitory software programs, instructions and modules stored in the memory, i.e., implementing the methods of the method embodiments described above.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory, which when executed by the processor, performs the method in the above embodiments.
The details of the computer device may be correspondingly understood by referring to the corresponding relevant descriptions and effects in the above embodiments, and will not be repeated here.
To achieve the above object, according to another aspect of the present application, there is also provided a computer-readable storage medium storing a computer program which, when executed in a computer processor, implements the steps in the above-described transaction authentication method based on elliptic curve cryptography algorithm. It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (RandomAccessMemory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
To achieve the above object, according to another aspect of the present application, there is also provided a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the above-described transaction authentication method based on elliptic curve cryptography algorithm.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a memory device for execution by the computing devices, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A transaction authentication method based on elliptic curve cryptography algorithm, the method comprising:
acquiring a digital certificate verification request sent by a first user, wherein the digital certificate verification request comprises a digital certificate of a second user, when the second user carries out a transaction with the first user, the second user sends the digital certificate to the first user, the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate comprises a signature of the authentication center;
the digital certificate is verified by verifying the validity of the signature in the digital certificate, and a verification result is generated.
2. The elliptic curve cryptography algorithm-based transaction verification method of claim 1, further comprising:
receiving a digital certificate application of the second user, wherein the digital certificate application comprises: personal identity information of the second user and a public key of the second user;
generating a signature according to the digital certificate application, a preset elliptic curve encrypted parameter set T and a hash function H, wherein the parameter set T= (p, a, b, G, n, H), p is the domain order, a and b are coefficients of an elliptic curve, G is a base point, n is the base point G order, and H is a remainder factor;
and generating a digital certificate corresponding to the second user according to the signature, the personal identity information and the public key.
3. The transaction authentication method based on elliptic curve cryptography according to claim 2, wherein the generating a signature according to the digital certificate application, a preset elliptic curve encrypted parameter set T and a hash function H specifically includes:
selecting a random number k, wherein 1< k < n;
calculating kg= (x, y), then calculating r=x mod n, and re-calculating r if the calculated r=0;
calculating a message digest e=h (id+ksp), then calculating s=k-1 (e+rk) (mod n), and re-calculating the message digest e if the calculated s=0, wherein ID is the personal identity information, ksp is the public key;
a signature (r, s) is generated.
4. A transaction verification method based on elliptic curve cryptography according to claim 3, wherein the verifying the digital certificate by verifying the validity of a signature in the digital certificate comprises:
verifying whether r and s in the signature are integers between [1, n-1 ];
if not, confirming that the signature is invalid;
if yes, the information abstract e=h (id+ksp) is calculated, and w=s is calculated -1 (mod n), calculate U 1 =ew (mod n), calculate U 2 =rw (mod n), calculate X=U 1 G+U 2 Q=(X 1 ,Y 1 ) And calculating v=x 1 mod n, wherein q=pksp;
if v=r, the signature is confirmed to be valid, and if v+.r, the signature is confirmed to be invalid.
5. The elliptic curve cryptography algorithm-based transaction verification method of claim 1, further comprising:
when the second user carries out transaction with the first user, the second user generates a digital signature according to transaction information, and generates a random symmetric key K according to the digital signature 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 Generating a digital envelope, and transmitting the encrypted information and the digital envelope to the first user;
the first user calculates a symmetric key K according to the digital envelope and the signature private key thereof 1 Using a symmetric key K 1 And decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature.
6. The elliptic curve cryptography algorithm-based transaction verification method according to claim 1, wherein the second user generates a digital signature from transaction information, and generates a random symmetric key K from the digital signature 1 Generating encryption information according to the public signature key and the symmetric key K of the first user 1 The method for generating the digital envelope specifically comprises the following steps:
the second user generates a double abstract e according to the transaction order information OI and the transaction account information PI 1 =h (H (OI) +h (PI)), H being a hash function;
the second user generates a random key pair (K 1 ,X 1 ) Wherein X is 1 =(x 1 ,y 1 ) Then calculate r 1 =x 1 e 1 (mod n),s 1 =K 1 -1 (e 1 +r 1 SS PV )(mod n),Generating a digital signature s= (r) 1 ,s 1 ) Where n is the order of the base point G of elliptic curve encryption, SS PV A private signature key for the second user;
the second user is based on the symmetric key K 1 Encrypting transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user to obtain encryption information D;
the second user generates a random key pair (k ', y '), calculates i=k ' AE PU ,X’=(x’,y’)=k’G,j=x’K 1 Generating a digital envelope E= (i, j), AE PU And G is the base point of elliptic curve encryption for the signature public key of the first user.
7. The elliptic curve cryptography algorithm-based transaction verification method according to claim 6, wherein the first user calculates a symmetric key K from the digital envelope and its own signature private key 1 Using a symmetric key K 1 Decrypting the encrypted information to obtain the digital signature, and further verifying the validity of the digital signature, specifically comprising:
the first user uses his own signature private key AE PV Decrypting the digital envelope E to obtain a symmetric key K ', and then obtaining (x', y ') from the symmetric key K', thereby calculating the symmetric key K 1 =j/x’;
The first user uses a symmetric key K 1 Decrypting the encryption information D to obtain the transaction order information OI, H (PI), a digital signature S and a digital certificate of the second user;
the first user verifies the digital certificate of the second user through an authentication center;
the first user verifies r in the digital signature S 1 Sum s 1 Whether or not they are all [1, n-1]]An integer between;
if not, confirming that the digital signature S is invalid;
if yes, calculate double abstract e 1 =h (H (OI) +h (PI)), w is calculated 1 =s 1 -1 (mod n), calculatingU 3 =e 1 w 1 (mod n), calculate U 4 =r 1 w 1 (mod n), calculate x=u 3 G+U 4 Q=(X 2 ,Y 2 ) And calculating V 1 =X 2 mod n, wherein q=pksp, p being the order of the domain, ksp being the public key of the second user;
if V 1 =r 1 The digital signature S is validated, if V 1 ≠r 1 The digital signature S is confirmed to be invalid.
8. A transaction authentication device based on elliptic curve cryptography algorithm, comprising:
a digital certificate verification request receiving unit, configured to obtain a digital certificate verification request sent by a first user, where the digital certificate verification request includes a digital certificate of a second user, and when the second user performs a transaction with the first user, the second user sends a digital certificate of the second user to the first user, where the digital certificate is generated by an authentication center according to an elliptic curve cryptography algorithm, and the digital certificate includes a signature of the authentication center;
and the digital certificate verification unit is used for verifying the digital certificate by verifying the validity of the signature in the digital certificate and generating a verification result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium having stored thereon a computer program/instruction, which when executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any of claims 1 to 7.
CN202311621241.3A 2023-11-30 2023-11-30 Transaction authentication method and device based on elliptic curve cryptography algorithm Pending CN117611162A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311621241.3A CN117611162A (en) 2023-11-30 2023-11-30 Transaction authentication method and device based on elliptic curve cryptography algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311621241.3A CN117611162A (en) 2023-11-30 2023-11-30 Transaction authentication method and device based on elliptic curve cryptography algorithm

Publications (1)

Publication Number Publication Date
CN117611162A true CN117611162A (en) 2024-02-27

Family

ID=89953143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311621241.3A Pending CN117611162A (en) 2023-11-30 2023-11-30 Transaction authentication method and device based on elliptic curve cryptography algorithm

Country Status (1)

Country Link
CN (1) CN117611162A (en)

Similar Documents

Publication Publication Date Title
CN108667626B (en) Secure two-party collaboration SM2 signature method
US10530585B2 (en) Digital signing by utilizing multiple distinct signing keys, distributed between two parties
CN107483212B (en) Method for generating digital signature by cooperation of two parties
WO2021042685A1 (en) Transaction method, device, and system employing blockchain
CN108173639B (en) Two-party cooperative signature method based on SM9 signature algorithm
CN104539423B (en) A kind of implementation method without CertPubKey cipher system of no Bilinear map computing
CN110247757B (en) Block chain processing method, device and system based on cryptographic algorithm
JP4588874B2 (en) Inherent certificate method
US9705683B2 (en) Verifiable implicit certificates
CN110120939B (en) Encryption method and system capable of repudiation authentication based on heterogeneous system
US9800418B2 (en) Signature protocol
CN110113150B (en) Encryption method and system based on non-certificate environment and capable of repudiation authentication
CN106972924B (en) Method and device for encryption, decryption, electronic signature and verification signature
CN112104453B (en) Anti-quantum computation digital signature system and signature method based on digital certificate
CN106936584B (en) Method for constructing certificateless public key cryptosystem
CN104821880A (en) Certificate-free generalized proxy signcryption method
CN104301108A (en) Signcryption method based from identity environment to certificateless environment
CN110519226B (en) Quantum communication server secret communication method and system based on asymmetric key pool and implicit certificate
CN110545169B (en) Block chain method and system based on asymmetric key pool and implicit certificate
US20150006900A1 (en) Signature protocol
CN113162773A (en) Heterogeneous blind signcryption method capable of proving safety
GB2421410A (en) Generating and Identifier-Based Public / Private key Pair from a Multi-Component Signature
CN114726546A (en) Digital identity authentication method, device, equipment and storage medium
CN110519040B (en) Anti-quantum computation digital signature method and system based on identity
Bindel et al. The need for being explicit: Failed attempts to construct implicit certificates from lattices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination