CN111314062B - Smart card data issuing method and device, electronic equipment and storage medium - Google Patents

Smart card data issuing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111314062B
CN111314062B CN202010037756.9A CN202010037756A CN111314062B CN 111314062 B CN111314062 B CN 111314062B CN 202010037756 A CN202010037756 A CN 202010037756A CN 111314062 B CN111314062 B CN 111314062B
Authority
CN
China
Prior art keywords
release
key
terminal
release key
smart card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010037756.9A
Other languages
Chinese (zh)
Other versions
CN111314062A (en
Inventor
郭炯光
李廷温
夏星星
李锡铭
沈凌楠
陈唐其
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010037756.9A priority Critical patent/CN111314062B/en
Publication of CN111314062A publication Critical patent/CN111314062A/en
Application granted granted Critical
Publication of CN111314062B publication Critical patent/CN111314062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • H04L9/0897Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage involving additional devices, e.g. trusted platform module [TPM], smartcard or USB

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computing Systems (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Storage Device Security (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The specification provides a smart card data issuing method. The method is executed by a server and comprises the following steps: after receiving a request of issuing the data of the intelligent card by a terminal, generating a release key, and encrypting the data of the intelligent card to be issued by using the release key; issuing an instruction stream carrying encrypted smart card data to a terminal; and after receiving an execution result of successful execution of the instruction stream fed back by the terminal, issuing a release instruction carrying a release key to enable the terminal to decrypt and obtain the data of the intelligent card. The specification also provides a device for realizing the data issuing of the intelligent card, electronic equipment and a computer readable storage medium.

Description

Smart card data issuing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of smart card technologies, and in particular, to a method and an apparatus for issuing smart card data, an electronic device, and a computer-readable storage medium.
Background
Over The Air (OTA) is a technology for remotely managing data on a mobile terminal device Over the Air interface of mobile communication. In the era of mobile internet, through the OTA technology, the server can issue the smart card data to the mobile terminal of the user, thereby implementing various smart card functions on the mobile terminal, for example, bank transfer, electronic wallet, electronic shopping, mobile phone payment and other functions. The smart card functions realized by the mobile terminal can provide great convenience for the daily life of a wide range of users. However, how to ensure the security of the smart card data in the issuing process to avoid the actions of card stealing or offline card swiping and the like is one of the key problems to be solved by the current OTA technology.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method for issuing data of a smart card, which can ensure security and integrity of the data issued by the smart card.
The method for issuing the data of the smart card executed by the server provided by the embodiment of the specification can comprise the following steps: after receiving a request of issuing the data of the smart card by a terminal, generating a release key, and encrypting the data of the smart card to be issued by using the release key; issuing an instruction stream carrying the encrypted smart card data to the terminal; and after receiving an execution result of successful execution of the instruction stream fed back by the terminal, issuing a release instruction carrying the release key so that the terminal decrypts by using the release key to obtain the smart card data.
The issuing of the instruction stream carrying the encrypted smart card data to the terminal may include: establishing a secure channel with the terminal; and issuing an instruction stream carrying the encrypted smart card data to the terminal through the secure channel.
The issuing of the release instruction carrying the release key may include: determining an encryption mode of the release key according to a channel environment between the terminal and the terminal; processing the release key according to the determined encryption mode; loading the processed release key and release parameters for indicating the encryption mode of the release key into the release instruction; wherein the encryption mode comprises one of the following: the release key is not encrypted; encrypting the release key by using a pre-stored initial key; encrypting the release key using a process key generated by the terminal in establishing a secure channel with the terminal; and encrypting the release key by using the process key and a pre-stored initial key.
Wherein, the method may further comprise: calculating a digest of at least one of the release key, the release parameter, and the process key; receiving a confirmation code which is fed back by the terminal and generated by the terminal according to at least one of the received release key, the release parameter and the generated process key; comparing the digest with the confirmation code; and responding to the condition that the abstract is inconsistent with the confirmation code, and calling the smart card data issuing process in question.
Wherein, the generating the release key may include: the release key is randomly generated.
The issuing of the release instruction carrying the release key may include: encrypting the release key using at least one of a pre-stored initial key and a process key generated by the terminal in establishing a secure channel with the terminal; and issuing a release instruction carrying the encrypted release key to the terminal.
The method for issuing the data of the smart card executed by the terminal provided by the embodiment of the specification can comprise the following steps: executing an instruction stream which is issued by a server and bears the encrypted smart card data, and acquiring the encrypted smart card data borne in the instruction stream; after the instruction stream is successfully executed, feeding back an execution result of the instruction stream, which is successfully executed, to the server, and receiving a release instruction which is issued by the server and bears a release key; acquiring the release key from the release instruction; decrypting the encrypted smart card data using the release key; and loading the decrypted smart card data.
Wherein, obtaining the release key from the release instruction may include: obtaining an encrypted release key and a release parameter for indicating the encryption mode of the release key from the release instruction; determining an encryption mode of the release key according to the release parameter; and decrypting the encrypted release key by using a decryption mode corresponding to the encryption mode.
Wherein, the method may further comprise: calculating a digest of at least one of the release key, the release parameter, and a process key generated in establishing a secure channel with the server; and returning the digest to the server as a confirmation code.
The server provided by the embodiment of the present specification may include:
the intelligent card data generation module is used for generating intelligent card data to be issued to the terminal after receiving a request of issuing the intelligent card data by the terminal;
the release key generation module is used for generating a release key;
the encryption module is used for encrypting the smart card data by using the release key;
the instruction issuing module is used for issuing an instruction stream carrying the encrypted intelligent card data to the terminal;
and the release module is used for responding to an execution result of successful execution of the instruction stream fed back by the terminal and issuing a release instruction carrying the release key so that the terminal decrypts by using the release key to obtain the smart card data.
Wherein, the instruction issuing module may include:
a secure channel establishing unit, configured to establish a secure channel with the terminal; and
and the transmission unit is used for transmitting an instruction stream carrying the encrypted intelligent card data to the terminal through the secure channel.
Wherein, the release module may include:
an encryption mode confirming unit, configured to determine an encryption mode for the release key according to a channel environment with the terminal;
the encryption unit is used for processing the release key according to the determined encryption mode; and
a release instruction generating unit, configured to load the processed release key and a release parameter indicating an encryption manner of the release key into the release instruction; wherein,
the encryption mode comprises one of the following modes: the release key is not encrypted; encrypting the release key by using a pre-stored initial key; encrypting the release key using a process key generated by the terminal during establishment of a secure channel with the terminal; and encrypting the release key by using the process key and a pre-stored initial key.
Wherein, the server may further include:
a digest determination module for calculating a digest of at least one of the release key, the release parameter, and the process key;
a confirmation code receiving module, configured to receive a confirmation code generated by the terminal according to at least one of the received release key, the release parameter, and the generated process key, where the confirmation code is fed back by the terminal; and
and the comparison module is used for comparing the abstract with the confirmation code and responding to the situation that the abstract is inconsistent with the confirmation code to question the data issuing process of the smart card.
Wherein, the release key generation module randomly generates the release key.
Wherein, the instruction issuing module may include:
a release key encryption unit for encrypting the release key using at least one of a pre-stored initial key and a process key generated by the terminal in establishing a secure channel with the terminal; and
and the instruction issuing unit is used for issuing a release instruction carrying the encrypted release key to the terminal.
The terminal provided by the embodiment of the present specification may include:
the instruction execution module is used for executing an instruction stream which is issued by a server and bears the encrypted smart card data, acquiring the encrypted smart card data borne in the instruction stream, and feeding back an execution result of successful instruction stream execution to the server after the instruction stream is successfully executed;
a release key obtaining module, configured to receive a release instruction carrying a release key issued by the server, and obtain the release key from the release instruction;
and the decryption module is used for decrypting the encrypted smart card data by using the release key and loading the decrypted smart card data.
Wherein, the release key obtaining module may include:
an extraction unit, configured to obtain the encrypted release key and a release parameter indicating an encryption mode of the release key from the release instruction;
the encryption mode determining unit is used for determining the encryption mode of the release key according to the release parameter; and
and the decryption unit is used for decrypting the encrypted release key by using a decryption mode corresponding to the encryption mode.
Wherein, the terminal may further include:
a confirmation code generation module for calculating a digest of at least one of the release key, the release parameter, and a process key generated in the process of establishing a secure channel with the server; and
and the confirmation code feedback module is used for returning the abstract serving as the confirmation code to the server.
Embodiments of the present specification also provide an electronic device, which may include: the intelligent card data issuing method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the intelligent card data issuing method.
Embodiments of the present specification further provide a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions for causing the computer to execute the smart card data issuing method.
In the above-mentioned solution provided in this embodiment of the present specification, since the smart card data sent by the server to the terminal is encrypted by the release key, the release instruction bearing the release key is sent to the terminal only after the server receives the execution result that the instruction stream fed back by the terminal is successfully executed. That is, before this, even if the terminal has downloaded the smart card data, but the smart card data is encrypted, the terminal cannot decrypt it, and only after the server has confirmed that the terminal has successfully executed the issued instruction stream, the terminal can obtain the release key for decrypting the smart card data. Therefore, the above process can effectively avoid the situation that the smart card data is failed to be issued or is in doubt marked at the server side through the setting of the release key and the release instruction, but the terminal side already obtains complete smart card data, that is, the situation that the card is illegally manufactured and the card is stolen offline for swiping due to the asymmetry of the server and the terminal information can be effectively avoided by adopting the issuing scheme of the smart card data, the safety and the integrity of the smart card data in the issuing process are ensured, and the safety of realizing the smart card service on the terminal is also ensured.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present specification, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of a system for implementing a smart card service in a mobile terminal according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a smart card data issuing method according to some embodiments of the present disclosure;
fig. 3 is a schematic flowchart of a smart card data issuing method according to another embodiment of the present disclosure;
fig. 4 is a schematic flowchart illustrating a smart card data issuing method according to still another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an internal structure of a publisher's server, in accordance with some embodiments of the present disclosure;
fig. 6 is a schematic diagram of the internal structure of a security carrier according to some embodiments of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present specification more apparent, the present specification is further described in detail below with reference to the accompanying drawings in combination with specific embodiments.
It should be noted that technical terms or scientific terms used in the embodiments of the present specification should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
As described above, currently, a server of a smart card service issuer can issue data related to a smart card application to a mobile terminal through an OTA technology, so as to implement various smart card functions on the mobile terminal, including various financial or banking services. Thus, after the mobile terminal is loaded with the smart card data, a smart card can be created on the smart terminal and can be used, for example, for taking a car, withdrawing money, consuming, parking, etc.
Fig. 1 is a schematic structural diagram of a system 100 for implementing a smart card service on a mobile terminal according to an embodiment of the present disclosure. As shown in fig. 1, the system 100 may include a mobile terminal 102 (hereinafter, also referred to simply as a terminal 102) and a smart card service issuer server 104 (hereinafter, referred to simply as a server 104).
The terminal 102 may specifically refer to an Application (APP) installed on a mobile terminal or a separate client device set by an issuer, such as a Point of sale (POS) machine or a service terminal. The terminal 102 may be configured to communicate with the server 104 to implement issuing of smart card data, and may load the smart card data issued by the server 104 to create a smart card, thereby implementing a smart card service on the terminal 102.
Specifically, the smart card data is sent to the terminal 102 in an instruction carried by the server 104. The terminal 102 may execute the instructions issued by the server 104 and load the smart card data issued by the server to implement the smart card function.
In order to ensure the security of the smart card data, before the smart card data is issued, a secure channel is generally required to be established between the server 104 and the terminal 102, and the server 104 issues an instruction carrying the smart card data to the terminal 102 by using the established secure channel. After executing the received command, the terminal 102 loads the smart card data and returns a command result to the server 104. After receiving the result of successful execution of the instruction fed back by the terminal 102, the server 104 may mark that the smart card data issuing process is successful. If the server 104 does not receive the result of successful execution of the instruction fed back by the terminal 102 or receives the result of failed execution of the instruction fed back by the terminal 102, the server 104 will generally question the smart card data issuing process, and then may re-execute the smart card data issuing process according to the system setting.
In the process of issuing the data of the smart card, if the terminal 102 is controlled by an illegal user to write or block the return of the instruction execution result, the server 104 will consider that the issuing process is an incomplete or failed smart card issuing process, and will doubt the behavior.
However, at this time, the terminal 102 has actually successfully executed all the instructions in the instruction stream, and has received all the smart card data, that is, has obtained confidential information such as the application and key information of the smart card, thereby providing a possibility for card stealing or offline card swiping.
For example, for the card opening or recharging service of the smart card, if in the above-mentioned process, the illegal user controls the client to write and change the return of the last instruction execution result, at this time, although the server has made a doubt on the data issuing process of the smart card this time, the security carrier has already obtained all the data of the smart card, so the security carrier can complete the card opening or recharging according to the received data of the smart card, that is, from the side of the security carrier, the card opening or recharging service has succeeded this time. At this time, the illegal user can perform card swiping consumption on the issuer consuming terminal used offline, and the issuer consuming terminal is used offline, so that the illegal user cannot be timely discovered by the server, and the issuer funds are lost.
Therefore, some embodiments of the present specification provide a method for issuing data of a smart card, which can solve the above problem.
In the method provided in the embodiment of the present specification, the server can ensure that the terminal can obtain the release key capable of decrypting the smart card data through the release instruction to obtain complete smart card data only after the server confirms that the smart card data issuing process is successfully completed through the setting of the release key and the release instruction, thereby effectively avoiding the situations of illegal card manufacturing and offline card swiping caused by asymmetric information of the server and the terminal, ensuring the security and integrity of the smart card data in the issuing process thereof, and also ensuring the security of the smart card service realized on the terminal
Fig. 2 is a schematic diagram illustrating a smart card data issuing process according to some embodiments of the present disclosure, where the method may be executed by a server. As shown in fig. 2, the method may include:
in step 202, after receiving a request of issuing the smart card data from the terminal, generating a release key, and encrypting the smart card data to be issued by using the release key;
in step 204, an instruction stream carrying the encrypted smart card data is issued to a terminal;
in step 206, after receiving the execution result that the instruction stream fed back by the terminal is successfully executed, a release instruction carrying a release key is issued to enable the terminal to decrypt and obtain the smart card data by using the release key.
Fig. 3 is a schematic diagram illustrating a smart card data issuing process according to another embodiment of the present disclosure, where the method may be executed by a terminal. As shown in fig. 3, the method may include:
in step 302, executing an instruction stream which is issued by a server and carries the encrypted smart card data, and acquiring the encrypted smart card data carried in the instruction stream;
in step 304, after the instruction stream is successfully executed, feeding back an execution result of the instruction stream to the server;
in step 306, a release instruction carrying a release key issued by the server is received;
in step 308, obtaining the release key from the release instruction;
decrypting the encrypted smart card data using the release key at step 310;
at step 312, the decrypted smart card data is loaded.
It should be noted that, in the embodiments of the present specification, an application capable of running inside a smart card is generally referred to as a card application, for example, a financial IC card, a transportation IC card, a high-speed ETC card, and the like may be regarded as different applications located inside the smart card; data related to card applications, referred to as smart card data for short, may include application data, key data, basic information data, and other data, among others.
Therefore, in the solution provided in the embodiment of the present specification, since the smart card data is encrypted by the release key, the release instruction bearing the release key is issued to the terminal only after the server receives the execution result that the instruction stream fed back by the terminal is successfully executed. That is, even if the terminal has downloaded the smart card data before that, it cannot be decrypted. Therefore, the above process can effectively avoid the situation that the server side has obtained complete smart card data even though the server side marks that the smart card data is failed to be issued or is in doubt through the setting of the release key and the release instruction, that is, the problem of illegal card making and offline card swiping which may occur can be avoided by adopting the method for issuing the smart card data, and the security of the smart card data in the issuing process can be ensured.
In some embodiments of the present description, in order to ensure the security of the release key issuing process and further ensure the security of the smart card data issuing process, the server may further encrypt the release key issued by the release instruction, and the encryption manner that the server may specifically adopt includes multiple types.
In some embodiments of the present description, the server may encrypt the release key using a pre-stored initial key. Wherein the initial key is a key pre-stored in the server and the terminal for encrypting the release key. In this case, when receiving the encrypted release key, the terminal decrypts the received encrypted release key using the initial key stored in the terminal itself to obtain the plaintext of the release key, and then decrypts the encrypted smart card data using the plaintext of the release key.
To further ensure the security of the encryption process for releasing the key, the server may periodically update the initial key, for example, randomly generate a new initial key, encrypt the new initial key with the old initial key, and then send the encrypted new initial key to the terminal through a key update message. And after receiving the key updating message, the terminal decrypts the new encrypted initial key carried in the message by using the old initial key stored in the terminal to obtain the new initial key, thereby completing the updating of the initial key.
In other embodiments of the present description, the server will establish a secure channel with the terminal before issuing the smart card data; and then, issuing an instruction stream carrying the encrypted smart card data to a terminal through the established secure channel. The secure channel is established for ensuring the security of instruction and data transmission, in the process of establishing the secure channel, the terminal generates a process key and sends the process key to the server, the server stores the process key generated by the terminal, and the terminal and the server encrypt the transmitted information through the process key in the process of transmitting the instruction stream and the instruction stream execution result, so that the security of instruction and data transmission is ensured. In this case, the server may encrypt the release key using the above-described procedure key. At this time, when the terminal receives the encrypted release key, the terminal decrypts the received encrypted release key by using the stored process key to obtain the plaintext of the release key, and then decrypts the encrypted smart card data by using the plaintext of the release key.
In further embodiments of the present specification, since there are multiple encryption manners that can be adopted by the server, the server may first determine an encryption manner for releasing the key according to a communication environment between itself and the terminal, and process the released key according to the determined encryption manner; then, loading the processed release key and release parameters for indicating the encryption mode of the release key into the release instruction; wherein, the encryption mode comprises one of the following modes: the release key is not encrypted; encrypting the release key by using a pre-stored initial key; encrypting the release key using a process key generated by the terminal during establishment of a secure channel with the terminal; and encrypting the release key by using the process key and a pre-stored initial key. In this case, when receiving the encrypted release key, the terminal acquires the encrypted release key and a release parameter indicating the encryption mode of the release key from the received release instruction; determining an encryption mode for releasing the key according to the release parameter; and then, decrypting the encrypted release key by using a decryption mode corresponding to the encryption mode to obtain a plaintext of the release key, and finally decrypting the encrypted smart card data by using the plaintext of the release key.
It should be noted that, in the above embodiment, when the server determines that the communication environment between itself and the terminal is good at present, a mode of not encrypting the release key may be selected; and when the server determines that the communication environment between the server and the terminal is not good currently, the server can choose to encrypt the release key by using one key or a plurality of keys. The optional encryption modes can be pre-configured in the server and the terminal and are identified through the release parameters, so that after the server determines the encryption mode and sends the release parameters corresponding to the determined encryption mode to the terminal, the terminal can determine the encryption mode adopted by the server end through the received release parameters, and then the corresponding decryption mode is adopted to decrypt the release key.
In the embodiment of the present specification, in order to ensure that the encryption mode of the decryption key and the decryption key themselves adopted by the terminal and the server are consistent, so as to further ensure the security of the data issuing process of the smart card, a secondary verification of the encryption mode and the decryption key may also be implemented between the terminal and the server. Specifically, the secondary verification process may include:
the terminal calculates the digest of at least one of the release key, the release parameter and the process key generated in the process of establishing the secure channel with the server; and returns the computed digest to the server as a confirmation code.
The server calculates the abstract of at least one of the release key, the release parameter and the process key in the same way as the terminal; receiving a confirmation code fed back by the terminal; comparing the calculated abstract with the received confirmation code; in response to the condition that the abstract is inconsistent with the confirmation code, the data issuing process of the smart card is questioned; subsequently, the server may re-execute the smart card issuing process, that is, re-issue the smart card data, or the server tags the smart card and further performs other verification operations in subsequent use of the smart card. And responding to the condition that the abstract is consistent with the confirmation code, and confirming that the data issuing process of the smart card is successfully completed.
In the second verification process, the data sources used by the terminal and the server to calculate the digest are the same and are pre-configured in the terminal and the server. The terminal and the server calculate the abstract according to a pre-configured mode. For example, the terminal and the server are configured in advance to calculate the digest of the release key; or the terminal and the server are configured in advance to calculate the release key and the digest of the release parameters, and the like.
A specific process of issuing the smart card data will be described in detail below with reference to the accompanying drawings.
Those skilled in the art will appreciate that various functions can be implemented in the mobile terminal by using a Secure Element (SE) as a carrier. The SE is a hardware chip that protects user sensitive information and data and provides a secure and trusted execution environment for the processing of such information and data. Therefore, in the embodiments of the present specification, such a function implemented by using the SE as a carrier may be referred to as a secure carrier, and the above-mentioned smart card data is carried on the secure carrier as a carrier of the created smart card. At this time, the mobile terminal 102 may be divided into two parts of the secure carrier 101 and the client 103 installed on the mobile terminal. Hereinafter, embodiments of the present specification may be described taking a secure carrier as an example of a carrier of a smart card.
Fig. 4 is a flowchart illustrating a smart card data issuing process according to some embodiments of the present disclosure. As shown in fig. 4, in order to implement issuing of the smart card data, the secure carrier 101, the client 103 and the server 104 on the terminal 102 together complete the following processes:
in step 402, the client 103 sends a smart card data issuing request to the server 104, and requests the server 104 to issue the smart card data.
In step 404, the server 104 establishes a secure channel between itself and the secure bearer 101 through the client 103, and ensures the security of the link between the secure bearer 101 and the issuer server 104, thereby ensuring the security of data transmission.
In some embodiments of the present description, server 104 may establish a secure channel between itself and secure carrier 101 through the SCP02 protocol. As will be understood by those skilled in the art, the SCP02 protocol is a secure channel protocol between the smart card and an entity outside the smart card, for ensuring entity authentication, integrity and source authentication of transmitted data, and confidentiality of transmitted data.
The server 104 stores the process key generated by the secure carrier 101 during the above-described establishment of the secure channel, step 406.
In some embodiments of the present description, the process key may generally include a message key K1, an encryption key K2, and a session key K3. In the subsequent data transmission process of the intelligent card, the transmitted data and the transmitted instruction are encrypted through each secret key in the secret keys in the process, namely, the transmitted instruction and the transmitted data are protected through the established safe channel, so that the safety of the transmitted instruction and the transmitted data is ensured.
At step 408, the server 104 generates the smart card data to be transmitted.
In some embodiments of the present description, the smart card data may include: application data and key information to be issued; the method specifically comprises the following steps: and plaintext information of the application data and the plaintext information of the key to be issued.
In step 410, the server 104 generates a release key K4 and encrypts the smart card data using the release key K4.
In some embodiments of the present description, the server may randomly generate the above-described release key K4. For example, the server may generate a random number and use the random number as the release key K4.
In step 412, the server 104 generates a distribution instruction stream according to the encrypted smart card data to be distributed, where the instruction stream includes at least one instruction to be executed by the secure bearer, and the encrypted smart card data is carried in the instruction stream.
In step 414, the server 104 issues the instructions to the secure carrier 101 item by item through the client 103 in the order of the instruction stream.
At step 416, the secure carrier 101 executes the received instruction, stores the encrypted smartcard data carried in the instruction, and returns the instruction execution result to the server 104 via the client 103.
The above process may be repeated until the server 104 receives the instruction execution result of the last instruction.
In step 418, the server 104 generates a release instruction after determining that the secure bearer 101 has successfully executed the instruction in the instruction stream according to the instruction execution result, where the release instruction carries the release key K4.
In the embodiment of the present specification, when determining that the secure carrier 101 does not successfully execute a certain instruction in the instruction stream according to the instruction execution result, the server 104 will challenge the issuing process of the smart card data of this time, and end the above process. Subsequently, the server 104 may re-execute the smart card issuing process, that is, re-issue the smart card data.
In some embodiments of the present specification, the server may directly carry the plaintext of the release key K4 in the release instruction.
In other embodiments of this specification, the server may first encrypt the release key K4 by using the procedure key, for example, encrypt the release key K4 by using the encryption key K2 in the procedure key, and then carry the encrypted release key K4 in the release instruction.
In further embodiments of the present specification, it is also possible to write an initial key into the secure carrier in a preset manner before the secure carrier leaves the factory, and store the same initial key at the server side, where the initial key is a key used for encrypting the release key. That is, in this step, the server may first encrypt the release key K4 using the initial key, and then carry the encrypted release key K4 in the release instruction. In addition, the server may also encrypt the release key K4 by using the encryption key K2 in the process key, perform secondary encryption on the release key K4 by using the initial key (or encrypt the release key K4 by using the initial key, perform secondary encryption on the release key K4 by using the encryption key K2 in the process key, and then carry the encrypted release key K4 in the release instruction.
In order to further ensure the security of the data issuing process of the smart card, the updating process of the initial key can be further increased. Specifically, the server may randomly generate a new initial key, encrypt the new initial key using the currently stored initial key, and then send the encrypted new initial key to the secure carrier through the initial key update instruction. At this time, the secure carrier may decrypt the new initial key according to the currently stored initial key to obtain the new initial key, thereby completing updating of the initial key. The above updating process may be performed periodically, that is, the server may set a life cycle for the initial key, and when the life cycle of the initial key expires, the server may perform the updating process of the initial key.
In still other embodiments of the present description, the server may first determine the encryption mode for the release key K4 based on the specific link environment. For example, if the current communication with the client is determined to be in a trusted environment, the server determines that the release key K4 does not need to be encrypted; and if the communication with the client currently is judged not to be in the trusted environment, the server determines how to encrypt the release key K4. For example, the server may encrypt the release key K4 using the encryption key K2 or the initial key in the process key; the server can also encrypt the release key K4 by using an encryption key K2 in the process key, and then encrypt the release key K4 for the second time by using the initial key; or the server may first encrypt the release key K4 using the initial key, and then encrypt the release key K4 using the encryption key K2 in the process key for the second time. In this case, the server needs to set a release parameter P for indicating the encryption scheme for the release key. For example, if the release key is not encrypted, the release parameter P may be set to 00; if the release key K4 is encrypted using the encryption key K2 in the process key, the release parameter P may be set to 01; if the release key K4 is encrypted using the initial key, the release parameter P may be set to 10; if the release key K4 is encrypted by using the encryption key K2 in the process key, and then the release key K4 is encrypted for the second time by using the initial key, the release parameter P may be set to 11. Or, only one single encryption mode is agreed between the server and the secure carrier, setting the release parameter P to 1 may represent that the release key K4 is encrypted, and setting the release parameter P to 0 may represent that the release key K4 is not encrypted. The setting of the release parameter P is only an example, and any setting method is possible, which is not limited in the present specification.
After determining the encryption mode of the release key, the server encrypts the release key K4 according to the determined encryption mode, and carries the encrypted release key K4 and the release parameter indicating the encryption mode of the release key in the release instruction. Thus, the secure carrier can determine the encryption mode of the server according to the release parameter P, and decrypt the encrypted release key by using a corresponding decryption mode.
In step 420, the server 104 issues the release instruction to the secure carrier 101 through the client 103, and marks that the smart card data issuing process is completed this time.
In step 422, the secure carrier 101 obtains the release key K4 from the release instruction.
In some embodiments of the present description, if the secure carrier confirms that the server does not encrypt the release key K4, the plaintext of the release key K4 may be directly obtained from the release instruction.
In other embodiments of the present specification, if the secure carrier confirms that the server encrypts the release key K4 using the process key (for example, the encryption key K2), the secure carrier may first obtain the encrypted release key K4 from the release instruction; then, the encrypted release key K4 is decrypted by using the process key (e.g., the encryption key K2), so as to obtain a plaintext of the release key K4.
In still other embodiments of the present description, if the secure carrier knows that the server uses the initial key to encrypt the release key K4, the secure carrier may first obtain the encrypted release key K4 from the release instruction; and then, decrypting the encrypted release key K4 by using the stored initial key to obtain the plaintext of the release key K4.
In still other embodiments of the present specification, if the release instruction includes the release parameter P in addition to the release key K4, in this case, the secure carrier may first determine an encryption manner of the release key carried in the release instruction according to the release parameter P, for example, the release key is not encrypted, the release key is encrypted by the process key, the initial key is encrypted, the process key is encrypted and the initial key is encrypted secondarily, or the initial key is encrypted and the process key is encrypted secondarily. And then, the secure carrier decrypts the encrypted release key K4 by adopting a corresponding decryption mode according to the determined encryption mode to obtain a plaintext of the release key K4. If the encryption is not performed, the secure carrier may directly obtain the plaintext of the release key K4 from the release instruction.
In step 424, the secure carrier 101 decrypts the encrypted smart card data acquired from the server 104 using the acquired release key K4, and loads the smart card data.
Only in this step is the secure carrier able to obtain all the real smart card data.
In the above process, since the smart card data is encrypted by the release key K4, before the server issues the release instruction, the secure carrier, although having successfully executed the instruction stream issued by the server, cannot decrypt the received smart card data, and thus cannot use the smart card data. And at the server end, the release instruction is issued only after the server determines that the security carrier successfully executes all the instructions according to the received instruction execution result, and the completion of the data issuing of the smart card can be marked when the server issues the release instruction. Therefore, the situation that the data issuing state of the smart card recorded by the server is inconsistent with the actual execution state of the security carrier can not occur. Therefore, the method can effectively avoid the situation that the security carrier side already obtains complete smart card data when the server side doubts the smart card data issuing process, thereby effectively avoiding the possible problems of illegal card making or offline card stealing and swiping, and further ensuring the security of the smart card data in the issuing process.
Furthermore, in order to further ensure the security of the smart card data issuing process, the process may further include:
at step 426, the secure carrier 101 generates a confirmation code from the release key K4.
In some embodiments of the present specification, the generating the confirmation code according to the release key K4 may be that the secure carrier calculates a digest of the release key K4, and uses the calculated digest as the confirmation code.
In other embodiments of the present disclosure, if the release instruction includes the release parameter P, the secure carrier may calculate a digest of the release key K4 and/or the release parameter P, and use the calculated digest as the confirmation code.
To further enhance security, in some embodiments of the present disclosure, one or any combination of the process keys may be added as a dynamic factor to the calculation of the digest, that is, one or any combination of the process keys, the release key K4 and the release parameter P (if any) are calculated, and the calculated digest is used as the confirmation code.
It should be noted that, the above step of calculating the digest may adopt various existing digest algorithms, such as a hash algorithm, etc. The specific abstract calculation method is not limited in the specification.
The secure carrier 101 returns the confirmation code to the server 104 via the client 103 at step 428.
At step 430, the server 104 verifies the confirmation code fed back by the secure carrier 101.
In some embodiments of the present specification, the server may calculate the digest based on the same information as the security carrier in the same way as the security carrier, and compare whether the confirmation code obtained from the security carrier is consistent with the digest calculated by itself. If they are consistent, the verification is passed and the server may record the confirmation code. At this time, the server may confirm that the security carrier has successfully obtained all the smart card data, that is, the smart card data issuing process is successful. If the data are inconsistent, the verification is not passed, and the server can question the data issuing process of the smart card. Subsequently, the server can execute the smart card issuing process again, namely, the smart card data is issued again; alternatively, the server tags the smart card and further performs other authentication operations in subsequent uses of the smart card.
It should be noted that the steps 426-430 may be executed after the step 424, before the step 424, or in parallel with the step 424, so as to reduce the time delay caused by executing the above operations. The order of execution of these steps is not limited in this specification.
In the embodiment of the present specification, by setting the confirmation code, the server may further check whether the security carrier decrypts the released key according to an encryption policy formulated by the server, so as to confirm whether the security carrier accurately obtains real smart card data, ensure that the server can confirm whether the operation of the security carrier is successful, further ensure state synchronization between the security carrier and the server, ensure security of the issuing process of the smart card data, and effectively avoid the possibility that the client is controlled by an illegal user in the process and falsifies the transmitted message, thereby further avoiding the occurrence of situations such as illegal card making or offline card swiping.
It should be noted that, although the foregoing embodiment describes an example of a scheme in which a secure carrier in a mobile terminal is used to implement a smart card, and an APP in the mobile terminal is used as a client, the technical solution provided by the foregoing embodiment may also be applied to a scheme of an entity smart card. That is, in such a scheme, the secure carrier may be embodied as a smart card, such as an IC card, and the client may be embodied as a terminal device of the issuer, such as a card issuing terminal or a charging terminal. Even, the scheme described in this embodiment can also be applied to the program issuing process of the internet of things terminal, in this application, the internet of things terminal issues the program through the issuer terminal, and in the program issuing process, in order to ensure the completeness and reliability of the program issuing process, the server side can set the release key to encrypt the program data, and after the program data issuing process is completed, the release flow is started to issue the release key to the internet of things terminal, so as to ensure the completeness and reliability of the issuing process.
It should be further noted that the method of the embodiments of the present specification may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the multiple devices may perform only one or more steps of the method of the embodiments, and the multiple devices interact with each other to complete the method.
In response to the above method, some embodiments of the present specification disclose an issuer server. Fig. 5 shows the internal structure of an issuer server according to some embodiments of the present description. As shown in fig. 5, the server may include:
the smart card data generation module 502 is configured to generate smart card data to be issued to the terminal after receiving a request for issuing the smart card data by the terminal;
a release key generation module 504, configured to generate a release key;
an encryption module 506, configured to encrypt the smart card data using the release key;
an instruction issuing module 508, configured to issue, to the terminal, an instruction stream carrying the encrypted smart card data; and
and the release module 510 is configured to issue a release instruction carrying the release key in response to an execution result that the instruction stream fed back by the terminal is successfully executed, so that the terminal decrypts to obtain the smart card data.
In some embodiments of the present specification, the instruction issuing module 508 may include:
a secure channel establishing unit, configured to establish a secure channel with the terminal; and
and the transmission unit is used for transmitting an instruction stream carrying the encrypted intelligent card data to the terminal through the secure channel.
In some embodiments of the present description, the releasing module 510 may include:
an encryption mode confirming unit, configured to determine an encryption mode for the release key according to a channel environment with the terminal;
the encryption unit is used for processing the release key according to a determined encryption mode; and
a release instruction generating unit, configured to carry the processed release key and a release parameter indicating an encryption manner of the release key in the release instruction; wherein,
the encryption mode comprises one of the following modes: the release key is not encrypted; encrypting the release key by using a pre-stored initial key; encrypting the release key using a process key generated by the terminal during establishment of a secure channel with the terminal; and encrypting the release key by using the process key and a pre-stored initial key.
In some embodiments of the present specification, the server may further include:
a digest determination module for calculating a digest of at least one of the release key, the release parameter, and the process key;
a confirmation code receiving module, configured to receive a confirmation code generated by the terminal according to at least one of the received release key, the release parameter, and the generated process key, where the confirmation code is fed back by the terminal; and
and the comparison module is used for comparing the abstract with the confirmation code and responding to the condition that the abstract is inconsistent with the confirmation code to question the data issuing process of the smart card.
In some embodiments of the present description, the release key generation module may randomly generate the release key.
In some embodiments of the present specification, the instruction issuing module 508 may include:
a release key encryption unit for encrypting the release key using at least one of a pre-stored initial key and a process key generated by the terminal in establishing a secure channel with the terminal; and
and the instruction issuing unit is used for issuing a release instruction carrying the encrypted release key to the terminal.
In an embodiment of the present specification, the server of the issuer may be regarded as one electronic device, and therefore, the server may further include: memory 50, processor 52, input/output interface 54, communication interface 56, and bus 58. Wherein the processor 52, memory 50, input/output interface 54, and communication interface 56 are communicatively coupled to each other within the device via a bus 58.
The Memory 50 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 50 may store an operating system and other application programs, and may also store various modules of the server provided in the embodiments of the present specification, and when the technical solution provided in the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 50 and called and executed by the processor 52.
The processor 52 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The input/output interface 54 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 56 is used for connecting a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication in a wired mode (for example, USB, network cable, etc.), and can also realize communication in a wireless mode (for example, mobile network, WIFI, bluetooth, etc.).
Bus 58 includes a path that transfers information between the various components of the device, such as processor 52, memory 50, input/output interface 54, and communication interface 56.
It should be noted that although the above-described device only shows the processor 52, the memory 50, the input/output interface 54, the communication interface 56 and the bus 58, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
In response to the above method, some embodiments of the present specification disclose a security vector. Fig. 6 shows the internal structure of a security carrier according to some embodiments of the present description. As shown in fig. 6, the security carrier may include:
the instruction execution module 602 is configured to execute an instruction stream that is sent by a server and carries the encrypted smart card data, obtain the encrypted smart card data carried in the instruction stream, and feed back an execution result that the instruction stream is successfully executed to the server;
a release key obtaining module 604, configured to receive a release instruction carrying a release key and issued by the server, and obtain the release key from the release instruction;
a decryption module 606, configured to decrypt the encrypted smart card data using the release key, and load the decrypted smart card data.
In an embodiment of the present specification, the released key obtaining module 604 may include:
an extraction unit, configured to obtain the encrypted release key and a release parameter indicating an encryption mode of the release key from the release instruction;
an encryption mode determining unit, configured to determine an encryption mode of the release key according to the release parameter; and
and the decryption unit is used for decrypting the encrypted release key by using a decryption mode corresponding to the encryption mode.
In an embodiment of the present specification, the terminal may further include:
a confirmation code generation module for calculating a digest of at least one of the release key, the release parameter, and a process key generated in the process of establishing a secure channel with the server; and
and the confirmation code feedback module is used for returning the abstract serving as the confirmation code to the server.
In an embodiment of the present specification, the server of the issuer may be regarded as one electronic device, and therefore, the server may further include: memory 60, processor 62, input/output interface 64, communication interface 66, and bus 68. Wherein the processor 62, memory 60, input/output interface 64, and communication interface 66 are communicatively coupled to each other within the device via bus 68.
The Memory 60 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 60 may store an operating system and other application programs, and may also store various modules of the server provided in the embodiments of the present specification, and when the technical solution provided in the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 60 and called and executed by the processor 62.
The processor 62 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The input/output interface 64 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and the output devices may include a display, speaker, vibrator, indicator light, etc.
The communication interface 66 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (for example, USB, network cable, etc.), and can also realize communication in a wireless mode (for example, mobile network, WIFI, bluetooth, etc.).
Bus 68 includes a pathway for transferring information between various components of the device, such as processor 62, memory 60, input/output interface 64, and communication interface 66.
It should be noted that although the above-described device only shows the processor 62, the memory 60, the input/output interface 64, the communication interface 66 and the bus 68, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only the components necessary to implement the embodiments of the present disclosure, and need not include all of the components shown in the figures.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the electronic device embodiment and the computer storage medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the context of this description, features in the above embodiments or in different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of the different aspects of this description as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the description. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the description, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the description is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the specification, it should be apparent to one skilled in the art that the specification can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present specification has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures, such as Dynamic RAM (DRAM), may use the discussed embodiments.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments of the present description are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalents, improvements, and the like that may be made within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (14)

1. A smart card data issuing method is executed by a server and comprises the following steps:
after receiving a request of issuing the data of the smart card by a terminal, generating a release key, and encrypting the data of the smart card to be issued by using the release key;
issuing an instruction stream carrying the encrypted smart card data to the terminal; and
after receiving an execution result of successful execution of the instruction stream fed back by the terminal, issuing a release instruction carrying the release key so that the terminal decrypts by using the release key to obtain the smart card data; wherein,
the issuing of the release instruction carrying the release key comprises:
determining an encryption mode of the release key and a release parameter for indicating the encryption mode of the release key according to a channel environment between the terminal and the terminal;
processing the release key according to the determined encryption mode; and
loading the processed release key and the release parameter in the release instruction; wherein,
the encryption mode comprises one of the following modes: the release key is not encrypted; encrypting the release key by using a pre-stored initial key; encrypting the release key using a process key generated by the terminal during establishment of a secure channel with the terminal; and encrypting the release key by using the process key and a pre-stored initial key.
2. The method of claim 1, wherein the issuing, to the terminal, an instruction stream carrying the encrypted smart card data comprises:
establishing a secure channel with the terminal; and
and issuing an instruction stream carrying the encrypted smart card data to the terminal through the secure channel.
3. The method of claim 1, wherein the method further comprises:
calculating a digest of at least one of the release key, the release parameter, and the process key;
receiving a confirmation code which is fed back by the terminal and generated by the terminal according to at least one of the received release key, the release parameter and the generated process key;
comparing the digest with the confirmation code;
and responding to the condition that the abstract is inconsistent with the confirmation code, and calling the smart card data issuing process in question.
4. The method of claim 1, wherein the generating a release key comprises: the release key is randomly generated.
5. A smart card data issuing method is executed by a terminal and comprises the following steps:
executing an instruction stream which is issued by a server and bears the encrypted smart card data, and acquiring the encrypted smart card data borne in the instruction stream;
after the instruction stream is successfully executed, feeding back an execution result of the instruction stream to the server;
receiving a release instruction which is issued by the server and bears a release key;
obtaining the release key from the release instruction;
decrypting the encrypted smart card data using the release key; and
loading the decrypted smart card data; wherein,
acquiring the release key from the release instruction comprises:
obtaining an encrypted release key and a release parameter for indicating the encryption mode of the release key from the release instruction;
determining an encryption mode of the release key according to the release parameter; and
and decrypting the encrypted release key by using a decryption mode corresponding to the encryption mode.
6. The method of claim 5, wherein the method further comprises:
calculating a digest of at least one of the release key, the release parameter, and a process key generated during establishment of a secure channel with the server; and
and returning the abstract to the server as a confirmation code.
7. A server, comprising:
the intelligent card data generation module is used for generating intelligent card data to be issued to the terminal after receiving a request of issuing the intelligent card data by the terminal;
the release key generation module is used for generating a release key;
the encryption module is used for encrypting the smart card data by using the release key;
the instruction issuing module is used for issuing an instruction stream carrying the encrypted intelligent card data to the terminal;
the release module is used for responding to an execution result of successful execution of the instruction stream fed back by the terminal, and issuing a release instruction carrying the release key so that the terminal can decrypt and obtain the smart card data by using the release key; wherein,
the release module includes:
an encryption mode confirming unit, configured to determine, according to a channel environment with the terminal, an encryption mode for the release key and a release parameter indicating the encryption mode for the release key;
the encryption unit is used for processing the release key according to the determined encryption mode; and
a release instruction generating unit, configured to carry the processed release key and the release parameter in the release instruction; wherein,
the encryption mode comprises one of the following modes: the release key is not encrypted; encrypting the release key by using a pre-stored initial key; encrypting the release key using a process key generated by the terminal during establishment of a secure channel with the terminal; and encrypting the release key by using the process key and a pre-stored initial key.
8. The server of claim 7, wherein the instruction issuing module comprises:
a secure channel establishing unit, configured to establish a secure channel with the terminal; and
and the transmission unit is used for transmitting an instruction stream carrying the encrypted intelligent card data to the terminal through the secure channel.
9. The server of claim 7, wherein the server further comprises:
a digest determination module for calculating a digest of at least one of the release key, the release parameter, and the process key;
a confirmation code receiving module, configured to receive a confirmation code generated by the terminal according to at least one of the received release key, the release parameter, and the generated process key, where the confirmation code is fed back by the terminal; and
and the comparison module is used for comparing the abstract with the confirmation code and responding to the situation that the abstract is inconsistent with the confirmation code to question the data issuing process of the smart card.
10. The server of claim 7, wherein the release key generation module randomly generates the release key.
11. A terminal, comprising:
the instruction execution module is used for executing an instruction stream which is issued by a server and bears encrypted smart card data, acquiring the encrypted smart card data borne in the instruction stream, and feeding back an execution result of successful instruction stream execution to the server after the instruction stream is successfully executed;
a release key acquisition module, configured to receive a release instruction carrying a release key issued by the server, and acquire the release key from the release instruction;
the decryption module is used for decrypting the encrypted smart card data by using the release key and loading the decrypted smart card data; wherein,
the release key acquisition module includes:
the extraction unit is used for acquiring the encrypted release key and a release parameter indicating the encryption mode of the release key from the release instruction;
an encryption mode determining unit, configured to determine an encryption mode of the release key according to the release parameter; and
and a decryption unit configured to decrypt the encrypted release key using a decryption method corresponding to the encryption method.
12. The terminal of claim 11, wherein the terminal further comprises:
a confirmation code generation module for calculating a digest of at least one of the release key, the release parameter, and a process key generated in the process of establishing a secure channel with the server; and
and the confirmation code feedback module is used for returning the abstract serving as the confirmation code to the server.
13. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the method of any one of claims 1 to 4.
14. A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 4.
CN202010037756.9A 2020-01-14 2020-01-14 Smart card data issuing method and device, electronic equipment and storage medium Active CN111314062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010037756.9A CN111314062B (en) 2020-01-14 2020-01-14 Smart card data issuing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010037756.9A CN111314062B (en) 2020-01-14 2020-01-14 Smart card data issuing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111314062A CN111314062A (en) 2020-06-19
CN111314062B true CN111314062B (en) 2022-10-18

Family

ID=71148736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010037756.9A Active CN111314062B (en) 2020-01-14 2020-01-14 Smart card data issuing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111314062B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667240A (en) * 2009-08-20 2010-03-10 北京握奇数据系统有限公司 Intelligent card and card writing method, equipment and system thereof
CN103532714A (en) * 2012-07-06 2014-01-22 中国银联股份有限公司 Method and system for transmitting data from data provider to intelligent card
CN104506497A (en) * 2014-12-10 2015-04-08 青岛海信电器股份有限公司 Information issuing method and system
CN105701390A (en) * 2016-03-08 2016-06-22 中国联合网络通信集团有限公司 Encryption terminal remote management method, encryption terminal and manager
CN106357393A (en) * 2016-08-27 2017-01-25 飞天诚信科技股份有限公司 Safe data transmission method and device
JP2019004475A (en) * 2018-07-31 2019-01-10 ウノ チェ Authentication under ubiquitous environment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9413759B2 (en) * 2013-11-27 2016-08-09 At&T Intellectual Property I, Lp Apparatus and method for secure delivery of data from a communication device
US10965449B2 (en) * 2018-05-31 2021-03-30 Microsoft Technology Licensing, Llc Autonomous secrets management for a key distribution service
CN108768643A (en) * 2018-06-22 2018-11-06 哈尔滨工业大学 A kind of private data guard method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667240A (en) * 2009-08-20 2010-03-10 北京握奇数据系统有限公司 Intelligent card and card writing method, equipment and system thereof
CN103532714A (en) * 2012-07-06 2014-01-22 中国银联股份有限公司 Method and system for transmitting data from data provider to intelligent card
CN104506497A (en) * 2014-12-10 2015-04-08 青岛海信电器股份有限公司 Information issuing method and system
CN105701390A (en) * 2016-03-08 2016-06-22 中国联合网络通信集团有限公司 Encryption terminal remote management method, encryption terminal and manager
CN106357393A (en) * 2016-08-27 2017-01-25 飞天诚信科技股份有限公司 Safe data transmission method and device
JP2019004475A (en) * 2018-07-31 2019-01-10 ウノ チェ Authentication under ubiquitous environment

Also Published As

Publication number Publication date
CN111314062A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
JP6936949B2 (en) Methods and devices to facilitate electronic payments using wearable devices
CN107111500B (en) Wireless provisioning of application libraries
KR102232649B1 (en) Checking online access to security device features
EP3345337B1 (en) Secure binding of software application to a communication device
US7882208B2 (en) Information management apparatus, information management method, and program for managing an integrated circuit
US10460314B2 (en) Pre-generation of session keys for electronic transactions and devices that pre-generate session keys for electronic transactions
EP2617219B1 (en) Secure near field communication of a non-secure memory element payload
US7822209B2 (en) Methods and systems for key recovery for a token
CN107820238B (en) SIM card, blockchain application security module, client and security operation method thereof
US20150213433A1 (en) Secure provisioning of credentials on an electronic device using elliptic curve cryptography
US10475024B1 (en) Secure smart card transactions
KR101702748B1 (en) Method, system and recording medium for user authentication using double encryption
CN107210912B (en) Authorized access to application libraries
US20170068955A1 (en) Verification and provisioning of mobile payment applications
US20150326545A1 (en) Secure key rotation for an issuer security domain of an electronic device
US20160027011A1 (en) Transaction terminal device, transaction processing method, and transaction processing system
CN114450663A (en) Electronic device for updating firmware by using secure integrated circuit and operation method thereof
GB2514142A (en) System and method for mobile PIN synchronisation
US11418494B2 (en) Electronic device for supporting backup and reinstallation of mobile card
CN111314062B (en) Smart card data issuing method and device, electronic equipment and storage medium
KR101710950B1 (en) Method for distributing encrypt key, card reader and system for distributing encrypt key thereof
CN110912697B (en) Scheme request verification method, device and equipment
JP2013046122A (en) Terminal, application protection method, and program
JP6801448B2 (en) Electronic information storage media, authentication systems, authentication methods, and authentication application programs
JP2006099510A (en) Server/client system, server, client, data processing method and program

Legal Events

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