WO2014135017A1 - Method and system for transactions using smart card having electronic signature function - Google Patents

Method and system for transactions using smart card having electronic signature function Download PDF

Info

Publication number
WO2014135017A1
WO2014135017A1 PCT/CN2014/072527 CN2014072527W WO2014135017A1 WO 2014135017 A1 WO2014135017 A1 WO 2014135017A1 CN 2014072527 W CN2014072527 W CN 2014072527W WO 2014135017 A1 WO2014135017 A1 WO 2014135017A1
Authority
WO
WIPO (PCT)
Prior art keywords
password
smart card
terminal
transaction
message
Prior art date
Application number
PCT/CN2014/072527
Other languages
French (fr)
Chinese (zh)
Inventor
李东声
Original Assignee
天地融科技股份有限公司
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
Priority claimed from CN201310071393.0A external-priority patent/CN103136666B/en
Application filed by 天地融科技股份有限公司 filed Critical 天地融科技股份有限公司
Publication of WO2014135017A1 publication Critical patent/WO2014135017A1/en

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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/341Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
    • 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

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a smart card transaction method and system having an electronic signature function. Background technique
  • Step S101 the user holds the card to access the POS device in a non-contact manner; wherein the non-contact mode can be radio frequency, Bluetooth,
  • Any non-contact method such as NFC.
  • Step S102 The POS machine sends the transaction information to the smart card accessed by the user.
  • the transaction information may include at least an account number and an amount, and may further include transaction detail information.
  • Step S103 the smart card receives the transaction information, displays the transaction information, and after the user confirms that the transaction information is correct, receives the confirmation password input by the user, and signs the transaction information;
  • Step S104 the smart card accesses the POS machine again in a non-contact manner, and sends the signature information to the POS machine.
  • Step S105 The POS machine uploads the transaction information and the signature information to the bank server, so that the bank server executes the transaction according to the transaction information.
  • the existing smart card needs to perform at least two accesses with the POS device in a non-contact manner in the process of signing the transaction information, so that the transaction information and/or the signature information are hijacked during the access process.
  • the problem is that the user is lost and the security is not high.
  • the invention aims to solve the problem that the security of the existing smart card is not high due to the hijacking of transaction information and/or signature information in the multiple access process.
  • Another object of the present invention is to provide a smart card transaction system having an electronic signature function.
  • An aspect of the present invention provides a smart card transaction method with an electronic signature function, the method comprising: A. A smart card access terminal having an electronic signature function, receiving a transaction message; B. The smart card generates a joint password; The smart card generates a signature message according to the transaction message and the joint password; D. The smart card sends at least the signature message to the terminal; E. The terminal acquires a verification password, and verifies the signature.
  • the message and the verification password And after the verification is passed, sending the transaction instruction to the background system server; wherein the verification password is a joint password input through a button of the terminal, or a joint password obtained by scanning, by the terminal, the information displayed by the smart card, or a joint password obtained from the smart card by the terminal in a contactless communication manner; F.
  • the background system server performs a transaction operation according to the transaction instruction.
  • the step C includes: the smart card calculates summary information of the transaction message; the smart card encrypts the joint password to obtain an encrypted joint password; and the summary information and the smart card of the transaction message The encrypted joint password is signed to generate a signature message.
  • the step C includes: the smart card calculates summary information of the transaction message; the smart card encrypts the combination of the joint password and the random number to obtain an encrypted joint password; the smart card pairs the transaction message The summary information is signed with the encrypted joint password to generate a signature message.
  • the smart card further sends the encrypted joint password and the signed message to the terminal.
  • the step C includes: the smart card calculates summary information of the transaction message; the smart card encrypts the joint password to obtain an encrypted joint password, and calculates summary information of the encrypted joint password; the smart card Signing the summary information of the transaction message and the summary information of the encrypted joint password to generate a signature message.
  • the smart card further sends the summary information of the encrypted joint password and the signed message to the terminal.
  • the method further includes: the smart card disconnects from the terminal; the smart card displays the transaction message; the smart card receives input through a button Confirmation password and/or confirmation instruction; the smart card displays the joint password or barcode or picture.
  • An aspect of the present invention provides a smart card transaction method with an electronic signature function, the method comprising: A. A smart card access terminal having an electronic signature function, receiving a transaction message; B. The smart card generates a joint password, and Generating an encrypted joint password according to the joint password; C. The smart card generates a signature message according to the transaction message; D. The smart card sends the encrypted joint password and the signature message to the terminal; E.
  • the terminal obtains a verification password, respectively verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a key input through the terminal a joint password obtained by the terminal scanning the information displayed by the smart card, or a joint password obtained from the smart card by the terminal in a contactless communication manner; F. the background system server according to the The trading order performs a trading operation.
  • the method further includes: the smart card disconnects from the terminal; the smart card displays the transaction message; the smart card receives input through a button Confirmation password and/or confirmation instruction; the smart card displays the joint password or barcode or picture.
  • the encrypting the joint password in the step B to obtain the encrypted joint password may adopt a symmetric encryption or an asymmetric encryption manner.
  • Another aspect of the present invention provides a smart card transaction system with an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function; the smart card access terminal having an electronic signature function, receiving a transaction Generating a combined password, generating a signature message according to the transaction message and the joint password, and transmitting the signature message to the terminal at least; the terminal acquires a verification password, and verifies the signature message and The verification password is sent, and after the verification is passed, the transaction instruction is sent to the background system server; wherein the verification password is a joint password input through a button of the terminal, or the information displayed by the smart card is scanned by the terminal. a joint password, or a joint password obtained from the smart card by the terminal in a contactless communication manner; the background system server performs a transaction operation according to the transaction instruction.
  • the smart card includes: a transceiver module, a password generation module, a signature module, and a display module;
  • the transceiver module is configured to access the terminal, receive a transaction message, and send the message to the signature module;
  • the password generation module is configured to generate Sending a password to the signature module and the display module;
  • the signature module generates a signature message according to the transaction message and the joint password, and sends at least the signature message by using the transceiver module To the terminal.
  • the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal.
  • the transaction message
  • the smart card further includes: a button module; the button module triggers the display module to display the joint password or a barcode or a picture according to the received confirmation password and/or confirmation command.
  • the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
  • the smart card further includes: a graphics generating module; the graphics generating module converts the joint password obtained by the password generating module to generate a barcode or a picture, and outputs the barcode to the display module.
  • the terminal acquires the verification password from the smart card in a contactless communication manner.
  • the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
  • Another aspect of the present invention provides a smart card transaction system with an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function; the smart card access terminal having an electronic signature function, receiving Transmitting a message, generating a joint password, and generating an encrypted joint password according to the joint password, generating a signature message according to the transaction message, and sending the encrypted joint password and the signature message to the terminal;
  • the terminal obtains the verification password, respectively verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a joint password input through a button of the terminal. , Or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner; and the background system server performs a transaction operation according to the transaction instruction.
  • the smart card includes: a transceiver module, a password generation module, an encryption module, a signature module, and a display module;
  • the transceiver module is configured to access a terminal, receive a transaction message, and send the message to the signature module;
  • the cryptographic module is configured to encrypt the joint password to obtain an encrypted joint password, and send the encrypted joint password by using the transceiver module.
  • the signing module generates a signature message according to the transaction message, and sends the signature message to the terminal by using the transceiver module.
  • the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal.
  • the transaction message
  • the smart card further includes: a button module; the button module triggers the display module to display the joint password or a barcode or a picture according to the received confirmation password and/or confirmation command.
  • the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
  • the smart card further includes: a graphics generating module; the graphics generating module converts the joint password obtained by the password generating module to generate a barcode or a picture, and outputs the barcode to the display module.
  • the terminal acquires the verification password from the smart card in a contactless communication manner.
  • the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
  • Another aspect of the present invention provides a smart card transaction system with an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function;
  • the smart card access terminal having the electronic signature function receives the transaction message, generates a joint password, generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal at least;
  • the terminal obtains a verification password, verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a joint password input through a button of the terminal. Or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
  • the backend system server performs a transaction operation in accordance with the transaction instruction.
  • the smart card includes: a transceiver module, a password generation module, and a signature module;
  • the transceiver module is configured to access a terminal, receive a transaction message, and send the message to the signature module;
  • the password generating module is configured to generate a joint password and send the code to the signature module;
  • the signature module generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal by using the transceiver module.
  • the smart card further includes: a display module; the display module is configured to display the joint password.
  • the smart card further includes: a button module; the button module triggers the display module to display the joint password according to the received confirmation password and/or the confirmation command.
  • the smart card further includes: a display module and a graphic generating module; the graphic generating module is configured to generate a barcode or a picture according to the joint password acquired from the password generating module; the display module is configured to display the barcode Or picture.
  • the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal.
  • the transaction message
  • the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
  • the terminal acquires the verification password from the smart card in a contactless communication manner.
  • the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
  • Another aspect of the present invention provides a smart card transaction system with an electronic signature function, characterized in that the system comprises: a terminal, a background system server, and a smart card having an electronic signature function;
  • the smart card access terminal having the electronic signature function receives the transaction message, generates a joint password, generates an encrypted joint password according to the joint password, generates a signature message according to the transaction message, and generates the encrypted joint password. And sending the signature message to the terminal;
  • the verification password is a combination of key input through the terminal a password, or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
  • the backend system server performs a transaction operation in accordance with the transaction instruction.
  • the smart card includes: a transceiver module, a password generation module, an encryption module, and a signature module; the transceiver module is configured to access the terminal, receive the transaction message, and send the message to the signature module;
  • the password generating module is configured to generate a joint password and send the password to the encryption module;
  • the encryption module is configured to encrypt the joint password to obtain an encrypted joint password, and send the encrypted joint password to the terminal by using the transceiver module;
  • the signature module generates a signature message according to the transaction message, and sends the signature message to the terminal by using the transceiver module.
  • the smart card further includes: a display module; the display module is configured to display the joint password.
  • the smart card further includes: a button module; the button module triggers the display module to display the joint password according to the received confirmation password and/or the confirmation command.
  • the smart card further includes: a display module and a graphic generating module; the graphic generating module is configured to generate a barcode or a picture according to the joint password acquired from the password generating module; the display module is configured to display the barcode Or picture.
  • the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal.
  • the transaction message
  • the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
  • the terminal acquires the verification password from the smart card in a contactless communication manner.
  • the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
  • the present invention provides a smart card transaction method with an electronic signature function and a smart card transaction system with an electronic signature function, and completes the data required for the transaction through one access of the smart card and the terminal (for example, the interaction of signature data) reduces the risk of intercepting important information caused by multiple accesses and improves security.
  • the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and the terminal of the present invention may be different. The method obtains the joint password.
  • the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates the joint password by the smart card and performs the joint password Encrypting or signing, ensuring the security of the joint password transmission to the terminal and the accuracy of the terminal verifying the joint password; the terminal of the present invention verifies the signature message according to the joint password after inputting the joint password, and is sent by the terminal after the verification is passed
  • the transaction command is sent to the back-end system server to prevent important data such as signature data from being transmitted through the network, resulting in unsafe hidden dangers and ensuring the security of the transaction.
  • FIG. 1 is a flow chart of a method for an existing electronic signature transaction
  • FIG. 2 is a schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention
  • FIG. 3 is another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention.
  • Embodiment 4 is a flowchart of Embodiment 1 of a smart card transaction method with an electronic signature function according to the present invention
  • FIG. 5 is a flowchart of Embodiment 2 of a smart card transaction method with an electronic signature function according to the present invention
  • FIG. 6 is another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention.
  • FIG. 7 is a schematic structural diagram of still another smart card transaction system with an electronic signature function according to the present invention.
  • FIG. 8 is a flowchart of Embodiment 3 of a smart card transaction method with an electronic signature function according to the present invention
  • FIG. 9 is a flowchart of Embodiment 4 of a smart card transaction method with an electronic signature function according to the present invention.
  • connection In the description of the present invention, it should be noted that the terms “installation”, “connected”, and “connected” are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or connected integrally; can be mechanical or electrical; can be directly connected, or indirectly connected through an intermediate medium, can be the internal communication of the two components.
  • Connected, or connected integrally can be mechanical or electrical; can be directly connected, or indirectly connected through an intermediate medium, can be the internal communication of the two components.
  • the specific meaning of the above terms in the present invention can be understood in a specific case by those skilled in the art.
  • FIG. 2 is a schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention.
  • the structure of the smart card transaction system with electronic signature function of the present invention will now be described with reference to FIG. 2, which is as follows:
  • the smart card transaction system with electronic signature function of the invention comprises: terminal 100, background system server 200 And a smart card 300 with an electronic signature function.
  • the smart card 300 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed using a key, or an integrated chip having the above two chip functions. among them,
  • the smart card 300 with the electronic signature function access terminal 100 receives the transaction message, generates a joint password, generates a signature message according to the transaction message, and sends the joint password and the signature message to the terminal 100;
  • the terminal 100 obtains the verification password, verifies the verification password, and sends the transaction message and the signature message to the background system server 200 after the verification is passed; wherein the verification password is a joint password input through the button of the terminal 100, or through the terminal 100. a joint password obtained by scanning the information displayed by the smart card 30, or a joint password acquired from the smart card 300 by the terminal 100 in a contactless communication manner;
  • the background system server 200 verifies the signature message, and after the verification is passed, performs a transaction operation according to the transaction message.
  • the smart card 30 includes: a transceiver module 3001, a password generation module 3002, and a signature module 3003; in other words, the above-described modules included in the smart card 300 having an electronic signature function may be integrated on one chip or according to the smart card 300. The number and function of the chips used are integrated on multiple chips, and will not be exemplified here.
  • the transceiver module 3001 is configured to access the terminal 100, receive the transaction message and send it to the signature module 3003;
  • the password generating module 3002 is configured to generate a joint password, and send the joint password to the terminal through the transceiver module 3001.
  • the signature module 3003 generates a signature message according to the transaction message, and sends the signature message to the terminal 100 through the transceiver module 3001.
  • the smart card 300 can further include a display module 3004 for displaying the joint password, so that the terminal 100 scans the displayed joint password to obtain the verification password.
  • the joint password input terminal 100 can also be used as the verification password through the button of the terminal 100.
  • the transceiver module 3001 of the smart card 300 of the present invention disconnects the terminal 100 after transmitting the signature message to the terminal 100, so that the display module 3004 displays the transaction message. Therefore, it is ensured that the smart card 300 of the present invention completes the data (signature data) required for transaction only by contacting the terminal 100 once, and reduces the risk of interception of data due to the secondary contact, thereby improving the security of the transaction.
  • the terminal 100 can notify the background system server 20 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
  • the smart card 300 may further include: a button module 3005.
  • the button module 3005 triggers the display module 3004 to display the joint password based on the received confirmation password and/or confirmation command.
  • the smart card 300 may further include: a graphics generation module 3006.
  • the graphics generation module 3006 will generate passwords
  • the joint password obtained by the module 3002 is converted to generate a barcode or a picture.
  • Graphic generation module is adopted in the smart card 300
  • the display module 3004 can be triggered by the button module 3005 to display the barcode or the picture.
  • the user may trigger the display module 3004 to display a joint password or display a barcode or a picture by:
  • the display module 304 displays the joint password, or displays the barcode or picture;
  • the display module 304 displays the joint password, or displays the barcode or picture.
  • the conditions for triggering the display module 3004 to display the joint password or the barcode or the picture may be set for different consumption amounts.
  • the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
  • the transceiver module 3001 of the smart card 300 can also be used to send the joint password acquired from the password generating module 3002 to the terminal 100 in a contactless communication manner, because the manner in which the terminal 100 obtains the verification password is different. In the above two manners, the terminal 300 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
  • the terminal 100 may acquire the verification password from the smart card 30 in a contactless communication manner or acquire the verification password by scanning the barcode or picture displayed by the display module 3004 of the smart card 300.
  • FIG. 3 is a schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. The structure of the smart card transaction system with electronic signature function of the present invention will now be described with reference to FIG. 3, which is as follows:
  • the smart card transaction system with electronic signature function of the present invention comprises: a terminal 10, a background system server 20, and a smart card 30 having an electronic signature function.
  • the smart card 30 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed by a key, or an integrated chip having the above two chip functions. among them,
  • the smart card 30 with the electronic signature function accesses the terminal, receives the transaction message, generates a joint password, generates a signature message according to the transaction message and the joint password, and sends at least the signature message to the terminal 10;
  • the terminal 10 obtains the verification password, verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through the button of the terminal 10, or the smart card is scanned through the terminal 10 a joint password obtained by the information, or a joint password obtained from the smart card by the terminal 10 in a contactless communication manner;
  • the backend system server 20 performs a transaction operation in accordance with the transaction instruction.
  • the smart card 30 includes: a transceiver module 301, a password generation module 302, a signature module 303, and a display module 304; in other words, the above-described modules included in the smart card 30 having an electronic signature function can be integrated on one chip, It can be integrated on multiple chips according to the number and functions of the chips used by the smart card 30, and will not be exemplified herein.
  • the transceiver module 301 is used to access the terminal 10, receive the transaction message and send it to the signature module 303;
  • the password generating module 302 is configured to generate a joint password, and sent to the signature module 303 and the display module 304;
  • the signature module 303 generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal 10 through the transceiver module 301.
  • the transceiver module 301 of the smart card 30 of the present invention disconnects the terminal 10 after transmitting the signature message to the terminal 10, so that the display module 304 displays the transaction message. Therefore, it is ensured that the smart card 30 of the present invention completes the data (signature data) interaction required for the transaction only by contacting the terminal 10 once, and reduces the risk of interception of data due to the second contact, thereby improving the security of the transaction.
  • the terminal 10 can notify the background system server 20 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
  • the smart card 30 may further include: a button module 305.
  • the button module 305 is based on the received confirmation password and
  • the trigger display module 304 displays the joint password.
  • the smart card 30 can also include: a graphics generation module 306.
  • the graphics generation module 306 converts the joint password obtained from the password generation module 302 into a barcode or picture.
  • the display module 304 can be triggered by the button module 305 to display the barcode or picture.
  • the user may trigger the display module 304 to display a joint password or display a barcode or a picture by:
  • the display module 304 displays the joint password, or displays the barcode or picture; or
  • the trigger display module 304 displays the joint password, or displays the barcode or picture; or (3) enter the confirmation password and press the confirm button, after the smart card 30 verifies that the password is correct, the display module
  • the display module 304 displays the joint password, or displays a barcode or picture.
  • the conditions for triggering the display module 304 to display the joint password or the barcode or the picture may be set for different consumption amounts. For example, the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
  • the transceiver module 301 of the smart card 30 can also be configured to send the joint password acquired from the password generating module 302 to the terminal 10 in a contactless communication manner, because the manner in which the terminal 10 obtains the verification password is different.
  • the terminal 30 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
  • the terminal 10 can acquire the verification password from the smart card 30 in a contactless communication manner or acquire the verification password by scanning the barcode or picture displayed by the display module 304 of the smart card 30.
  • the smart card transaction system with electronic signature function of the present invention completes the interaction of data required for transactions through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses and improving security. Sex. Example 1
  • FIG. 4 is a flowchart of Embodiment 1 of the smart card transaction method with electronic signature function according to the present invention.
  • the smart card transaction method with the electronic signature function in this embodiment can be arbitrarily divided according to the structure shown in FIG. 2 or 3, and the method of the present embodiment is all within the scope of the present invention. .
  • the smart card transaction method with the electronic signature function of the present invention will be described below with reference to FIG. 4, which is as follows:
  • the smart card transaction method with the electronic signature function of the present invention includes:
  • Step S301 A smart card access terminal having an electronic signature function, receiving a transaction message
  • the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
  • the smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal.
  • the transaction message includes at least an account and an amount, and may also include transaction details.
  • the smart card can also access the terminal through contact.
  • the smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
  • the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
  • Step S302 The smart card generates a joint password.
  • the smart card randomly generates numbers, letters, and/or symbols, and selects one of numbers, letters, and symbols or Multiple combinations generate a joint password, which can guarantee the uniqueness and randomness of the joint password and improve the security of the joint password.
  • the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition.
  • Step S303 The smart card generates a signature message according to the transaction message and the joint password.
  • the smart card can directly sign the transaction message and the joint password to generate a signature message; or the smart card calculates the summary information of the transaction message, calculates the summary information of the joint password, and summarizes the summary information of the transaction message and the combined password. The information is signed to generate a signature message; or
  • the smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and signs the summary information of the transaction message and the encrypted joint password to generate a signature message;
  • the smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and calculates the summary information of the encrypted joint password, and signs the summary information of the transaction message and the summary information of the encrypted joint password to generate a signature message.
  • the summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
  • the encryption operation can be symmetric encryption or asymmetric encryption.
  • the smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password. Combining the joint password with the random number at this time can prevent replay attacks.
  • the invention can adopt the method of performing summary calculation on the joint password, encrypting the joint password or performing digest calculation on the encrypted joint password, thereby ensuring the security of the joint password transmission; the summary information of the joint password, the encrypted joint password or the encrypted joint password.
  • the summary information is signed to improve the security of the transaction.
  • Step S304 The smart card sends at least the signature message to the terminal.
  • step S303 if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the smart card also sends the encrypted joint password and the signed message to the terminal.
  • step S303 if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the smart card also sends the summary information and the signature message of the encrypted joint password to the terminal.
  • the smart card can send the calculated information to the terminal, so that the terminal subsequently verifies the verification password.
  • Step S305 The terminal obtains the verification password, verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or is displayed by scanning the smart card through the terminal. a joint password for obtaining information, or a joint password obtained from a smart card by a terminal in a contactless communication manner; Specifically, in step S303, if the smart card performs signature according to the joint password and the transaction message, in this step, the terminal verifies the correctness of the signature message according to the transaction message and the verification password, and if the signature is correct, the verification is determined. Both the password and the signed message are verified.
  • step S303 if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the terminal verifies the correctness of the password according to the encrypted joint password verification, and verifies the correctness of the signature message according to the transaction message and the verification password.
  • step S303 if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the terminal verifies the correctness of the verification password according to the summary information of the encrypted joint password, and verifies the signature report according to the transaction message and the verification password. The correctness of the text.
  • the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
  • the terminal can verify the correctness of the verification password and the signature message according to the information or the verification password.
  • the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal acquires the joint password by scanning the information displayed by the smart card, for example, the terminal. Scan the QR code displayed by the smart card or barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, with NFC, optical communication, Bluetooth, infrared Wait for the joint password.
  • the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
  • Step S306 The background system server performs a transaction operation according to the transaction instruction.
  • the background system server may be a bank server or a third-party server
  • the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
  • the terminal of the invention After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted.
  • the important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction.
  • the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways.
  • the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates a joint password and signs by the smart card. To ensure the security of the joint password transmission to the terminal and the accuracy of the terminal to verify the joint password.
  • the smart card transaction method of the present invention is completed, and the transaction is completed by one access of the smart card and the terminal.
  • the interaction of data (such as signature data) reduces the risk of intercepting important information caused by multiple accesses and improves security.
  • Example 2
  • FIG. 5 is a flowchart of Embodiment 2 of the smart card transaction method with electronic signature function according to the present invention.
  • the smart card transaction method with the electronic signature function in this embodiment can be arbitrarily divided according to the structure shown in FIG. 2 or 3, and the method of the present embodiment is all within the scope of the present invention. .
  • the smart card transaction method with the electronic signature function of the present invention will be described below with reference to FIG. 5, which is as follows:
  • the smart card transaction method with the electronic signature function of the present invention includes:
  • Step S401 A smart card access terminal having an electronic signature function, receiving a transaction message
  • the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
  • the smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal.
  • the transaction message includes at least an account and an amount, and may also include transaction details.
  • the smart card can also access the terminal through contact.
  • the smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
  • the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
  • Step S402 The smart card generates a joint password.
  • the smart card randomly generates numbers, letters, and/or symbols, and selects one or more combinations of numbers, letters, and symbols to generate a joint password, which can ensure non-uniqueness of the joint password, randomness, and improve the security of the joint password. Sex.
  • Step S403 The smart card generates a signature message according to the transaction packet and the joint password.
  • the smart card can directly sign the transaction message and the joint password to generate a signature message; or the smart card calculates the summary information of the transaction message, calculates the summary information of the joint password, and summarizes the summary information of the transaction message and the combined password. The information is signed to generate a signature message; or
  • the smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and signs the summary information of the transaction message and the encrypted joint password to generate a signature message;
  • the smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and calculates plus The summary information of the secret combination password, the summary information of the transaction message and the summary information of the encrypted joint password are signed to generate a signature message.
  • the summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
  • the encryption operation can be symmetric encryption or asymmetric encryption.
  • the smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password. Combining the joint password with the random number at this time can prevent replay attacks.
  • the invention can adopt the method of performing summary calculation on the joint password, encrypting the joint password or performing digest calculation on the encrypted joint password, thereby ensuring the security of the joint password transmission; the summary information of the joint password, the encrypted joint password or the encrypted joint password.
  • the summary information is signed to improve the security of the transaction.
  • Step S404 The smart card sends at least the signature message to the terminal.
  • step S403 if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the smart card also sends the encrypted joint password and the signed message to the terminal.
  • step S403 if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the smart card also sends the summary information and the signature message of the encrypted joint password to the terminal.
  • the smart card can send the calculated information to the terminal, so that the terminal subsequently verifies the verification password.
  • Step S405 The smart card disconnects from the terminal.
  • the user can leave the sensing range of the smart card to leave the terminal; in the case of contact mode access, the user can pull out the smart card from the terminal. Disconnecting from the terminal ensures a single contact between the smart card and the terminal, which reduces the risk of intercepting multiple contact information and improves the security of data transmission.
  • Step S406 The smart card displays the transaction message
  • the smart card displays the received transaction message on the display screen, so that the user can confirm the authenticity of the transaction and ensure the security of the transaction.
  • the user can also select the transaction message of the transaction according to the multiple transactions displayed by the smart card on the display screen to ensure that the joint password displayed subsequently is the joint password of the transaction.
  • Step S407 The smart card receives the confirmation password and/or the confirmation command input through the button;
  • the user may trigger the smart card to display the generated joint password or barcode or picture by inputting the confirmation password and/or the operation of the confirmation instruction.
  • a confirmation password to trigger the smart card to display a joint password or barcode or picture
  • the joint password can be prevented from being known by others, and the confidentiality of the joint password can be improved.
  • the user enters the confirmation password on the smart card, and presses the confirmation button, and the smart card's display screen displays the joint password corresponding to the transaction information confirmed by the user.
  • Step S408 The smart card displays a joint password or a barcode or a picture.
  • the smart card displays the joint password or the barcode or the picture, so that the user can know the joint password, so that the user can input the joint password to the terminal through the button of the terminal, or the terminal scans the barcode or the picture to obtain the verification password to complete the transaction.
  • the password entered by the user and the password scanned by the terminal may be referred to as a verification password, and the user inputs the verification password to the terminal to ensure that the subsequent terminal verifies the correctness of the verification password.
  • the smart card can also convert the joint password into a barcode or a two-dimensional code or picture for subsequent terminal access.
  • the joint password plaintext may be encrypted by using a preset symmetric encryption algorithm, and the encrypted joint password is stored in the smart card.
  • the smart card receives the confirmation password and/or confirmation command input by the user through the button, the combined password clear text is decrypted by the preset symmetric encryption algorithm for display.
  • Step S409 The terminal acquires the verification password, verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or is displayed by scanning the smart card through the terminal. a joint password for obtaining information, or a joint password obtained from a smart card by a terminal in a contactless communication manner;
  • step S403 if the smart card performs signature according to the joint password and the transaction message, in this step, the terminal verifies the correctness of the signature message according to the transaction message and the verification password, and if the signature is correct, the verification is determined. Both the password and the signed message are verified.
  • step S403 if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the terminal verifies the correctness of the password according to the encrypted joint password verification, and verifies the correctness of the signed message according to the transaction message and the verification password.
  • step S403 if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the terminal verifies the correctness of the verification password according to the summary information of the encrypted joint password, and verifies the signature report according to the transaction message and the verification password. The correctness of the text.
  • the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
  • the terminal can verify the correctness of the verification password and the signature message according to the information of the smart card or the verification password.
  • the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal scanning the smart card
  • the displayed information obtains the joint password, for example, the terminal scans the QR code displayed by the smart card or the barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, Get the joint password in NFC, optical communication, Bluetooth, infrared, etc.
  • the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
  • Step S410 The background system server performs a transaction operation according to the transaction instruction.
  • the background system server may be a bank server or a third-party server
  • the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
  • the terminal of the invention After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted.
  • the important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction.
  • the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways.
  • the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates a joint password and signs by the smart card. To ensure the security of the joint password transmission to the terminal and the accuracy of the terminal to verify the joint password.
  • FIG. 6 is still another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. Referring now to FIG. 6, the structure of the smart card transaction system with electronic signature function of the present invention will be described as follows:
  • the smart card transaction system with electronic signature function of the present invention comprises: a terminal 400, a background system server 500, and a smart card 600 having an electronic signature function.
  • the smart card 600 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed by a key, or an integrated chip having the above two chip functions. among them,
  • the smart card 600 with the electronic signature function accesses the terminal 400, receives the transaction message, generates a joint password, encrypts the joint password to obtain an encrypted joint password, generates a signature message according to the transaction message, and sends the encrypted joint password and the signed message.
  • the terminal 400 obtains the verification password, verifies the verification password, and sends the transaction message and the signature message to the background system server 500 after the verification is passed; wherein the verification password is a joint password input through the button of the terminal 400, or The joint password obtained by the terminal 400 scanning the information displayed by the smart card 600, or the joint password acquired from the smart card 600 by the terminal 400 in a contactless communication manner;
  • the background system server 500 verifies the signature message, and after the verification is passed, performs a transaction operation according to the transaction message.
  • the smart card 600 includes: a transceiver module 6001, a password generation module 6002, an encryption module 6003, and a signature module 6004;
  • the transceiver module 6001 is configured to access the terminal 400, and receive the transaction message and send it to the signature module 6004.
  • the password generating module 6002 is configured to generate a joint password, and sent to the encryption module 6003;
  • the encryption module 6003 is configured to encrypt the joint password to obtain the encrypted joint password, and send the encrypted joint password to the terminal 400 through the transceiver module 6001;
  • the signature module 6004 generates a signature message according to the transaction message, and sends the signature message to the terminal through the transceiver module 6001.
  • the smart card 600 may further include a display module 6005 for displaying the joint password, so that the terminal 400 scans the displayed joint password to obtain the verification password.
  • the joint password input terminal 400 can also be used as the verification password by the button of the terminal 400.
  • the transceiver module 6001 of the smart card 600 of the present invention disconnects the terminal 400 after transmitting the signature message to the terminal 400, so that the display module 6005 displays the transaction message. Therefore, it is ensured that the smart card 600 of the present invention completes the data (signature data) interaction required for the transaction only by contacting the terminal 400 once, thereby reducing the risk of data being intercepted due to the secondary contact, thereby improving the security of the transaction.
  • the terminal 400 can notify the background system server 500 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
  • the smart card 600 may further include: a button module 6006.
  • the button module 6006 triggers the display module 6005 to display the joint password based on the received confirmation password and/or confirmation command.
  • the smart card 600 may further include: a graphic generating module 6007 that converts the joint password acquired from the password generating module 6002 into a barcode or a picture.
  • a graphic generating module 6007 that converts the joint password acquired from the password generating module 6002 into a barcode or a picture.
  • the display module 6005 can be triggered by the button module 6006 to display the barcode or the picture.
  • the user may trigger the display module 605 to display the joint password or display a barcode or a picture by:
  • the display module 605 displays the joint password or displays the barcode or picture; or
  • the display module 605 displays the joint password, or the barcode or picture.
  • the conditions for triggering the display module 6005 to display the joint password or the barcode or the picture may be set for different consumption amounts.
  • the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
  • the transceiver module 6001 of the smart card 600 can also be used to send the joint password acquired from the password generation module 6002 to the terminal 400 in a contactless communication manner.
  • the terminal 600 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
  • the terminal 400 may acquire the verification password from the smart card 600 in a contactless communication manner or acquire the verification password by scanning the barcode or picture displayed by the display module 6005 of the smart card 600.
  • FIG. 7 is still another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. Referring now to Figure 7, the structure of the smart card transaction system with electronic signature function of the present invention will be described as follows:
  • the smart card transaction system with electronic signature function of the present invention comprises: a terminal 40, a background system server 50, and a smart card 60 having an electronic signature function.
  • the smart card 60 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed by a key, or an integrated chip having the above two chip functions. among them,
  • the smart card 60 with the electronic signature function accesses the terminal 40, receives the transaction message, generates a joint password, and generates an encrypted joint password according to at least the joint password, generates a signature message according to the transaction message, and sends the encrypted joint password and the signature message to the Terminal 40;
  • the terminal 40 obtains the verification password, respectively verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server 50; wherein, the verification password is a joint password input through the button of the terminal 40, or is scanned by the terminal 40. a joint password obtained by the smart card to display the information, or a joint password obtained by the terminal 40 from the smart card in a contactless communication manner;
  • the backend system server 50 performs the transaction operation in accordance with the transaction instruction.
  • the smart card 60 includes: a transceiver module 601, a password generation module 602, and an encryption module 603. Signing module 604 and display module 605;
  • the transceiver module 601 is used for the access terminal 40, receives the transaction message and sends it to the signature module 604;
  • the password generating module 602 is configured to generate a joint password, and sent to the display module 605 and the encryption module 603;
  • the encryption module 603 is configured to encrypt the joint password to obtain the encrypted joint password, and send the encrypted joint password to the terminal 40 through the transceiver module 601;
  • the signature module 604 generates a signature message according to the transaction message, and sends the signature message to the terminal 40 through the transceiver module 601.
  • the transceiver module 601 of the smart card 60 of the present invention disconnects the terminal 40 after transmitting the signature message to the terminal 40, so that the display module 605 displays the transaction message. Therefore, it is ensured that the smart card 60 of the present invention completes the data (signature data) interaction required for the transaction only by contacting the terminal 40 once, thereby reducing the risk of interception of data due to the second contact, thereby improving the security of the transaction.
  • the terminal 40 can notify the background system server 50 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
  • the smart card 60 can also include: a button module 606.
  • the button module 606 triggers the display module 605 to display the joint password based on the received confirmation password and/or confirmation command.
  • the smart card 60 further includes: a graphic generation module 607; the graphic generation module 607 generates a barcode or a picture based on the joint password acquired from the password generation module 602.
  • the display module 605 can be triggered by the button module 606 to display the barcode or picture.
  • the user may trigger the display module 605 to display the joint password or display a barcode or a picture by:
  • the display module 605 displays the joint password, or displays the barcode or picture; or
  • the trigger display module 605 displays the joint password, or displays the barcode or picture;
  • the display module 605 displays the joint password or displays the barcode or picture.
  • the conditions for triggering the display module 605 to display the joint password or the barcode or the picture may be set for different consumption amounts.
  • the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
  • the transceiver module 601 of the smart card 60 can also be used to send the joint password acquired from the password generating module 602 to the terminal 40 in a contactless communication manner, because the manner in which the terminal 40 obtains the verification password is different. In the above two manners, the terminal 60 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
  • the terminal 40 can receive the smart card in a contactless communication manner.
  • 60 Acquire a verification password or obtain a verification password by scanning a barcode or a picture displayed by the display module 605 of the smart card 60.
  • the smart card transaction system with electronic signature function of the present invention completes the interaction of data required for transactions through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses and improving security. Sex. Example 3
  • FIG. 8 is a flowchart of Embodiment 3 of the smart card transaction method with electronic signature function according to the present invention.
  • the smart card transaction method with the electronic signature function in this embodiment can also arbitrarily divide the structure thereof, as long as the method of the present embodiment belongs to the scope claimed by the present invention. .
  • the smart card transaction method with the electronic signature function of the present invention includes:
  • Step S601 A smart card access terminal having an electronic signature function, receiving a transaction message
  • the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
  • the smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal.
  • the transaction message includes at least an account and an amount, and may also include transaction details.
  • the smart card can also access the terminal through contact.
  • the smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
  • the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
  • Step S602 The smart card generates a joint password, and generates an encrypted joint password according to at least the joint password. Specifically, the smart card randomly generates numbers, letters, and/or symbols, and selects one or more combinations of numbers, letters, and symbols to generate a joint password. , can guarantee the non-uniqueness of the joint password, randomness, and improve the security of the joint password.
  • the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition.
  • the encryption operation can be symmetric encryption or asymmetric encryption. among them:
  • the smart card can directly encrypt the joint password to generate an encrypted joint password
  • the smart card calculates the summary information of the joint password, and uses the summary information as the encrypted joint password; or
  • the smart card calculates summary information of the joint password, encrypts the summary information of the joint password, and generates an encrypted joint secret. Code; or
  • the smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password.
  • the combination of the joint password and the random number can prevent the replay attack and further improve the security of the joint password transmission.
  • the summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
  • the smart card and the terminal use the same encryption key, which facilitates the terminal to verify the joint password.
  • the smart card can be encrypted using the public key of the terminal or encrypted with the private key of the smart card.
  • Step S603 The smart card generates a signature message according to the transaction packet.
  • the smart card can directly sign the transaction message to generate a signature message;
  • the smart card calculates the summary information of the transaction message, and signs the summary information of the transaction message to generate a signature message.
  • the summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
  • Step S604 The smart card sends the encrypted joint password and the signed message to the terminal.
  • the smart card may send the encrypted joint password and the signed message to the terminal, so that the terminal subsequently verifies the verification password.
  • Step S605 The terminal obtains the verification password, respectively verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or the smart card is scanned through the terminal. a joint password obtained by the displayed information, or a joint password obtained from the smart card by the terminal in a contactless communication manner;
  • the terminal can verify the correctness of the signature message according to the transaction message and the verification password. If the signature is correct, it is determined that the verification password and the signature message are verified.
  • the terminal can also verify the correctness of the password according to the encrypted joint password verification, and verify the correctness of the signed message according to the transaction message and the verification password.
  • the terminal may also verify the correctness of the verification password according to the summary information of the encrypted joint password, and verify the correctness of the signature message according to the transaction message and the verification password.
  • the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
  • the smart card obtains the encrypted joint password and the calculated signature message, and the terminal can verify the correctness of the verification password and the signature message according to the information or the verification password.
  • the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal acquires the joint password by scanning the information displayed by the smart card, for example, the terminal. Scan the QR code displayed by the smart card or barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, with NFC, optical communication, Bluetooth, infrared Wait for the joint password.
  • the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
  • Step S606 The background system server performs a transaction operation according to the transaction instruction.
  • the background system server may be a bank server or a third-party server
  • the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
  • the terminal of the invention After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted.
  • the important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction.
  • the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways.
  • the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates a joint password by the smart card, and The joint password is encrypted to ensure the security of the joint password transmission to the terminal and the accuracy of the terminal verification joint password.
  • the smart card transaction method of the present invention completes the interaction of data required for transaction (such as signature data) through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses, and improving the risk. safety.
  • data required for transaction such as signature data
  • FIG. 9 is a flowchart of Embodiment 4 of the smart card transaction method with electronic signature function according to the present invention.
  • the smart card transaction method with the electronic signature function in this embodiment can also arbitrarily divide the structure thereof, as long as the method of the present embodiment belongs to the scope claimed by the present invention. .
  • the smart card transaction method with the electronic signature function of the present invention will be described below with reference to FIG. 9, which is as follows:
  • the smart card transaction method with the electronic signature function of the present invention includes: Step S701: A smart card access terminal having an electronic signature function, receiving a transaction message;
  • the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
  • the smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal.
  • the transaction message includes at least an account and an amount, and may also include transaction details.
  • the smart card can also access the terminal through contact.
  • the smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
  • the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
  • Step S702 The smart card generates a joint password, and generates an encrypted joint password according to at least the joint password. Specifically, the smart card randomly generates numbers, letters, and/or symbols, and selects one or more combinations of numbers, letters, and symbols to generate a joint password. , can guarantee the non-uniqueness of the joint password, randomness, and improve the security of the joint password.
  • the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition.
  • the encryption operation can be symmetric encryption or asymmetric encryption. among them:
  • the smart card can directly encrypt the joint password to generate an encrypted joint password
  • the smart card calculates the summary information of the joint password, and uses the summary information as the encrypted joint password; or
  • the smart card calculates summary information of the joint password, encrypts the summary information of the joint password, and generates an encrypted joint password;
  • the smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password.
  • the combination of the joint password and the random number can prevent the replay attack and further improve the security of the joint password transmission.
  • the summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
  • the smart card and the terminal use the same encryption key, which facilitates the terminal to verify the joint password.
  • the smart card can be encrypted using the public key of the terminal or encrypted with the private key of the smart card.
  • Step S703 The smart card generates a signature message according to the transaction packet.
  • the smart card can directly sign the transaction message to generate a signature message;
  • the smart card calculates the summary information of the transaction message, and signs the summary information of the transaction message to generate a signature message.
  • the summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, and a MAC address.
  • Step S704 The smart card sends the encrypted joint password and the signed message to the terminal.
  • the smart card may send the encrypted joint password and the signed message to the terminal, so that the terminal subsequently verifies the verification password.
  • Step S705 The smart card disconnects from the terminal
  • the user can leave the sensing range of the smart card to leave the terminal; in the case of contact mode access, the user can pull out the smart card from the terminal. Disconnecting from the terminal ensures a single contact between the smart card and the terminal, which reduces the risk of intercepting multiple contact information and improves the security of data transmission.
  • Step S706 The smart card displays the transaction message
  • the smart card displays the received transaction message on the display screen, so that the user can confirm the authenticity of the transaction and ensure the security of the transaction.
  • the user can also select the transaction message of the transaction according to the multiple transactions displayed by the smart card on the display screen to ensure that the joint password displayed subsequently is the joint password of the transaction.
  • Step S707 The smart card receives the confirmation password and/or the confirmation command input through the button;
  • the user may trigger the smart card to display the generated joint password by inputting the confirmation password and/or the operation of the confirmation instruction.
  • the joint password can be prevented from being known by others, and the confidentiality of the joint password can be improved.
  • the user After the user confirms the transaction or selects the transaction information of the transaction, the user enters the confirmation password on the smart card, presses the confirmation button, and the smart card's display screen displays the joint password corresponding to the transaction information confirmed by the user.
  • Step S708 The smart card displays a joint password or a barcode or a picture
  • the smart card displays the joint password or the barcode or the picture, so that the user can know the joint password, so that the user can input the joint password to the terminal through the button of the terminal, or the terminal scans the barcode or the picture to obtain the verification password to complete the transaction.
  • the password entered by the user and the password scanned by the terminal may be referred to as a verification password, and the user inputs the verification password to the terminal to ensure that the subsequent terminal verifies the correctness of the verification password.
  • the smart card can also convert the joint password into a barcode or a two-dimensional code or picture for subsequent terminal access.
  • the joint password plaintext may be encrypted by using a preset symmetric encryption algorithm, and the encrypted joint password is stored in the smart card.
  • the smart card receives the confirmation password and/or confirmation command input by the user through the button, the preset pair is It is said that the encryption algorithm decrypts the joint password plaintext for display.
  • Step S709 The terminal obtains the verification password, respectively verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or the smart card is scanned through the terminal. a joint password obtained by the displayed information, or a joint password obtained from the smart card by the terminal in a contactless communication manner;
  • the terminal can verify the correctness of the signature message according to the transaction message and the verification password. If the signature is correct, it is determined that the verification password and the signature message are verified.
  • the terminal can also verify the correctness of the password according to the encrypted joint password verification, and verify the correctness of the signed message according to the transaction message and the verification password.
  • the terminal may also verify the correctness of the verification password according to the summary information of the encrypted joint password, and verify the correctness of the signature message according to the transaction message and the verification password.
  • the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
  • the terminal can verify the correctness of the verification password and the signature message according to the information or the verification password.
  • the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal acquires the joint password by scanning the information displayed by the smart card, for example, the terminal. Scan the QR code displayed by the smart card or barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, with NFC, optical communication, Bluetooth, infrared Wait for the joint password.
  • the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
  • Step S710 The background system server performs a transaction operation according to the transaction instruction.
  • the background system server may be a bank server or a third-party server
  • the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
  • the terminal of the invention After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted.
  • the important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction.
  • the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext.
  • the joint password can be obtained in different ways. In the process of obtaining, the joint password (authentication password) can be transmitted in clear text, and will not The security of the account during the transaction process is reduced.
  • the invention generates a joint password by the smart card, and encrypts the joint password, thereby ensuring the security of the joint password transmission to the terminal and the accuracy of the terminal verifying the joint password.
  • the smart card transaction method of the present invention completes the interaction of data required for transaction (such as signature data) through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses, and improving the risk. safety.
  • data required for transaction such as signature data
  • Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process.
  • the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented with any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as separate products, may also be stored in a computer readable storage medium.
  • the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A method and system for transactions using a smart card having an electronic signature function are disclosed. The method comprises: a smart card having an electronic signature function accesses a terminal and receives a transaction message; the smart card generates a joint password; the smart card generates a signature message on the basis of the transaction message and the joint password; the smart card at least sends the signature message to the terminal; the terminal obtains an authentication password, authenticates the signature message and the authentication password, and, upon authentication, sends a transaction command to a background system server, wherein the authentication password is a joint password entered by means of push-keys on the terminal, or is a joint password obtained by means of the terminal scanning information displayed by the smart card, or is a joint password obtained from the smart card by means of the terminal using a non-contact communication mode; and, the background system server executes a transaction operation in accordance with the transaction command.

Description

具有电子签名功能的智能卡交易方法及系统 技术领域  Smart card transaction method and system with electronic signature function
本发明涉及电子技术领域, 尤其涉及一种具有电子签名功能的智能卡交易方法及系 统。 背景技术  The present invention relates to the field of electronic technologies, and in particular, to a smart card transaction method and system having an electronic signature function. Background technique
现今, 刷卡消费已经成为主流。 采用如下流程实现电子签名交易:  Today, credit card spending has become mainstream. The following process is used to implement electronic signature transactions:
步骤 S101 ,用户持卡以非接触方式接入 POS机;其中,非接触方式可以为射频、蓝牙、 Step S101, the user holds the card to access the POS device in a non-contact manner; wherein the non-contact mode can be radio frequency, Bluetooth,
NFC等任意非接触方式。 Any non-contact method such as NFC.
步骤 S102, POS机将交易信息发送至用户接入的智能卡; 其中, 交易信息可以至少包 括帐号和金额, 当然还可以包括交易明细信息。  Step S102: The POS machine sends the transaction information to the smart card accessed by the user. The transaction information may include at least an account number and an amount, and may further include transaction detail information.
步骤 S103, 智能卡接收交易信息, 显示交易信息, 待用户确认交易信息无误后, 接收 用户输入的确认密码, 对交易信息进行签名;  Step S103, the smart card receives the transaction information, displays the transaction information, and after the user confirms that the transaction information is correct, receives the confirmation password input by the user, and signs the transaction information;
步骤 S104, 智能卡再次以非接触方式接入 POS机, 将签名信息发送至 POS机; 步骤 S105, POS机将交易信息和签名信息上传至银行服务器, 以便银行服务器根据交 易信息执行交易。  Step S104, the smart card accesses the POS machine again in a non-contact manner, and sends the signature information to the POS machine. Step S105: The POS machine uploads the transaction information and the signature information to the bank server, so that the bank server executes the transaction according to the transaction information.
由此可见, 现有的智能卡在完成对交易信息进行签名的过程中需要以非接触方式与 POS机进行至少两次接入, 从而会存在接入过程中交易信息和 /或签名信息被劫持的问题, 造成用户损失, 安全性不高。 发明内容  It can be seen that the existing smart card needs to perform at least two accesses with the POS device in a non-contact manner in the process of signing the transaction information, so that the transaction information and/or the signature information are hijacked during the access process. The problem is that the user is lost and the security is not high. Summary of the invention
本发明旨在解决现有智能卡在多次接入过程中交易信息和 /或签名信息被劫持而造成 的安全性不高的问题。  The invention aims to solve the problem that the security of the existing smart card is not high due to the hijacking of transaction information and/or signature information in the multiple access process.
本发明的一个目的在于提供一种具有电子签名功能的智能卡交易方法。  It is an object of the present invention to provide a smart card transaction method having an electronic signature function.
本发明的另一目的在于提供一种具有电子签名功能的智能卡交易系统。  Another object of the present invention is to provide a smart card transaction system having an electronic signature function.
为达到上述目的, 本发明的技术方案具体是这样实现的:  In order to achieve the above object, the technical solution of the present invention is specifically implemented as follows:
本发明一方面提供了一种具有电子签名功能的智能卡交易方法, 所述方法包括: A、 具有电子签名功能的智能卡接入终端, 接收交易报文; B、 所述智能卡生成联合密码; C、 所述智能卡根据所述交易报文和所述联合密码生成签名报文; D、 所述智能卡至少将所述 签名报文发送至所述终端; E、所述终端获取验证密码,验证所述签名报文和所述验证密码, 并在验证通过后, 发送交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端 的按键输入的联合密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或 通过所述终端以非接触通讯方式从所述智能卡获取的联合密码; F、所述后台系统服务器根 据所述交易指令执行交易操作。 An aspect of the present invention provides a smart card transaction method with an electronic signature function, the method comprising: A. A smart card access terminal having an electronic signature function, receiving a transaction message; B. The smart card generates a joint password; The smart card generates a signature message according to the transaction message and the joint password; D. The smart card sends at least the signature message to the terminal; E. The terminal acquires a verification password, and verifies the signature. The message and the verification password, And after the verification is passed, sending the transaction instruction to the background system server; wherein the verification password is a joint password input through a button of the terminal, or a joint password obtained by scanning, by the terminal, the information displayed by the smart card, or a joint password obtained from the smart card by the terminal in a contactless communication manner; F. The background system server performs a transaction operation according to the transaction instruction.
此外, 所述步骤 C包括: 所述智能卡计算所述交易报文的摘要信息; 所述智能卡对所 述联合密码进行加密获得加密联合密码; 所述智能卡对所述交易报文的摘要信息和所述加 密联合密码进行签名, 生成签名报文。  In addition, the step C includes: the smart card calculates summary information of the transaction message; the smart card encrypts the joint password to obtain an encrypted joint password; and the summary information and the smart card of the transaction message The encrypted joint password is signed to generate a signature message.
此外, 所述步骤 C包括: 所述智能卡计算所述交易报文的摘要信息; 所述智能卡对所 述联合密码以及随机数的组合进行加密获得加密联合密码; 所述智能卡对所述交易报文的 摘要信息和所述加密联合密码进行签名, 生成签名报文。  In addition, the step C includes: the smart card calculates summary information of the transaction message; the smart card encrypts the combination of the joint password and the random number to obtain an encrypted joint password; the smart card pairs the transaction message The summary information is signed with the encrypted joint password to generate a signature message.
此外, 所述步骤 D中, 所述智能卡还将所述加密联合密码和所述签名报文发送至所述 终端。  In addition, in the step D, the smart card further sends the encrypted joint password and the signed message to the terminal.
此外, 所述步骤 C包括: 所述智能卡计算所述交易报文的摘要信息; 所述智能卡对所 述联合密码进行加密获得加密联合密码, 并计算所述加密联合密码的摘要信息; 所述智能 卡对所述交易报文的摘要信息和所述加密联合密码的摘要信息进行签名, 生成签名报文。  In addition, the step C includes: the smart card calculates summary information of the transaction message; the smart card encrypts the joint password to obtain an encrypted joint password, and calculates summary information of the encrypted joint password; the smart card Signing the summary information of the transaction message and the summary information of the encrypted joint password to generate a signature message.
此外, 所述步骤 D中, 所述智能卡还将所述加密联合密码的摘要信息和所述签名报文 发送至所述终端。  In addition, in the step D, the smart card further sends the summary information of the encrypted joint password and the signed message to the terminal.
此外, 在所述步骤 D和所述步骤 E之间, 所述方法还包括: 所述智能卡断开与所述终 端的连接; 所述智能卡显示所述交易报文; 所述智能卡接收通过按键输入的确认密码和 /或 确认指令; 所述智能卡显示所述联合密码或条形码或图片。  In addition, between the step D and the step E, the method further includes: the smart card disconnects from the terminal; the smart card displays the transaction message; the smart card receives input through a button Confirmation password and/or confirmation instruction; the smart card displays the joint password or barcode or picture.
本发明一方面还提供了一种具有电子签名功能的智能卡交易方法, 所述方法包括: A、 具有电子签名功能的智能卡接入终端, 接收交易报文; B、所述智能卡生成联合密码, 并至 少根据所述联合密码生成加密联合密码; C、 所述智能卡根据所述交易报文生成签名报文; D、 所述智能卡将所述加密联合密码和所述签名报文发送至所述终端; E、 所述终端获取验 证密码, 分别验证所述签名报文和所述验证密码, 并在验证通过后, 发送交易指令至后台 系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合密码, 或通过所述终 端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非接触通讯方式从所述 智能卡获取的联合密码; F、 所述后台系统服务器根据所述交易指令执行交易操作。  An aspect of the present invention provides a smart card transaction method with an electronic signature function, the method comprising: A. A smart card access terminal having an electronic signature function, receiving a transaction message; B. The smart card generates a joint password, and Generating an encrypted joint password according to the joint password; C. The smart card generates a signature message according to the transaction message; D. The smart card sends the encrypted joint password and the signature message to the terminal; E. The terminal obtains a verification password, respectively verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a key input through the terminal a joint password obtained by the terminal scanning the information displayed by the smart card, or a joint password obtained from the smart card by the terminal in a contactless communication manner; F. the background system server according to the The trading order performs a trading operation.
此外, 在所述步骤 D和所述步骤 E之间, 所述方法还包括: 所述智能卡断开与所述终 端的连接; 所述智能卡显示所述交易报文; 所述智能卡接收通过按键输入的确认密码和 /或 确认指令; 所述智能卡显示所述联合密码或条形码或图片。 此外, 所述步骤 B中对所述联合密码进行加密获得加密联合密码可以采用对称加密或 者非对称加密方式。 In addition, between the step D and the step E, the method further includes: the smart card disconnects from the terminal; the smart card displays the transaction message; the smart card receives input through a button Confirmation password and/or confirmation instruction; the smart card displays the joint password or barcode or picture. In addition, the encrypting the joint password in the step B to obtain the encrypted joint password may adopt a symmetric encryption or an asymmetric encryption manner.
本发明另一方面提供了一种具有电子签名功能的智能卡交易系统, 所述系统包括: 终 端、 后台系统服务器以及具有电子签名功能的智能卡; 所述具有电子签名功能的智能卡接 入终端, 接收交易报文, 生成联合密码, 根据所述交易报文和所述联合密码生成签名报文, 至少将所述签名报文发送至所述终端; 所述终端获取验证密码, 验证所述签名报文和所述 验证密码, 并在验证通过后, 发送交易指令至后台系统服务器; 其中, 所述验证密码为通 过所述终端的按键输入的联合密码, 或通过所述终端扫描所述智能卡显示的信息获取的联 合密码, 或通过所述终端以非接触通讯方式从所述智能卡获取的联合密码; 所述后台系统 服务器根据所述交易指令执行交易操作。  Another aspect of the present invention provides a smart card transaction system with an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function; the smart card access terminal having an electronic signature function, receiving a transaction Generating a combined password, generating a signature message according to the transaction message and the joint password, and transmitting the signature message to the terminal at least; the terminal acquires a verification password, and verifies the signature message and The verification password is sent, and after the verification is passed, the transaction instruction is sent to the background system server; wherein the verification password is a joint password input through a button of the terminal, or the information displayed by the smart card is scanned by the terminal. a joint password, or a joint password obtained from the smart card by the terminal in a contactless communication manner; the background system server performs a transaction operation according to the transaction instruction.
此外, 所述智能卡包括: 收发模块, 密码生成模块, 签名模块和显示模块; 所述收发 模块用于接入终端, 接收交易报文并发送至所述签名模块; 所述密码生成模块用于生成联 合密码, 并发送至所述签名模块和所述显示模块; 所述签名模块根据所述交易报文和所述 联合密码生成签名报文, 并通过所述收发模块至少将所述签名报文发送至所述终端。  In addition, the smart card includes: a transceiver module, a password generation module, a signature module, and a display module; the transceiver module is configured to access the terminal, receive a transaction message, and send the message to the signature module; the password generation module is configured to generate Sending a password to the signature module and the display module; the signature module generates a signature message according to the transaction message and the joint password, and sends at least the signature message by using the transceiver module To the terminal.
此外, 所述收发模块在发送所述签名报文至所述终端之后, 还断开与所述终端的连接; 所述显示模块在所述收发模块断开与所述终端的连接后, 还显示所述交易报文。  In addition, the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal. The transaction message.
此外, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认 指令, 触发所述显示模块显示所述联合密码或条形码或图片。  In addition, the smart card further includes: a button module; the button module triggers the display module to display the joint password or a barcode or a picture according to the received confirmation password and/or confirmation command.
此外, 所述收发模块还用于以非接触通讯方式发送从所述密码生成模块获取的所述联 合密码至所述终端。  In addition, the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
此外, 所述智能卡还包括: 图形生成模块; 所述图形生成模块将从所述密码生成模块 获取的所述联合密码进行转换生成条形码或图片, 并输出至所述显示模块显示。  In addition, the smart card further includes: a graphics generating module; the graphics generating module converts the joint password obtained by the password generating module to generate a barcode or a picture, and outputs the barcode to the display module.
此外, 所述终端以非接触通讯方式从所述智能卡获取所述验证密码。  In addition, the terminal acquires the verification password from the smart card in a contactless communication manner.
此外, 所述终端通过扫描所述智能卡的所述显示模块显示的条形码或图片获取所述验 证密码。  In addition, the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
本发明另一方面还提供了一种具有电子签名功能的智能卡交易系统, 所述系统包括: 终端、 后台系统服务器以及具有电子签名功能的智能卡; 所述具有电子签名功能的智能卡 接入终端, 接收交易报文, 生成联合密码, 并至少根据所述联合密码生成加密联合密码, 根据所述交易报文生成签名报文, 将所述加密联合密码和所述签名报文发送至所述终端; 所述终端获取验证密码, 分别验证所述签名报文和所述验证密码, 并在验证通过后, 发送 交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非接触通 讯方式从所述智能卡获取的联合密码; 所述后台系统服务器根据所述交易指令执行交易操 作。 Another aspect of the present invention provides a smart card transaction system with an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function; the smart card access terminal having an electronic signature function, receiving Transmitting a message, generating a joint password, and generating an encrypted joint password according to the joint password, generating a signature message according to the transaction message, and sending the encrypted joint password and the signature message to the terminal; The terminal obtains the verification password, respectively verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a joint password input through a button of the terminal. , Or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner; and the background system server performs a transaction operation according to the transaction instruction.
此外, 所述智能卡包括: 收发模块、 密码生成模块、 加密模块、 签名模块和显示模块; 所述收发模块用于接入终端, 接收交易报文并发送至所述签名模块; 所述密码生成模块用 于生成联合密码, 并发送至所述显示模块和所述加密模块; 所述加密模块用于对所述联合 密码进行加密获得加密联合密码, 并通过所述收发模块将所述加密联合密码发送至所述终 端; 所述签名模块根据所述交易报文生成签名报文, 并通过所述收发模块将所述签名报文 发送至所述终端。  In addition, the smart card includes: a transceiver module, a password generation module, an encryption module, a signature module, and a display module; the transceiver module is configured to access a terminal, receive a transaction message, and send the message to the signature module; And the cryptographic module is configured to encrypt the joint password to obtain an encrypted joint password, and send the encrypted joint password by using the transceiver module. And the signing module generates a signature message according to the transaction message, and sends the signature message to the terminal by using the transceiver module.
此外, 所述收发模块在发送所述签名报文至所述终端之后, 还断开与所述终端的连接; 所述显示模块在所述收发模块断开与所述终端的连接后, 还显示所述交易报文。  In addition, the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal. The transaction message.
此外, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认 指令, 触发所述显示模块显示所述联合密码或条形码或图片。  In addition, the smart card further includes: a button module; the button module triggers the display module to display the joint password or a barcode or a picture according to the received confirmation password and/or confirmation command.
此外, 所述收发模块还用于以非接触通讯方式发送从所述密码生成模块获取的所述联 合密码至所述终端。  In addition, the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
此外, 所述智能卡还包括: 图形生成模块; 所述图形生成模块将从所述密码生成模块 获取的所述联合密码进行转换生成条形码或图片, 并输出至所述显示模块显示。  In addition, the smart card further includes: a graphics generating module; the graphics generating module converts the joint password obtained by the password generating module to generate a barcode or a picture, and outputs the barcode to the display module.
此外, 所述终端以非接触通讯方式从所述智能卡获取所述验证密码。  In addition, the terminal acquires the verification password from the smart card in a contactless communication manner.
此外, 所述终端通过扫描所述智能卡的所述显示模块显示的条形码或图片获取所述验 证密码。  In addition, the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
本发明另一方面还提供了一种具有电子签名功能的智能卡交易系统, 所述系统包括: 终端、 后台系统服务器以及具有电子签名功能的智能卡;  Another aspect of the present invention provides a smart card transaction system with an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function;
所述具有电子签名功能的智能卡接入终端, 接收交易报文, 生成联合密码, 根据所述 交易报文和所述联合密码生成签名报文, 至少将所述签名报文发送至所述终端;  The smart card access terminal having the electronic signature function receives the transaction message, generates a joint password, generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal at least;
所述终端获取验证密码, 验证所述签名报文和所述验证密码, 并在验证通过后, 发送 交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非接触通 讯方式从所述智能卡获取的联合密码;  The terminal obtains a verification password, verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a joint password input through a button of the terminal. Or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
所述后台系统服务器根据所述交易指令执行交易操作。  The backend system server performs a transaction operation in accordance with the transaction instruction.
此外, 所述智能卡包括: 收发模块, 密码生成模块和签名模块;  In addition, the smart card includes: a transceiver module, a password generation module, and a signature module;
所述收发模块用于接入终端, 接收交易报文并发送至所述签名模块; 所述密码生成模块用于生成联合密码, 并发送至所述签名模块; The transceiver module is configured to access a terminal, receive a transaction message, and send the message to the signature module; The password generating module is configured to generate a joint password and send the code to the signature module;
所述签名模块根据所述交易报文和所述联合密码生成签名报文, 并通过所述收发模块 至少将所述签名报文发送至所述终端。  And the signature module generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal by using the transceiver module.
此外, 所述智能卡还包括: 显示模块; 所述显示模块用于显示所述联合密码。  In addition, the smart card further includes: a display module; the display module is configured to display the joint password.
此外, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认 指令, 触发所述显示模块显示所述联合密码。  In addition, the smart card further includes: a button module; the button module triggers the display module to display the joint password according to the received confirmation password and/or the confirmation command.
此外, 所述智能卡还包括: 显示模块和图形生成模块; 所述图形生成模块用于根据从 所述密码生成模块获取的所述联合密码生成条形码或图片; 所述显示模块用于显示所述条 形码或图片。  In addition, the smart card further includes: a display module and a graphic generating module; the graphic generating module is configured to generate a barcode or a picture according to the joint password acquired from the password generating module; the display module is configured to display the barcode Or picture.
此外, 所述收发模块在发送所述签名报文至所述终端之后, 还断开与所述终端的连接; 所述显示模块在所述收发模块断开与所述终端的连接后, 还显示所述交易报文。  In addition, the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal. The transaction message.
此外, 所述收发模块还用于以非接触通讯方式发送从所述密码生成模块获取的所述联 合密码至所述终端。  In addition, the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
此外, 所述终端以非接触通讯方式从所述智能卡获取所述验证密码。  In addition, the terminal acquires the verification password from the smart card in a contactless communication manner.
此外, 所述终端通过扫描所述智能卡的所述显示模块显示的条形码或图片获取所述验 证密码。  In addition, the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
本发明另一方面还提供了一种具有电子签名功能的智能卡交易系统, 其特征在于, 所 述系统包括: 终端、 后台系统服务器以及具有电子签名功能的智能卡;  Another aspect of the present invention provides a smart card transaction system with an electronic signature function, characterized in that the system comprises: a terminal, a background system server, and a smart card having an electronic signature function;
所述具有电子签名功能的智能卡接入终端, 接收交易报文, 生成联合密码, 并至少根 据所述联合密码生成加密联合密码, 根据所述交易报文生成签名报文, 将所述加密联合密 码和所述签名报文发送至所述终端;  The smart card access terminal having the electronic signature function receives the transaction message, generates a joint password, generates an encrypted joint password according to the joint password, generates a signature message according to the transaction message, and generates the encrypted joint password. And sending the signature message to the terminal;
所述终端获取验证密码, 分别验证所述签名报文和所述验证密码, 并在验证通过后, 发送交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合 密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非 接触通讯方式从所述智能卡获取的联合密码;  And obtaining, by the terminal, the verification password, respectively verifying the signature message and the verification password, and sending the transaction instruction to the background system server after the verification is passed; wherein the verification password is a combination of key input through the terminal a password, or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
所述后台系统服务器根据所述交易指令执行交易操作。  The backend system server performs a transaction operation in accordance with the transaction instruction.
此外, 所述智能卡包括: 收发模块、 密码生成模块、 加密模块和签名模块; 所述收发模块用于接入终端, 接收交易报文并发送至所述签名模块;  In addition, the smart card includes: a transceiver module, a password generation module, an encryption module, and a signature module; the transceiver module is configured to access the terminal, receive the transaction message, and send the message to the signature module;
所述密码生成模块用于生成联合密码, 并发送至所述加密模块;  The password generating module is configured to generate a joint password and send the password to the encryption module;
所述加密模块用于对所述联合密码进行加密获得加密联合密码, 并通过所述收发模块 将所述加密联合密码发送至所述终端; 所述签名模块根据所述交易报文生成签名报文, 并通过所述收发模块将所述签名报文 发送至所述终端。 The encryption module is configured to encrypt the joint password to obtain an encrypted joint password, and send the encrypted joint password to the terminal by using the transceiver module; The signature module generates a signature message according to the transaction message, and sends the signature message to the terminal by using the transceiver module.
此外, 所述智能卡还包括: 显示模块; 所述显示模块用于显示所述联合密码。  In addition, the smart card further includes: a display module; the display module is configured to display the joint password.
此外, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认 指令, 触发所述显示模块显示所述联合密码。  In addition, the smart card further includes: a button module; the button module triggers the display module to display the joint password according to the received confirmation password and/or the confirmation command.
此外, 所述智能卡还包括: 显示模块和图形生成模块; 所述图形生成模块用于根据从 所述密码生成模块获取的所述联合密码生成条形码或图片; 所述显示模块用于显示所述条 形码或图片。  In addition, the smart card further includes: a display module and a graphic generating module; the graphic generating module is configured to generate a barcode or a picture according to the joint password acquired from the password generating module; the display module is configured to display the barcode Or picture.
此外, 所述收发模块在发送所述签名报文至所述终端之后, 还断开与所述终端的连接; 所述显示模块在所述收发模块断开与所述终端的连接后, 还显示所述交易报文。  In addition, the transceiver module further disconnects the terminal after sending the signature message to the terminal; the display module further displays after the transceiver module disconnects from the terminal. The transaction message.
此外, 所述收发模块还用于以非接触通讯方式发送从所述密码生成模块获取的所述联 合密码至所述终端。  In addition, the transceiver module is further configured to send the combined password obtained from the password generating module to the terminal in a contactless communication manner.
此外, 所述终端以非接触通讯方式从所述智能卡获取所述验证密码。  In addition, the terminal acquires the verification password from the smart card in a contactless communication manner.
此外, 所述终端通过扫描所述智能卡的所述显示模块显示的条形码或图片获取所述验 证密码。 由上述本发明提供的技术方案可以看出, 本发明提供了一种具有电子签名功能的智能 卡交易方法和具有电子签名功能的智能卡交易系统, 通过智能卡和终端的一次接入完成交 易所需数据 (例如签名数据) 的交互, 降低了多次接入造成的重要信息被截获的风险, 提 高了安全性。 本发明的联合密码可以是在每次交易时随机生成的数字、 字母和字符的一种 或多种的组合, 不同于现有的交易密码和 OTP必须采用密文进行传输, 本发明终端可以不 同方式获取联合密码, 在获取的过程中, 该联合密码 (验证密码) 可以以明文的形式进行 传输, 并且不会降低交易过程中账户的安全性; 本发明由智能卡生成联合密码并对联合密 码进行加密或者进行签名, 保证联合密码传输至终端的安全性和终端验证联合密码的准确 性; 本发明的终端是在输入了联合密码之后根据联合密码验证签名报文, 并在验证通过后 由终端发送交易指令至后台系统服务器, 防止将签名数据等重要数据通过网络进行传输而 导致不安全的隐患, 保证了交易的安全性。 附图说明  In addition, the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card. It can be seen from the technical solution provided by the present invention that the present invention provides a smart card transaction method with an electronic signature function and a smart card transaction system with an electronic signature function, and completes the data required for the transaction through one access of the smart card and the terminal ( For example, the interaction of signature data) reduces the risk of intercepting important information caused by multiple accesses and improves security. The joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and the terminal of the present invention may be different. The method obtains the joint password. In the process of obtaining, the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates the joint password by the smart card and performs the joint password Encrypting or signing, ensuring the security of the joint password transmission to the terminal and the accuracy of the terminal verifying the joint password; the terminal of the present invention verifies the signature message according to the joint password after inputting the joint password, and is sent by the terminal after the verification is passed The transaction command is sent to the back-end system server to prevent important data such as signature data from being transmitted through the network, resulting in unsafe hidden dangers and ensuring the security of the transaction. DRAWINGS
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例描述中所需要使用的附 图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领 域的普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他附 图。 图 1为现有的电子签名交易的方法流程图; In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without any creative work. 1 is a flow chart of a method for an existing electronic signature transaction;
图 2为本发明具有电子签名功能的智能卡交易系统的一个结构示意图;  2 is a schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention;
图 3为本发明具有电子签名功能的智能卡交易系统的另一个结构示意图;  3 is another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention;
图 4为本发明具有电子签名功能的智能卡交易方法实施例 1的流程图;  4 is a flowchart of Embodiment 1 of a smart card transaction method with an electronic signature function according to the present invention;
图 5为本发明具有电子签名功能的智能卡交易方法实施例 2的流程图;  FIG. 5 is a flowchart of Embodiment 2 of a smart card transaction method with an electronic signature function according to the present invention; FIG.
图 6为本发明具有电子签名功能的智能卡交易系统的又一个结构示意图;  6 is another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention;
图 7为本发明具有电子签名功能的智能卡交易系统的再一个结构示意图;  7 is a schematic structural diagram of still another smart card transaction system with an electronic signature function according to the present invention;
图 8为本发明具有电子签名功能的智能卡交易方法实施例 3的流程图; 图 9为本发明具有电子签名功能的智能卡交易方法实施例 4的流程图。 具体实施方式  FIG. 8 is a flowchart of Embodiment 3 of a smart card transaction method with an electronic signature function according to the present invention; FIG. 9 is a flowchart of Embodiment 4 of a smart card transaction method with an electronic signature function according to the present invention. detailed description
下面结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发 明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例, 都属于本发明的保护范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
在本发明的描述中, 需要理解的是, 术语"中心"、 "纵向"、 "横向"、 "上"、 "下"、 "前"、 "后"、 "左"、 "右"、 "竖直"、 "水平"、 "顶"、 "底"、 "内"、 "外"等指示的方位或位置关系为 基于附图所示的方位或位置关系, 仅是为了便于描述本发明和简化描述, 而不是指示或暗 示所指的装置或元件必须具有特定的方位、 以特定的方位构造和操作, 因此不能理解为对 本发明的限制。 此外, 术语"第一"、 "第二 "仅用于描述目的, 而不能理解为指示或暗示相 对重要性或数量或位置。  In the description of the present invention, it is to be understood that the terms "center", "vertical", "transverse", "upper", "lower", "previous", "rear", "left", "right", " The orientation or positional relationship of the indications of "", "horizon", "top", "bottom", "inside", "outside", etc. is based on the orientation or positional relationship shown in the drawings, only for the convenience of describing the present invention and The simplification of the description is not intended to limit or imply that the device or elements referred to have a particular orientation, construction and operation in a particular orientation. Moreover, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or quantity or location.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语"安装"、"相连"、 "连接 "应做广义理解, 例如, 可以是固定连接, 也可以是可拆卸连接, 或一体地连接; 可 以是机械连接, 也可以是电连接; 可以是直接相连, 也可以通过中间媒介间接相连, 可以 是两个元件内部的连通。 对于本领域的普通技术人员而言, 可以具体情况理解上述术语在 本发明中的具体含义。  In the description of the present invention, it should be noted that the terms "installation", "connected", and "connected" are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or connected integrally; can be mechanical or electrical; can be directly connected, or indirectly connected through an intermediate medium, can be the internal communication of the two components. The specific meaning of the above terms in the present invention can be understood in a specific case by those skilled in the art.
下面将结合附图对本发明实施例作进一步地详细描述。 图 2为本发明具有电子签名功能的智能卡交易系统的一种结构示意图。 现结合图 2, 对本发明具有电子签名功能的智能卡交易系统的结构进行说明, 具体如下:  The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. FIG. 2 is a schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. The structure of the smart card transaction system with electronic signature function of the present invention will now be described with reference to FIG. 2, which is as follows:
本发明的具有电子签名功能的智能卡交易系统包括: 终端 100、 后台系统服务器 200 以及具有电子签名功能的智能卡 300。 智能卡 300为具有电子签名功能的设备, 可以包括 含有用户账户信息的卡芯片和利用密钥进行数字签名的安全芯片, 或者包括具有上述两个 芯片功能的集成芯片。 其中, The smart card transaction system with electronic signature function of the invention comprises: terminal 100, background system server 200 And a smart card 300 with an electronic signature function. The smart card 300 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed using a key, or an integrated chip having the above two chip functions. among them,
具有电子签名功能的智能卡 300接入终端 100, 接收交易报文, 生成联合密码, 根据 交易报文生成签名报文, 将联合密码和签名报文发送至终端 100;  The smart card 300 with the electronic signature function access terminal 100, receives the transaction message, generates a joint password, generates a signature message according to the transaction message, and sends the joint password and the signature message to the terminal 100;
终端 100获取验证密码, 验证验证密码, 并在验证通过后, 将交易报文和签名报文发 送至后台系统服务器 200; 其中, 验证密码为通过终端 100的按键输入的联合密码, 或通 过终端 100扫描智能卡 30显示的信息获取的联合密码,或通过终端 100以非接触通讯方式 从智能卡 300获取的联合密码;  The terminal 100 obtains the verification password, verifies the verification password, and sends the transaction message and the signature message to the background system server 200 after the verification is passed; wherein the verification password is a joint password input through the button of the terminal 100, or through the terminal 100. a joint password obtained by scanning the information displayed by the smart card 30, or a joint password acquired from the smart card 300 by the terminal 100 in a contactless communication manner;
后台系统服务器 200验证签名报文, 并在验证通过后, 根据交易报文执行交易操作。 同时, 基于上述系统, 智能卡 30包括: 收发模块 3001, 密码生成模块 3002和签名模 块 3003;换句话说,具有电子签名功能的智能卡 300包括的上述模块可集成在一个芯片上, 也可根据智能卡 300所采用的芯片的数量和功能, 集成在多个芯片上, 在此就不再一一举 例说明。  The background system server 200 verifies the signature message, and after the verification is passed, performs a transaction operation according to the transaction message. Meanwhile, based on the above system, the smart card 30 includes: a transceiver module 3001, a password generation module 3002, and a signature module 3003; in other words, the above-described modules included in the smart card 300 having an electronic signature function may be integrated on one chip or according to the smart card 300. The number and function of the chips used are integrated on multiple chips, and will not be exemplified here.
收发模块 3001用于接入终端 100, 接收交易报文并发送至签名模块 3003;  The transceiver module 3001 is configured to access the terminal 100, receive the transaction message and send it to the signature module 3003;
密码生成模块 3002用于生成联合密码, 并通过收发模块 3001将联合密码发送至终端 The password generating module 3002 is configured to generate a joint password, and send the joint password to the terminal through the transceiver module 3001.
10; 10;
签名模块 3003根据交易报文生成签名报文, 并通过收发模块 3001将签名报文发送至 终端 100。  The signature module 3003 generates a signature message according to the transaction message, and sends the signature message to the terminal 100 through the transceiver module 3001.
此外, 智能卡 300还可以包括显示模块 3004, 显示模块 304用于显示联合密码, 以便 终端 100扫描显示的联合密码获取验证密码。 当然, 通过显示该联合密码, 还可以通过终 端 100的按键将联合密码输入终端 100作为验证密码。  In addition, the smart card 300 can further include a display module 3004 for displaying the joint password, so that the terminal 100 scans the displayed joint password to obtain the verification password. Of course, by displaying the joint password, the joint password input terminal 100 can also be used as the verification password through the button of the terminal 100.
当然, 在上述结构的基础上, 本发明的智能卡 300的收发模块 3001在发送签名报文至 终端 100之后, 还断开与终端 100的连接, 以便显示模块 3004显示交易报文。 从而保证本 发明的智能卡 300仅与终端 100接触一次便完成了交易所需数据 (签名数据) 交互, 降低 由于二次接触产生数据被截获的风险, 提高了交易的安全性。  Of course, on the basis of the above structure, the transceiver module 3001 of the smart card 300 of the present invention disconnects the terminal 100 after transmitting the signature message to the terminal 100, so that the display module 3004 displays the transaction message. Therefore, it is ensured that the smart card 300 of the present invention completes the data (signature data) required for transaction only by contacting the terminal 100 once, and reduces the risk of interception of data due to the secondary contact, thereby improving the security of the transaction.
当然, 终端 100可以在验证联合密码失败预设次数 (例如 3次) 后, 通知后台系统服 务器 20锁定该智能卡对应的账号以保护用户账户的安全。  Of course, the terminal 100 can notify the background system server 20 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
此外, 智能卡 300还可以包括: 按键模块 3005。 按键模块 3005根据接收到的确认密 码和 /或确认指令, 触发显示模块 3004显示联合密码。  In addition, the smart card 300 may further include: a button module 3005. The button module 3005 triggers the display module 3004 to display the joint password based on the received confirmation password and/or confirmation command.
此外, 智能卡 300还可以包括: 图形生成模块 3006。 图形生成模块 3006将从密码生 成模块 3002获取的联合密码进行转换生成条形码或图片。在智能卡 300采用图形生成模块In addition, the smart card 300 may further include: a graphics generation module 3006. The graphics generation module 3006 will generate passwords The joint password obtained by the module 3002 is converted to generate a barcode or a picture. Graphic generation module is adopted in the smart card 300
3006生成条形码或图片时, 可以通过按键模块 3005触发显示模块 3004显示该条形码或图 片。 When the barcode or picture is generated by the 3006, the display module 3004 can be triggered by the button module 3005 to display the barcode or the picture.
具体的, 例如用户可以通过如下方式触发显示模块 3004显示联合密码、或显示条形码 或图片:  Specifically, for example, the user may trigger the display module 3004 to display a joint password or display a barcode or a picture by:
( 1 )输入确认密码,在智能卡 300验证确认密码正确后,显示模块 304显示联合密码、 或显示条形码或图片; 或者  (1) Entering the confirmation password, after the smart card 300 verifies that the confirmation password is correct, the display module 304 displays the joint password, or displays the barcode or picture; or
(2) 按下确认按键, 触发显示模块 3004显示联合密码、 或显示条形码或图片; 或者 (2) Press the confirmation button to trigger the display module 3004 to display the joint password, or display the barcode or picture; or
( 3 )输入确认密码, 并按下确认按键, 在智能卡 300验证确认密码正确后, 显示模块 304显示联合密码、 或显示条形码或图片。 (3) Enter the confirmation password and press the confirm button. After the smart card 300 verifies that the confirmation password is correct, the display module 304 displays the joint password, or displays the barcode or picture.
当然,可以针对不同的消费金额设置触发显示模块 3004显示联合密码或条形码或图片 的条件, 例如, 小额消费只需要用户按下确认按键, 大额消费需要用户输入确认密码等。  Of course, the conditions for triggering the display module 3004 to display the joint password or the barcode or the picture may be set for different consumption amounts. For example, the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
另外, 由于终端 100获取验证密码的方式不同, 智能卡 300的收发模块 3001还可以用 于以非接触通讯方式发送从密码生成模块 3002获取的联合密码至终端 100。 采用上述两种 方式, 可以方便终端 300获取验证密码, 防止由于验证密码输入错误而导致的锁定智能卡 的问题。  In addition, the transceiver module 3001 of the smart card 300 can also be used to send the joint password acquired from the password generating module 3002 to the terminal 100 in a contactless communication manner, because the manner in which the terminal 100 obtains the verification password is different. In the above two manners, the terminal 300 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
另外, 终端 100为了与智能卡 300匹配接收验证密码, 可以以非接触通讯方式从智能 卡 30获取验证密码或者通过扫描智能卡 300的显示模块 3004显示的条形码或图片获取验 证密码。  In addition, in order to match the smart card 300 to receive the verification password, the terminal 100 may acquire the verification password from the smart card 30 in a contactless communication manner or acquire the verification password by scanning the barcode or picture displayed by the display module 3004 of the smart card 300.
由此可见, 本发明的具有电子签名功能的智能卡交易系统, 通过智能卡和终端的一次 接入完成交易所需数据的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 图 3为本发明具有电子签名功能的智能卡交易系统的一种结构示意图。 现结合图 3, 对本发明具有电子签名功能的智能卡交易系统的结构进行说明, 具体如下:  It can be seen that the smart card transaction system with electronic signature function of the present invention completes the interaction of data required for transactions through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses and improving security. Sex. FIG. 3 is a schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. The structure of the smart card transaction system with electronic signature function of the present invention will now be described with reference to FIG. 3, which is as follows:
本发明的具有电子签名功能的智能卡交易系统包括: 终端 10、 后台系统服务器 20 以 及具有电子签名功能的智能卡 30。 智能卡 30为具有电子签名功能的设备, 可以包括含有 用户账户信息的卡芯片和利用密钥进行数字签名的安全芯片, 或者包括具有上述两个芯片 功能的集成芯片。 其中,  The smart card transaction system with electronic signature function of the present invention comprises: a terminal 10, a background system server 20, and a smart card 30 having an electronic signature function. The smart card 30 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed by a key, or an integrated chip having the above two chip functions. among them,
具有电子签名功能的智能卡 30接入终端, 接收交易报文, 生成联合密码, 根据交易报 文和联合密码生成签名报文, 至少将签名报文发送至终端 10; 终端 10获取验证密码, 验证签名报文和验证密码, 并在验证通过后, 发送交易指令至 后台系统服务器; 其中, 验证密码为通过终端 10 的按键输入的联合密码, 或通过终端 10 扫描智能卡显示的信息获取的联合密码,或通过终端 10以非接触通讯方式从智能卡获取的 联合密码; The smart card 30 with the electronic signature function accesses the terminal, receives the transaction message, generates a joint password, generates a signature message according to the transaction message and the joint password, and sends at least the signature message to the terminal 10; The terminal 10 obtains the verification password, verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through the button of the terminal 10, or the smart card is scanned through the terminal 10 a joint password obtained by the information, or a joint password obtained from the smart card by the terminal 10 in a contactless communication manner;
后台系统服务器 20根据交易指令执行交易操作。  The backend system server 20 performs a transaction operation in accordance with the transaction instruction.
同时, 基于上述系统, 智能卡 30包括: 收发模块 301, 密码生成模块 302, 签名模块 303和显示模块 304; 换句话说, 具有电子签名功能的智能卡 30包括的上述模块可集成在 一个芯片上, 也可根据智能卡 30所采用的芯片的数量和功能, 集成在多个芯片上, 在此就 不在一一举例说明。  Meanwhile, based on the above system, the smart card 30 includes: a transceiver module 301, a password generation module 302, a signature module 303, and a display module 304; in other words, the above-described modules included in the smart card 30 having an electronic signature function can be integrated on one chip, It can be integrated on multiple chips according to the number and functions of the chips used by the smart card 30, and will not be exemplified herein.
收发模块 301用于接入终端 10, 接收交易报文并发送至签名模块 303;  The transceiver module 301 is used to access the terminal 10, receive the transaction message and send it to the signature module 303;
密码生成模块 302用于生成联合密码, 并发送至签名模块 303和显示模块 304;  The password generating module 302 is configured to generate a joint password, and sent to the signature module 303 and the display module 304;
签名模块 303根据交易报文和联合密码生成签名报文, 并通过收发模块 301至少将签 名报文发送至终端 10。  The signature module 303 generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal 10 through the transceiver module 301.
当然, 在上述结构的基础上, 本发明的智能卡 30的收发模块 301在发送签名报文至终 端 10之后, 还断开与终端 10的连接, 以便显示模块 304显示交易报文。 从而保证本发明 的智能卡 30仅与终端 10接触一次便完成了交易所需数据 (签名数据) 交互, 降低由于二 次接触产生数据被截获的风险, 提高了交易的安全性。  Of course, on the basis of the above structure, the transceiver module 301 of the smart card 30 of the present invention disconnects the terminal 10 after transmitting the signature message to the terminal 10, so that the display module 304 displays the transaction message. Therefore, it is ensured that the smart card 30 of the present invention completes the data (signature data) interaction required for the transaction only by contacting the terminal 10 once, and reduces the risk of interception of data due to the second contact, thereby improving the security of the transaction.
当然, 终端 10可以在验证联合密码失败预设次数(例如 3次)后, 通知后台系统服务 器 20锁定该智能卡对应的账号以保护用户账户的安全。  Of course, the terminal 10 can notify the background system server 20 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
此外, 智能卡 30还可以包括: 按键模块 305。 按键模块 305根据接收到的确认密码和 In addition, the smart card 30 may further include: a button module 305. The button module 305 is based on the received confirmation password and
/或确认指令, 触发显示模块 304显示联合密码。 / or confirm the command, the trigger display module 304 displays the joint password.
此外, 智能卡 30还可以包括: 图形生成模块 306。 图形生成模块 306将从密码生成模 块 302获取的联合密码进行转换生成条形码或图片。在智能卡 30采用图形生成模块 306生 成条形码或图片时, 可以通过按键模块 305触发显示模块 304显示该条形码或图片。  In addition, the smart card 30 can also include: a graphics generation module 306. The graphics generation module 306 converts the joint password obtained from the password generation module 302 into a barcode or picture. When the smart card 30 generates a barcode or a picture using the graphic generation module 306, the display module 304 can be triggered by the button module 305 to display the barcode or picture.
具体的, 例如用户可以通过如下方式触发显示模块 304显示联合密码、 或显示条形码 或图片:  Specifically, for example, the user may trigger the display module 304 to display a joint password or display a barcode or a picture by:
( 1 )输入确认密码, 在智能卡 30验证确认密码正确后, 显示模块 304显示联合密码、 或显示条形码或图片; 或者  (1) Enter the confirmation password. After the smart card 30 verifies that the confirmation password is correct, the display module 304 displays the joint password, or displays the barcode or picture; or
(2) 按下确认按键, 触发显示模块 304显示联合密码、 或显示条形码或图片; 或者 ( 3 ) 输入确认密码, 并按下确认按键, 在智能卡 30验证确认密码正确后, 显示模块 (2) Press the confirmation button, the trigger display module 304 displays the joint password, or displays the barcode or picture; or (3) enter the confirmation password and press the confirm button, after the smart card 30 verifies that the password is correct, the display module
304显示联合密码、 或显示条形码或图片。 当然, 可以针对不同的消费金额设置触发显示模块 304显示联合密码或条形码或图片 的条件, 例如, 小额消费只需要用户按下确认按键, 大额消费需要用户输入确认密码等。 304 displays the joint password, or displays a barcode or picture. Of course, the conditions for triggering the display module 304 to display the joint password or the barcode or the picture may be set for different consumption amounts. For example, the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
另外, 由于终端 10获取验证密码的方式不同, 智能卡 30的收发模块 301还可以用于 以非接触通讯方式发送从密码生成模块 302获取的联合密码至终端 10。采用上述两种方式, 可以方便终端 30获取验证密码, 防止由于验证密码输入错误而导致的锁定智能卡的问题。  In addition, the transceiver module 301 of the smart card 30 can also be configured to send the joint password acquired from the password generating module 302 to the terminal 10 in a contactless communication manner, because the manner in which the terminal 10 obtains the verification password is different. By adopting the above two methods, the terminal 30 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
另外, 终端 10为了与智能卡 30匹配接收验证密码, 可以以非接触通讯方式从智能卡 30获取验证密码或者通过扫描智能卡 30的显示模块 304显示的条形码或图片获取验证密 码。  In addition, in order to match the smart card 30 to receive the verification password, the terminal 10 can acquire the verification password from the smart card 30 in a contactless communication manner or acquire the verification password by scanning the barcode or picture displayed by the display module 304 of the smart card 30.
由此可见, 本发明的具有电子签名功能的智能卡交易系统, 通过智能卡和终端的一次 接入完成交易所需数据的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 实施例 1  It can be seen that the smart card transaction system with electronic signature function of the present invention completes the interaction of data required for transactions through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses and improving security. Sex. Example 1
基于图 2或 3所示的具有电子签名功能的智能卡交易系统的结构, 图 4为本发明具有 电子签名功能的智能卡交易方法实施例 1 的流程图。 当然, 本实施例中具有电子签名功能 的智能卡交易方法的除了采用图 2或 3所示的结构外, 还可以任意划分其结构, 只要采用 本实施例的方法均属于本发明所要求保护的范围。  Based on the structure of the smart card transaction system with electronic signature function shown in FIG. 2 or 3, FIG. 4 is a flowchart of Embodiment 1 of the smart card transaction method with electronic signature function according to the present invention. Of course, the smart card transaction method with the electronic signature function in this embodiment can be arbitrarily divided according to the structure shown in FIG. 2 or 3, and the method of the present embodiment is all within the scope of the present invention. .
现结合图 4, 对本发明具有电子签名功能的智能卡交易方法进行说明, 具体如下: 本发明具有电子签名功能的智能卡交易方法包括:  The smart card transaction method with the electronic signature function of the present invention will be described below with reference to FIG. 4, which is as follows: The smart card transaction method with the electronic signature function of the present invention includes:
步骤 S301 : 具有电子签名功能的智能卡接入终端, 接收交易报文;  Step S301: A smart card access terminal having an electronic signature function, receiving a transaction message;
具体的, 在具有电子签名功能的智能卡接入终端之前, 终端可通过手工输入、 网络、 扫描商品信息等方式获取交易报文。  Specifically, before the smart card access terminal having the electronic signature function, the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
智能卡可通过非接触方式接入终端, 接收终端发送的交易报文。 其中, 交易报文至少 包括账户和金额, 还可包括交易明细信息。  The smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal. The transaction message includes at least an account and an amount, and may also include transaction details.
当然, 智能卡也可以通过接触方式接入终端。  Of course, the smart card can also access the terminal through contact.
本发明的智能卡采用非接触方式接入终端较接触方式接入终端具有较高的安全性, 防 止信息被获取。  The smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
另外, 智能卡为具有电子签名功能的设备, 可以包括含有用户账户信息的卡芯片和利 用密钥进行数字签名的安全芯片, 或者包括具有上述两个芯片功能的集成芯片。  Further, the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
步骤 S302: 智能卡生成联合密码;  Step S302: The smart card generates a joint password.
具体的, 智能卡随机地生成数字、 字母和 /或符号, 从数字、 字母和符号中选择一种或 多种组合生成联合密码, 可以保证联合密码的不唯一性, 随机性, 提高联合密码的安全性。 当然, 智能卡还可以将联合密码转换为条形码或者二维码或者图片, 以方便后续获取。 步骤 S303: 智能卡根据交易报文和联合密码生成签名报文; Specifically, the smart card randomly generates numbers, letters, and/or symbols, and selects one of numbers, letters, and symbols or Multiple combinations generate a joint password, which can guarantee the uniqueness and randomness of the joint password and improve the security of the joint password. Of course, the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition. Step S303: The smart card generates a signature message according to the transaction message and the joint password.
具体的, 智能卡可以直接对交易报文和联合密码进行签名, 生成签名报文; 或者 智能卡计算交易报文的摘要信息, 计算联合密码的摘要信息, 对交易报文的摘要信息 和联合密码的摘要信息进行签名, 生成签名报文; 或者  Specifically, the smart card can directly sign the transaction message and the joint password to generate a signature message; or the smart card calculates the summary information of the transaction message, calculates the summary information of the joint password, and summarizes the summary information of the transaction message and the combined password. The information is signed to generate a signature message; or
智能卡计算交易报文的摘要信息, 对联合密码进行加密获得加密联合密码, 对交易报 文的摘要信息和加密联合密码进行签名, 生成签名报文; 或者  The smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and signs the summary information of the transaction message and the encrypted joint password to generate a signature message;
智能卡计算交易报文的摘要信息, 对联合密码进行加密获得加密联合密码, 并计算加 密联合密码的摘要信息, 对交易报文的摘要信息和加密联合密码的摘要信息进行签名, 生 成签名报文。  The smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and calculates the summary information of the encrypted joint password, and signs the summary information of the transaction message and the summary information of the encrypted joint password to generate a signature message.
其中,摘要信息可以包括如下的一种或其组合:通过哈希算法计算的哈希值、通过 MAC 算法计算的 MAC值, 通过对称加密获得的密文本身。  The summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
另外, 加密运算可以为对称加密或者非对称加密。 为了进一步提高联合密码传输的安 全性, 智能卡还可以生成一个随机数, 将联合密码和该随机数按照预设的格式进行组合, 并对组合后的数据进行加密获得加密联合密码。 此时将联合密码和随机数进行组合, 可以 防止重放攻击。  In addition, the encryption operation can be symmetric encryption or asymmetric encryption. In order to further improve the security of the joint password transmission, the smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password. Combining the joint password with the random number at this time can prevent replay attacks.
本发明可以采用通过对联合密码进行摘要计算、 对联合密码进行加密或对加密联合密 码进行摘要计算, 保证了联合密码传输的安全性; 可以对联合密码的摘要信息、 加密联合 密码或加密联合密码的摘要信息进行签名, 提高了交易的安全性。  The invention can adopt the method of performing summary calculation on the joint password, encrypting the joint password or performing digest calculation on the encrypted joint password, thereby ensuring the security of the joint password transmission; the summary information of the joint password, the encrypted joint password or the encrypted joint password. The summary information is signed to improve the security of the transaction.
步骤 S304: 智能卡至少将签名报文发送至终端;  Step S304: The smart card sends at least the signature message to the terminal.
具体的, 在步骤 S303中, 如果采用智能卡计算加密联合密码的方案时, 此步骤中, 智 能卡还将加密联合密码和签名报文发送至终端。  Specifically, in step S303, if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the smart card also sends the encrypted joint password and the signed message to the terminal.
在步骤 S303中, 如果采用智能卡计算加密联合密码的摘要信息的方案时, 此步骤中, 智能卡还将加密联合密码的摘要信息和签名报文发送至终端。  In step S303, if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the smart card also sends the summary information and the signature message of the encrypted joint password to the terminal.
当然, 无论步骤 S303中, 智能卡计算的是何种信息, 智能卡都可以将计算的信息发送 至终端, 以便终端后续对验证密码进行验证。  Of course, no matter what kind of information is calculated by the smart card in step S303, the smart card can send the calculated information to the terminal, so that the terminal subsequently verifies the verification password.
步骤 S305: 终端获取验证密码, 验证签名报文和验证密码, 并在验证通过后, 发送交 易指令至后台系统服务器; 其中, 验证密码为通过终端的按键输入的联合密码, 或通过终 端扫描智能卡显示的信息获取的联合密码, 或通过终端以非接触通讯方式从智能卡获取的 联合密码; 具体的,在步骤 S303中,如果智能卡根据联合密码和交易报文进行签名,则此步骤中, 终端则根据而交易报文和验证密码验证签名报文的正确性, 如果签名正确, 则确定验证密 码和签名报文均通过验证。 Step S305: The terminal obtains the verification password, verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or is displayed by scanning the smart card through the terminal. a joint password for obtaining information, or a joint password obtained from a smart card by a terminal in a contactless communication manner; Specifically, in step S303, if the smart card performs signature according to the joint password and the transaction message, in this step, the terminal verifies the correctness of the signature message according to the transaction message and the verification password, and if the signature is correct, the verification is determined. Both the password and the signed message are verified.
在步骤 S303中, 如果采用智能卡计算加密联合密码的方案时, 此步骤中, 终端则根据 加密联合密码验证验证密码的正确性,并根据交易报文和验证密码验证签名报文的正确性。  In step S303, if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the terminal verifies the correctness of the password according to the encrypted joint password verification, and verifies the correctness of the signature message according to the transaction message and the verification password.
在步骤 S303中, 如果采用智能卡计算加密联合密码的摘要信息的方案时, 此步骤中, 终端则根据加密联合密码的摘要信息验证验证密码的正确性, 并根据交易报文和验证密码 验证签名报文的正确性。  In step S303, if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the terminal verifies the correctness of the verification password according to the summary information of the encrypted joint password, and verifies the signature report according to the transaction message and the verification password. The correctness of the text.
当然, 上述过程中, 终端还可以根据交易报文和加密联合密码或加密联合密码的摘要 信息验证签名报文的正确性。  Of course, in the foregoing process, the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
当然, 无论步骤 S303中, 智能卡在计算签名报文时根据的是何种信息, 终端均可以根 据该信息或者验证密码来验证验证密码和签名报文的正确性。  Of course, no matter what information the smart card is based on when calculating the signature message in step S303, the terminal can verify the correctness of the verification password and the signature message according to the information or the verification password.
另外, 终端可以采用如下方式获取验证密码: 终端接收通过按键输入的信息获取联合 密码, 例如通过从终端的键盘输入验证密码从而获得联合密码; 或终端通过扫描智能卡显 示的信息获取联合密码,例如终端扫描智能卡显示的二维码或者条形码等获取该联合密码; 或终端通过非接触通讯方式从智能卡获取联合密码, 例如可以通过将智能卡放置在终端的 扫描范围内, 以 NFC、 光通讯、 蓝牙、 红外等方式获取联合密码。  In addition, the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal acquires the joint password by scanning the information displayed by the smart card, for example, the terminal. Scan the QR code displayed by the smart card or barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, with NFC, optical communication, Bluetooth, infrared Wait for the joint password.
当然, 在用户执行该操作被代理时, 可以将联合密码告知第三人, 以便第三人将联合 密码输入至终端。  Of course, when the user performs the operation as a proxy, the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
步骤 S306: 后台系统服务器根据交易指令执行交易操作。  Step S306: The background system server performs a transaction operation according to the transaction instruction.
具体的, 后台系统服务器可以为银行服务器或第三方服务器, 第三方服务器为非银行 系统采用的服务器, 比如公交系统所采用的对公交卡进行充值和扣款控制的服务器等。  Specifically, the background system server may be a bank server or a third-party server, and the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
本发明的终端在获取验证密码后, 对验证密码和签名报文进行验证, 并在验证通过后, 才会将交易指令发送至后台系统服务器, 以触发后台系统服务器完成交易, 从而防止将签 名数据等重要数据通过网络进行传输而导致不安全的隐患, 保证了交易的安全性。 另外, 本发明的联合密码可以是在每次交易时随机生成的数字、字母和字符的一种或多种的组合, 不同于现有的交易密码和 OTP必须采用密文进行传输, 本发明终端可以不同方式获取联合 密码, 在获取的过程中, 该联合密码 (验证密码) 可以以明文的形式进行传输, 并且不会 降低交易过程中账户的安全性; 本发明由智能卡生成联合密码并进行签名, 以保证联合密 码传输至终端的安全性和终端验证联合密码的准确性。  After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted. The important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction. In addition, the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways. In the process of obtaining, the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates a joint password and signs by the smart card. To ensure the security of the joint password transmission to the terminal and the accuracy of the terminal to verify the joint password.
由此可见本发明的智能卡交易方法, 通过智能卡和终端的一次接入即完成了交易所需 数据 (例如签名数据) 的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 实施例 2 Thus, the smart card transaction method of the present invention is completed, and the transaction is completed by one access of the smart card and the terminal. The interaction of data (such as signature data) reduces the risk of intercepting important information caused by multiple accesses and improves security. Example 2
基于图 2或 3所示的具有电子签名功能的智能卡交易系统的结构, 图 5为本发明具有 电子签名功能的智能卡交易方法实施例 2的流程图。 当然, 本实施例中具有电子签名功能 的智能卡交易方法的除了采用图 2或 3所示的结构外, 还可以任意划分其结构, 只要采用 本实施例的方法均属于本发明所要求保护的范围。  Based on the structure of the smart card transaction system with electronic signature function shown in FIG. 2 or 3, FIG. 5 is a flowchart of Embodiment 2 of the smart card transaction method with electronic signature function according to the present invention. Of course, the smart card transaction method with the electronic signature function in this embodiment can be arbitrarily divided according to the structure shown in FIG. 2 or 3, and the method of the present embodiment is all within the scope of the present invention. .
现结合图 5, 对本发明具有电子签名功能的智能卡交易方法进行说明, 具体如下: 本发明具有电子签名功能的智能卡交易方法包括:  The smart card transaction method with the electronic signature function of the present invention will be described below with reference to FIG. 5, which is as follows: The smart card transaction method with the electronic signature function of the present invention includes:
步骤 S401 : 具有电子签名功能的智能卡接入终端, 接收交易报文;  Step S401: A smart card access terminal having an electronic signature function, receiving a transaction message;
具体的, 在具有电子签名功能的智能卡接入终端之前, 终端可通过手工输入、 网络、 扫描商品信息等方式获取交易报文。  Specifically, before the smart card access terminal having the electronic signature function, the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
智能卡可通过非接触方式接入终端, 接收终端发送的交易报文。 其中, 交易报文至少 包括账户和金额, 还可包括交易明细信息。  The smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal. The transaction message includes at least an account and an amount, and may also include transaction details.
当然, 智能卡也可以通过接触方式接入终端。  Of course, the smart card can also access the terminal through contact.
本发明的智能卡采用非接触方式接入终端较接触方式接入终端具有较高的安全性, 防 止信息被获取。  The smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
另外, 智能卡为具有电子签名功能的设备, 可以包括含有用户账户信息的卡芯片和利 用密钥进行数字签名的安全芯片, 或者包括具有上述两个芯片功能的集成芯片。  Further, the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
步骤 S402: 智能卡生成联合密码;  Step S402: The smart card generates a joint password.
具体的, 智能卡随机地生成数字、 字母和 /或符号, 从数字、 字母和符号中选择一种或 多种组合生成联合密码, 可以保证联合密码的不唯一性, 随机性, 提高联合密码的安全性。  Specifically, the smart card randomly generates numbers, letters, and/or symbols, and selects one or more combinations of numbers, letters, and symbols to generate a joint password, which can ensure non-uniqueness of the joint password, randomness, and improve the security of the joint password. Sex.
当然, 智能卡还可以将联合密码转换为条形码或者二维码或者图片, 以方便后续获取。 步骤 S403: 智能卡根据交易报文和联合密码生成签名报文;  Of course, the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition. Step S403: The smart card generates a signature message according to the transaction packet and the joint password.
具体的, 智能卡可以直接对交易报文和联合密码进行签名, 生成签名报文; 或者 智能卡计算交易报文的摘要信息, 计算联合密码的摘要信息, 对交易报文的摘要信息 和联合密码的摘要信息进行签名, 生成签名报文; 或者  Specifically, the smart card can directly sign the transaction message and the joint password to generate a signature message; or the smart card calculates the summary information of the transaction message, calculates the summary information of the joint password, and summarizes the summary information of the transaction message and the combined password. The information is signed to generate a signature message; or
智能卡计算交易报文的摘要信息, 对联合密码进行加密获得加密联合密码, 对交易报 文的摘要信息和加密联合密码进行签名, 生成签名报文; 或者  The smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and signs the summary information of the transaction message and the encrypted joint password to generate a signature message;
智能卡计算交易报文的摘要信息, 对联合密码进行加密获得加密联合密码, 并计算加 密联合密码的摘要信息, 对交易报文的摘要信息和加密联合密码的摘要信息进行签名, 生 成签名报文。 The smart card calculates the summary information of the transaction message, encrypts the joint password to obtain the encrypted joint password, and calculates plus The summary information of the secret combination password, the summary information of the transaction message and the summary information of the encrypted joint password are signed to generate a signature message.
其中,摘要信息可以包括如下的一种或其组合:通过哈希算法计算的哈希值、通过 MAC 算法计算的 MAC值, 通过对称加密获得的密文本身。  The summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
另外, 加密运算可以为对称加密或者非对称加密。 为了进一步提高联合密码传输的安 全性, 智能卡还可以生成一个随机数, 将联合密码和该随机数按照预设的格式进行组合, 并对组合后的数据进行加密获得加密联合密码。 此时将联合密码和随机数进行组合, 可以 防止重放攻击。  In addition, the encryption operation can be symmetric encryption or asymmetric encryption. In order to further improve the security of the joint password transmission, the smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password. Combining the joint password with the random number at this time can prevent replay attacks.
本发明可以采用通过对联合密码进行摘要计算、 对联合密码进行加密或对加密联合密 码进行摘要计算, 保证了联合密码传输的安全性; 可以对联合密码的摘要信息、 加密联合 密码或加密联合密码的摘要信息进行签名, 提高了交易的安全性。  The invention can adopt the method of performing summary calculation on the joint password, encrypting the joint password or performing digest calculation on the encrypted joint password, thereby ensuring the security of the joint password transmission; the summary information of the joint password, the encrypted joint password or the encrypted joint password. The summary information is signed to improve the security of the transaction.
步骤 S404: 智能卡至少将签名报文发送至终端;  Step S404: The smart card sends at least the signature message to the terminal.
具体的, 在步骤 S403中, 如果采用智能卡计算加密联合密码的方案时, 此步骤中, 智 能卡还将加密联合密码和签名报文发送至终端。  Specifically, in step S403, if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the smart card also sends the encrypted joint password and the signed message to the terminal.
在步骤 S403中, 如果采用智能卡计算加密联合密码的摘要信息的方案时, 此步骤中, 智能卡还将加密联合密码的摘要信息和签名报文发送至终端。  In step S403, if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the smart card also sends the summary information and the signature message of the encrypted joint password to the terminal.
当然, 无论步骤 S403中, 智能卡计算的是何种信息, 智能卡都可以将计算的信息发送 至终端, 以便终端后续对验证密码进行验证。  Of course, no matter what kind of information is calculated by the smart card in step S403, the smart card can send the calculated information to the terminal, so that the terminal subsequently verifies the verification password.
步骤 S405: 智能卡断开与终端的连接;  Step S405: The smart card disconnects from the terminal.
具体的, 在非接触式方式接入的情况下, 用户持智能卡离开终端的感应范围即可; 在 接触式方式接入的情况下, 用户从终端中拔出智能卡即可。 断开与终端的连接保证了智能 卡与终端的一次接触, 降低了多次接触信息被截获的风险, 提高了数据传输的安全性。  Specifically, in the case of non-contact mode access, the user can leave the sensing range of the smart card to leave the terminal; in the case of contact mode access, the user can pull out the smart card from the terminal. Disconnecting from the terminal ensures a single contact between the smart card and the terminal, which reduces the risk of intercepting multiple contact information and improves the security of data transmission.
步骤 S406: 智能卡显示交易报文;  Step S406: The smart card displays the transaction message;
具体的, 智能卡在显示屏上显示接收到的交易报文, 以便用户确认该交易的真实性, 保证交易的安全。 同时, 用户还可以根据智能卡在显示屏上显示的多个交易中选择本次交 易的交易报文, 以确保后续显示的联合密码为本次交易的联合密码。  Specifically, the smart card displays the received transaction message on the display screen, so that the user can confirm the authenticity of the transaction and ensure the security of the transaction. At the same time, the user can also select the transaction message of the transaction according to the multiple transactions displayed by the smart card on the display screen to ensure that the joint password displayed subsequently is the joint password of the transaction.
步骤 S407: 智能卡接收通过按键输入的确认密码和 /或确认指令;  Step S407: The smart card receives the confirmation password and/or the confirmation command input through the button;
具体的, 用户在确认了交易信息的真实性或者选择了本次交易的交易信息之后, 可以 通过输入确认密码和 /或确认指令的操作, 触发智能卡显示生成的联合密码或条形码或图 片。 通过输入确认密码触发智能卡显示联合密码或条形码或图片可以防止联合密码被他人 获知, 提高联合密码的保密性。 例如, 用户在确认了交易真实或者选择本次交易的交易信息后, 在智能卡上输入确认 密码, 按下确认按键, 智能卡的显示屏上显示出对应用户确认的交易信息的联合密码。 Specifically, after confirming the authenticity of the transaction information or selecting the transaction information of the transaction, the user may trigger the smart card to display the generated joint password or barcode or picture by inputting the confirmation password and/or the operation of the confirmation instruction. By entering a confirmation password to trigger the smart card to display a joint password or barcode or picture, the joint password can be prevented from being known by others, and the confidentiality of the joint password can be improved. For example, after the user confirms the transaction or selects the transaction information of the transaction, the user enters the confirmation password on the smart card, and presses the confirmation button, and the smart card's display screen displays the joint password corresponding to the transaction information confirmed by the user.
步骤 S408: 智能卡显示联合密码或条形码或图片。  Step S408: The smart card displays a joint password or a barcode or a picture.
具体的, 智能卡显示联合密码或条形码或图片, 以便用户可以获知该联合密码, 从而 方便用户将该联合密码通过终端的按键输入至终端, 或者终端扫描条形码或者图片获取验 证密码, 以完成交易, 此时, 用户输入的密码和终端扫描到的密码可以被称为验证密码, 用户输入该验证密码至终端, 保证后续终端对验证密码的正确性进行验证。  Specifically, the smart card displays the joint password or the barcode or the picture, so that the user can know the joint password, so that the user can input the joint password to the terminal through the button of the terminal, or the terminal scans the barcode or the picture to obtain the verification password to complete the transaction. The password entered by the user and the password scanned by the terminal may be referred to as a verification password, and the user inputs the verification password to the terminal to ensure that the subsequent terminal verifies the correctness of the verification password.
当然, 智能卡还可以将联合密码转换为条形码或者二维码或者图片, 以便后续终端获 取。  Of course, the smart card can also convert the joint password into a barcode or a two-dimensional code or picture for subsequent terminal access.
为了进一步提高联合密码的安全性, 防止他人获取联合密码的明文信息, 在步骤 S402 时, 还可以将联合密码明文以预设的对称加密算法进行加密并将加密后的联合密码存储在 智能卡中, 在智能卡接收用户通过按键输入的确认密码和 /或确认指令后, 再以该预设的对 称加密算法解密出联合密码明文进行显示。  In order to further improve the security of the joint password, and prevent others from obtaining the plaintext information of the joint password, in step S402, the joint password plaintext may be encrypted by using a preset symmetric encryption algorithm, and the encrypted joint password is stored in the smart card. After the smart card receives the confirmation password and/or confirmation command input by the user through the button, the combined password clear text is decrypted by the preset symmetric encryption algorithm for display.
步骤 S409: 终端获取验证密码, 验证签名报文和验证密码, 并在验证通过后, 发送交 易指令至后台系统服务器; 其中, 验证密码为通过终端的按键输入的联合密码, 或通过终 端扫描智能卡显示的信息获取的联合密码, 或通过终端以非接触通讯方式从智能卡获取的 联合密码;  Step S409: The terminal acquires the verification password, verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or is displayed by scanning the smart card through the terminal. a joint password for obtaining information, or a joint password obtained from a smart card by a terminal in a contactless communication manner;
具体的,在步骤 S403中,如果智能卡根据联合密码和交易报文进行签名,则此步骤中, 终端则根据而交易报文和验证密码验证签名报文的正确性, 如果签名正确, 则确定验证密 码和签名报文均通过验证。  Specifically, in step S403, if the smart card performs signature according to the joint password and the transaction message, in this step, the terminal verifies the correctness of the signature message according to the transaction message and the verification password, and if the signature is correct, the verification is determined. Both the password and the signed message are verified.
在步骤 S403中, 如果采用智能卡计算加密联合密码的方案时, 此步骤中, 终端则根据 加密联合密码验证验证密码的正确性,并根据交易报文和验证密码验证签名报文的正确性。  In step S403, if the smart card is used to calculate the scheme for encrypting the joint password, in this step, the terminal verifies the correctness of the password according to the encrypted joint password verification, and verifies the correctness of the signed message according to the transaction message and the verification password.
在步骤 S403中, 如果采用智能卡计算加密联合密码的摘要信息的方案时, 此步骤中, 终端则根据加密联合密码的摘要信息验证验证密码的正确性, 并根据交易报文和验证密码 验证签名报文的正确性。  In step S403, if the smart card is used to calculate the scheme for encrypting the summary information of the joint password, in this step, the terminal verifies the correctness of the verification password according to the summary information of the encrypted joint password, and verifies the signature report according to the transaction message and the verification password. The correctness of the text.
当然, 上述过程中, 终端还可以根据交易报文和加密联合密码或加密联合密码的摘要 信息验证签名报文的正确性。  Of course, in the foregoing process, the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
当然, 无论步骤 S403中, 智能卡在计算签名报文时根据的是何种信息, 终端均可以根 据智能卡该信息或者验证密码来验证验证密码和签名报文的正确性。  Of course, regardless of the information according to the smart card in calculating the signature message in step S403, the terminal can verify the correctness of the verification password and the signature message according to the information of the smart card or the verification password.
另外, 终端可以采用如下方式获取验证密码: 终端接收通过按键输入的信息获取联合 密码, 例如通过从终端的键盘输入验证密码从而获得联合密码; 或终端通过扫描智能卡显 示的信息获取联合密码,例如终端扫描智能卡显示的二维码或者条形码等获取该联合密码; 或终端通过非接触通讯方式从智能卡获取联合密码, 例如可以通过将智能卡放置在终端的 扫描范围内, 以 NFC、 光通讯、 蓝牙、 红外等方式获取联合密码。 In addition, the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal scanning the smart card The displayed information obtains the joint password, for example, the terminal scans the QR code displayed by the smart card or the barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, Get the joint password in NFC, optical communication, Bluetooth, infrared, etc.
当然, 在用户执行该操作被代理时, 可以将联合密码告知第三人, 以便第三人将联合 密码输入至终端。  Of course, when the user performs the operation as a proxy, the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
步骤 S410: 后台系统服务器根据交易指令执行交易操作。  Step S410: The background system server performs a transaction operation according to the transaction instruction.
具体的, 后台系统服务器可以为银行服务器或第三方服务器, 第三方服务器为非银行 系统采用的服务器, 比如公交系统所采用的对公交卡进行充值和扣款控制的服务器等。  Specifically, the background system server may be a bank server or a third-party server, and the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
本发明的终端在获取验证密码后, 对验证密码和签名报文进行验证, 并在验证通过后, 才会将交易指令发送至后台系统服务器, 以触发后台系统服务器完成交易, 从而防止将签 名数据等重要数据通过网络进行传输而导致不安全的隐患, 保证了交易的安全性。 另外, 本发明的联合密码可以是在每次交易时随机生成的数字、字母和字符的一种或多种的组合, 不同于现有的交易密码和 OTP必须采用密文进行传输, 本发明终端可以不同方式获取联合 密码, 在获取的过程中, 该联合密码 (验证密码) 可以以明文的形式进行传输, 并且不会 降低交易过程中账户的安全性; 本发明由智能卡生成联合密码并进行签名, 以保证联合密 码传输至终端的安全性和终端验证联合密码的准确性。  After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted. The important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction. In addition, the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways. In the process of obtaining, the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates a joint password and signs by the smart card. To ensure the security of the joint password transmission to the terminal and the accuracy of the terminal to verify the joint password.
由此可见本发明的智能卡交易方法, 通过智能卡和终端的一次接入即完成了交易所需 数据 (例如签名数据) 的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 图 6为本发明具有电子签名功能的智能卡交易系统的又一个结构示意图。 现结合图 6, 对本发明具有电子签名功能的智能卡交易系统的结构进行说明, 具体如下:  It can be seen that the smart card transaction method of the present invention completes the interaction of data required for transaction (such as signature data) through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses, and improving the risk. safety. FIG. 6 is still another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. Referring now to FIG. 6, the structure of the smart card transaction system with electronic signature function of the present invention will be described as follows:
本发明的具有电子签名功能的智能卡交易系统包括: 终端 400、 后台系统服务器 500 以及具有电子签名功能的智能卡 600。 智能卡 600为具有电子签名功能的设备, 可以包括 含有用户账户信息的卡芯片和利用密钥进行数字签名的安全芯片, 或者包括具有上述两个 芯片功能的集成芯片。 其中,  The smart card transaction system with electronic signature function of the present invention comprises: a terminal 400, a background system server 500, and a smart card 600 having an electronic signature function. The smart card 600 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed by a key, or an integrated chip having the above two chip functions. among them,
具有电子签名功能的智能卡 600接入终端 400, 接收交易报文, 生成联合密码, 并对 联合密码进行加密获得加密联合密码, 根据交易报文生成签名报文, 将加密联合密码和签 名报文发送至终端 400;  The smart card 600 with the electronic signature function accesses the terminal 400, receives the transaction message, generates a joint password, encrypts the joint password to obtain an encrypted joint password, generates a signature message according to the transaction message, and sends the encrypted joint password and the signed message. To the terminal 400;
终端 400获取验证密码, 验证验证密码, 并在验证通过后, 将交易报文和签名报文发 送至后台系统服务器 500; 其中, 验证密码为通过终端 400的按键输入的联合密码, 或通 过终端 400扫描智能卡 600显示的信息获取的联合密码, 或通过终端 400以非接触通讯方 式从智能卡 600获取的联合密码; The terminal 400 obtains the verification password, verifies the verification password, and sends the transaction message and the signature message to the background system server 500 after the verification is passed; wherein the verification password is a joint password input through the button of the terminal 400, or The joint password obtained by the terminal 400 scanning the information displayed by the smart card 600, or the joint password acquired from the smart card 600 by the terminal 400 in a contactless communication manner;
后台系统服务器 500验证签名报文, 并在验证通过后, 根据交易报文执行交易操作。 基于上述系统, 智能卡 600包括: 收发模块 6001、密码生成模块 6002、加密模块 6003 和签名模块 6004;  The background system server 500 verifies the signature message, and after the verification is passed, performs a transaction operation according to the transaction message. Based on the above system, the smart card 600 includes: a transceiver module 6001, a password generation module 6002, an encryption module 6003, and a signature module 6004;
收发模块 6001用于接入终端 400, 接收交易报文并发送至签名模块 6004;  The transceiver module 6001 is configured to access the terminal 400, and receive the transaction message and send it to the signature module 6004.
密码生成模块 6002用于生成联合密码, 并发送至加密模块 6003;  The password generating module 6002 is configured to generate a joint password, and sent to the encryption module 6003;
加密模块 6003用于对联合密码进行加密获得加密联合密码, 并通过收发模块 6001将 加密联合密码发送至终端 400;  The encryption module 6003 is configured to encrypt the joint password to obtain the encrypted joint password, and send the encrypted joint password to the terminal 400 through the transceiver module 6001;
签名模块 6004根据交易报文生成签名报文, 并通过收发模块 6001将签名报文发送至 终端。  The signature module 6004 generates a signature message according to the transaction message, and sends the signature message to the terminal through the transceiver module 6001.
此外, 智能卡 600还可以包括显示模块 6005, 显示模块 6005用于显示联合密码, 以 便终端 400扫描显示的联合密码获取验证密码。 当然, 通过显示该联合密码, 还可以通过 终端 400的按键将联合密码输入终端 400作为验证密码。  In addition, the smart card 600 may further include a display module 6005 for displaying the joint password, so that the terminal 400 scans the displayed joint password to obtain the verification password. Of course, by displaying the joint password, the joint password input terminal 400 can also be used as the verification password by the button of the terminal 400.
当然, 在上述结构的基础上, 本发明的智能卡 600的收发模块 6001在发送签名报文至 终端 400之后, 还断开与终端 400的连接, 以便显示模块 6005显示交易报文。 从而保证本 发明的智能卡 600仅与终端 400接触一次便完成了交易所需数据 (签名数据) 交互, 降低 由于二次接触产生数据被截获的风险, 提高了交易的安全性。  Of course, on the basis of the above structure, the transceiver module 6001 of the smart card 600 of the present invention disconnects the terminal 400 after transmitting the signature message to the terminal 400, so that the display module 6005 displays the transaction message. Therefore, it is ensured that the smart card 600 of the present invention completes the data (signature data) interaction required for the transaction only by contacting the terminal 400 once, thereby reducing the risk of data being intercepted due to the secondary contact, thereby improving the security of the transaction.
当然, 终端 400可以在验证联合密码失败预设次数 (例如 3次) 后, 通知后台系统服 务器 500锁定该智能卡对应的账号以保护用户账户的安全。  Of course, the terminal 400 can notify the background system server 500 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
此外, 智能卡 600还可以包括: 按键模块 6006。 按键模块 6006根据接收到的确认密 码和 /或确认指令, 触发显示模块 6005显示联合密码。  In addition, the smart card 600 may further include: a button module 6006. The button module 6006 triggers the display module 6005 to display the joint password based on the received confirmation password and/or confirmation command.
此外, 智能卡 600还可以包括: 图形生成模块 6007, 图形生成模块 6007将从密码生 成模块 6002获取的联合密码进行转换生成条形码或图片。在智能卡 600采用图形生成模块 6007生成条形码或图片时, 可以通过按键模块 6006触发显示模块 6005显示该条形码或图 片。  In addition, the smart card 600 may further include: a graphic generating module 6007 that converts the joint password acquired from the password generating module 6002 into a barcode or a picture. When the smart card 600 generates a barcode or a picture by using the graphic generation module 6007, the display module 6005 can be triggered by the button module 6006 to display the barcode or the picture.
具体的, 例如用户可以通过如下方式触发显示模块 605显示联合密码或者显示条形码 或图片:  Specifically, for example, the user may trigger the display module 605 to display the joint password or display a barcode or a picture by:
( 1 )输入确认密码, 在智能卡 600验证确认密码正确后, 显示模块 605显示联合密码 或者显示条形码或图片; 或者  (1) Enter the confirmation password. After the smart card 600 verifies that the confirmation password is correct, the display module 605 displays the joint password or displays the barcode or picture; or
(2) 按下确认按键, 触发显示模块 6005显示联合密码、 或者显示条形码或图片; 或 者 (2) Press the confirmation button, trigger the display module 6005 to display the joint password, or display the barcode or picture; or By
( 3 )输入确认密码, 并按下确认按键, 在智能卡 600验证确认密码正确后, 显示模块 605显示联合密码、 或者条形码或图片。  (3) Enter the confirmation password and press the confirmation button. After the smart card 600 verifies that the confirmation password is correct, the display module 605 displays the joint password, or the barcode or picture.
当然,可以针对不同的消费金额设置触发显示模块 6005显示联合密码或条形码或图片 的条件, 例如, 小额消费只需要用户按下确认按键, 大额消费需要用户输入确认密码等。  Of course, the conditions for triggering the display module 6005 to display the joint password or the barcode or the picture may be set for different consumption amounts. For example, the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
另外, 由于终端 400获取验证密码的方式不同, 智能卡 600的收发模块 6001还可以用 于以非接触通讯方式发送从密码生成模块 6002获取的联合密码至终端 400。 采用上述两种 方式, 可以方便终端 600获取验证密码, 防止由于验证密码输入错误而导致的锁定智能卡 的问题。  In addition, because the manner in which the terminal 400 obtains the verification password is different, the transceiver module 6001 of the smart card 600 can also be used to send the joint password acquired from the password generation module 6002 to the terminal 400 in a contactless communication manner. In the above two manners, the terminal 600 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
另外, 终端 400为了与智能卡 600匹配接收验证密码, 可以以非接触通讯方式从智能 卡 600获取验证密码或者通过扫描智能卡 600的显示模块 6005显示的条形码或图片获取验 证密码。  In addition, in order to match the smart card 600 to receive the verification password, the terminal 400 may acquire the verification password from the smart card 600 in a contactless communication manner or acquire the verification password by scanning the barcode or picture displayed by the display module 6005 of the smart card 600.
由此可见, 本发明的具有电子签名功能的智能卡交易系统, 通过智能卡和终端的一次 接入完成交易所需数据的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 图 7为本发明具有电子签名功能的智能卡交易系统的再一个结构示意图。 现结合图 7, 对本发明具有电子签名功能的智能卡交易系统的结构进行说明, 具体如下:  It can be seen that the smart card transaction system with electronic signature function of the present invention completes the interaction of data required for transactions through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses and improving security. Sex. FIG. 7 is still another schematic structural diagram of a smart card transaction system with an electronic signature function according to the present invention. Referring now to Figure 7, the structure of the smart card transaction system with electronic signature function of the present invention will be described as follows:
本发明的具有电子签名功能的智能卡交易系统包括: 终端 40、 后台系统服务器 50 以 及具有电子签名功能的智能卡 60。 智能卡 60为具有电子签名功能的设备, 可以包括含有 用户账户信息的卡芯片和利用密钥进行数字签名的安全芯片, 或者包括具有上述两个芯片 功能的集成芯片。 其中,  The smart card transaction system with electronic signature function of the present invention comprises: a terminal 40, a background system server 50, and a smart card 60 having an electronic signature function. The smart card 60 is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed by a key, or an integrated chip having the above two chip functions. among them,
具有电子签名功能的智能卡 60接入终端 40, 接收交易报文, 生成联合密码, 并至少 根据联合密码生成加密联合密码, 根据交易报文生成签名报文, 将加密联合密码和签名报 文发送至终端 40;  The smart card 60 with the electronic signature function accesses the terminal 40, receives the transaction message, generates a joint password, and generates an encrypted joint password according to at least the joint password, generates a signature message according to the transaction message, and sends the encrypted joint password and the signature message to the Terminal 40;
终端 40获取验证密码, 分别验证签名报文和验证密码, 并在验证通过后, 发送交易指 令至后台系统服务器 50; 其中, 验证密码为通过终端 40的按键输入的联合密码, 或通过 终端 40扫描智能卡显示的信息获取的联合密码, 或通过终端 40以非接触通讯方式从智能 卡获取的联合密码;  The terminal 40 obtains the verification password, respectively verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server 50; wherein, the verification password is a joint password input through the button of the terminal 40, or is scanned by the terminal 40. a joint password obtained by the smart card to display the information, or a joint password obtained by the terminal 40 from the smart card in a contactless communication manner;
后台系统服务器 50根据交易指令执行交易操作。  The backend system server 50 performs the transaction operation in accordance with the transaction instruction.
基于上述系统, 智能卡 60包括: 收发模块 601、 密码生成模块 602、 加密模块 603、 签名模块 604和显示模块 605; Based on the above system, the smart card 60 includes: a transceiver module 601, a password generation module 602, and an encryption module 603. Signing module 604 and display module 605;
收发模块 601用于接入终端 40, 接收交易报文并发送至签名模块 604;  The transceiver module 601 is used for the access terminal 40, receives the transaction message and sends it to the signature module 604;
密码生成模块 602用于生成联合密码, 并发送至显示模块 605和加密模块 603;  The password generating module 602 is configured to generate a joint password, and sent to the display module 605 and the encryption module 603;
加密模块 603用于对联合密码进行加密获得加密联合密码, 并通过收发模块 601将加 密联合密码发送至终端 40;  The encryption module 603 is configured to encrypt the joint password to obtain the encrypted joint password, and send the encrypted joint password to the terminal 40 through the transceiver module 601;
签名模块 604根据交易报文生成签名报文, 并通过收发模块 601将签名报文发送至终 端 40。  The signature module 604 generates a signature message according to the transaction message, and sends the signature message to the terminal 40 through the transceiver module 601.
当然, 在上述结构的基础上, 本发明的智能卡 60的收发模块 601在发送签名报文至终 端 40之后, 还断开与终端 40的连接, 以便显示模块 605显示交易报文。 从而保证本发明 的智能卡 60仅与终端 40接触一次便完成了交易所需数据 (签名数据) 交互, 降低由于二 次接触产生数据被截获的风险, 提高了交易的安全性。  Of course, on the basis of the above structure, the transceiver module 601 of the smart card 60 of the present invention disconnects the terminal 40 after transmitting the signature message to the terminal 40, so that the display module 605 displays the transaction message. Therefore, it is ensured that the smart card 60 of the present invention completes the data (signature data) interaction required for the transaction only by contacting the terminal 40 once, thereby reducing the risk of interception of data due to the second contact, thereby improving the security of the transaction.
当然, 终端 40可以在验证联合密码失败预设次数(例如 3次)后, 通知后台系统服务 器 50锁定该智能卡对应的账号以保护用户账户的安全。  Of course, the terminal 40 can notify the background system server 50 to lock the account corresponding to the smart card to protect the security of the user account after verifying that the joint password fails a preset number of times (for example, three times).
此外, 智能卡 60还可以包括: 按键模块 606。 按键模块 606根据接收到的确认密码和 /或确认指令, 触发显示模块 605显示联合密码。  In addition, the smart card 60 can also include: a button module 606. The button module 606 triggers the display module 605 to display the joint password based on the received confirmation password and/or confirmation command.
此外, 智能卡 60还包括: 图形生成模块 607; 图形生成模块 607根据从密码生成模块 602获取的联合密码生成条形码或图片。 在智能卡 60采用图形生成模块 607生成条形码或 图片时, 可以通过按键模块 606触发显示模块 605显示该条形码或图片。  Further, the smart card 60 further includes: a graphic generation module 607; the graphic generation module 607 generates a barcode or a picture based on the joint password acquired from the password generation module 602. When the smart card 60 generates a barcode or a picture using the graphic generation module 607, the display module 605 can be triggered by the button module 606 to display the barcode or picture.
具体的, 例如用户可以通过如下方式触发显示模块 605显示联合密码、 或显示条形码 或图片:  Specifically, for example, the user may trigger the display module 605 to display the joint password or display a barcode or a picture by:
( 1 )输入确认密码, 在智能卡 60验证确认密码正确后, 显示模块 605显示联合密码、 或显示条形码或图片; 或者  (1) Enter the confirmation password. After the smart card 60 verifies that the confirmation password is correct, the display module 605 displays the joint password, or displays the barcode or picture; or
(2) 按下确认按键, 触发显示模块 605显示联合密码、 或显示条形码或图片; 或者 (2) Pressing the confirmation button, the trigger display module 605 displays the joint password, or displays the barcode or picture; or
( 3 ) 输入确认密码, 并按下确认按键, 在智能卡 60验证确认密码正确后, 显示模块 605显示联合密码、 或显示条形码或图片。 (3) Enter the confirmation password and press the confirmation button. After the smart card 60 verifies that the confirmation password is correct, the display module 605 displays the joint password or displays the barcode or picture.
当然, 可以针对不同的消费金额设置触发显示模块 605显示联合密码或条形码或图片 的条件, 例如, 小额消费只需要用户按下确认按键, 大额消费需要用户输入确认密码等。  Of course, the conditions for triggering the display module 605 to display the joint password or the barcode or the picture may be set for different consumption amounts. For example, the small amount of consumption only requires the user to press the confirmation button, and the large amount of consumption requires the user to input the confirmation password.
另外, 由于终端 40获取验证密码的方式不同, 智能卡 60的收发模块 601还可以用于 以非接触通讯方式发送从密码生成模块 602获取的联合密码至终端 40。采用上述两种方式, 可以方便终端 60获取验证密码, 防止由于验证密码输入错误而导致的锁定智能卡的问题。  In addition, the transceiver module 601 of the smart card 60 can also be used to send the joint password acquired from the password generating module 602 to the terminal 40 in a contactless communication manner, because the manner in which the terminal 40 obtains the verification password is different. In the above two manners, the terminal 60 can be conveniently obtained to obtain the verification password, and the problem of locking the smart card due to the error of the verification password input is prevented.
另外, 终端 40为了与智能卡 60匹配接收验证密码, 可以以非接触通讯方式从智能卡 60获取验证密码或者通过扫描智能卡 60的显示模块 605显示的条形码或图片获取验证密 码。 In addition, in order to match the smart card 60 to receive the verification password, the terminal 40 can receive the smart card in a contactless communication manner. 60 Acquire a verification password or obtain a verification password by scanning a barcode or a picture displayed by the display module 605 of the smart card 60.
由此可见, 本发明的具有电子签名功能的智能卡交易系统, 通过智能卡和终端的一次 接入完成交易所需数据的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 实施例 3  It can be seen that the smart card transaction system with electronic signature function of the present invention completes the interaction of data required for transactions through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses and improving security. Sex. Example 3
基于图 6或 Ί所示的具有电子签名功能的智能卡交易系统的结构, 图 8为本发明具有 电子签名功能的智能卡交易方法实施例 3的流程图。 当然, 本实施例中具有电子签名功能 的智能卡交易方法的除了采用图 6或 7所示的结构外, 还可以任意划分其结构, 只要采用 本实施例的方法均属于本发明所要求保护的范围。  Based on the structure of the smart card transaction system with electronic signature function shown in FIG. 6 or FIG. 8, FIG. 8 is a flowchart of Embodiment 3 of the smart card transaction method with electronic signature function according to the present invention. Of course, in addition to adopting the structure shown in FIG. 6 or 7, the smart card transaction method with the electronic signature function in this embodiment can also arbitrarily divide the structure thereof, as long as the method of the present embodiment belongs to the scope claimed by the present invention. .
现结合图 8, 对本发明具有电子签名功能的智能卡交易方法进行说明, 具体如下: 本发明具有电子签名功能的智能卡交易方法包括:  Referring to FIG. 8, the smart card transaction method with the electronic signature function of the present invention will be described as follows: The smart card transaction method with the electronic signature function of the present invention includes:
步骤 S601 : 具有电子签名功能的智能卡接入终端, 接收交易报文;  Step S601: A smart card access terminal having an electronic signature function, receiving a transaction message;
具体的, 在具有电子签名功能的智能卡接入终端之前, 终端可通过手工输入、 网络、 扫描商品信息等方式获取交易报文。  Specifically, before the smart card access terminal having the electronic signature function, the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
智能卡可通过非接触方式接入终端, 接收终端发送的交易报文。 其中, 交易报文至少 包括账户和金额, 还可包括交易明细信息。  The smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal. The transaction message includes at least an account and an amount, and may also include transaction details.
当然, 智能卡也可以通过接触方式接入终端。  Of course, the smart card can also access the terminal through contact.
本发明的智能卡采用非接触方式接入终端较接触方式接入终端具有较高的安全性, 防 止信息被获取。  The smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
另外, 智能卡为具有电子签名功能的设备, 可以包括含有用户账户信息的卡芯片和利 用密钥进行数字签名的安全芯片, 或者包括具有上述两个芯片功能的集成芯片。  Further, the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
步骤 S602: 智能卡生成联合密码, 并至少根据联合密码生成加密联合密码; 具体的, 智能卡随机地生成数字、 字母和 /或符号, 从数字、 字母和符号中选择一种或 多种组合生成联合密码, 可以保证联合密码的不唯一性, 随机性, 提高联合密码的安全性。  Step S602: The smart card generates a joint password, and generates an encrypted joint password according to at least the joint password. Specifically, the smart card randomly generates numbers, letters, and/or symbols, and selects one or more combinations of numbers, letters, and symbols to generate a joint password. , can guarantee the non-uniqueness of the joint password, randomness, and improve the security of the joint password.
当然, 智能卡还可以将联合密码转换为条形码或者二维码或者图片, 以方便后续获取。 另外, 加密运算可以为对称加密或者非对称加密。 其中:  Of course, the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition. In addition, the encryption operation can be symmetric encryption or asymmetric encryption. among them:
智能卡可以直接对联合密码进行加密, 生成加密联合密码; 或者  The smart card can directly encrypt the joint password to generate an encrypted joint password; or
智能卡计算联合密码的摘要信息, 将摘要信息作为加密联合密码; 或者  The smart card calculates the summary information of the joint password, and uses the summary information as the encrypted joint password; or
智能卡计算联合密码的摘要信息, 对联合密码的摘要信息进行加密, 生成加密联合密 码; 或者 The smart card calculates summary information of the joint password, encrypts the summary information of the joint password, and generates an encrypted joint secret. Code; or
智能卡还可以生成一个随机数, 将联合密码和该随机数按照预设的格式进行组合, 并 对组合后的数据进行加密获得加密联合密码。 此时将联合密码和随机数进行组合, 可以防 止重放攻击, 进一步提高联合密码传输的安全性。  The smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password. In this case, the combination of the joint password and the random number can prevent the replay attack and further improve the security of the joint password transmission.
其中,摘要信息可以包括如下的一种或其组合:通过哈希算法计算的哈希值、通过 MAC 算法计算的 MAC值, 通过对称加密获得的密文本身。  The summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
采用对称加密时, 智能卡与终端采用相同的加密密钥, 从而方便终端验证联合密码。 采用非对称加密时, 智能卡可以采用终端的公钥进行加密, 也可以采用智能卡的私钥进行 加密。  When symmetric encryption is used, the smart card and the terminal use the same encryption key, which facilitates the terminal to verify the joint password. When asymmetric encryption is used, the smart card can be encrypted using the public key of the terminal or encrypted with the private key of the smart card.
步骤 S603: 智能卡根据交易报文生成签名报文;  Step S603: The smart card generates a signature message according to the transaction packet.
具体的, 智能卡可以直接对交易报文进行签名, 生成签名报文; 或者  Specifically, the smart card can directly sign the transaction message to generate a signature message; or
智能卡计算交易报文的摘要信息, 对交易报文的摘要信息进行签名, 生成签名报文。 其中,摘要信息可以包括如下的一种或其组合:通过哈希算法计算的哈希值、通过 MAC 算法计算的 MAC值, 通过对称加密获得的密文本身。  The smart card calculates the summary information of the transaction message, and signs the summary information of the transaction message to generate a signature message. The summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
通过对交易报文生成签名报文发送至终端进行验证, 可以保证交易为真实的交易, 以 及交易的不可抵赖性。  By generating a signature message for the transaction message and sending it to the terminal for verification, it is possible to ensure that the transaction is a real transaction and the non-repudiation of the transaction.
步骤 S604: 智能卡将加密联合密码和签名报文发送至终端;  Step S604: The smart card sends the encrypted joint password and the signed message to the terminal.
具体的, 智能卡可以将加密联合密码和签名报文发送至终端, 以便终端后续对验证密 码的验证。  Specifically, the smart card may send the encrypted joint password and the signed message to the terminal, so that the terminal subsequently verifies the verification password.
步骤 S605: 终端获取验证密码, 分别验证签名报文和验证密码, 并在验证通过后, 发 送交易指令至后台系统服务器; 其中, 验证密码为通过终端的按键输入的联合密码, 或通 过终端扫描智能卡显示的信息获取的联合密码, 或通过终端以非接触通讯方式从智能卡获 取的联合密码;  Step S605: The terminal obtains the verification password, respectively verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or the smart card is scanned through the terminal. a joint password obtained by the displayed information, or a joint password obtained from the smart card by the terminal in a contactless communication manner;
具体的, 终端可以根据而交易报文和验证密码验证签名报文的正确性, 如果签名正确, 则确定验证密码和签名报文均通过验证。  Specifically, the terminal can verify the correctness of the signature message according to the transaction message and the verification password. If the signature is correct, it is determined that the verification password and the signature message are verified.
终端还可以根据加密联合密码验证验证密码的正确性, 并根据交易报文和验证密码验 证签名报文的正确性。  The terminal can also verify the correctness of the password according to the encrypted joint password verification, and verify the correctness of the signed message according to the transaction message and the verification password.
终端还可以根据加密联合密码的摘要信息验证验证密码的正确性, 并根据交易报文和 验证密码验证签名报文的正确性。  The terminal may also verify the correctness of the verification password according to the summary information of the encrypted joint password, and verify the correctness of the signature message according to the transaction message and the verification password.
当然, 上述过程中, 终端还可以根据交易报文和加密联合密码或加密联合密码的摘要 信息验证签名报文的正确性。 当然, 无论步骤 S602和 S603中, 智能卡在获得加密联合密码和计算签名报文时根据 的是何种信息,终端均可以根据该信息或者验证密码来验证验证密码和签名报文的正确性。 Of course, in the foregoing process, the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password. Of course, regardless of the information in the steps S602 and S603, the smart card obtains the encrypted joint password and the calculated signature message, and the terminal can verify the correctness of the verification password and the signature message according to the information or the verification password.
另外, 终端可以采用如下方式获取验证密码: 终端接收通过按键输入的信息获取联合 密码, 例如通过从终端的键盘输入验证密码从而获得联合密码; 或终端通过扫描智能卡显 示的信息获取联合密码,例如终端扫描智能卡显示的二维码或者条形码等获取该联合密码; 或终端通过非接触通讯方式从智能卡获取联合密码, 例如可以通过将智能卡放置在终端的 扫描范围内, 以 NFC、 光通讯、 蓝牙、 红外等方式获取联合密码。  In addition, the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal acquires the joint password by scanning the information displayed by the smart card, for example, the terminal. Scan the QR code displayed by the smart card or barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, with NFC, optical communication, Bluetooth, infrared Wait for the joint password.
当然, 在用户执行该操作被代理时, 可以将联合密码告知第三人, 以便第三人将联合 密码输入至终端。  Of course, when the user performs the operation as a proxy, the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
步骤 S606: 后台系统服务器根据交易指令执行交易操作。  Step S606: The background system server performs a transaction operation according to the transaction instruction.
具体的, 后台系统服务器可以为银行服务器或第三方服务器, 第三方服务器为非银行 系统采用的服务器, 比如公交系统所采用的对公交卡进行充值和扣款控制的服务器等。  Specifically, the background system server may be a bank server or a third-party server, and the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
本发明的终端在获取验证密码后, 对验证密码和签名报文进行验证, 并在验证通过后, 才会将交易指令发送至后台系统服务器, 以触发后台系统服务器完成交易, 从而防止将签 名数据等重要数据通过网络进行传输而导致不安全的隐患, 保证了交易的安全性。 另外, 本发明的联合密码可以是在每次交易时随机生成的数字、字母和字符的一种或多种的组合, 不同于现有的交易密码和 OTP必须采用密文进行传输, 本发明终端可以不同方式获取联合 密码, 在获取的过程中, 该联合密码 (验证密码) 可以以明文的形式进行传输, 并且不会 降低交易过程中账户的安全性; 本发明由智能卡生成联合密码, 并对联合密码进行加密, 保证了联合密码传输至终端的安全性和终端验证联合密码的准确性。  After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted. The important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction. In addition, the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways. In the process of obtaining, the joint password (authentication password) can be transmitted in clear text without reducing the security of the account during the transaction; the invention generates a joint password by the smart card, and The joint password is encrypted to ensure the security of the joint password transmission to the terminal and the accuracy of the terminal verification joint password.
由此可见本发明的智能卡交易方法, 通过智能卡和终端的一次接入即完成了交易所需 数据 (例如签名数据) 的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 实施例 4  It can be seen that the smart card transaction method of the present invention completes the interaction of data required for transaction (such as signature data) through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses, and improving the risk. safety. Example 4
基于图 6或 Ί所示的具有电子签名功能的智能卡交易系统的结构, 图 9为本发明具有 电子签名功能的智能卡交易方法实施例 4的流程图。 当然, 本实施例中具有电子签名功能 的智能卡交易方法的除了采用图 6或 7所示的结构外, 还可以任意划分其结构, 只要采用 本实施例的方法均属于本发明所要求保护的范围。  Based on the structure of the smart card transaction system with electronic signature function shown in FIG. 6 or FIG. 9, FIG. 9 is a flowchart of Embodiment 4 of the smart card transaction method with electronic signature function according to the present invention. Of course, in addition to adopting the structure shown in FIG. 6 or 7, the smart card transaction method with the electronic signature function in this embodiment can also arbitrarily divide the structure thereof, as long as the method of the present embodiment belongs to the scope claimed by the present invention. .
现结合图 9, 对本发明具有电子签名功能的智能卡交易方法进行说明, 具体如下: 本发明具有电子签名功能的智能卡交易方法包括: 步骤 S701 : 具有电子签名功能的智能卡接入终端, 接收交易报文; The smart card transaction method with the electronic signature function of the present invention will be described below with reference to FIG. 9, which is as follows: The smart card transaction method with the electronic signature function of the present invention includes: Step S701: A smart card access terminal having an electronic signature function, receiving a transaction message;
具体的, 在具有电子签名功能的智能卡接入终端之前, 终端可通过手工输入、 网络、 扫描商品信息等方式获取交易报文。  Specifically, before the smart card access terminal having the electronic signature function, the terminal can obtain the transaction message by manually inputting, searching for the network, scanning the commodity information, and the like.
智能卡可通过非接触方式接入终端, 接收终端发送的交易报文。 其中, 交易报文至少 包括账户和金额, 还可包括交易明细信息。  The smart card can access the terminal in a contactless manner and receive the transaction message sent by the terminal. The transaction message includes at least an account and an amount, and may also include transaction details.
当然, 智能卡也可以通过接触方式接入终端。  Of course, the smart card can also access the terminal through contact.
本发明的智能卡采用非接触方式接入终端较接触方式接入终端具有较高的安全性, 防 止信息被获取。  The smart card of the present invention adopts a non-contact mode access terminal and has higher security than a contact mode access terminal, and prevents information from being acquired.
另外, 智能卡为具有电子签名功能的设备, 可以包括含有用户账户信息的卡芯片和利 用密钥进行数字签名的安全芯片, 或者包括具有上述两个芯片功能的集成芯片。  Further, the smart card is a device having an electronic signature function, and may include a card chip containing user account information and a security chip digitally signed with a key, or an integrated chip having the above two chip functions.
步骤 S702: 智能卡生成联合密码, 并至少根据联合密码生成加密联合密码; 具体的, 智能卡随机地生成数字、 字母和 /或符号, 从数字、 字母和符号中选择一种或 多种组合生成联合密码, 可以保证联合密码的不唯一性, 随机性, 提高联合密码的安全性。  Step S702: The smart card generates a joint password, and generates an encrypted joint password according to at least the joint password. Specifically, the smart card randomly generates numbers, letters, and/or symbols, and selects one or more combinations of numbers, letters, and symbols to generate a joint password. , can guarantee the non-uniqueness of the joint password, randomness, and improve the security of the joint password.
当然, 智能卡还可以将联合密码转换为条形码或者二维码或者图片, 以方便后续获取。 另外, 加密运算可以为对称加密或者非对称加密。 其中:  Of course, the smart card can also convert the joint password into a barcode or a two-dimensional code or picture to facilitate subsequent acquisition. In addition, the encryption operation can be symmetric encryption or asymmetric encryption. among them:
智能卡可以直接对联合密码进行加密, 生成加密联合密码; 或者  The smart card can directly encrypt the joint password to generate an encrypted joint password; or
智能卡计算联合密码的摘要信息, 将摘要信息作为加密联合密码; 或者  The smart card calculates the summary information of the joint password, and uses the summary information as the encrypted joint password; or
智能卡计算联合密码的摘要信息, 对联合密码的摘要信息进行加密, 生成加密联合密 码; 或者  The smart card calculates summary information of the joint password, encrypts the summary information of the joint password, and generates an encrypted joint password; or
智能卡还可以生成一个随机数, 将联合密码和该随机数按照预设的格式进行组合, 并 对组合后的数据进行加密获得加密联合密码。 此时将联合密码和随机数进行组合, 可以防 止重放攻击, 进一步提高联合密码传输的安全性。  The smart card can also generate a random number, combine the joint password and the random number according to a preset format, and encrypt the combined data to obtain an encrypted joint password. In this case, the combination of the joint password and the random number can prevent the replay attack and further improve the security of the joint password transmission.
其中,摘要信息可以包括如下的一种或其组合:通过哈希算法计算的哈希值、通过 MAC 算法计算的 MAC值, 通过对称加密获得的密文本身。  The summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, a MAC value calculated by a MAC algorithm, and a secret text body obtained by symmetric encryption.
采用对称加密时, 智能卡与终端采用相同的加密密钥, 从而方便终端验证联合密码。 采用非对称加密时, 智能卡可以采用终端的公钥进行加密, 也可以采用智能卡的私钥进行 加密。  When symmetric encryption is used, the smart card and the terminal use the same encryption key, which facilitates the terminal to verify the joint password. When asymmetric encryption is used, the smart card can be encrypted using the public key of the terminal or encrypted with the private key of the smart card.
步骤 S703 : 智能卡根据交易报文生成签名报文;  Step S703: The smart card generates a signature message according to the transaction packet.
具体的, 智能卡可以直接对交易报文进行签名, 生成签名报文; 或者  Specifically, the smart card can directly sign the transaction message to generate a signature message; or
智能卡计算交易报文的摘要信息, 对交易报文的摘要信息进行签名, 生成签名报文。 其中,摘要信息可以包括如下的一种或其组合:通过哈希算法计算的哈希值、通过 MAC 算法计算的 MAC值, 通过对称加密获得的密文本身。 The smart card calculates the summary information of the transaction message, and signs the summary information of the transaction message to generate a signature message. The summary information may include one or a combination of the following: a hash value calculated by a hash algorithm, and a MAC address. The MAC value calculated by the algorithm, the ciphertext obtained by symmetric encryption.
通过对交易报文生成签名报文发送至终端进行验证, 可以保证交易为真实的交易, 以 及交易的不可抵赖性。  By generating a signature message for the transaction message and sending it to the terminal for verification, it is possible to ensure that the transaction is a real transaction and the non-repudiation of the transaction.
步骤 S704: 智能卡将加密联合密码和签名报文发送至终端;  Step S704: The smart card sends the encrypted joint password and the signed message to the terminal.
具体的, 智能卡可以将加密联合密码和签名报文发送至终端, 以便终端后续对验证密 码的验证。  Specifically, the smart card may send the encrypted joint password and the signed message to the terminal, so that the terminal subsequently verifies the verification password.
步骤 S705 : 智能卡断开与终端的连接;  Step S705: The smart card disconnects from the terminal;
具体的, 在非接触式方式接入的情况下, 用户持智能卡离开终端的感应范围即可; 在 接触式方式接入的情况下, 用户从终端中拔出智能卡即可。 断开与终端的连接保证了智能 卡与终端的一次接触, 降低了多次接触信息被截获的风险, 提高了数据传输的安全性。  Specifically, in the case of non-contact mode access, the user can leave the sensing range of the smart card to leave the terminal; in the case of contact mode access, the user can pull out the smart card from the terminal. Disconnecting from the terminal ensures a single contact between the smart card and the terminal, which reduces the risk of intercepting multiple contact information and improves the security of data transmission.
步骤 S706: 智能卡显示交易报文;  Step S706: The smart card displays the transaction message;
具体的, 智能卡在显示屏上显示接收到的交易报文, 以便用户确认该交易的真实性, 保证交易的安全。 同时, 用户还可以根据智能卡在显示屏上显示的多个交易中选择本次交 易的交易报文, 以确保后续显示的联合密码为本次交易的联合密码。  Specifically, the smart card displays the received transaction message on the display screen, so that the user can confirm the authenticity of the transaction and ensure the security of the transaction. At the same time, the user can also select the transaction message of the transaction according to the multiple transactions displayed by the smart card on the display screen to ensure that the joint password displayed subsequently is the joint password of the transaction.
步骤 S707 : 智能卡接收通过按键输入的确认密码和 /或确认指令;  Step S707: The smart card receives the confirmation password and/or the confirmation command input through the button;
具体的, 用户在确认了交易信息的真实性或者选择了本次交易的交易信息之后, 可以 通过输入确认密码和 /或确认指令的操作, 触发智能卡显示生成的联合密码。 通过输入确认 密码触发智能卡显示联合密码或条形码或图片可以防止联合密码被他人获知, 提高联合密 码的保密性。  Specifically, after confirming the authenticity of the transaction information or selecting the transaction information of the transaction, the user may trigger the smart card to display the generated joint password by inputting the confirmation password and/or the operation of the confirmation instruction. By entering a confirmation password to trigger the smart card to display a joint password or barcode or picture, the joint password can be prevented from being known by others, and the confidentiality of the joint password can be improved.
例如, 用户在确认了交易真实或者选择本次交易的交易信息后, 在智能卡上输入确认 密码, 按下确认按键, 智能卡的显示屏上显示出对应用户确认的交易信息的联合密码。  For example, after the user confirms the transaction or selects the transaction information of the transaction, the user enters the confirmation password on the smart card, presses the confirmation button, and the smart card's display screen displays the joint password corresponding to the transaction information confirmed by the user.
步骤 S708 : 智能卡显示联合密码或条形码或图片;  Step S708: The smart card displays a joint password or a barcode or a picture;
具体的, 智能卡显示联合密码或条形码或图片, 以便用户可以获知该联合密码, 从而 方便用户将该联合密码通过终端的按键输入至终端, 或者终端扫描条形码或者图片获取验 证密码, 以完成交易, 此时, 用户输入的密码和终端扫描到的密码可以被称为验证密码, 用户输入该验证密码至终端, 保证后续终端对验证密码的正确性进行验证。  Specifically, the smart card displays the joint password or the barcode or the picture, so that the user can know the joint password, so that the user can input the joint password to the terminal through the button of the terminal, or the terminal scans the barcode or the picture to obtain the verification password to complete the transaction. The password entered by the user and the password scanned by the terminal may be referred to as a verification password, and the user inputs the verification password to the terminal to ensure that the subsequent terminal verifies the correctness of the verification password.
当然, 智能卡还可以将联合密码转换为条形码或者二维码或者图片, 以便后续终端获 取。  Of course, the smart card can also convert the joint password into a barcode or a two-dimensional code or picture for subsequent terminal access.
为了进一步提高联合密码的安全性, 防止他人获取联合密码的明文信息, 在步骤 S402 时, 还可以将联合密码明文以预设的对称加密算法进行加密并将加密后的联合密码存储在 智能卡中, 在智能卡接收用户通过按键输入的确认密码和 /或确认指令后, 再以该预设的对 称加密算法解密出联合密码明文进行显示。 In order to further improve the security of the joint password, and prevent others from obtaining the plaintext information of the joint password, in step S402, the joint password plaintext may be encrypted by using a preset symmetric encryption algorithm, and the encrypted joint password is stored in the smart card. After the smart card receives the confirmation password and/or confirmation command input by the user through the button, the preset pair is It is said that the encryption algorithm decrypts the joint password plaintext for display.
步骤 S709: 终端获取验证密码, 分别验证签名报文和验证密码, 并在验证通过后, 发 送交易指令至后台系统服务器; 其中, 验证密码为通过终端的按键输入的联合密码, 或通 过终端扫描智能卡显示的信息获取的联合密码, 或通过终端以非接触通讯方式从智能卡获 取的联合密码;  Step S709: The terminal obtains the verification password, respectively verifies the signature message and the verification password, and after the verification is passed, sends the transaction instruction to the background system server; wherein, the verification password is a joint password input through a button of the terminal, or the smart card is scanned through the terminal. a joint password obtained by the displayed information, or a joint password obtained from the smart card by the terminal in a contactless communication manner;
具体的, 终端可以根据而交易报文和验证密码验证签名报文的正确性, 如果签名正确, 则确定验证密码和签名报文均通过验证。  Specifically, the terminal can verify the correctness of the signature message according to the transaction message and the verification password. If the signature is correct, it is determined that the verification password and the signature message are verified.
终端还可以根据加密联合密码验证验证密码的正确性, 并根据交易报文和验证密码验 证签名报文的正确性。  The terminal can also verify the correctness of the password according to the encrypted joint password verification, and verify the correctness of the signed message according to the transaction message and the verification password.
终端还可以根据加密联合密码的摘要信息验证验证密码的正确性, 并根据交易报文和 验证密码验证签名报文的正确性。  The terminal may also verify the correctness of the verification password according to the summary information of the encrypted joint password, and verify the correctness of the signature message according to the transaction message and the verification password.
当然, 上述过程中, 终端还可以根据交易报文和加密联合密码或加密联合密码的摘要 信息验证签名报文的正确性。  Of course, in the foregoing process, the terminal may further verify the correctness of the signed message according to the transaction message and the encrypted joint password or the summary information of the encrypted joint password.
当然, 无论步骤 S702和 S703中, 智能卡在获得加密联合密码和计算签名报文时根据 的是何种信息,终端均可以根据该信息或者验证密码来验证验证密码和签名报文的正确性。  Of course, regardless of the information obtained by the smart card in obtaining the encrypted joint password and the calculated signature message in steps S702 and S703, the terminal can verify the correctness of the verification password and the signature message according to the information or the verification password.
另外, 终端可以采用如下方式获取验证密码: 终端接收通过按键输入的信息获取联合 密码, 例如通过从终端的键盘输入验证密码从而获得联合密码; 或终端通过扫描智能卡显 示的信息获取联合密码,例如终端扫描智能卡显示的二维码或者条形码等获取该联合密码; 或终端通过非接触通讯方式从智能卡获取联合密码, 例如可以通过将智能卡放置在终端的 扫描范围内, 以 NFC、 光通讯、 蓝牙、 红外等方式获取联合密码。  In addition, the terminal may obtain the verification password in the following manner: The terminal receives the information input by the key to obtain the joint password, for example, by inputting the verification password from the keyboard of the terminal to obtain the joint password; or the terminal acquires the joint password by scanning the information displayed by the smart card, for example, the terminal. Scan the QR code displayed by the smart card or barcode to obtain the joint password; or the terminal obtains the joint password from the smart card through contactless communication, for example, by placing the smart card in the scanning range of the terminal, with NFC, optical communication, Bluetooth, infrared Wait for the joint password.
当然, 在用户执行该操作被代理时, 可以将联合密码告知第三人, 以便第三人将联合 密码输入至终端。  Of course, when the user performs the operation as a proxy, the joint password can be notified to the third person so that the third party can input the joint password to the terminal.
步骤 S710: 后台系统服务器根据交易指令执行交易操作。  Step S710: The background system server performs a transaction operation according to the transaction instruction.
具体的, 后台系统服务器可以为银行服务器或第三方服务器, 第三方服务器为非银行 系统采用的服务器, 比如公交系统所采用的对公交卡进行充值和扣款控制的服务器等。  Specifically, the background system server may be a bank server or a third-party server, and the third-party server is a server used by the non-bank system, such as a server used by the bus system to recharge and debit the bus card.
本发明的终端在获取验证密码后, 对验证密码和签名报文进行验证, 并在验证通过后, 才会将交易指令发送至后台系统服务器, 以触发后台系统服务器完成交易, 从而防止将签 名数据等重要数据通过网络进行传输而导致不安全的隐患, 保证了交易的安全性。 另外, 本发明的联合密码可以是在每次交易时随机生成的数字、字母和字符的一种或多种的组合, 不同于现有的交易密码和 OTP必须采用密文进行传输, 本发明终端可以不同方式获取联合 密码, 在获取的过程中, 该联合密码 (验证密码) 可以以明文的形式进行传输, 并且不会 降低交易过程中账户的安全性; 本发明由智能卡生成联合密码, 并对联合密码进行加密, 保证了联合密码传输至终端的安全性和终端验证联合密码的准确性。 After obtaining the verification password, the terminal of the invention verifies the verification password and the signature message, and after the verification is passed, sends the transaction instruction to the background system server to trigger the background system server to complete the transaction, thereby preventing the signature data from being deleted. The important data is transmitted through the network, resulting in unsafe hidden dangers, ensuring the security of the transaction. In addition, the joint password of the present invention may be a combination of one or more of numbers, letters and characters randomly generated at each transaction, which is different from the existing transaction password and OTP, and must be transmitted in ciphertext. The joint password can be obtained in different ways. In the process of obtaining, the joint password (authentication password) can be transmitted in clear text, and will not The security of the account during the transaction process is reduced. The invention generates a joint password by the smart card, and encrypts the joint password, thereby ensuring the security of the joint password transmission to the terminal and the accuracy of the terminal verifying the joint password.
由此可见本发明的智能卡交易方法, 通过智能卡和终端的一次接入即完成了交易所需 数据 (例如签名数据) 的交互, 降低了多次接入造成的重要信息被截获的风险, 提高了安 全性。 流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为, 表示包括一个 或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、 片段或部分, 并且本发明的优选实施方式的范围包括另外的实现, 其中可以不按所示出或讨论的顺序, 包括根据所涉及的功能按基本同时的方式或按相反的顺序, 来执行功能, 这应被本发明的 实施例所属技术领域的技术人员所理解。  It can be seen that the smart card transaction method of the present invention completes the interaction of data required for transaction (such as signature data) through one access of the smart card and the terminal, thereby reducing the risk of intercepting important information caused by multiple accesses, and improving the risk. safety. Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
应当理解, 本发明的各部分可以用硬件、 软件、 固件或它们的组合来实现。 在上述实 施方式中, 多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或 固件来实现。 例如, 如果用硬件来实现, 和在另一实施方式中一样, 可用本领域公知的下 列技术中的任一项或他们的组合来实现: 具有用于对数据信号实现逻辑功能的逻辑门电路 的离散逻辑电路, 具有合适的组合逻辑门电路的专用集成电路, 可编程门阵列 (PGA), 现 场可编程门阵列 (FPGA) 等。  It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented with any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可 以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种计算机可读存储介质中, 该程序在执行时, 包括方法实施例的步骤之一或其组合。  One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included.
此外, 在本发明各个实施例中的各功能单元可以集成在一个处理模块中, 也可以是各 个单元单独物理存在, 也可以两个或两个以上单元集成在一个模块中。 上述集成的模块既 可以采用硬件的形式实现, 也可以采用软件功能模块的形式实现。 所述集成的模块如果以 软件功能模块的形式实现并作为独立的产品销售或使用时, 也可以存储在一个计算机可读 取存储介质中。  In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as separate products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器, 磁盘或光盘等。  The above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
在本说明书的描述中, 参考术语"一个实施例"、 "一些实施例"、 "示例"、 "具体示例"、 或"一些示例"等的描述意指结合该实施例或示例描述的具体特征、 结构、 材料或者特点包 括于本发明的至少一个实施例或示例中。 在本说明书中, 对上述术语的示意性表述不一定 指的是相同的实施例或示例。 而且, 描述的具体特征、 结构、 材料或者特点可以在任何的 一个或多个实施例或示例中以合适的方式结合。 尽管上面已经示出和描述了本发明的实施例, 可以理解的是, 上述实施例是示例性的, 不能理解为对本发明的限制, 本领域的普通技术人员在不脱离本发明的原理和宗旨的情况 下在本发明的范围内可以对上述实施例进行变化、 修改、 替换和变型。 本发明的范围由所 附权利要求及其等同限定。 In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. Although the embodiments of the present invention have been shown and described, it is understood that the foregoing embodiments are illustrative and not restrictive Variations, modifications, alterations and variations of the above-described embodiments are possible within the scope of the invention. The scope of the invention is defined by the appended claims and their equivalents.

Claims

权利要求书 Claim
1、 一种具有电子签名功能的智能卡交易方法, 其特征在于, 所述方法包括: A smart card transaction method with an electronic signature function, the method comprising:
A、 具有电子签名功能的智能卡接入终端, 接收交易报文;  A. A smart card access terminal having an electronic signature function, receiving a transaction message;
B、 所述智能卡生成联合密码;  B. The smart card generates a joint password;
C、 所述智能卡根据所述交易报文和所述联合密码生成签名报文;  C. The smart card generates a signature message according to the transaction packet and the joint password.
D、 所述智能卡至少将所述签名报文发送至所述终端;  D. The smart card sends at least the signature message to the terminal;
E、 所述终端获取验证密码, 验证所述签名报文和所述验证密码, 并在验证通过后, 发 送交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合密 码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非接 触通讯方式从所述智能卡获取的联合密码;  E. The terminal obtains a verification password, verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is input through a button of the terminal. a joint password, or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
F、 所述后台系统服务器根据所述交易指令执行交易操作。  F. The background system server performs a transaction operation according to the transaction instruction.
2、 根据权利要求 1所述的方法, 其特征在于, 所述步骤 C包括:  2. The method according to claim 1, wherein the step C comprises:
所述智能卡计算所述交易报文的摘要信息;  The smart card calculates summary information of the transaction message;
所述智能卡对所述联合密码进行加密获得加密联合密码;  The smart card encrypts the joint password to obtain an encrypted joint password;
所述智能卡对所述交易报文的摘要信息和所述加密联合密码进行签名,生成签名报文。 The smart card signs the summary information of the transaction message and the encrypted joint password to generate a signature message.
3、 根据权利要求 1所述的方法, 其特征在于, 所述步骤 C包括: 3. The method according to claim 1, wherein the step C comprises:
所述智能卡计算所述交易报文的摘要信息;  The smart card calculates summary information of the transaction message;
所述智能卡对所述联合密码以及随机数的组合进行加密获得加密联合密码; 所述智能卡对所述交易报文的摘要信息和所述加密联合密码进行签名,生成签名报文。 The smart card encrypts the combination of the joint password and the random number to obtain an encrypted joint password; the smart card signs the summary information of the transaction packet and the encrypted joint password to generate a signature message.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 4. A method according to claim 2 or 3, characterized in that
所述步骤 D中, 所述智能卡还将所述加密联合密码和所述签名报文发送至所述终端。 In the step D, the smart card further sends the encrypted joint password and the signed message to the terminal.
5、 根据权利要求 1所述的方法, 其特征在于, 所述步骤 C包括: 5. The method according to claim 1, wherein the step C comprises:
所述智能卡计算所述交易报文的摘要信息;  The smart card calculates summary information of the transaction message;
所述智能卡对所述联合密码进行加密获得加密联合密码, 并计算所述加密联合密码的 摘要信息;  The smart card encrypts the joint password to obtain an encrypted joint password, and calculates summary information of the encrypted joint password;
所述智能卡对所述交易报文的摘要信息和所述加密联合密码的摘要信息进行签名, 生 成签名报文。  The smart card signs the summary information of the transaction message and the summary information of the encrypted joint password to generate a signature message.
6、 根据权利要求 5所述的方法, 其特征在于,  6. The method of claim 5, wherein
所述步骤 D中, 所述智能卡还将所述加密联合密码的摘要信息和所述签名报文发送至 所述终端。 In the step D, the smart card further sends the summary information of the encrypted joint password and the signature message to The terminal.
7、 根据权利要求 1所述的方法, 其特征在于, 在所述步骤 D和所述步骤 E之间, 所 述方法还包括:  The method according to claim 1, wherein between the step D and the step E, the method further comprises:
所述智能卡断开与所述终端的连接;  The smart card disconnects from the terminal;
所述智能卡显示所述交易报文;  The smart card displays the transaction message;
所述智能卡接收通过按键输入的确认密码和 /或确认指令;  The smart card receives a confirmation password and/or a confirmation command input through a button;
所述智能卡显示所述联合密码或条形码或图片。  The smart card displays the joint password or barcode or picture.
8、 一种具有电子签名功能的智能卡交易方法, 其特征在于, 所述方法包括:  8. A smart card transaction method with an electronic signature function, wherein the method comprises:
A、 具有电子签名功能的智能卡接入终端, 接收交易报文;  A. A smart card access terminal having an electronic signature function, receiving a transaction message;
B、 所述智能卡生成联合密码, 并至少根据所述联合密码生成加密联合密码;  B. The smart card generates a joint password, and generates an encrypted joint password according to at least the joint password.
C、 所述智能卡根据所述交易报文生成签名报文;  C. The smart card generates a signature message according to the transaction packet;
D、 所述智能卡将所述加密联合密码和所述签名报文发送至所述终端;  D. The smart card sends the encrypted joint password and the signed message to the terminal;
E、所述终端获取验证密码,分别验证所述签名报文和所述验证密码,并在验证通过后, 发送交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合 密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非 接触通讯方式从所述智能卡获取的联合密码;  E. The terminal obtains a verification password, respectively verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a key input through the terminal. a joint password, or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
F、 所述后台系统服务器根据所述交易指令执行交易操作。  F. The background system server performs a transaction operation according to the transaction instruction.
9、 根据权利要求 8所述的方法, 其特征在于, 在所述步骤 D和所述步骤 E之间, 所 述方法还包括:  The method according to claim 8, wherein between the step D and the step E, the method further comprises:
所述智能卡断开与所述终端的连接;  The smart card disconnects from the terminal;
所述智能卡显示所述交易报文;  The smart card displays the transaction message;
所述智能卡接收通过按键输入的确认密码和 /或确认指令;  The smart card receives a confirmation password and/or a confirmation command input through a button;
所述智能卡显示所述联合密码或条形码或图片。  The smart card displays the joint password or barcode or picture.
10、 根据权利要求 8所述的方法, 其特征在于, 所述步骤 B中对所述联合密码进行加 密获得加密联合密码可以采用对称加密或者非对称加密方式。  The method according to claim 8, wherein the encrypting the joint password in the step B to obtain the encrypted joint password may adopt a symmetric encryption or an asymmetric encryption.
11、 一种具有电子签名功能的智能卡交易系统, 其特征在于, 所述系统包括: 终端、 后台系统服务器以及具有电子签名功能的智能卡;  11. A smart card transaction system having an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function;
所述具有电子签名功能的智能卡接入终端, 接收交易报文, 生成联合密码, 根据所述 交易报文和所述联合密码生成签名报文, 至少将所述签名报文发送至所述终端;  The smart card access terminal having the electronic signature function receives the transaction message, generates a joint password, generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal at least;
所述终端获取验证密码, 验证所述签名报文和所述验证密码, 并在验证通过后, 发送 交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非接触通 讯方式从所述智能卡获取的联合密码; The terminal obtains a verification password, verifies the signature message and the verification password, and sends a transaction instruction to the background system server after the verification is passed; wherein the verification password is a joint password input through a button of the terminal. , Or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
所述后台系统服务器根据所述交易指令执行交易操作。  The backend system server performs a transaction operation in accordance with the transaction instruction.
12、 根据权利要求 11所述的系统, 其特征在于, 所述智能卡包括: 收发模块, 密码生 成模块和签名模块;  The system according to claim 11, wherein the smart card comprises: a transceiver module, a password generation module and a signature module;
所述收发模块用于接入终端, 接收交易报文并发送至所述签名模块;  The transceiver module is configured to access a terminal, receive a transaction message, and send the message to the signature module;
所述密码生成模块用于生成联合密码, 并发送至所述签名模块;  The password generating module is configured to generate a joint password and send the code to the signature module;
所述签名模块根据所述交易报文和所述联合密码生成签名报文, 并通过所述收发模块 至少将所述签名报文发送至所述终端。  And the signature module generates a signature message according to the transaction message and the joint password, and sends the signature message to the terminal by using the transceiver module.
13、 根据权利要求 12所述的系统, 其特征在于, 所述智能卡还包括: 显示模块; 所述显示模块用于显示所述联合密码。  The system of claim 12, wherein the smart card further comprises: a display module; the display module is configured to display the joint password.
14、 根据权利要求 13所述的系统, 其特征在于, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认指令, 触发所述显示模块显示所述联合 密码。  The system according to claim 13, wherein the smart card further comprises: a button module; the button module triggers the display module to display the joint password according to the received confirmation password and/or confirmation command .
15、 根据权利要求 12所述的系统, 其特征在于, 所述智能卡还包括: 显示模块和图形 生成模块;  The system of claim 12, wherein the smart card further comprises: a display module and a graphics generation module;
所述图形生成模块用于根据从所述密码生成模块获取的所述联合密码生成条形码或图 片;  The graphics generating module is configured to generate a barcode or a picture according to the joint password obtained from the password generating module;
所述显示模块用于显示所述条形码或图片。  The display module is configured to display the barcode or a picture.
16、 根据权利要求 15所述的系统, 其特征在于, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认指令, 触发所述显示模块显示所述条形 码或图片。  The system according to claim 15, wherein the smart card further comprises: a button module; the button module triggers the display module to display the barcode or according to the received confirmation password and/or confirmation command image.
17、 根据权利要求 13至 16任一项所述的系统, 其特征在于, 所述收发模块在发送所 述签名报文至所述终端之后, 还断开与所述终端的连接;  The system according to any one of claims 13 to 16, wherein the transceiver module disconnects the terminal after transmitting the signature message to the terminal;
所述显示模块在所述收发模块断开与所述终端的连接后, 还显示所述交易报文。 The display module further displays the transaction message after the transceiver module disconnects from the terminal.
18、 根据权利要求 12至 17任一项所述的系统, 其特征在于, 所述收发模块还用于以 非接触通讯方式发送从所述密码生成模块获取的所述联合密码至所述终端。 The system according to any one of claims 12 to 17, wherein the transceiver module is further configured to send the joint password acquired from the password generating module to the terminal in a contactless communication manner.
19、 根据权利要求 18所述的系统, 其特征在于, 所述终端以非接触通讯方式从所述智 能卡获取所述验证密码。  The system according to claim 18, wherein the terminal acquires the verification password from the smart card in a contactless communication manner.
20、 根据权利要求 15或 16所述的系统, 其特征在于, 所述终端通过扫描所述智能卡 的所述显示模块显示的条形码或图片获取所述验证密码。 The system according to claim 15 or 16, wherein the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
21、 一种具有电子签名功能的智能卡交易系统, 其特征在于, 所述系统包括: 终端、 后台系统服务器以及具有电子签名功能的智能卡; 21. A smart card transaction system having an electronic signature function, the system comprising: a terminal, a background system server, and a smart card having an electronic signature function;
所述具有电子签名功能的智能卡接入终端, 接收交易报文, 生成联合密码, 并至少根 据所述联合密码生成加密联合密码, 根据所述交易报文生成签名报文, 将所述加密联合密 码和所述签名报文发送至所述终端;  The smart card access terminal having the electronic signature function receives the transaction message, generates a joint password, generates an encrypted joint password according to the joint password, generates a signature message according to the transaction message, and generates the encrypted joint password. And sending the signature message to the terminal;
所述终端获取验证密码, 分别验证所述签名报文和所述验证密码, 并在验证通过后, 发送交易指令至后台系统服务器; 其中, 所述验证密码为通过所述终端的按键输入的联合 密码, 或通过所述终端扫描所述智能卡显示的信息获取的联合密码, 或通过所述终端以非 接触通讯方式从所述智能卡获取的联合密码;  And obtaining, by the terminal, the verification password, respectively verifying the signature message and the verification password, and sending the transaction instruction to the background system server after the verification is passed; wherein the verification password is a combination of key input through the terminal a password, or a joint password obtained by scanning the information displayed by the smart card by the terminal, or a joint password obtained by the terminal from the smart card in a contactless communication manner;
所述后台系统服务器根据所述交易指令执行交易操作。  The backend system server performs a transaction operation in accordance with the transaction instruction.
22、 根据权利要求 21所述的系统, 其特征在于, 所述智能卡包括: 收发模块、 密码生 成模块、 加密模块和签名模块;  The system according to claim 21, wherein the smart card comprises: a transceiver module, a password generation module, an encryption module, and a signature module;
所述收发模块用于接入终端, 接收交易报文并发送至所述签名模块;  The transceiver module is configured to access a terminal, receive a transaction message, and send the message to the signature module;
所述密码生成模块用于生成联合密码, 并发送至所述加密模块;  The password generating module is configured to generate a joint password and send the password to the encryption module;
所述加密模块用于对所述联合密码进行加密获得加密联合密码, 并通过所述收发模块 将所述加密联合密码发送至所述终端;  The encryption module is configured to encrypt the joint password to obtain an encrypted joint password, and send the encrypted joint password to the terminal by using the transceiver module;
所述签名模块根据所述交易报文生成签名报文, 并通过所述收发模块将所述签名报文 发送至所述终端。  The signature module generates a signature message according to the transaction message, and sends the signature message to the terminal by using the transceiver module.
23、 根据权利要求 22所述的系统, 其特征在于, 所述智能卡还包括: 显示模块; 所述显示模块用于显示所述联合密码。  The system of claim 22, wherein the smart card further comprises: a display module; the display module is configured to display the joint password.
24、 根据权利要求 23所述的系统, 其特征在于, 所述智能卡还包括: 按键模块; 所述按键模块根据接收到的确认密码和 /或确认指令, 触发所述显示模块显示所述联合 密码。  The system according to claim 23, wherein the smart card further comprises: a button module; the button module triggers the display module to display the joint password according to the received confirmation password and/or confirmation command .
25、 根据权利要求 22所述的系统, 其特征在于, 所述智能卡还包括: 显示模块和图形 生成模块;  The system of claim 22, wherein the smart card further comprises: a display module and a graphics generation module;
所述图形生成模块用于根据从所述密码生成模块获取的所述联合密码生成条形码或图 片;  The graphics generating module is configured to generate a barcode or a picture according to the joint password obtained from the password generating module;
所述显示模块用于显示所述条形码或图片。  The display module is configured to display the barcode or a picture.
26、 根据权利要求 25所述的系统, 其特征在于, 所述智能卡还包括: 按键模块; 所述按键模块用于根据接收到的确认密码和 /或确认指令, 触发所述显示模块显示所述 条形码或图片。 The system of claim 25, wherein the smart card further comprises: a button module; the button module is configured to trigger the display module to display the according to the received confirmation password and/or confirmation command Bar code or picture.
27、 根据权利要求 23至 26任一项所述的系统, 其特征在于, 所述收发模块在发送所 述签名报文至所述终端之后, 还断开与所述终端的连接; The system according to any one of claims 23 to 26, wherein the transceiver module disconnects the terminal after transmitting the signature message to the terminal;
所述显示模块在所述收发模块断开与所述终端的连接后, 还显示所述交易报文。 The display module further displays the transaction message after the transceiver module disconnects from the terminal.
28、 根据权利要求 21至 27任一项所述的系统, 其特征在于, 所述收发模块还用于以 非接触通讯方式发送从所述密码生成模块获取的所述联合密码至所述终端。 The system according to any one of claims 21 to 27, wherein the transceiver module is further configured to send the joint password acquired from the password generation module to the terminal in a contactless communication manner.
29、 根据权利要求 28所述的系统, 其特征在于, 所述终端以非接触通讯方式从所述智 能卡获取所述验证密码。  The system according to claim 28, wherein the terminal acquires the verification password from the smart card in a contactless communication manner.
30、 根据权利要求 25或 26所述的系统, 其特征在于, 所述终端通过扫描所述智能卡 的所述显示模块显示的条形码或图片获取所述验证密码。  The system according to claim 25 or 26, wherein the terminal acquires the verification password by scanning a barcode or a picture displayed by the display module of the smart card.
PCT/CN2014/072527 2013-03-06 2014-02-25 Method and system for transactions using smart card having electronic signature function WO2014135017A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201310071393.0A CN103136666B (en) 2013-03-06 2013-03-06 There is smart card method of commerce and the system of electronic signature functionality
CN201320101456 2013-03-06
CN201320101456.8 2013-03-06
CN201310071393.0 2013-03-06

Publications (1)

Publication Number Publication Date
WO2014135017A1 true WO2014135017A1 (en) 2014-09-12

Family

ID=51490625

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/072527 WO2014135017A1 (en) 2013-03-06 2014-02-25 Method and system for transactions using smart card having electronic signature function

Country Status (1)

Country Link
WO (1) WO2014135017A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614620A (en) * 2004-11-26 2005-05-11 王小矿 Portable card readers and method thereof
CN101571926A (en) * 2009-06-09 2009-11-04 上海复旦微电子股份有限公司 Safe read-write device for IC cards and method for using same
CN102186169A (en) * 2010-04-30 2011-09-14 北京华大智宝电子系统有限公司 Identity authentication method, device and system
CN102779303A (en) * 2012-08-07 2012-11-14 上海方付通商务服务有限公司 Wireless payment system and method on basis of mobile phone
CN103136666A (en) * 2013-03-06 2013-06-05 天地融科技股份有限公司 Trading method and trading system of smart card with electronic signature function

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614620A (en) * 2004-11-26 2005-05-11 王小矿 Portable card readers and method thereof
CN101571926A (en) * 2009-06-09 2009-11-04 上海复旦微电子股份有限公司 Safe read-write device for IC cards and method for using same
CN102186169A (en) * 2010-04-30 2011-09-14 北京华大智宝电子系统有限公司 Identity authentication method, device and system
CN102779303A (en) * 2012-08-07 2012-11-14 上海方付通商务服务有限公司 Wireless payment system and method on basis of mobile phone
CN103136666A (en) * 2013-03-06 2013-06-05 天地融科技股份有限公司 Trading method and trading system of smart card with electronic signature function

Similar Documents

Publication Publication Date Title
CN103136664B (en) There is smart card transaction system and the method for electronic signature functionality
AU2014258980B2 (en) Providing digital certificates
WO2014161469A1 (en) Method and system for processing operation requests
WO2016112675A1 (en) Financial self-service system processing method
EP2961094A1 (en) System and method for generating a random number
WO2015058596A1 (en) Dynamic password generation method and system, and transaction request processing method and system
CN104243451A (en) Information interaction method and system and smart key equipment
WO2014201907A1 (en) Electronic signature method and system
US10404475B2 (en) Method and system for establishing a secure communication tunnel
US10547451B2 (en) Method and device for authentication
WO2015161689A1 (en) Data processing method based on negotiation key
CN103401844A (en) Operation request processing method and system
WO2014194730A1 (en) Method and system for processing operation request
WO2014187210A1 (en) Method and system for backing up private key of electronic signature token
WO2014173288A1 (en) Encryption/decryption device and information processing method and system
AU2014340234A1 (en) Facilitating secure transactions using a contactless interface
US20100005519A1 (en) System and method for authenticating one-time virtual secret information
EP3133791A1 (en) Double authentication system for electronically signed documents
US20150310441A1 (en) Transaction system method, electronic signature tool, and network bank server authentication
CN104243162A (en) Information interaction method and system and smart key equipment
CN105323063A (en) Identity verification method of mobile terminal and fixed intelligent terminal based on two-dimensional code
CN103198401A (en) Smart card transaction method and smart card transaction system with electronic signature function
WO2015109958A1 (en) Data processing method based on negotiation key, and mobile phone
JP2017536030A (en) Method for accessing services, corresponding first device, second device and system
JP2001243196A (en) Personal authentification system using mobile telephone and ic card

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14760206

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14760206

Country of ref document: EP

Kind code of ref document: A1