CN105787723A - Method, device and system for processing SIM card applications - Google Patents
Method, device and system for processing SIM card applications Download PDFInfo
- Publication number
- CN105787723A CN105787723A CN201410799630.XA CN201410799630A CN105787723A CN 105787723 A CN105787723 A CN 105787723A CN 201410799630 A CN201410799630 A CN 201410799630A CN 105787723 A CN105787723 A CN 105787723A
- Authority
- CN
- China
- Prior art keywords
- card application
- instruction
- consumption
- card
- sim
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000012545 processing Methods 0.000 title abstract description 110
- 238000012546 transfer Methods 0.000 claims description 291
- 230000004044 response Effects 0.000 claims description 90
- 230000008569 process Effects 0.000 claims description 28
- 230000005540 biological transmission Effects 0.000 claims description 12
- 238000004519 manufacturing process Methods 0.000 claims description 7
- 238000011022 operating instruction Methods 0.000 claims 61
- 239000013589 supplement Substances 0.000 claims 31
- 230000001502 supplementing effect Effects 0.000 claims 16
- 238000000151 deposition Methods 0.000 claims 6
- 230000000903 blocking effect Effects 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 17
- 101100059544 Arabidopsis thaliana CDC5 gene Proteins 0.000 description 8
- 101150115300 MAC1 gene Proteins 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 101100244969 Arabidopsis thaliana PRL1 gene Proteins 0.000 description 6
- 102100039558 Galectin-3 Human genes 0.000 description 6
- 101100454448 Homo sapiens LGALS3 gene Proteins 0.000 description 6
- 101150051246 MAC2 gene Proteins 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000011664 signaling Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 238000004148 unit process Methods 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 230000009849 deactivation Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开了一种对SIM卡应用进行处理的方法、装置和系统,用以解决现有技术中存在的对SE芯片中的卡应用进行操作时安全性较低的问题。该方法包括:客户识别模块SIM卡接收移动终端发送的第一卡应用操作指令;其中,所述第一卡应用操作指令中携带卡应用标识;根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求,以实现与所述卡应用标识指示的卡应用之间的双向认证;当与所述卡应用标识指示的卡应用之间的双向认证成功时,向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作。
The invention discloses a method, a device and a system for processing SIM card applications, which are used to solve the problem of low security in the prior art when operating card applications in SE chips. The method includes: the customer identification module SIM card receives the first card application operation instruction sent by the mobile terminal; wherein, the first card application operation instruction carries a card application identification; according to the card carried in the first card application operation instruction Application identification, sending an authentication request to the card application indicated by the card application identification, so as to realize two-way authentication with the card application indicated by the card application identification; when two-way authentication with the card application indicated by the card application identification When the authentication is successful, send a second card application operation instruction to the card application indicated by the card application identifier, so as to complete the operation on the card application indicated by the card application identifier.
Description
技术领域technical field
本发明涉及移动通信技术领域,尤其涉及一种对SIM卡应用进行处理的方法、装置和系统。The invention relates to the technical field of mobile communication, in particular to a method, device and system for processing SIM card applications.
背景技术Background technique
近场通信(NearFieldCommunication,NFC),又称近距离无线通信,是一种短距离的高频无线通信技术,允许电子设备之间进行非接触式点对点数据传输(在10厘米内)交换数据。Near Field Communication (Near Field Communication, NFC), also known as short-range wireless communication, is a short-range high-frequency wireless communication technology that allows non-contact point-to-point data transmission (within 10 cm) between electronic devices to exchange data.
在NFC技术解决方案中,近场通信-单线协议(NFCSingleWireProtocol,NFC-SWP)方案因其高安全、易扩展等优势在多种NFC标准中脱颖而出,成为全球绝大多数运营商及主流终端厂商所支持的标准。NFC-SWP方案是将安全元件(SecureElement,SE)芯片内置于客户识别模块(SubscriberIdentityModule,SIM)卡中,用来存储应用、密钥以及敏感数据。当用户使用NFC手机终端进行业务操作,如利用SIM卡中存储的银行卡应用进行支付时,通过由客户端组装应用协议数据单元(ApplicationProtocolDataUnit,APDU)指令直接与存储在SE中的银行卡应用进行数据传递,以完成支付等操作。图1为支持NFC-SWP技术的NFC手机终端结构示意图。Among the NFC technology solutions, the Near Field Communication-Single Wire Protocol (NFC-SWP) solution stands out among various NFC standards due to its advantages of high security and easy expansion, and has become the preferred solution of most operators and mainstream terminal manufacturers in the world. Supported standards. The NFC-SWP solution is to build a secure element (SecureElement, SE) chip into a customer identification module (Subscriber Identity Module, SIM) card, which is used to store applications, keys and sensitive data. When the user uses the NFC mobile phone terminal to perform business operations, such as using the bank card application stored in the SIM card for payment, the application protocol data unit (ApplicationProtocolDataUnit, APDU) instruction assembled by the client is directly connected to the bank card application stored in the SE. Data transfer to complete payment and other operations. FIG. 1 is a schematic structural diagram of an NFC mobile phone terminal supporting the NFC-SWP technology.
目前基于NFC手机终端进行业务操作的系统结构示意图如图2所示,包括NFC手机终端、销售点(pointofsale,POS)终端以及账户平台。其中,账户平台可以为某个银行或公交应用的业务系统,用来处理业务交易;POS终端可以是具有非接触支付功能的某个金融消费POS终端,也可以是支持充值操作的专用POS终端;POS终端通过通用分组无线业务(GeneralPacketRadioService,GPRS)网络接入金融机构或者某个卡应用所属的账户平台。当发起充值或支付等交易时,POS终端通过与NFC手机终端中的卡应用进行指令交互,获取卡应用相关数据,上传给账户平台进行账户验证;账户平台确认有效后,完成账务处理,生成操作脚本并完成下发。A schematic diagram of a system structure for business operations based on an NFC mobile phone terminal is shown in FIG. 2 , including an NFC mobile phone terminal, a point of sale (point of sale, POS) terminal, and an account platform. Among them, the account platform can be a business system of a certain bank or bus application, which is used to process business transactions; the POS terminal can be a financial consumer POS terminal with contactless payment function, or a dedicated POS terminal that supports recharge operations; The POS terminal accesses the financial institution or the account platform to which a certain card application belongs through the General Packet Radio Service (GPRS) network. When initiating transactions such as recharge or payment, the POS terminal interacts with the card application in the NFC mobile terminal to obtain card application-related data and upload it to the account platform for account verification; after the account platform confirms that it is valid, it completes the accounting processing and generates Operate the script and complete the delivery.
现有的NFC-SWP方案中,对于SIM卡应用进行充值和消费等操作时,均需通过卡外实体(如手机终端客户端、POS终端)直接对SE芯片上的卡应用进行交互实现。这可能会产生如下问题:In the existing NFC-SWP solution, when recharging and consuming SIM card applications, it is necessary to directly interact with the card application on the SE chip through entities outside the card (such as mobile phone terminal clients and POS terminals). This can create problems like:
通过手机终端客户端直接对卡应用执行操作,存在一定的安全隐患。手机终端客户端作为手机终端操作系统(OperatingSystem,OS)上的软件,可以通过OS调用应用程序编程接口(ApplicationProgrammingInterface,API)访问SE芯片。这种情况下,SE芯片有可能会遭到恶意攻击,造成信息缺失、篡改和泄漏,给用户带来损失。There are certain security risks in directly performing operations on the card application through the mobile terminal client. The mobile terminal client, as software on the mobile terminal operating system (Operating System, OS), can call an application programming interface (Application Programming Interface, API) through the OS to access the SE chip. In this case, the SE chip may be maliciously attacked, causing information loss, tampering and leakage, and causing losses to users.
发明内容Contents of the invention
本发明实施例提供一种对SIM卡应用进行处理的方法、装置和系统,用以解决现有技术中存在的对SE芯片中的卡应用进行操作时安全性较低的问题。Embodiments of the present invention provide a method, device and system for processing SIM card applications, so as to solve the problem of low security in the prior art when operating card applications in SE chips.
本发明实施例采用以下技术方案:Embodiments of the present invention adopt the following technical solutions:
一种对SIM卡应用进行处理的方法,包括:A method for processing SIM card applications, comprising:
客户识别模块SIM卡接收移动终端发送的第一卡应用操作指令;其中,所述第一卡应用操作指令中携带卡应用标识;The customer identification module SIM card receives the first card application operation instruction sent by the mobile terminal; wherein, the first card application operation instruction carries the card application identification;
根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求,以实现与所述卡应用标识指示的卡应用之间的双向认证;According to the card application identification carried in the first card application operation instruction, send an authentication request to the card application indicated by the card application identification, so as to realize two-way authentication with the card application indicated by the card application identification;
当与所述卡应用标识指示的卡应用之间的双向认证成功时,向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作。When the two-way authentication with the card application indicated by the card application identification is successful, send a second card application operation instruction to the card application indicated by the card application identification to complete the authentication of the card application indicated by the card application identification operate.
其中,根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求,以实现与所述卡应用标识指示的卡应用之间的双向认证,具体包括:Wherein, according to the card application identification carried in the first card application operation instruction, an authentication request is sent to the card application indicated by the card application identification, so as to realize two-way authentication with the card application indicated by the card application identification, Specifically include:
根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求;Sending an authentication request to the card application indicated by the card application identifier according to the card application identifier carried in the first card application operation instruction;
接收所述卡应用标识指示的卡应用反馈的第一加密密文;其中,所述第一加密密文是所述卡应用标识指示的卡应用根据与所述SIM卡预先约定的第一密钥生成的;Receive the first encrypted ciphertext fed back by the card application indicated by the card application identifier; wherein, the first encrypted ciphertext is the card application indicated by the card application identifier according to the first key pre-agreed with the SIM card Generated;
判断预先根据所述第一密钥生成的第二加密密文和接收到的第一加密密文是否相同;judging whether the second encrypted ciphertext generated in advance according to the first key is the same as the received first encrypted ciphertext;
当所述第二加密密文和所述第一加密密文相同时,继续根据与所述卡应用标识指示的卡应用预先约定的第二密钥生成第三加密密文,并发送给所述卡应用标识指示的卡应用,由所述卡应用标识指示的卡应用判断预先根据所述第二密钥生成的第四加密密文和接收到的第三加密密文是否相同,以实现对所述SIM卡的认证;When the second encrypted ciphertext is the same as the first encrypted ciphertext, continue to generate a third encrypted ciphertext according to the second key pre-agreed with the card application indicated by the card application identification, and send it to the The card application indicated by the card application identification, the card application indicated by the card application identification determines whether the fourth encrypted ciphertext generated in advance according to the second key is the same as the received third encrypted ciphertext, so as to realize the identification of all authentication of the SIM card;
当接收到所述卡应用标识指示的卡应用发送的认证成功消息时,则确定双向认证成功。When the authentication success message sent by the card application indicated by the card application identifier is received, it is determined that the two-way authentication is successful.
其中,所述第一卡应用操作指令为充值指令,且所述充值指令中还携带有充值金额和充值密码;则Wherein, the first card application operation instruction is a recharge instruction, and the recharge instruction also carries a recharge amount and a recharge password; then
所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有所述充值金额和所述充值密码;以及The second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries the recharge amount and the recharge password; and
向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作,具体包括:Sending a second card application operation instruction to the card application indicated by the card application identifier to complete the operation on the card application indicated by the card application identifier, specifically including:
向所述卡应用标识指示的卡应用发送充值初始化指令;Sending a recharge initialization instruction to the card application indicated by the card application identifier;
接收所述卡应用标识指示的卡应用根据所述充值初始化指令反馈的圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;The card application that receives the card application identifier indicates the transfer request fed back according to the recharge initialization instruction; wherein, the transfer request carries the recharge amount, the recharge password, and the card application indicated by the card application identifier. the account balance of the card application indicated by the card number and said card application identifier;
将所述圈存请求发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理。Sending the loading request to the accounting platform, so that the accounting platform completes loading processing according to the recharge amount, the recharge password, the card number and the account balance.
其中,所述第一卡应用操作指令为消费指令,且所述消费指令中还携带有消费金额和消费密码;则Wherein, the first card application operation instruction is a consumption instruction, and the consumption instruction also carries a consumption amount and a consumption password; then
第二卡应用操作指令为消费初始化指令;以及The second card application operation instruction is a consumption initialization instruction; and
向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作,具体包括:Sending a second card application operation instruction to the card application indicated by the card application identifier to complete the operation on the card application indicated by the card application identifier, specifically including:
向所述卡应用标识指示的卡应用发送消费初始化指令;sending a consumption initialization instruction to the card application indicated by the card application identifier;
接收所述卡应用标识指示的卡应用反馈的消费响应消息;其中,所述消费响应消息中携带所述卡应用标识指示的卡应用根据所述消费初始化指令生成的消费密钥;Receive a consumption response message fed back by the card application indicated by the card application identifier; wherein, the consumption response message carries the consumption key generated by the card application indicated by the card application identifier according to the consumption initialization instruction;
根据所述消费响应消息中的消费密钥,生成加密后的第一扣费指令;其中,所述加密后的第一扣费指令中携带所述消费金额和消费密码;Generate an encrypted first fee deduction instruction according to the consumption key in the consumption response message; wherein, the encrypted first fee deduction instruction carries the consumption amount and consumption password;
将所述加密后的第一扣费指令发送给所述卡应用标识指示的卡应用,由所述卡应用标识指示的卡应用根据所述消费密钥,以及所述加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。Send the encrypted first fee deduction instruction to the card application indicated by the card application identifier, and the card application indicated by the card application identifier The consumption amount and consumption password carried in the instruction complete the deduction.
其中,所述第一卡应用操作指令为转账指令,且所述转账指令中携带有卡应用标识、转账金额和转账密码,且所述卡应用标识包括:转出账户标识和转入账户标识;则Wherein, the first card application operation instruction is a transfer instruction, and the transfer instruction carries a card application identifier, a transfer amount, and a transfer password, and the card application identifier includes: a transfer-out account identifier and a transfer-in account identifier; but
所述第二卡应用操作指令为向所述卡应用标识中的转出账户标识指示的卡应用发送的转账初始化指令;The second card application operation instruction is a transfer initialization instruction sent to the card application indicated by the transfer-out account identifier in the card application identifier;
向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作,具体包括:Sending a second card application operation instruction to the card application indicated by the card application identifier to complete the operation on the card application indicated by the card application identifier, specifically including:
向所述卡应用标识中的转出账户标识指示的卡应用发送转账初始化指令;Sending a transfer initialization instruction to the card application indicated by the transfer-out account identifier in the card application identifier;
接收所述转出账户标识指示的卡应用反馈的转账响应消息;其中,所述转账响应消息中携带所述转出账户标识指示的卡应用根据所述转账初始化指令生成的转账密钥;Receive a transfer response message fed back by the card application indicated by the transfer-out account identifier; wherein, the transfer response message carries the transfer key generated by the card application indicated by the transfer-out account identifier according to the transfer initialization instruction;
根据所述转账响应消息中的转账密钥,生成加密后的第二扣费指令;其中,所述加密后的第二扣费指令中携带所述转账金额和转账密码;Generate an encrypted second deduction instruction according to the transfer key in the transfer response message; wherein, the encrypted second deduction instruction carries the transfer amount and the transfer password;
将所述加密后的第二扣费指令发送给所述转出账户标识指示的卡应用,由所述转出账户标识指示的卡应用根据所述转账密钥,以及所述加密后的第二扣费指令中携带的转账金额和转账密码完成扣费;Send the encrypted second deduction instruction to the card application indicated by the transfer-out account identifier, and the card application indicated by the transfer-out account identifier uses the transfer key and the encrypted second The transfer amount and transfer password carried in the deduction command complete the deduction;
向所述转入账户标识指示的卡应用发送携带所述转账金额的第一转账指令,由所述转入账户标识指示的卡应用根据所述第一转账指令中携带的转账金额完成转账。Sending a first transfer instruction carrying the transfer amount to the card application indicated by the transfer-in account identifier, and the card application indicated by the transfer-in account identifier completes the transfer according to the transfer amount carried in the first transfer instruction.
一种对SIM卡应用进行处理的方法,包括:A method for processing SIM card applications, comprising:
卡应用接收客户识别模块SIM卡发送的认证请求,与所述SIM卡进行双向认证;The card application receives the authentication request sent by the customer identification module SIM card, and performs two-way authentication with the SIM card;
当与所述SIM卡之间的双向认证成功时,接收所述SIM卡发送的第二卡应用操作指令;When the two-way authentication with the SIM card succeeds, receiving a second card application operation instruction sent by the SIM card;
根据所述第二卡应用操作指令,完成相应操作。According to the second card application operation instruction, the corresponding operation is completed.
其中,卡应用接收客户识别模块SIM卡发送的认证请求,与所述SIM卡进行双向认证,具体包括:Wherein, the card application receives the authentication request sent by the customer identification module SIM card, and performs two-way authentication with the SIM card, specifically including:
接收SIM卡发送的认证请求;Receive the authentication request sent by the SIM card;
根据所述认证请求,以及和所述SIM卡预先约定的第一密钥,生成第一加密密文;generating a first encrypted ciphertext according to the authentication request and the first key pre-agreed with the SIM card;
将所述第一加密密文发送给所述SIM卡,由所述SIM卡判断预先根据所述第一密钥生成的第二加密密文和接收到的第一加密密文是否相同,以实现所述SIM卡对所述卡应用的认证;Send the first encrypted ciphertext to the SIM card, and the SIM card judges whether the second encrypted ciphertext generated in advance according to the first key is the same as the received first encrypted ciphertext, so as to realize The authentication of the card application by the SIM card;
当接收到所述SIM卡发送的第三加密密文时,继续根据与所述SIM卡预先约定的第二密钥,生成第四加密密文;其中,所述第三加密密文是所述SIM卡判断出所述第二加密密文和所述第一加密密文相同时,根据所述第二密钥生成的;When receiving the third encrypted ciphertext sent by the SIM card, continue to generate a fourth encrypted ciphertext according to the second key pre-agreed with the SIM card; wherein, the third encrypted ciphertext is the When the SIM card determines that the second encrypted ciphertext is the same as the first encrypted ciphertext, it is generated according to the second key;
判断所述第四加密密文和接收到的第三加密密文是否相同;judging whether the fourth encrypted ciphertext is the same as the received third encrypted ciphertext;
当所述第四加密密文和接收到的第三加密密文相同时,则确定双向认证成功。When the fourth encrypted ciphertext is the same as the received third encrypted ciphertext, it is determined that the two-way authentication is successful.
其中,所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有充值金额和充值密码;则Wherein, the second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries a recharge amount and a recharge password; then
根据所述第二卡应用操作指令,完成相应操作,具体包括:According to the second card application operation instruction, complete the corresponding operation, specifically including:
根据所述充值初始化指令,生成圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;According to the recharge initialization instruction, a transfer request is generated; wherein, the transfer request carries the recharge amount, the recharge password, the card application card number indicated by the card application identification, and the card indicated by the card application identification App's account balance;
将所述圈存请求通过所述SIM卡发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理。The loading request is sent to the account platform through the SIM card, so that the account platform completes the loading process according to the recharge amount, the recharge password, the card number and the account balance.
其中,第二卡应用操作指令为消费初始化指令;则Wherein, the second card application operation instruction is a consumption initialization instruction; then
根据所述第二卡应用操作指令,完成相应操作,具体包括:According to the second card application operation instruction, complete the corresponding operation, specifically including:
根据所述消费初始化指令,生成消费密钥;Generate a consumption key according to the consumption initialization instruction;
将所述消费密钥携带在消费响应消息中发送给所述SIM卡,由所述SIM卡根据所述消费密钥,生成加密后的第一扣费指令;其中,所述加密后的第一扣费指令中携带消费金额和消费密码;Carrying the consumption key in a consumption response message and sending it to the SIM card, and the SIM card generates an encrypted first deduction instruction according to the consumption key; wherein, the encrypted first The consumption amount and consumption password are carried in the deduction instruction;
接收所述SIM卡发送的加密后的第一扣费指令;receiving the encrypted first deduction instruction sent by the SIM card;
根据所述消费密钥,以及所述加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。The fee deduction is completed according to the consumption key, the consumption amount and the consumption password carried in the encrypted first fee deduction instruction.
其中,所述第二卡应用操作指令为转账初始化指令,以及所述卡应用为转出账户;则Wherein, the second card application operation instruction is a transfer initialization instruction, and the card application is a transfer-out account; then
根据所述第二卡应用操作指令,完成相应操作,具体包括:According to the second card application operation instruction, complete the corresponding operation, specifically including:
根据所述转账初始化指令,生成转账密钥;generating a transfer key according to the transfer initialization instruction;
将所述转账密钥携带在转账响应消息中发送给所述SIM卡,由所述SIM卡根据所述转账密钥,生成加密后的第二扣费指令;其中,所述加密后的第二扣费指令中携带转账金额和转账密码;carrying the transfer key in a transfer response message and sending it to the SIM card, and the SIM card generates an encrypted second deduction instruction according to the transfer key; wherein, the encrypted second Carry the transfer amount and transfer password in the deduction instruction;
接收所述SIM卡发送的加密后的第二扣费指令;receiving the encrypted second deduction instruction sent by the SIM card;
根据所述转账密钥,以及所述加密后的第二扣费指令中携带的转账金额和转账密码完成扣费,并向所述SIM卡反馈第二扣费结果,由所述SIM卡根据所述第二扣费结果,生成携带所述转账金额的第一转账指令,并发送给转入账户,使所述转入账户根据所述第一转账指令中携带的转账金额完成转账。According to the transfer key, and the transfer amount and transfer password carried in the encrypted second deduction instruction, the deduction is completed, and the second deduction result is fed back to the SIM card, and the SIM card according to the According to the second deduction result, a first transfer instruction carrying the transfer amount is generated and sent to the transfer-in account, so that the transfer-in account completes the transfer according to the transfer amount carried in the first transfer instruction.
一种对SIM卡应用进行处理的装置,包括:A device for processing SIM card applications, comprising:
第一卡应用操作指令接收单元,用于接收移动终端发送的第一卡应用操作指令;其中,所述第一卡应用操作指令中携带卡应用标识;The first card application operation instruction receiving unit is configured to receive the first card application operation instruction sent by the mobile terminal; wherein, the first card application operation instruction carries a card application identifier;
认证单元,用于根据所述第一卡应用操作指令接收单元接收的第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求,以实现与所述卡应用标识指示的卡应用之间的双向认证;The authentication unit is configured to send an authentication request to the card application indicated by the card application identifier according to the card application identifier carried in the first card application operation instruction received by the first card application operation instruction receiving unit, so as to realize the Two-way authentication between card applications indicated by the card application identifier;
第二卡应用操作指令发送单元,用于当所述认证单元中与所述卡应用标识指示的卡应用之间的双向认证成功时,向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作。The second card application operation instruction sending unit is configured to send a second card application to the card application indicated by the card application identifier when the two-way authentication between the authentication unit and the card application indicated by the card application identifier succeeds An operation instruction to complete the operation of the card application indicated by the card application identifier.
其中,所述认证单元,具体包括:Wherein, the authentication unit specifically includes:
认证请求发送模块,用于根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求;An authentication request sending module, configured to send an authentication request to the card application indicated by the card application identifier according to the card application identifier carried in the first card application operation instruction;
密文接收模块,用于接收所述卡应用标识指示的卡应用反馈的第一加密密文;其中,所述第一加密密文是所述卡应用标识指示的卡应用根据与客户识别模块SIM卡预先约定的第一密钥生成的;The ciphertext receiving module is used to receive the first encrypted ciphertext fed back by the card application indicated by the card application identification; wherein, the first encrypted ciphertext is the card application indicated by the card application identification according to the customer identification module SIM Generated by the first key pre-agreed by the card;
判断模块,用于判断预先根据所述第一密钥生成的第二加密密文和所述密文接收模块接收到的第一加密密文是否相同;A judging module, configured to judge whether the second encrypted ciphertext generated in advance according to the first key is the same as the first encrypted ciphertext received by the ciphertext receiving module;
密文发送模块,用于当所述判断模块判断出第二加密密文和所述第一加密密文相同时,继续根据与所述卡应用标识指示的卡应用预先约定的第二密钥生成第三加密密文,并发送给所述卡应用标识指示的卡应用,由所述卡应用标识指示的卡应用判断预先根据所述第二密钥生成的第四加密密文和接收到的第三加密密文是否相同,以实现对所述SIM卡的认证;The ciphertext sending module is configured to continue to generate the second key according to the pre-agreed card application indicated by the card application identification when the judging module judges that the second encrypted ciphertext is the same as the first encrypted ciphertext The third encrypted ciphertext is sent to the card application indicated by the card application identifier, and the card application indicated by the card application identifier judges the fourth encrypted ciphertext generated in advance according to the second key and the received first encrypted ciphertext. whether the three encrypted ciphertexts are the same, so as to realize the authentication of the SIM card;
双向认证成功确定模块,用于当接收到所述卡应用标识指示的卡应用发送的认证成功消息时,则确定双向认证成功。The two-way authentication success determining module is configured to determine that the two-way authentication is successful when receiving the authentication success message sent by the card application indicated by the card application identifier.
其中,所述第一卡应用操作指令为充值指令,且所述充值指令中还携带有充值金额和充值密码;则Wherein, the first card application operation instruction is a recharge instruction, and the recharge instruction also carries a recharge amount and a recharge password; then
所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有所述充值金额和所述充值密码;The second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries the recharge amount and the recharge password;
所述第二卡应用操作指令发送单元,具体包括:The second card application operation command sending unit specifically includes:
充值初始化指令发送模块,用于向所述卡应用标识指示的卡应用发送充值初始化指令;A recharge initialization instruction sending module, configured to send a recharge initialization instruction to the card application indicated by the card application identifier;
圈存请求接收模块,用于接收所述卡应用标识指示的卡应用根据所述充值初始化指令发送模块发送的充值初始化指令反馈的圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;The transfer request receiving module is configured to receive the transfer request fed back by the card application indicated by the card application identifier according to the recharge initialization instruction sent by the recharge initialization instruction sending module; wherein, the transfer request carries the recharge amount , the recharge password, the card application card number indicated by the card application identification, and the account balance of the card application indicated by the card application identification;
圈存请求发送模块,用于将所述圈存请求接收模块接收的圈存请求发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理。The loading request sending module is used to send the loading request received by the loading request receiving module to the account platform, so that the account platform can use the recharge amount, the recharge password, the card number and the The account balance has completed loading processing.
其中,所述第一卡应用操作指令为消费指令,且所述消费指令中还携带有消费金额和消费密码;则Wherein, the first card application operation instruction is a consumption instruction, and the consumption instruction also carries a consumption amount and a consumption password; then
第二卡应用操作指令为消费初始化指令;The second card application operation instruction is a consumption initialization instruction;
所述第二卡应用操作指令发送单元,具体包括:The second card application operation command sending unit specifically includes:
消费初始化指令发送模块,用于向所述卡应用标识指示的卡应用发送消费初始化指令;A consumption initialization instruction sending module, configured to send a consumption initialization instruction to the card application indicated by the card application identifier;
消费响应消息接收模块,用于接收所述卡应用标识指示的卡应用反馈的消费响应消息;其中,所述消费响应消息中携带所述卡应用标识指示的卡应用根据所述消费初始化指令发送模块发送的消费初始化指令生成的消费密钥;The consumption response message receiving module is configured to receive the consumption response message fed back by the card application indicated by the card application identification; wherein, the consumption response message carries the card application indicated by the card application identification and sends the module according to the consumption initialization instruction The consumption key generated by the consumption initialization instruction sent;
第一扣费指令发送模块,用于根据所述消费响应消息接收模块接收的消费响应消息中的消费密钥,生成加密后的第一扣费指令,并发送给所述卡应用标识指示的卡应用;其中,所述加密后的第一扣费指令中携带所述消费金额和消费密码,由所述卡应用标识指示的卡应用根据所述消费密钥,以及所述加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。The first deduction instruction sending module is configured to generate an encrypted first deduction instruction according to the consumption key in the consumption response message received by the consumption response message receiving module, and send it to the card indicated by the card application identifier application; wherein, the encrypted first deduction instruction carries the consumption amount and the consumption password, and the card application indicated by the card application identifier uses the consumption key and the encrypted first deduction The consumption amount and consumption password carried in the fee instruction are used to complete the deduction.
其中,所述第一卡应用操作指令为转账指令,且所述转账指令中携带有卡应用标识、转账金额和转账密码,且所述卡应用标识包括:转出账户标识和转入账户标识;则Wherein, the first card application operation instruction is a transfer instruction, and the transfer instruction carries a card application identifier, a transfer amount, and a transfer password, and the card application identifier includes: a transfer-out account identifier and a transfer-in account identifier; but
所述第二卡应用操作指令为向所述卡应用标识中的转出账户标识指示的卡应用发送的转账初始化指令;The second card application operation instruction is a transfer initialization instruction sent to the card application indicated by the transfer-out account identifier in the card application identifier;
所述第二卡应用操作指令发送单元,具体包括:The second card application operation command sending unit specifically includes:
转账初始化指令发送模块,用于向所述卡应用标识中的转出账户标识指示的卡应用发送转账初始化指令;A transfer initialization instruction sending module, configured to send a transfer initialization instruction to the card application indicated by the transfer-out account identifier in the card application identifier;
转账响应消息接收模块,用于接收所述转出账户标识指示的卡应用反馈的转账响应消息;其中,所述转账响应消息中携带所述转出账户标识指示的卡应用根据所述转账初始化指令发送模块发送的转账初始化指令生成的转账密钥;A transfer response message receiving module, configured to receive a transfer response message fed back by the card application indicated by the transfer-out account identifier; wherein, the transfer response message carries the card application indicated by the transfer-out account identifier according to the transfer initialization instruction Send the transfer key generated by the transfer initialization command sent by the module;
第二扣费指令发送模块,用于根据所述转账响应消息接收模块接收的转账响应消息中的转账密钥,生成加密后的第二扣费指令,并发送给所述转出账户标识指示的卡应用;其中,所述加密后的第二扣费指令中携带所述转账金额和转账密码,由所述转出账户标识指示的卡应用根据所述转账密钥,以及所述加密后的第二扣费指令中携带的转账金额和转账密码完成扣费;The second deduction instruction sending module is configured to generate an encrypted second deduction instruction according to the transfer key in the transfer response message received by the transfer response message receiving module, and send it to the account indicated by the transfer-out account identifier Card application; wherein, the encrypted second deduction instruction carries the transfer amount and the transfer password, and the card application indicated by the transfer-out account identifier uses the transfer key and the encrypted second 2. The transfer amount and transfer password carried in the deduction instruction complete the deduction;
第一转账指令发送模块,用于向所述转入账户标识指示的卡应用发送携带所述转账金额的第一转账指令,由所述转入账户标识指示的卡应用根据所述第一转账指令中携带的转账金额完成转账。A first transfer instruction sending module, configured to send a first transfer instruction carrying the transfer amount to the card application indicated by the transfer-in account identifier, and the card application indicated by the transfer-in account identifier according to the first transfer instruction The transfer amount carried in the transfer is completed.
一种对SIM卡应用进行处理的装置,包括:A device for processing SIM card applications, comprising:
认证单元,用于接收客户识别模块SIM卡发送的认证请求,与所述SIM卡进行双向认证;The authentication unit is used to receive the authentication request sent by the customer identification module SIM card, and perform two-way authentication with the SIM card;
第二卡应用操作指令接收单元,用于当所述认证单元中与所述SIM卡之间的双向认证成功时,接收所述SIM卡发送的第二卡应用操作指令;The second card application operation instruction receiving unit is configured to receive the second card application operation instruction sent by the SIM card when the two-way authentication between the authentication unit and the SIM card is successful;
操作完成单元,用于根据所述第二卡应用操作指令接收单元接收的第二卡应用操作指令,完成相应操作。The operation completion unit is configured to complete corresponding operations according to the second card application operation instruction received by the second card application operation instruction receiving unit.
其中,所述认证单元,具体包括:Wherein, the authentication unit specifically includes:
认证请求接收模块,用于接收SIM卡发送的认证请求;An authentication request receiving module, configured to receive an authentication request sent by a SIM card;
密文发送模块,用于根据所述认证请求接收模块接收的认证请求,以及和所述SIM卡预先约定的第一密钥,生成第一加密密文,并发送给所述SIM卡,由所述SIM卡判断预先根据所述第一密钥生成的第二加密密文和接收到的第一加密密文是否相同,以实现所述SIM卡对所述卡应用的认证;The ciphertext sending module is used to generate a first encrypted ciphertext according to the authentication request received by the authentication request receiving module and the first key pre-agreed with the SIM card, and send it to the SIM card, and the The SIM card judges whether the second encrypted ciphertext generated in advance according to the first key is the same as the received first encrypted ciphertext, so as to realize the authentication of the card application by the SIM card;
密文接收模块,用于接收所述SIM卡发送的第三加密密文;A ciphertext receiving module, configured to receive the third encrypted ciphertext sent by the SIM card;
判断模块,用于当所述密文接收模块接收到述SIM卡发送的第三加密密文时,继续根据与所述SIM卡预先约定的第二密钥,生成第四加密密文,并判断所述第四加密密文和接收到的第三加密密文是否相同;其中,所述第三加密密文是所述SIM卡判断出所述第二加密密文和所述第一加密密文相同时,根据所述第二密钥生成的;A judging module, configured to, when the ciphertext receiving module receives the third encrypted ciphertext sent by the SIM card, continue to generate a fourth encrypted ciphertext according to the second key pre-agreed with the SIM card, and judge Whether the fourth encrypted ciphertext is the same as the received third encrypted ciphertext; wherein, the third encrypted ciphertext is that the SIM card judges that the second encrypted ciphertext and the first encrypted ciphertext When the same, generated according to the second key;
双向认证确定模块,用于当所述判断模块判断出第四加密密文和接收到的第三加密密文相同时,则确定双向认证成功。The two-way authentication determining module is configured to determine that the two-way authentication is successful when the judging module judges that the fourth encrypted ciphertext is the same as the received third encrypted ciphertext.
其中,所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有充值金额和充值密码;则Wherein, the second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries a recharge amount and a recharge password; then
所述操作完成单元,具体包括:The operation completion unit specifically includes:
圈存请求生成模块,用于根据所述充值初始化指令,生成圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;A loading request generating module, configured to generate a loading request according to the recharging initialization instruction; wherein, the loading request carries the recharging amount, the recharging password, the card application card number indicated by the card application identification and The account balance of the card application indicated by the card application identifier;
圈存请求发送模块,用于将所述圈存请求生成模块生成的圈存请求通过所述SIM卡发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理。A loading request sending module, configured to send the loading request generated by the loading request generating module to the account platform through the SIM card, so that the account platform can use the recharge amount, the recharge password, and the The above card number and the account balance are used to complete the loading process.
其中,第二卡应用操作指令为消费初始化指令;则Wherein, the second card application operation instruction is a consumption initialization instruction; then
所述操作完成单元,具体包括:The operation completion unit specifically includes:
消费密钥生成模块,用于根据所述消费初始化指令,生成消费密钥;A consumption key generation module, configured to generate a consumption key according to the consumption initialization instruction;
消费响应消息发送模块,用于将所述消费密钥生成模块生成的消费密钥携带在消费响应消息中发送给所述SIM卡,由所述SIM卡根据所述消费密钥,生成加密后的第一扣费指令;其中,所述加密后的第一扣费指令中携带消费金额和消费密码;A consumption response message sending module, configured to carry the consumption key generated by the consumption key generation module in the consumption response message and send it to the SIM card, and the SIM card generates an encrypted consumption key according to the consumption key A first fee deduction instruction; wherein, the encrypted first fee deduction instruction carries a consumption amount and a consumption password;
第一扣费指令接收模块,用于接收所述SIM卡发送的加密后的第一扣费指令;The first deduction instruction receiving module is configured to receive the encrypted first deduction instruction sent by the SIM card;
扣费模块,用于根据所述消费密钥生成模块生成的消费密钥,以及所述第一扣费指令接收模块接收的加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。The fee deduction module is used to complete the deduction according to the consumption key generated by the consumption key generation module, and the consumption amount and consumption password carried in the encrypted first deduction instruction received by the first deduction instruction receiving module fee.
其中,所述第二卡应用操作指令为转账初始化指令,以及所述卡应用为转出账户;则Wherein, the second card application operation instruction is a transfer initialization instruction, and the card application is a transfer-out account; then
所述操作完成单元,具体包括:The operation completion unit specifically includes:
转账密钥生成模块,用于根据所述转账初始化指令,生成转账密钥;A transfer key generating module, configured to generate a transfer key according to the transfer initialization instruction;
转账密钥发送模块,用于将所述转账密钥生成模块生成的转账密钥携带在转账响应消息中发送给所述SIM卡,由所述SIM卡根据所述转账密钥,生成加密后的第二扣费指令;其中,所述加密后的第二扣费指令中携带转账金额和转账密码;A transfer key sending module, configured to carry the transfer key generated by the transfer key generation module in a transfer response message and send it to the SIM card, and the SIM card generates an encrypted key according to the transfer key. A second fee deduction instruction; wherein, the encrypted second fee deduction instruction carries a transfer amount and a transfer password;
第二扣费指令接收模块,用于接收所述SIM卡发送的加密后的第二扣费指令;The second deduction instruction receiving module is configured to receive the encrypted second deduction instruction sent by the SIM card;
扣费模块,用于根据所述转账密钥生成模块生成的转账密钥,以及所述第二扣费指令接收模块接收的加密后的第二扣费指令中携带的转账金额和转账密码完成扣费,并向所述SIM卡反馈第二扣费结果,由所述SIM卡根据所述第二扣费结果,生成携带所述转账金额的第一转账指令,并发送给转入账户,使所述转入账户根据所述第一转账指令中携带的转账金额完成转账。The deduction module is used to complete the deduction according to the transfer key generated by the transfer key generation module, and the transfer amount and the transfer password carried in the encrypted second deduction instruction received by the second deduction instruction receiving module fee, and feed back the second deduction result to the SIM card, and the SIM card generates the first transfer instruction carrying the transfer amount according to the second deduction result, and sends it to the transfer-in account, so that the The transfer-in account completes the transfer according to the transfer amount carried in the first transfer instruction.
一种对SIM卡应用进行处理的系统,包括移动终端和包含至少一种卡应用的客户识别模块SIM卡,其中:A system for processing SIM card applications, comprising a mobile terminal and a SIM card containing at least one card application, wherein:
所述移动终端,用于向所述SIM卡发送第一卡应用操作指令;其中,所述第一卡应用操作指令中携带卡应用标识;The mobile terminal is configured to send a first card application operation instruction to the SIM card; wherein, the first card application operation instruction carries a card application identifier;
所述SIM卡,用于接收所述第一卡应用操作指令;根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求,以实现与所述卡应用标识指示的卡应用之间的双向认证;当与所述卡应用标识指示的卡应用之间的双向认证成功时,向所述卡应用标识指示的卡应用发送第二卡应用操作指令;The SIM card is configured to receive the first card application operation instruction; according to the card application identification carried in the first card application operation instruction, send an authentication request to the card application indicated by the card application identification, so as to realize the Two-way authentication between card applications indicated by the card application identifier; when the two-way authentication with the card application indicated by the card application identifier succeeds, send a second card application operation to the card application indicated by the card application identifier instruction;
所述卡应用标识指示的卡应用,用于接收所述SIM卡发送的认证请求;根据所述认证请求,与所述SIM卡进行双向认证;当与所述SIM卡之间的双向认证成功时,接收所述SIM卡发送的第二卡应用操作指令;根据所述第二卡应用操作指令,完成相应操作。The card application indicated by the card application identifier is used to receive the authentication request sent by the SIM card; perform two-way authentication with the SIM card according to the authentication request; when the two-way authentication with the SIM card is successful , receiving a second card application operation instruction sent by the SIM card; completing corresponding operations according to the second card application operation instruction.
其中,所述SIM卡,具体用于:Wherein, the SIM card is specifically used for:
根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求;接收所述卡应用标识指示的卡应用反馈的第一加密密文;判断预先根据所述第一密钥生成的第二加密密文和接收到的第一加密密文是否相同;当所述第二加密密文和所述第一加密密文相同时,继续根据与所述卡应用标识指示的卡应用预先约定的第二密钥生成第三加密密文,并发送给所述卡应用标识指示的卡应用;当接收到所述卡应用标识指示的卡应用发送的认证成功消息时,则确定双向认证成功;According to the card application identification carried in the first card application operation instruction, send an authentication request to the card application indicated by the card application identification; receive the first encrypted ciphertext fed back by the card application indicated by the card application identification; judge in advance Whether the second encrypted ciphertext generated according to the first key is the same as the received first encrypted ciphertext; when the second encrypted ciphertext is the same as the first encrypted ciphertext, continue to The card application indicated by the card application identifier generates the third encrypted ciphertext with the pre-agreed second key, and sends it to the card application indicated by the card application identifier; when the authentication sent by the card application indicated by the card application identifier is received successfully message, it is determined that the two-way authentication is successful;
所述卡应用标识指示的卡应用,具体用于:The card application indicated by the card application identifier is specifically used for:
根据所述认证请求,以及和所述SIM卡预先约定的第一密钥,生成第一加密密文,并发送给所述SIM卡;当接收到所述SIM卡发送的第三加密密文时,继续根据与所述SIM卡预先约定的第二密钥,生成第四加密密文;判断所述第四加密密文和接收到的第三加密密文是否相同;当所述第四加密密文和接收到的第三加密密文相同时,向所述SIM卡发送认证成功消息。Generate a first encrypted ciphertext according to the authentication request and the first key pre-agreed with the SIM card, and send it to the SIM card; when receiving the third encrypted ciphertext sent by the SIM card , continue to generate a fourth encrypted ciphertext according to the second key pre-agreed with the SIM card; judge whether the fourth encrypted ciphertext is the same as the received third encrypted ciphertext; when the fourth encrypted ciphertext When the text is the same as the received third encrypted ciphertext, send an authentication success message to the SIM card.
其中,所述第一卡应用操作指令为充值指令,且所述充值指令中还携带有充值金额和充值密码;Wherein, the first card application operation instruction is a recharge instruction, and the recharge instruction also carries a recharge amount and a recharge password;
所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有所述充值金额和所述充值密码;The second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries the recharge amount and the recharge password;
所述SIM卡,具体用于:The SIM card is specifically used for:
向所述卡应用标识指示的卡应用发送充值初始化指令;接收所述卡应用标识指示的卡应用根据所述充值初始化指令反馈的圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;将所述圈存请求发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理;Sending a recharge initialization instruction to the card application indicated by the card application identifier; receiving a loading request fed back by the card application indicated by the card application identifier according to the recharging initialization instruction; wherein, the loading request carries the recharge amount , the recharge password, the card number indicated by the card application identifier, and the account balance of the card application indicated by the card application identifier; The above-mentioned recharge amount, the above-mentioned recharge password, the above-mentioned card number and the above-mentioned account balance are completed;
所述卡应用标识指示的卡应用,具体用于:The card application indicated by the card application identifier is specifically used for:
根据所述充值初始化指令,生成圈存请求,并发送给所述SIM卡。Generate a loading request according to the recharge initialization instruction and send it to the SIM card.
其中,所述系统还包括:控制平台;则Wherein, the system also includes: a control platform;
所述SIM卡,具体用于:The SIM card is specifically used for:
将所述圈存请求发送给控制平台,由所述控制平台将所述圈存请求发送给账务平台;sending the loading request to a control platform, and the control platform sends the loading request to an accounting platform;
所述SIM卡还用于:The SIM card is also used for:
接收所述控制平台发送的充值脚本;其中,所述充值脚本是所述控制平台收到所述账务平台发送的圈存处理结果后生成的;receiving the recharge script sent by the control platform; wherein, the recharge script is generated after the control platform receives the loading processing result sent by the accounting platform;
将所述充值脚本发送给所述卡应用标识指示的卡应用;sending the recharge script to the card application indicated by the card application identifier;
所述卡应用标识指示的卡应用,还用于:The card application indicated by the card application identifier is also used for:
根据所述充值脚本对所述账户余额进行更新。The account balance is updated according to the recharge script.
其中,所述第一卡应用操作指令为消费指令,且所述消费指令中还携带有消费金额和消费密码;Wherein, the first card application operation instruction is a consumption instruction, and the consumption instruction also carries a consumption amount and a consumption password;
第二卡应用操作指令为消费初始化指令;The second card application operation instruction is a consumption initialization instruction;
所述SIM卡,具体用于:The SIM card is specifically used for:
向所述卡应用标识指示的卡应用发送消费初始化指令;接收所述卡应用标识指示的卡应用反馈的消费响应消息;其中,所述消费响应消息中携带消费密钥;根据所述消费响应消息中的消费密钥,生成加密后的第一扣费指令;其中,所述加密后的第一扣费指令中携带所述消费金额和消费密码;将所述加密后的第一扣费指令发送给所述卡应用标识指示的卡应用;Send a consumption initialization instruction to the card application indicated by the card application identification; receive a consumption response message fed back by the card application indicated by the card application identification; wherein, the consumption response message carries a consumption key; according to the consumption response message In the consumption key, generate the encrypted first deduction instruction; wherein, the encrypted first deduction instruction carries the consumption amount and the consumption password; send the encrypted first deduction instruction giving the card application indicated by the card application identification;
所述卡应用标识指示的卡应用,具体用于:The card application indicated by the card application identifier is specifically used for:
根据所述消费初始化指令,生成消费密钥;将所述消费密钥携带在消费响应消息中发送给所述SIM卡;接收SIM卡发送的加密后的第一扣费密钥;根据所述消费密钥,以及所述加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。Generate a consumption key according to the consumption initialization instruction; carry the consumption key in a consumption response message and send it to the SIM card; receive the encrypted first deduction key sent by the SIM card; according to the consumption The key, as well as the consumption amount and consumption password carried in the encrypted first fee deduction instruction complete the fee deduction.
其中,所述第一卡应用操作指令为转账指令,且所述转账指令中携带有卡应用标识、转账金额和转账密码,且所述卡应用标识包括:转出账户标识和转入账户标识;所述第二卡应用操作指令为向所述卡应用标识中的转出账户标识指示的卡应用发送的转账初始化指令;Wherein, the first card application operation instruction is a transfer instruction, and the transfer instruction carries a card application identifier, a transfer amount, and a transfer password, and the card application identifier includes: a transfer-out account identifier and a transfer-in account identifier; The second card application operation instruction is a transfer initialization instruction sent to the card application indicated by the transfer-out account identifier in the card application identifier;
所述SIM卡,具体用于:The SIM card is specifically used for:
向所述卡应用标识中的转出账户标识指示的卡应用发送转账初始化指令;接收所述转出账户标识指示的卡应用反馈的转账响应消息;其中,所述转账响应消息中携带转账密钥;根据所述转账密钥,生成加密后的第二扣费指令;其中,所述加密后的第二扣费指令中携带所述转账金额和转账密码;将所述加密后的第二扣费指令发送给所述转出账户标识指示的卡应用;以及向所述转入账户标识指示的卡应用发送携带所述转账金额的第一转账指令;Sending a transfer initialization instruction to the card application indicated by the transfer-out account identifier in the card application identifier; receiving a transfer response message fed back by the card application indicated by the transfer-out account identifier; wherein, the transfer response message carries a transfer key ; According to the transfer key, an encrypted second deduction instruction is generated; wherein, the encrypted second deduction instruction carries the transfer amount and the transfer password; the encrypted second deduction instruction The instruction is sent to the card application indicated by the transfer-out account identifier; and the first transfer instruction carrying the transfer amount is sent to the card application indicated by the transfer-in account identifier;
所述转出账户标识指示的卡应用,具体用于:The card application indicated by the transfer-out account identifier is specifically used for:
根据所述转账初始化指令,生成转账密钥;将所述转账密钥携带在转账响应消息中发送给所述SIM卡;接收所述SIM卡发送的加密后的第二扣费指令,根据所述转账密钥,以及所述加密后的第二扣费指令中携带的转账金额和转账密码完成扣费;According to the transfer initialization instruction, generate a transfer key; carry the transfer key in the transfer response message and send it to the SIM card; receive the encrypted second deduction instruction sent by the SIM card, according to the The transfer key, and the transfer amount and transfer password carried in the encrypted second deduction instruction complete the deduction;
所述转入账户标识指示的卡应用,具体用于:The card application indicated by the transfer-in account identifier is specifically used for:
接收所述SIM卡发送的加密后的第一转账指令,根据所述第一转账指令中携带的转账金额完成转账。The encrypted first transfer instruction sent by the SIM card is received, and the transfer is completed according to the transfer amount carried in the first transfer instruction.
本发明实施例的有益效果如下:The beneficial effects of the embodiments of the present invention are as follows:
本发明实施例中,当SIM卡接收移动终端发送的第一卡应用操作指令时,根据该第一卡应用操作指令中携带的卡应用标识,向卡应用标识指示的卡应用发送认证请求,以实现与卡应用标识指示的卡应用之间的双向认证,当双向认证成功时,向卡应用标识指示的卡应用发送第二卡应用操作指令,以完成相应操作。本方案与现有技术相比,可以直接通过卡内实体对卡应用进行操作,使操作的安全性得以提高。In the embodiment of the present invention, when the SIM card receives the first card application operation instruction sent by the mobile terminal, according to the card application identification carried in the first card application operation instruction, it sends an authentication request to the card application indicated by the card application identification, so as to Realize two-way authentication with the card application indicated by the card application identifier, and when the two-way authentication is successful, send a second card application operation instruction to the card application indicated by the card application identifier to complete the corresponding operation. Compared with the prior art, this solution can directly operate the card application through the entity in the card, so that the security of the operation can be improved.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention, and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute improper limitations to the present invention. In the attached picture:
图1为现有技术中,支持NFC-SWP技术的NFC手机终端结构示意图;FIG. 1 is a schematic structural diagram of an NFC mobile phone terminal supporting NFC-SWP technology in the prior art;
图2为现有技术中,基于NFC手机终端进行业务操作的系统结构示意图;FIG. 2 is a schematic structural diagram of a system for performing business operations based on an NFC mobile phone terminal in the prior art;
图3为本发明实施例中,一种对SIM卡应用进行处理的方法实现流程图;FIG. 3 is an implementation flowchart of a method for processing SIM card applications in an embodiment of the present invention;
图3a为本发明实施例中,一种SIM卡与卡应用之间的双向认证实现流程图;Fig. 3a is a flow chart of realizing two-way authentication between a SIM card and a card application in an embodiment of the present invention;
图4为本发明实施例中,基于NFC手机终端进行操作的系统结构示意图;Fig. 4 is in the embodiment of the present invention, the system structural diagram that operates based on NFC mobile phone terminal;
图5为本发明实施例中,充值场景下的对SIM卡应用进行处理的方法实现流程图;Fig. 5 is an implementation flow chart of a method for processing SIM card applications in a recharge scenario in an embodiment of the present invention;
图6为本发明实施例中,消费场景下的对SIM卡应用进行处理的方法实现流程图;Fig. 6 is an implementation flow chart of a method for processing SIM card applications in a consumption scenario in an embodiment of the present invention;
图7为本发明实施例中,转账场景下的对SIM卡应用进行处理的方法实现流程图;Fig. 7 is an implementation flow chart of a method for processing a SIM card application in a transfer scenario in an embodiment of the present invention;
图8为本发明实施例中,一种对SIM卡应用进行处理的装置结构示意图;FIG. 8 is a schematic structural diagram of a device for processing SIM card applications in an embodiment of the present invention;
图9为本发明实施例中,一种对SIM卡应用进行处理的装置结构示意图;FIG. 9 is a schematic structural diagram of a device for processing SIM card applications in an embodiment of the present invention;
图10为本发明实施例中,一种对SIM卡应用进行处理的系统结构示意图。FIG. 10 is a schematic structural diagram of a system for processing SIM card applications in an embodiment of the present invention.
具体实施方式detailed description
为了解决现有技术中存在的对SE芯片中的卡应用进行操作时安全性较低的问题,本发明实施例提供了一种对SIM卡应用进行处理的方案。该技术方案中,当SIM卡接收移动终端发送的第一卡应用操作指令时,根据该第一卡应用操作指令中携带的卡应用标识,向卡应用标识指示的卡应用发送认证请求,以实现与卡应用标识指示的卡应用之间的双向认证,当双向认证成功时,向卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对卡应用标识指示的卡应用的操作。本方案与现有技术相比,可以直接通过卡内实体对卡应用进行操作,使操作的安全性得以提高。In order to solve the problem of low security in operating the card application in the SE chip in the prior art, the embodiment of the present invention provides a solution for processing the SIM card application. In this technical solution, when the SIM card receives the first card application operation instruction sent by the mobile terminal, according to the card application identification carried in the first card application operation instruction, it sends an authentication request to the card application indicated by the card application identification, so as to realize Two-way authentication with the card application indicated by the card application identifier. When the two-way authentication is successful, send a second card application operation instruction to the card application indicated by the card application identifier to complete the operation on the card application indicated by the card application identifier. Compared with the prior art, this solution can directly operate the card application through the entity in the card, so that the security of the operation can be improved.
以下结合说明书附图对本发明的实施例进行说明,应当理解,此处所描述的实施例仅用于说明和解释本发明,并不用于限制本发明。并且在不冲突的情况下,本发明中的实施例及实施例的特征可以互相结合。The embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention. And in the case of no conflict, the embodiments and the features of the embodiments in the present invention can be combined with each other.
本发明实施例提供了一种对SIM卡应用进行处理的方法,如图3所示,为该方法的实现流程图,具体包括下述步骤:The embodiment of the present invention provides a method for processing SIM card applications, as shown in Figure 3, which is a flow chart for the implementation of the method, specifically including the following steps:
步骤31,SIM卡接收移动终端发送的第一卡应用操作指令;其中,第一卡应用操作指令中携带卡应用标识。Step 31, the SIM card receives the first card application operation instruction sent by the mobile terminal; wherein, the first card application operation instruction carries the card application identifier.
其中,第一卡应用操作指令可以但不限于为:Among them, the first card application operation instruction can be but not limited to:
充值指令、消费指令和转账指令。Recharge instructions, consumption instructions and transfer instructions.
当第一卡应用操作指令为充值指令时,该充值指令中除了携带卡应用标识之外,还可以携带有充值金额和充值密码。其中,充值金额和充值密码可以是用户通过移动终端中的客户端软件输入的。When the first card application operation instruction is a recharge instruction, in addition to the card application identification, the recharge instruction may also carry a recharge amount and a recharge password. Wherein, the recharge amount and the recharge password may be input by the user through the client software in the mobile terminal.
当第一卡应用操作指令为消费指令时,该消费指令中除了携带卡应用标识之外,还可以携带消费金额和消费密码。其中,消费密码可以是用户通过移动终端中的客户端软件输入的。When the first card application operation instruction is a consumption instruction, in addition to the card application identification, the consumption instruction may also carry the consumption amount and the consumption password. Wherein, the consumption password may be input by the user through the client software in the mobile terminal.
当第一卡应用操作指令为转账指令时,该转账指令中除了携带卡应用标识之外,还可以携带转账金额和转账密码,而且卡应用标识需要包括:转出账户标识和转入账户标识。其中,转出账户、转入账户以及转账金额和转账密码可以是用户通过移动终端中的客户端软件输入的。When the first card application operation instruction is a transfer instruction, in addition to the card application identification, the transfer instruction may also carry the transfer amount and the transfer password, and the card application identification needs to include: the transfer-out account ID and the transfer-in account ID. Wherein, the transfer-out account, transfer-in account, transfer amount and transfer password may be input by the user through the client software in the mobile terminal.
步骤32,根据该第一卡应用操作指令中携带的卡应用标识,向卡应用标识指示的卡应用发送认证请求,以实现与卡应用标识指示的卡应用之间的双向认证。Step 32: According to the card application identification carried in the first card application operation instruction, send an authentication request to the card application indicated by the card application identification, so as to realize two-way authentication with the card application indicated by the card application identification.
具体的,步骤32可以按照如图3a所示的过程实现:Specifically, step 32 can be implemented according to the process shown in Figure 3a:
步骤32a,SIM卡根据该第一卡应用操作指令中携带的卡应用标识,向卡应用标识指示的卡应用发送认证请求;Step 32a, the SIM card sends an authentication request to the card application indicated by the card application identifier according to the card application identifier carried in the first card application operation instruction;
步骤32b,卡应用标识指示的卡应用根据认证请求,以及和SIM卡预先约定的第一密钥,生成第一加密密文,并发送给SIM卡;Step 32b, the card application indicated by the card application identifier generates a first encrypted ciphertext according to the authentication request and the first key pre-agreed with the SIM card, and sends it to the SIM card;
步骤32c,SIM卡接收到第一加密密文后,判断预先根据第一密钥生成的第二加密密文和接收到的第一加密密文是否相同;Step 32c, after the SIM card receives the first encrypted ciphertext, judge whether the second encrypted ciphertext generated in advance according to the first key is the same as the received first encrypted ciphertext;
步骤32d,当SIM卡判断出第二加密密文和第一加密密文相同时,继续根据与卡应用标识指示的卡应用预先约定的第二密钥生成第三加密密文,并发送给卡应用标识指示的卡应用;Step 32d, when the SIM card judges that the second encrypted ciphertext is the same as the first encrypted ciphertext, continue to generate the third encrypted ciphertext according to the pre-agreed second key of the card application indicated by the card application identification, and send it to the card the card application indicated by the application identification;
步骤32e,卡应用标识指示的卡应用判断预先根据第二密钥生成的第四加密密文和接收到的第三加密密文是否相同;Step 32e, the card application indicated by the card application identifier judges whether the fourth encrypted ciphertext generated in advance according to the second key is the same as the received third encrypted ciphertext;
步骤32f,当卡应用标识指示的卡应用判断出第四加密密文和第三加密密文相同时,向SIM卡发送认证成功消息;Step 32f, when the card application indicated by the card application identifier determines that the fourth encrypted ciphertext is the same as the third encrypted ciphertext, send an authentication success message to the SIM card;
步骤32g,当SIM卡接收到卡应用标识指示的卡应用发送的认证成功消息时,确定双向认证成功。Step 32g, when the SIM card receives the authentication success message sent by the card application indicated by the card application identifier, determine that the two-way authentication is successful.
步骤33,当SIM卡与卡应用标识指示的卡应用之间的双向认证成功时,SIM卡向卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对卡应用标识指示的卡应用的操作。Step 33, when the two-way authentication between the SIM card and the card application indicated by the card application identification is successful, the SIM card sends a second card application operation instruction to the card application indicated by the card application identification to complete the card application indicated by the card application identification operation.
当第一卡应用操作指令为充值指令时,步骤33中的第二卡应用操作指令为充值初始化指令,该充值初始化指令中可以携带充值金额和充值密码。When the first card application operation instruction is a recharge instruction, the second card application operation instruction in step 33 is a recharge initialization instruction, and the recharge initialization instruction may carry a recharge amount and a recharge password.
在这种情况下,步骤33可以具体包括:In this case, step 33 may specifically include:
向卡应用标识指示的卡应用发送充值初始化指令;Send a recharge initialization command to the card application indicated by the card application identifier;
接收卡应用标识指示的卡应用根据充值初始化指令反馈的圈存请求;其中,圈存请求中携带充值金额、充值密码、卡应用标识指示的卡应用卡号和卡应用标识指示的卡应用的账户余额;Receive the loading request from the card application indicated by the card application identification according to the recharge initialization instruction; wherein, the loading request carries the recharge amount, the recharge password, the card number of the card application indicated by the card application identification, and the account balance of the card application indicated by the card application identification ;
将圈存请求发送给账务平台,以便账务平台根据充值金额、充值密码、卡号和账户余额完成圈存处理。Send the loading request to the accounting platform, so that the accounting platform can complete the loading process according to the recharge amount, recharge password, card number and account balance.
现有技术中,用户通过移动终端中的客户端软件直接向卡应用发起充值指令。而本发明实施例中,用户通过移动终端中的客户端软件发起充值指令时,该充值指令被卡内实体接收,并在与卡应用进行双向认证之后,再向卡应用发起充值初始化指令,从而提高了操作的安全性。In the prior art, the user directly initiates a recharge instruction to the card application through the client software in the mobile terminal. However, in the embodiment of the present invention, when the user initiates a recharge instruction through the client software in the mobile terminal, the recharge instruction is received by the entity in the card, and after two-way authentication with the card application, the recharge initialization instruction is initiated to the card application, thereby Improved operational safety.
另外,根据现有技术可知,在操作过程中,需要账务平台完成账务处理之后,生成业务脚本下发,这对于账务平台的要求较高。因此,本发明实施例中,可以增添一个控制平台,使控制平台连接账务平台,代替账务平台下发业务脚本。In addition, according to the prior art, it is known that in the operation process, after the accounting platform completes the accounting processing, it needs to generate a business script and issue it, which has higher requirements on the accounting platform. Therefore, in the embodiment of the present invention, a control platform may be added, so that the control platform is connected to the accounting platform, and instead of the accounting platform, the service script is issued.
因此,本发明实施例中将圈存请求发送给账务平台时,可以具体包括:Therefore, in the embodiment of the present invention, when sending the loading request to the accounting platform, it may specifically include:
将圈存请求发送给控制平台,由控制平台将圈存请求发送给账务平台;Send the loading request to the control platform, and the control platform will send the loading request to the accounting platform;
在这种情况下,该方法还可以包括:In this case, the method may also include:
接收控制平台发送的充值脚本;其中,充值脚本是控制平台收到账务平台发送的圈存处理结果后生成的;receiving the recharge script sent by the control platform; wherein, the recharge script is generated after the control platform receives the transfer processing result sent by the accounting platform;
将充值脚本发送给卡应用标识指示的卡应用,由卡应用标识指示的卡应用根据该充值脚本对账户金额进行更新。The recharge script is sent to the card application indicated by the card application identifier, and the card application indicated by the card application identifier updates the account amount according to the recharge script.
进一步的,为了提高SIM卡与控制平台之间进行交互时的安全性,本发明实施例中在将圈存请求发送给控制平台之前,首先向控制平台发送认证请求,以实现SIM卡与控制平台之间的双向认证,并且当与控制平台之间的双向认证成功时,再将圈存请求发送给控制平台。Further, in order to improve the security when interacting between the SIM card and the control platform, in the embodiment of the present invention, before sending the load request to the control platform, first send an authentication request to the control platform, so as to realize the interaction between the SIM card and the control platform. Two-way authentication with the control platform, and when the two-way authentication with the control platform is successful, the load request is sent to the control platform.
当第一卡应用操作指令为消费指令时,步骤33中的第二卡应用操作指令为消费初始化指令。When the first card application operation instruction is a consumption instruction, the second card application operation instruction in step 33 is a consumption initialization instruction.
在这种情况下,步骤33可以具体包括:In this case, step 33 may specifically include:
向卡应用标识指示的卡应用发送消费初始化指令;Send consumption initialization instructions to the card application indicated by the card application identifier;
接收卡应用标识指示的卡应用反馈的消费响应消息;其中,消费响应消息中携带卡应用标识指示的卡应用根据消费初始化指令生成的消费密钥;其中,该消费密钥用于整个消费交易的认证和加密过程中;Receive the consumption response message fed back by the card application indicated by the card application identification; wherein, the consumption response message carries the consumption key generated by the card application indicated by the card application identification according to the consumption initialization instruction; wherein, the consumption key is used for the entire consumption transaction During authentication and encryption;
根据消费响应消息中的消费密钥,生成加密后的第一扣费指令;其中,加密后的第一扣费指令中携带消费金额和消费密码;According to the consumption key in the consumption response message, an encrypted first deduction instruction is generated; wherein, the encrypted first deduction instruction carries the consumption amount and the consumption password;
将加密后的第一扣费指令发送给卡应用标识指示的卡应用,由卡应用标识指示的卡应用根据消费密钥,以及加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。Send the encrypted first deduction instruction to the card application indicated by the card application identifier, and the card application indicated by the card application identifier completes the transaction according to the consumption key, the consumption amount and the consumption password carried in the encrypted first deduction instruction. Deduction.
现有技术中,用户通过移动终端中的客户端软件直接向卡应用发起消费指令。而本发明实施例中,用户通过移动终端中的客户端软件发起消费指令时,该消费指令被卡内实体接收,并在与卡应用进行双向认证之后,再向卡应用发起消费初始化指令,从而提高了操作的安全性。In the prior art, the user directly initiates consumption instructions to the card application through the client software in the mobile terminal. However, in the embodiment of the present invention, when the user initiates a consumption instruction through the client software in the mobile terminal, the consumption instruction is received by the entity in the card, and after two-way authentication with the card application, the consumption initialization instruction is initiated to the card application, thereby Improved operational safety.
当第一卡应用操作指令为转账指令时,步骤33中的第二卡应用操作指令为向卡应用标识中的转出账户标识指示的卡应用发送的转账初始化指令。When the first card application operation instruction is a transfer instruction, the second card application operation instruction in step 33 is a transfer initialization instruction sent to the card application indicated by the transfer-out account identifier in the card application identifier.
在这种情况下,步骤33可以具体包括:In this case, step 33 may specifically include:
向卡应用标识中的转出账户标识指示的卡应用发送转账初始化指令;Send a transfer initialization instruction to the card application indicated by the transfer-out account identifier in the card application identifier;
接收转出账户标识指示的卡应用反馈的转账响应消息;其中,转账响应消息中携带转出账户标识指示的卡应用根据转账初始化指令生成的转账密钥;Receive the transfer response message fed back by the card application indicated by the transfer-out account identifier; wherein, the transfer response message carries the transfer key generated by the card application indicated by the transfer-out account identifier according to the transfer initialization instruction;
根据转账响应消息中的转账密钥,生成加密后的第二扣费指令;其中,加密后的第二扣费指令中携带转账金额和转账密码;According to the transfer key in the transfer response message, an encrypted second deduction instruction is generated; wherein, the encrypted second deduction instruction carries the transfer amount and the transfer password;
将加密后的第二扣费指令发送给转出账户标识指示的卡应用,由转出账户标识指示的卡应用根据转账密钥,以及加密后的第二扣费指令中携带的转账金额和转账密码完成扣费;The encrypted second deduction instruction is sent to the card application indicated by the transfer-out account identifier, and the card application indicated by the transfer-out account identifier is based on the transfer key, and the transfer amount and transfer amount carried in the encrypted second deduction instruction. Password to complete the deduction;
向转入账户标识指示的卡应用发送携带转账金额的第一转账指令,由转入账户标识指示的卡应用根据第一转账指令中携带的转账金额完成转账。Send the first transfer instruction carrying the transfer amount to the card application indicated by the transfer-in account identifier, and the card application indicated by the transfer-in account identifier completes the transfer according to the transfer amount carried in the first transfer instruction.
现有技术中,根据现有的SWP-SIM卡的应用架构,每个卡应用在SE芯片上被分配一块独立空间,不同卡应用之间不存在交互接口,无法进行卡应用之间的信令交互,这就导致不同卡应用之间若需要传递信令时必须通过卡外实体(比如移动终端中的客户端软件)转发才可以完成,从而会过多占用移动终端的操作系统资源,影响操作系统的处理效率。而本发明实施例中,可以通过卡内实体传递不同卡应用之间的信令,从而实现不同卡应用之间的信令交互,避免占用移动终端的操作系统资源。In the prior art, according to the existing SWP-SIM card application architecture, each card application is allocated an independent space on the SE chip, there is no interactive interface between different card applications, and signaling between card applications cannot be performed Interaction, which leads to the need to transmit signaling between different card applications must be forwarded by an entity outside the card (such as the client software in the mobile terminal), which will occupy too much operating system resources of the mobile terminal and affect the operation. System processing efficiency. However, in the embodiment of the present invention, the signaling between different card applications can be transmitted through the entity in the card, so as to realize the signaling interaction between different card applications and avoid occupying operating system resources of the mobile terminal.
为了更好的理解本发明实施例,以下结合具体的实施对本发明实施例的具体实施过程进行说明。In order to better understand the embodiments of the present invention, the specific implementation process of the embodiments of the present invention will be described below in combination with specific implementations.
如图4所示,为本发明实施例提供的基于NFC手机终端进行操作的系统结构示意图。其中,该系统中主要包括:账务平台、控制平台、NFC手机终端以及SWP-SIM卡。具体功能介绍如下:As shown in FIG. 4 , it is a schematic structural diagram of a system operating based on an NFC mobile phone terminal provided by an embodiment of the present invention. Among them, the system mainly includes: accounting platform, control platform, NFC mobile terminal and SWP-SIM card. The specific functions are introduced as follows:
一)对SWP-SIM卡进行的改造主要有两个方面:1) There are two main aspects to the transformation of the SWP-SIM card:
1、新增认证处理单元1. New authentication processing unit
SIM卡中内置的安全芯片SE除装载各种卡应用(银行卡、公交卡、门禁卡等)之外,还新增了一个认证处理单元,该认证处理单元对其它卡应用来说是第三方可信的。其主要功能描述如下:In addition to loading various card applications (bank cards, bus cards, access control cards, etc.), the built-in security chip SE in the SIM card also adds an authentication processing unit, which is a third-party authentication processing unit for other card applications. Believable. Its main functions are described as follows:
(1)实现SWP-SIM卡内所有卡应用的统一注册及管理功能,包括对卡应用的激活、去激活操作、卡应用数据的存储以及打开/关闭卡应用访问权限等;(1) Realize the unified registration and management functions of all card applications in the SWP-SIM card, including activation and deactivation of card applications, storage of card application data, and opening/closing of card application access rights, etc.;
(2)密钥的存储;(2) Storage of keys;
(3)提供对SIM卡内卡应用以及卡外实体的安全认证;认证成功后,可作为桥接卡外实体与卡应用之间的安全通道以及不同卡应用之间的安全通道;(3) Provide security authentication for SIM card applications and entities outside the card; after successful authentication, it can be used as a bridge between the entity outside the card and the card application and the security channel between different card applications;
(4)充值、消费相关指令的组成和解析;(4) Composition and analysis of instructions related to recharge and consumption;
(5)进行卡应用认证以及交易操作时的逻辑处理;(5) Logical processing during card application authentication and transaction operations;
2、扩展卡内接口2. Expansion card interface
修改PBOC标准,定义认证处理单元与其他卡应用之间进行交互的安全接口,以完成认证处理单元对各个卡应用的注册、认证以及指令传输等。卡内新增接口功能描述如下:Modify the PBOC standard to define the security interface for the interaction between the authentication processing unit and other card applications, so as to complete the registration, authentication and instruction transmission of each card application by the authentication processing unit. The new interface functions in the card are described as follows:
(1)卡应用注册功能:对于预置或下载到SE中的卡应用,需通过该接口将卡应用相关参数(如应用序列号等信息)在认证处理单元中进行登记注册;(1) Card application registration function: For the card application preset or downloaded to the SE, it is necessary to register the relevant parameters of the card application (such as application serial number and other information) in the authentication processing unit through this interface;
(2)卡应用激活/去激活功能:当某个卡应用被选择作为当前交易的默认应用时,认证处理单元需将该卡应用设置为激活状态;变更交易操作的默认卡应用时,认证处理单元需对已经激活的卡应用进行去激活;(2) Card application activation/deactivation function: When a certain card application is selected as the default application for the current transaction, the authentication processing unit needs to set the card application to the activated state; when changing the default card application for the transaction operation, the authentication processing unit The unit needs to deactivate the activated card application;
(3)卡应用锁定/解锁功能:当认证处理单元检测到当前交易操作异常(如交易密码连续输入错误三次以上),出于对卡应用的安全保障,认证处理单元将会关闭该卡应用的访问权限,将其设置为锁定状态。(3) Card application lock/unlock function: When the authentication processing unit detects that the current transaction operation is abnormal (for example, the transaction password has been entered incorrectly for more than three consecutive times), for the security of the card application, the authentication processing unit will close the card application. Access, set it to locked state.
二)提供手机客户端交互界面2) Provide mobile client interface
为了便于用户使用手机终端随时随地的发起交易并完成操作,可以在NFC手机终端中安装一个客户端软件,为用户提供可视化的交互界面。In order to facilitate the user to initiate transactions and complete operations anytime and anywhere using the mobile terminal, a client software can be installed in the NFC mobile terminal to provide the user with a visual interactive interface.
三)控制平台3) Control platform
在后台增设一个(或多个)控制平台,连接银行、公交等卡应用的账务平台。控制平台作为具有公信力的第三方,在与卡应用对应的账务平台以及SIM卡认证处理单元进行相互认证之后,可与认证处理单元之间建立安全通道,代替账务平台生成操作指令并完成下发。Add one (or more) control platforms in the background to connect to the accounting platforms of bank, bus and other card applications. As a third party with credibility, the control platform can establish a secure channel with the authentication processing unit after mutual authentication with the accounting platform corresponding to the card application and the SIM card authentication processing unit, and replace the accounting platform to generate operation instructions and complete the next step. send.
在交易完成后,控制平台负责生成交易记录,上传至相关账务平台;控制平台也可对交易记录进行暂存,积累多条记录后通过邮件等方式发给账务平台。After the transaction is completed, the control platform is responsible for generating transaction records and uploading them to the relevant accounting platform; the control platform can also temporarily store the transaction records, and after accumulating multiple records, send them to the accounting platform by email or other methods.
本发明实施例适用于对SIM卡中的卡应用进行充值、消费和转账等多种交易类型、下面分别以充值、消费和转账三种交易场景为例,阐述实现过程。The embodiment of the present invention is applicable to multiple types of transactions such as recharging, consumption and transfer for card applications in the SIM card. The following three transaction scenarios of recharging, consumption and transfer are used as examples to illustrate the implementation process.
充值流程:Recharge process:
如图5所示,充值场景下的对SIM卡应用进行处理的方法具体过程如下:As shown in Figure 5, the specific process of the method for processing the SIM card application in the recharge scenario is as follows:
1、用户通过客户端软件发起充值交易,选择进行充值的卡应用;1. The user initiates a recharge transaction through the client software, and selects the card application for recharging;
2、客户端软件向SIM卡中的认证处理单元发送应用选择指令;2. The client software sends an application selection instruction to the authentication processing unit in the SIM card;
3、认证处理单元返回应用选择指令的响应,包含应用序列号等信息;3. The authentication processing unit returns a response to the application selection command, including information such as the application serial number;
4、客户端软件向认证处理单元发起充值请求;4. The client software initiates a recharge request to the authentication processing unit;
5、认证处理单元处理充值请求,激活相应的卡应用,通过卡内新增API与该卡应用进行相互鉴权,并建立安全通道。具体过程:5. The authentication processing unit processes the recharge request, activates the corresponding card application, performs mutual authentication with the card application through the newly added API in the card, and establishes a secure channel. Specific process:
1)认证处理单元向卡应用发送主机挑战数来初始化安全通道;1) The authentication processing unit sends the host challenge number to the card application to initialize the security channel;
2)卡应用收到后,生成自身的挑战数;利用静态密钥生成一个安全会话密钥,并利用该会话密钥生成一个加密密文;并将卡应用挑战数及加密密文返回给认证处理单元;2) After receiving the card application, generate its own challenge number; use the static key to generate a secure session key, and use the session key to generate an encrypted ciphertext; and return the card application challenge number and encrypted ciphertext to the authentication processing unit;
3)此时,认证处理单元应该具有生成加密密文相同的信息,认证处理单元应该能够生成相同的会话密钥、相同的加密密文,通过执行比较对卡应用进行鉴权;3) At this point, the authentication processing unit should have the same information to generate the encrypted ciphertext, the authentication processing unit should be able to generate the same session key, the same encrypted ciphertext, and authenticate the card application by performing comparison;
4)认证处理单元同样使用类似的流程生成第二个加密密文,并将其返回给卡应用;4) The authentication processing unit also uses a similar process to generate the second encrypted ciphertext, and returns it to the card application;
5)卡应用也应该具有生成第二个加密密文相同的信息,通过执行比较可以对认证处理单元进行鉴权;相互鉴权完毕,认证处理单元与卡应用之间的安全通道建立完成。5) The card application should also have the same information as the second encrypted ciphertext, and the authentication processing unit can be authenticated by performing comparison; after the mutual authentication is completed, the secure channel between the authentication processing unit and the card application is established.
6、认证处理单元组装卡应用可识别的充值初始化指令,并通过安全通道将充值初始化指令发送给相应的卡应用;6. The authentication processing unit assembles a recharge initialization instruction that can be identified by the card application, and sends the recharge initialization instruction to the corresponding card application through a secure channel;
7、卡应用收到充值初始化指令,产生用于本次交易的充值密钥,此充值密钥用于整个充值交易的认证和加密;7. The card application receives the recharge initialization command and generates a recharge key for this transaction, which is used for authentication and encryption of the entire recharge transaction;
8、卡应用生成圈存请求(携带卡号、余额、充值金额等信息),使用充值密钥对圈存请求进行加密,并计算第一校验值MAC1,发送给认证处理单元;8. The card application generates a transfer request (carrying information such as card number, balance, recharge amount, etc.), encrypts the transfer request with the recharge key, calculates the first check value MAC1, and sends it to the authentication processing unit;
9、认证处理单元将加密后的圈存请求通过客户端软件转发给控制平台。认证处理平台可通过客户端软件与控制平台进行相互鉴权(鉴权过程与第5步类似),建立控制平台与认证处理单元之间的安全通道,此时,认证处理平台将控制平台与银行卡应用之间的安全通道相连通;9. The authentication processing unit forwards the encrypted loading request to the control platform through the client software. The authentication processing platform can perform mutual authentication with the control platform through the client software (the authentication process is similar to step 5), and establish a safe channel between the control platform and the authentication processing unit. At this time, the authentication processing platform will control the platform and the bank The secure channel between card applications is connected;
10、控制平台将圈存请求转发给银行卡账务平台;10. The control platform forwards the loading request to the bank card accounting platform;
11、银行卡账务平台使用充值密钥解密,并验证MAC1;11. The bank card accounting platform uses the recharge key to decrypt and verify MAC1;
12、银行卡账务平台验证账户有效性之后,完成账务处理,更新银行卡账户余额;12. After the bank card account platform verifies the validity of the account, complete the account processing and update the bank card account balance;
13、银行卡账务平台向控制平台返回圈存请求响应,将处理结果发送给控制平台;13. The bank card accounting platform returns a loading request response to the control platform, and sends the processing result to the control platform;
14、控制平台生成充值脚本,使用充值密钥对充值脚本进行加密,并计算第二校验值MAC2;14. The control platform generates a recharge script, uses the recharge key to encrypt the recharge script, and calculates the second check value MAC2;
15、控制平台通过安全通道将充值指令传递给银行卡应用,完成充值脚本下发;15. The control platform transmits the recharge instruction to the bank card application through a secure channel, and completes the distribution of the recharge script;
16、银行卡应用使用充值密钥进行解密,并对MAC2进行验证;16. The bank card application uses the recharge key to decrypt and verify MAC2;
17、验证通过,银行卡应用执行充值脚本,更新余额,生成交易记录。17. After the verification is passed, the bank card application executes the recharge script, updates the balance, and generates transaction records.
消费流程:Consumption process:
如图6所示,消费场景下的对SIM卡应用进行处理的方法具体过程如下:As shown in Figure 6, the specific process of the method for processing the SIM card application in the consumption scenario is as follows:
1、用户通过客户端软件发起消费交易,选择一张银行卡应用进行消费;1. The user initiates a consumption transaction through the client software, and selects a bank card application for consumption;
2、客户端软件向SIM卡中的认证处理单元发送应用选择指令;2. The client software sends an application selection instruction to the authentication processing unit in the SIM card;
3、认证处理单元返回应用选择指令的响应,包含应用序列号等信息;3. The authentication processing unit returns a response to the application selection command, including information such as the application serial number;
4、客户端软件请求输入支付密码,并向认证处理单元发起消费请求(请求中包含卡应用的标识、支付密码以及支付金额),建立与认证处理单元之间的安全通道,认证处理单元还可对客户端软件进行认证;4. The client software requests the input of the payment password, and initiates a consumption request to the authentication processing unit (the request includes the identification of the card application, the payment password, and the payment amount), and establishes a secure channel with the authentication processing unit. The authentication processing unit can also Authenticate client software;
5、认证处理单元处理消费请求,激活待消费的卡应用,通过卡内新增API与该卡应用进行相互鉴权,并建立安全通道,过程同上述充值流程第5步。此时,认证处理单元可将到客户端的通道与到卡应用的通道连接起来;5. The authentication processing unit processes the consumption request, activates the card application to be consumed, performs mutual authentication with the card application through the new API in the card, and establishes a secure channel. The process is the same as step 5 of the above-mentioned recharge process. At this point, the authentication processing unit may connect the channel to the client with the channel to the card application;
6、认证处理单元生成消费初始化指令,并通过安全通道将消费初始化指令发送给相应的卡应用;6. The authentication processing unit generates a consumption initialization command, and sends the consumption initialization command to the corresponding card application through a secure channel;
7、卡应用收到消费初始化指令后,产生用于本次交易的消费密钥,并通过响应告知认证处理单元,此密钥用于整个消费交易的认证和加密。7. After receiving the consumption initialization instruction, the card application generates a consumption key for this transaction, and informs the authentication processing unit through a response that the key is used for authentication and encryption of the entire consumption transaction.
8、认证处理单元生成扣费指令,并使用消费密钥进行加密,发送给卡应用;同时携带一个MAC1,此MAC1的产生也使用该消费密钥;8. The authentication processing unit generates a deduction instruction, encrypts it with the consumption key, and sends it to the card application; at the same time, it carries a MAC1, and the generation of the MAC1 also uses the consumption key;
9、卡应用使用消费密钥进行解密,并验证MAC1;9. The card application uses the consumption key to decrypt and verify MAC1;
10、验证通过,卡应用执行脚本完成本地扣费,并将操作结果生成指令,再通过消费密钥完成加密,并计算MAC2;通过响应返回给认证处理单元;10. After the verification is passed, the card application executes the script to complete the local deduction, and generates an instruction from the operation result, and then completes the encryption through the consumption key, and calculates MAC2; returns the response to the authentication processing unit;
11、认证处理单元使用消费密钥对响应进行解密,验证MAC2;11. The authentication processing unit uses the consumption key to decrypt the response and verify MAC2;
12、认证处理单元验证通过,生成交易记录,并将处理结果发送给客户端;12. The authentication processing unit passes the verification, generates a transaction record, and sends the processing result to the client;
13、客户端将交易记录发送给控制平台;13. The client sends the transaction records to the control platform;
14、控制平台可积累多条交易记录后,一次性通过邮件等方式发送给银行账户平台。14. The control platform can accumulate multiple transaction records, and send them to the bank account platform by email or other methods at one time.
转账流程:Transfer process:
如图7所示,转账场景下的对SIM卡应用进行处理的方法具体过程如下:As shown in Figure 7, the specific process of the method for processing the SIM card application in the transfer scenario is as follows:
1、用户通过客户端软件发起转账交易,选择转出账户-卡应用2;1. The user initiates a transfer transaction through the client software, and selects the transfer account-card application 2;
2、客户端软件向SIM卡中的认证处理单元发送应用选择指令;2. The client software sends an application selection instruction to the authentication processing unit in the SIM card;
3、认证处理单元返回应用选择指令的响应,包含应用序列号等信息;3. The authentication processing unit returns a response to the application selection command, including information such as the application serial number;
4、客户端软件提示用户输入卡应用1的支付密码,并选择转入账户-卡应用1;4. The client software prompts the user to enter the payment password of the card application 1, and selects the transfer-in account-card application 1;
5、客户端软件向认证处理单元发起转账请求,包含转出账户卡号、支付密码、转账金额、转入账户卡号等;5. The client software initiates a transfer request to the authentication processing unit, including the transfer-out account card number, payment password, transfer amount, transfer-in account card number, etc.;
6、认证处理单元处理转账请求,激活卡应用2,通过卡内API与卡应用2进行相互鉴权,并建立安全通道。具体过程:6. The authentication processing unit processes the transfer request, activates the card application 2, performs mutual authentication with the card application 2 through the API in the card, and establishes a secure channel. Specific process:
1)认证处理单元向卡应用发送主机挑战数来初始化安全通道;1) The authentication processing unit sends the host challenge number to the card application to initialize the security channel;
2)卡应用收到后,生成自身的挑战数;利用静态密钥生成一个安全会话密钥,并利用该会话密钥生成一个加密密文;并将卡应用挑战数及加密密文返回给认证处理单元;2) After receiving the card application, generate its own challenge number; use the static key to generate a secure session key, and use the session key to generate an encrypted ciphertext; and return the card application challenge number and encrypted ciphertext to the authentication processing unit;
3)此时,认证处理单元应该具有生成加密密文相同的信息,认证处理单元应该能够生成相同的会话密钥、相同的加密密文,通过执行比较对卡应用进行鉴权;3) At this point, the authentication processing unit should have the same information to generate the encrypted ciphertext, the authentication processing unit should be able to generate the same session key, the same encrypted ciphertext, and authenticate the card application by performing comparison;
4)认证处理单元同样使用类似的流程生成第二个加密密文,并将其返回给卡应用;4) The authentication processing unit also uses a similar process to generate the second encrypted ciphertext, and returns it to the card application;
5)卡应用也应该具有生成第二个加密密文相同的信息,通过执行比较可以对认证处理单元进行鉴权;相互鉴权完毕,认证处理单元与卡应用之间的安全通道建立完成。5) The card application should also have the same information as the second encrypted ciphertext, and the authentication processing unit can be authenticated by performing comparison; after the mutual authentication is completed, the secure channel between the authentication processing unit and the card application is established.
7、认证处理单元组装卡应用可识别的消费初始化指令,并通过安全通道将消费初始化指令发送给相应的卡应用;7. The authentication processing unit assembles the consumption initialization instruction that can be identified by the card application, and sends the consumption initialization instruction to the corresponding card application through a secure channel;
8、卡应用2收到消费初始化指令,产生用于本次交易的消费密钥,此密钥用于整个消费交易的认证和加密;8. The card application 2 receives the consumption initialization command and generates a consumption key for this transaction, which is used for authentication and encryption of the entire consumption transaction;
9、认证处理单元生成扣费指令,并使用消费密钥对扣费指令进行加密,同时产生MAC1;9. The authentication processing unit generates a fee deduction instruction, encrypts the fee deduction instruction with the consumption key, and generates MAC1 at the same time;
10、认证处理单元将加密后的扣费指令发送给卡应用2;10. The authentication processing unit sends the encrypted deduction instruction to the card application 2;
11、卡应用2使用消费密钥解密,并验证MAC1;11. Card application 2 uses the consumption key to decrypt and verify MAC1;
12、卡应用2验证MAC1有效后,完成扣费,更新银行卡应用2账户余额,并生成MAC2;12. After the card application 2 verifies that MAC1 is valid, the deduction is completed, the account balance of the bank card application 2 is updated, and MAC2 is generated;
13、卡应用2返回扣费指令的响应,将处理结果发送给认证处理单元;13. The card application 2 returns a response to the deduction instruction, and sends the processing result to the authentication processing unit;
14、认证处理单元验证MAC2;14. The authentication processing unit verifies MAC2;
15、认证处理单元生成充值指令,使用充值密钥对充值指令进行加密;15. The authentication processing unit generates a recharge instruction, and uses the recharge key to encrypt the recharge instruction;
16、认证处理单元将充值指令下发给卡应用1,携带卡应用标识及充值金额;16. The authentication processing unit sends the recharge instruction to the card application 1, carrying the card application identification and recharge amount;
17、银行卡应用1使用充值密钥进行解密;17. Bank card application 1 uses the recharge key to decrypt;
18、银行卡应用1执行充值指令完成账户充值,更新余额,生成交易记录;18. The bank card application 1 executes the recharge command to complete the account recharge, update the balance, and generate transaction records;
19、银行卡应用1返回充值指令的响应。19. The bank card application 1 returns a response to the recharge instruction.
基于同一发明构思,本发明实施例中还分别提供了一种SIM卡侧实施的对SIM卡应用进行处理的装置和卡应用侧实施的对SIM卡应用进行处理的装置以及对SIM卡应用进行处理的系统,由于上述装置及系统解决问题的原理与SIM卡侧实施的对SIM卡应用进行处理的方法和卡应用侧实施的对SIM卡应用进行处理的方法相似,因此上述装置和系统的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, embodiments of the present invention also provide a device for processing SIM card applications implemented by the SIM card side, a device for processing SIM card applications implemented by the card application side, and a device for processing SIM card applications. system, because the principle of the above-mentioned device and system to solve the problem is similar to the method for processing the SIM card application implemented by the SIM card side and the method for processing the SIM card application implemented by the card application side, the implementation of the above-mentioned device and system can be Refer to the implementation of the method, and the repetition will not be repeated.
如图8所示,为本发明实施例提供的第一种对SIM卡应用进行处理的装置的结构示意图,包括:As shown in FIG. 8, it is a schematic structural diagram of the first device for processing SIM card applications provided by the embodiment of the present invention, including:
第一卡应用操作指令接收单元81,用于接收移动终端发送的第一卡应用操作指令;其中,所述第一卡应用操作指令中携带卡应用标识;The first card application operation instruction receiving unit 81 is configured to receive the first card application operation instruction sent by the mobile terminal; wherein, the first card application operation instruction carries a card application identifier;
认证单元82,用于根据所述第一卡应用操作指令接收单元81接收的第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求,以实现与所述卡应用标识指示的卡应用之间的双向认证;The authentication unit 82 is configured to send an authentication request to the card application indicated by the card application identifier according to the card application identifier carried in the first card application operation instruction received by the first card application operation instruction receiving unit 81, so as to realize the Two-way authentication between card applications indicated by the card application identifier;
第二卡应用操作指令发送单元83,用于当所述认证单元82中与所述卡应用标识指示的卡应用之间的双向认证成功时,向所述卡应用标识指示的卡应用发送第二卡应用操作指令,以完成对所述卡应用标识指示的卡应用的操作。The second card application operation instruction sending unit 83 is configured to send a second card application operation instruction to the card application indicated by the card application identifier when the two-way authentication between the authentication unit 82 and the card application indicated by the card application identifier is successful. The card application operation instruction is used to complete the operation of the card application indicated by the card application identification.
其中,所述认证单元82,具体包括:Wherein, the authentication unit 82 specifically includes:
认证请求发送模块821,用于根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用发送认证请求;An authentication request sending module 821, configured to send an authentication request to the card application indicated by the card application identifier according to the card application identifier carried in the first card application operation instruction;
密文接收模块822,用于接收所述卡应用标识指示的卡应用反馈的第一加密密文;其中,所述第一加密密文是所述卡应用标识指示的卡应用根据与客户识别模块SIM卡预先约定的第一密钥生成的;The ciphertext receiving module 822 is configured to receive the first encrypted ciphertext fed back by the card application indicated by the card application identifier; wherein, the first encrypted ciphertext is the card application indicated by the card application identifier and the customer identification module Generated by the first key pre-agreed by the SIM card;
判断模块823,用于判断预先根据所述第一密钥生成的第二加密密文和所述密文接收模块822接收到的第一加密密文是否相同;A judging module 823, configured to judge whether the second encrypted ciphertext generated in advance according to the first key is the same as the first encrypted ciphertext received by the ciphertext receiving module 822;
密文发送模块824,用于当所述判断模块823判断出第二加密密文和所述第一加密密文相同时,继续根据与所述卡应用标识指示的卡应用预先约定的第二密钥生成第三加密密文,并发送给所述卡应用标识指示的卡应用,由所述卡应用标识指示的卡应用判断预先根据所述第二密钥生成的第四加密密文和接收到的第三加密密文是否相同,以实现对所述SIM卡的认证;The ciphertext sending module 824 is configured to, when the judging module 823 judges that the second encrypted ciphertext is the same as the first encrypted ciphertext, continue to use the pre-agreed second ciphertext according to the card application indicated by the card application identification. key to generate a third encrypted ciphertext, and send it to the card application indicated by the card application identifier, and the card application indicated by the card application identifier judges the fourth encrypted ciphertext generated according to the second key in advance and the received Whether the third encrypted ciphertext of the same, to realize the authentication of the SIM card;
双向认证成功确定模块825,用于当接收到所述卡应用标识指示的卡应用发送的认证成功消息时,则确定双向认证成功。The two-way authentication success determining module 825 is configured to determine that the two-way authentication is successful when receiving the authentication success message sent by the card application indicated by the card application identifier.
其中,所述第一卡应用操作指令为充值指令,且所述充值指令中还携带有充值金额和充值密码;则Wherein, the first card application operation instruction is a recharge instruction, and the recharge instruction also carries a recharge amount and a recharge password; then
所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有所述充值金额和所述充值密码;The second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries the recharge amount and the recharge password;
所述第二卡应用操作指令发送单元83,具体包括:The second card application operation instruction sending unit 83 specifically includes:
充值初始化指令发送模块831,用于向所述卡应用标识指示的卡应用发送充值初始化指令;A recharge initialization instruction sending module 831, configured to send a recharge initialization instruction to the card application indicated by the card application identifier;
圈存请求接收模块832,用于接收所述卡应用标识指示的卡应用根据所述充值初始化指令发送模块831发送的充值初始化指令反馈的圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;The load request receiving module 832 is configured to receive the load request fed back by the card application indicated by the card application identifier according to the recharge initialization instruction sent by the recharge initialization instruction sending module 831; wherein, the load request carries the The recharge amount, the recharge password, the card number of the card application indicated by the card application identification, and the account balance of the card application indicated by the card application identification;
圈存请求发送模块833,用于将所述圈存请求接收模块832接收的圈存请求发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理。The loading request sending module 833 is configured to send the loading request received by the loading request receiving module 832 to the account platform, so that the account platform can use the recharge amount, the recharge password, the card number and The account balance has completed loading processing.
其中,所述第一卡应用操作指令为消费指令,且所述消费指令中还携带有消费金额和消费密码;则Wherein, the first card application operation instruction is a consumption instruction, and the consumption instruction also carries a consumption amount and a consumption password; then
第二卡应用操作指令为消费初始化指令;The second card application operation instruction is a consumption initialization instruction;
所述第二卡应用操作指令发送单元83,具体包括:The second card application operation instruction sending unit 83 specifically includes:
消费初始化指令发送模块834,用于向所述卡应用标识指示的卡应用发送消费初始化指令;A consumption initialization instruction sending module 834, configured to send a consumption initialization instruction to the card application indicated by the card application identifier;
消费响应消息接收模块835,用于接收所述卡应用标识指示的卡应用反馈的消费响应消息;其中,所述消费响应消息中携带所述卡应用标识指示的卡应用根据所述消费初始化指令发送模块834发送的消费初始化指令生成的消费密钥;The consumption response message receiving module 835 is configured to receive the consumption response message fed back by the card application indicated by the card application identification; wherein, the consumption response message carries the card application indicated by the card application identification and sends it according to the consumption initialization instruction The consumption key generated by the consumption initialization command sent by module 834;
第一扣费指令发送模块836,用于根据所述消费响应消息接收模块835接收的消费响应消息中的消费密钥,生成加密后的第一扣费指令,并发送给所述卡应用标识指示的卡应用;其中,所述加密后的第一扣费指令中携带所述消费金额和消费密码,由所述卡应用标识指示的卡应用根据所述消费密钥,以及所述加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。The first deduction instruction sending module 836 is configured to generate an encrypted first deduction instruction according to the consumption key in the consumption response message received by the consumption response message receiving module 835, and send it to the card application identification instruction The card application; wherein, the encrypted first deduction instruction carries the consumption amount and the consumption password, and the card application indicated by the card application identifier is based on the consumption key and the encrypted first deduction instruction The consumption amount and consumption password carried in the fee deduction instruction complete the deduction.
其中,所述第一卡应用操作指令为转账指令,且所述转账指令中携带有卡应用标识、转账金额和转账密码,且所述卡应用标识包括:转出账户标识和转入账户标识;则Wherein, the first card application operation instruction is a transfer instruction, and the transfer instruction carries a card application identifier, a transfer amount, and a transfer password, and the card application identifier includes: a transfer-out account identifier and a transfer-in account identifier; but
所述第二卡应用操作指令为向所述卡应用标识中的转出账户标识指示的卡应用发送的转账初始化指令;The second card application operation instruction is a transfer initialization instruction sent to the card application indicated by the transfer-out account identifier in the card application identifier;
所述第二卡应用操作指令发送单元83,具体包括:The second card application operation instruction sending unit 83 specifically includes:
转账初始化指令发送模块837,用于向所述卡应用标识中的转出账户标识指示的卡应用发送转账初始化指令;A transfer initialization instruction sending module 837, configured to send a transfer initialization instruction to the card application indicated by the transfer-out account identifier in the card application identifier;
转账响应消息接收模块838,用于接收所述转出账户标识指示的卡应用反馈的转账响应消息;其中,所述转账响应消息中携带所述转出账户标识指示的卡应用根据所述转账初始化指令发送模块837发送的转账初始化指令生成的转账密钥;The transfer response message receiving module 838 is configured to receive a transfer response message fed back by the card application indicated by the transfer-out account identifier; wherein, the transfer response message carries the card application indicated by the transfer-out account identifier according to the transfer initialization The transfer key generated by the transfer initialization instruction sent by the instruction sending module 837;
第二扣费指令发送模块839,用于根据所述转账响应消息接收模块838接收的转账响应消息中的转账密钥,生成加密后的第二扣费指令,并发送给所述转出账户标识指示的卡应用;其中,所述加密后的第二扣费指令中携带所述转账金额和转账密码,由所述转出账户标识指示的卡应用根据所述转账密钥,以及所述加密后的第二扣费指令中携带的转账金额和转账密码完成扣费;The second deduction instruction sending module 839 is configured to generate an encrypted second deduction instruction according to the transfer key in the transfer response message received by the transfer response message receiving module 838, and send it to the transfer-out account identifier The indicated card application; wherein, the encrypted second deduction instruction carries the transfer amount and the transfer password, and the card application indicated by the transfer-out account identifier uses the transfer key and the encrypted The transfer amount and the transfer password carried in the second deduction instruction of the deduction fee are completed;
第一转账指令发送模块8310,用于向所述转入账户标识指示的卡应用发送携带所述转账金额的第一转账指令,由所述转入账户标识指示的卡应用根据所述第一转账指令中携带的转账金额完成转账。The first transfer instruction sending module 8310, configured to send a first transfer instruction carrying the transfer amount to the card application indicated by the transfer-in account identifier, and the card application indicated by the transfer-in account identifier according to the first transfer The transfer amount carried in the instruction completes the transfer.
为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本发明时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Certainly, when implementing the present invention, the functions of each module (or unit) can be implemented in one or more pieces of software or hardware.
具体实施时,上述第一种对SIM卡应用进行处理的装置可以设置在SIM卡中。During specific implementation, the above-mentioned first device for processing SIM card applications may be set in the SIM card.
如图9所示,为本发明实施例提供的第二种对SIM卡应用进行处理的装置的结构示意图,包括:As shown in FIG. 9 , it is a schematic structural diagram of a second device for processing SIM card applications provided by an embodiment of the present invention, including:
认证单元91,用于接收客户识别模块SIM卡发送的认证请求,与所述SIM卡进行双向认证;The authentication unit 91 is used to receive the authentication request sent by the customer identification module SIM card, and carry out two-way authentication with the SIM card;
第二卡应用操作指令接收单元92,用于当所述认证单元91中与所述SIM卡之间的双向认证成功时,接收所述SIM卡发送的第二卡应用操作指令;The second card application operation instruction receiving unit 92 is used for receiving the second card application operation instruction sent by the SIM card when the two-way authentication between the authentication unit 91 and the SIM card is successful;
操作完成单元93,用于根据所述第二卡应用操作指令接收单元92接收的第二卡应用操作指令,完成相应操作。The operation completion unit 93 is configured to complete corresponding operations according to the second card application operation instruction received by the second card application operation instruction receiving unit 92 .
其中,所述认证单元91,具体包括:Wherein, the authentication unit 91 specifically includes:
认证请求接收模块911,用于接收SIM卡发送的认证请求;An authentication request receiving module 911, configured to receive an authentication request sent by a SIM card;
密文发送模块912,用于根据所述认证请求接收模块911接收的认证请求,以及和所述SIM卡预先约定的第一密钥,生成第一加密密文,并发送给所述SIM卡,由所述SIM卡判断预先根据所述第一密钥生成的第二加密密文和接收到的第一加密密文是否相同,以实现所述SIM卡对所述卡应用的认证;The ciphertext sending module 912 is configured to generate a first encrypted ciphertext according to the authentication request received by the authentication request receiving module 911 and the first key pre-agreed with the SIM card, and send it to the SIM card, The SIM card judges whether the second encrypted ciphertext generated in advance according to the first key is the same as the received first encrypted ciphertext, so as to realize the authentication of the card application by the SIM card;
密文接收模块913,用于接收所述SIM卡发送的第三加密密文;A ciphertext receiving module 913, configured to receive the third encrypted ciphertext sent by the SIM card;
判断模块914,用于当所述密文接收模块913接收到述SIM卡发送的第三加密密文时,继续根据与所述SIM卡预先约定的第二密钥,生成第四加密密文,并判断所述第四加密密文和接收到的第三加密密文是否相同;其中,所述第三加密密文是所述SIM卡判断出所述第二加密密文和所述第一加密密文相同时,根据所述第二密钥生成的;The judging module 914 is configured to continue to generate a fourth encrypted ciphertext according to the second key pre-agreed with the SIM card when the ciphertext receiving module 913 receives the third encrypted ciphertext sent by the SIM card, and judge whether the fourth encrypted ciphertext is the same as the received third encrypted ciphertext; When the ciphertexts are the same, generated according to the second key;
双向认证确定模块915,用于当所述判断模块914判断出第四加密密文和接收到的第三加密密文相同时,则确定双向认证成功。The two-way authentication determining module 915 is configured to determine that the two-way authentication is successful when the judging module 914 judges that the fourth encrypted ciphertext is the same as the received third encrypted ciphertext.
其中,所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有充值金额和充值密码;则Wherein, the second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries a recharge amount and a recharge password; then
所述操作完成单元93,具体包括:The operation completion unit 93 specifically includes:
圈存请求生成模块931,用于根据所述充值初始化指令,生成圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;Loading request generating module 931, configured to generate a loading request according to the recharging initialization instruction; wherein, the loading request carries the recharging amount, the recharging password, and the card application card number indicated by the card application identification and the account balance of the card application indicated by the card application identifier;
圈存请求发送模块932,用于将所述圈存请求生成模块931生成的圈存请求通过所述SIM卡发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理。The loading request sending module 932 is configured to send the loading request generated by the loading request generating module 931 to the account platform through the SIM card, so that the account platform can use the recharge amount and the recharge password , the card number and the account balance complete the loading process.
其中,第二卡应用操作指令为消费初始化指令;则Wherein, the second card application operation instruction is a consumption initialization instruction; then
所述操作完成单元93,具体包括:The operation completion unit 93 specifically includes:
消费密钥生成模块933,用于根据所述消费初始化指令,生成消费密钥;A consumption key generating module 933, configured to generate a consumption key according to the consumption initialization instruction;
消费响应消息发送模块,用于将所述消费密钥生成模块生成的消费密钥携带在消费响应消息中发送给所述SIM卡,由所述SIM卡根据所述消费密钥,生成加密后的第一扣费指令;其中,所述加密后的第一扣费指令中携带消费金额和消费密码;A consumption response message sending module, configured to carry the consumption key generated by the consumption key generation module in the consumption response message and send it to the SIM card, and the SIM card generates an encrypted consumption key according to the consumption key A first fee deduction instruction; wherein, the encrypted first fee deduction instruction carries a consumption amount and a consumption password;
第一扣费指令接收模块934,用于接收所述SIM卡发送的加密后的第一扣费指令;The first deduction instruction receiving module 934 is configured to receive the encrypted first deduction instruction sent by the SIM card;
扣费模块935,用于根据所述消费密钥生成模块933生成的消费密钥,以及所述第一扣费指令接收模块934接收的加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。The deduction module 935 is configured to use the consumption key generated by the consumption key generation module 933, and the consumption amount and the consumption amount carried in the encrypted first deduction instruction received by the first deduction instruction receiving module 934. Password to complete the deduction.
其中,所述第二卡应用操作指令为转账初始化指令,以及所述卡应用为转出账户;则Wherein, the second card application operation instruction is a transfer initialization instruction, and the card application is a transfer-out account; then
所述操作完成单元93,具体包括:The operation completion unit 93 specifically includes:
转账密钥生成模块936,用于根据所述转账初始化指令,生成转账密钥;A transfer key generating module 936, configured to generate a transfer key according to the transfer initialization instruction;
转账密钥发送模块937,用于将所述转账密钥生成模块936生成的转账密钥携带在转账响应消息中发送给所述SIM卡,由所述SIM卡根据所述转账密钥,生成加密后的第二扣费指令;其中,所述加密后的第二扣费指令中携带转账金额和转账密码;The transfer key sending module 937 is configured to carry the transfer key generated by the transfer key generation module 936 in the transfer response message and send it to the SIM card, and the SIM card generates an encrypted key according to the transfer key. The second fee deduction instruction; wherein, the encrypted second fee deduction instruction carries the transfer amount and the transfer password;
第二扣费指令接收模块938,用于接收所述SIM卡发送的加密后的第二扣费指令;The second deduction instruction receiving module 938 is configured to receive the encrypted second deduction instruction sent by the SIM card;
扣费模块939,用于根据所述转账密钥生成模块936生成的转账密钥,以及所述第二扣费指令接收模块938接收的加密后的第二扣费指令中携带的转账金额和转账密码完成扣费,并向所述SIM卡反馈第二扣费结果,由所述SIM卡根据所述第二扣费结果,生成携带所述转账金额的第一转账指令,并发送给转入账户,使所述转入账户根据所述第一转账指令中携带的转账金额完成转账。The deduction module 939 is configured to use the transfer key generated by the transfer key generation module 936, and the transfer amount and transfer amount carried in the encrypted second deduction instruction received by the second deduction instruction receiving module 938. The password completes the deduction, and feeds back the second deduction result to the SIM card, and the SIM card generates the first transfer instruction carrying the transfer amount according to the second deduction result, and sends it to the transfer-in account , enabling the transfer-in account to complete the transfer according to the transfer amount carried in the first transfer instruction.
为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本发明时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Certainly, when implementing the present invention, the functions of each module (or unit) can be implemented in one or more pieces of software or hardware.
具体实施时,上述第二种对SIM卡应用进行处理的装置可以设置在SIM卡中。During specific implementation, the above-mentioned second device for processing the SIM card application may be set in the SIM card.
如图10所示,为本发明实施例提供的对SIM卡应用进行处理的系统的结构示意图,包括:包括移动终端101和包含至少一种卡应用103的客户识别模块SIM卡102,其中:As shown in FIG. 10, a schematic structural diagram of a system for processing SIM card applications provided by an embodiment of the present invention includes: a mobile terminal 101 and a customer identification module SIM card 102 including at least one card application 103, wherein:
所述移动终端101,用于向所述SIM卡102发送第一卡应用操作指令;其中,所述第一卡应用操作指令中携带卡应用标识;The mobile terminal 101 is configured to send a first card application operation instruction to the SIM card 102; wherein, the first card application operation instruction carries a card application identifier;
所述SIM卡102,用于接收所述第一卡应用操作指令;根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用103发送认证请求,以实现与所述卡应用标识指示的卡应用103之间的双向认证;当与所述卡应用标识指示的卡应用103之间的双向认证成功时,向所述卡应用标识指示的卡应用103发送第二卡应用操作指令;The SIM card 102 is configured to receive the first card application operation instruction; according to the card application identification carried in the first card application operation instruction, send an authentication request to the card application 103 indicated by the card application identification, to Realize the two-way authentication with the card application 103 indicated by the card application identification; when the two-way authentication with the card application 103 indicated by the card application identification succeeds, send The second card applies an operation instruction;
所述卡应用标识指示的卡应用103,用于接收所述SIM卡102发送的认证请求;根据所述认证请求,与所述SIM卡102进行双向认证;当与所述SIM卡102之间的双向认证成功时,接收所述SIM卡102发送的第二卡应用操作指令;根据所述第二卡应用操作指令,完成相应操作。The card application 103 indicated by the card application identifier is used to receive the authentication request sent by the SIM card 102; perform two-way authentication with the SIM card 102 according to the authentication request; When the two-way authentication is successful, receive the second card application operation instruction sent by the SIM card 102; complete the corresponding operation according to the second card application operation instruction.
其中,所述SIM卡102,具体用于:Wherein, the SIM card 102 is specifically used for:
根据所述第一卡应用操作指令中携带的卡应用标识,向所述卡应用标识指示的卡应用103发送认证请求;接收所述卡应用标识指示的卡应用103反馈的第一加密密文;判断预先根据所述第一密钥生成的第二加密密文和接收到的第一加密密文是否相同;当所述第二加密密文和所述第一加密密文相同时,继续根据与所述卡应用标识指示的卡应用103预先约定的第二密钥生成第三加密密文,并发送给所述卡应用标识指示的卡应用103;当接收到所述卡应用标识指示的卡应用103发送的认证成功消息时,则确定双向认证成功;According to the card application identification carried in the first card application operation instruction, send an authentication request to the card application 103 indicated by the card application identification; receive the first encrypted ciphertext fed back by the card application 103 indicated by the card application identification; Judging whether the second encrypted ciphertext generated in advance based on the first key is the same as the received first encrypted ciphertext; when the second encrypted ciphertext is identical to the first encrypted ciphertext, continue to The second key pre-agreed by the card application 103 indicated by the card application identifier generates a third encrypted ciphertext and sends it to the card application 103 indicated by the card application identifier; when receiving the card application indicated by the card application identifier When the authentication success message sent by 103, it is determined that the two-way authentication is successful;
所述卡应用标识指示的卡应用103,具体用于:The card application 103 indicated by the card application identifier is specifically used for:
根据所述认证请求,以及和所述SIM卡102预先约定的第一密钥,生成第一加密密文,并发送给所述SIM卡102;当接收到所述SIM卡102发送的第三加密密文时,继续根据与所述SIM卡102预先约定的第二密钥,生成第四加密密文;判断所述第四加密密文和接收到的第三加密密文是否相同;当所述第四加密密文和接收到的第三加密密文相同时,向所述SIM卡102发送认证成功消息。According to the authentication request and the first key pre-agreed with the SIM card 102, a first encrypted ciphertext is generated and sent to the SIM card 102; when receiving the third encrypted ciphertext sent by the SIM card 102 When ciphertext, continue to generate the fourth encrypted ciphertext according to the second key pre-agreed with the SIM card 102; judge whether the fourth encrypted ciphertext is the same as the received third encrypted ciphertext; when the When the fourth encrypted ciphertext is the same as the received third encrypted ciphertext, an authentication success message is sent to the SIM card 102 .
其中,所述第一卡应用操作指令为充值指令,且所述充值指令中还携带有充值金额和充值密码;Wherein, the first card application operation instruction is a recharge instruction, and the recharge instruction also carries a recharge amount and a recharge password;
所述第二卡应用操作指令为充值初始化指令,且所述充值初始化指令中携带有所述充值金额和所述充值密码;The second card application operation instruction is a recharge initialization instruction, and the recharge initialization instruction carries the recharge amount and the recharge password;
所述SIM卡102,具体用于:The SIM card 102 is specifically used for:
向所述卡应用标识指示的卡应用103发送充值初始化指令;接收所述卡应用标识指示的卡应用103根据所述充值初始化指令反馈的圈存请求;其中,所述圈存请求中携带所述充值金额、所述充值密码、所述卡应用标识指示的卡应用卡号和所述卡应用标识指示的卡应用的账户余额;将所述圈存请求发送给账务平台,以便所述账务平台根据所述充值金额、所述充值密码、所述卡号和所述账户余额完成圈存处理;Sending a recharge initialization instruction to the card application 103 indicated by the card application identifier; receiving a loading request fed back by the card application 103 indicated by the card application identifier according to the recharging initialization instruction; wherein, the loading request carries the The recharge amount, the recharge password, the card application card number indicated by the card application identification and the account balance of the card application indicated by the card application identification; sending the loading request to the account platform, so that the account platform completing loading processing according to the recharge amount, the recharge password, the card number and the account balance;
所述卡应用标识指示的卡应用103,具体用于:The card application 103 indicated by the card application identifier is specifically used for:
根据所述充值初始化指令,生成圈存请求,并发送给所述SIM卡102。According to the recharge initialization instruction, a credit loading request is generated and sent to the SIM card 102 .
其中,所述系统还包括:控制平台104;则Wherein, the system also includes: a control platform 104;
所述SIM卡102,具体用于:The SIM card 102 is specifically used for:
将所述圈存请求发送给控制平台104,由所述控制平台104将所述圈存请求发送给账务平台;Send the loading request to the control platform 104, and the control platform 104 sends the loading request to the accounting platform;
所述SIM卡102还用于:The SIM card 102 is also used for:
接收所述控制平台104发送的充值脚本;其中,所述充值脚本是所述控制平台104收到所述账务平台发送的圈存处理结果后生成的;receiving the recharge script sent by the control platform 104; wherein, the recharge script is generated after the control platform 104 receives the transfer processing result sent by the account platform;
将所述充值脚本发送给所述卡应用标识指示的卡应用103;Send the recharge script to the card application 103 indicated by the card application identifier;
所述卡应用标识指示的卡应用103,还用于:The card application 103 indicated by the card application identifier is also used for:
根据所述充值脚本对所述账户余额进行更新。The account balance is updated according to the recharge script.
其中,所述第一卡应用操作指令为消费指令,且所述消费指令中还携带有消费金额和消费密码;Wherein, the first card application operation instruction is a consumption instruction, and the consumption instruction also carries a consumption amount and a consumption password;
第二卡应用操作指令为消费初始化指令;The second card application operation instruction is a consumption initialization instruction;
所述SIM卡102,具体用于:The SIM card 102 is specifically used for:
向所述卡应用标识指示的卡应用103发送消费初始化指令;接收所述卡应用标识指示的卡应用103反馈的消费响应消息;其中,所述消费响应消息中携带消费密钥;根据所述消费响应消息中的消费密钥,生成加密后的第一扣费指令;其中,所述加密后的第一扣费指令中携带所述消费金额和消费密码;将所述加密后的第一扣费指令发送给所述卡应用标识指示的卡应用103;Send a consumption initialization instruction to the card application 103 indicated by the card application identification; receive a consumption response message fed back by the card application 103 indicated by the card application identification; wherein, the consumption response message carries a consumption key; according to the consumption Responding to the consumption key in the message, generate an encrypted first deduction instruction; wherein, the encrypted first deduction instruction carries the consumption amount and consumption password; The instruction is sent to the card application 103 indicated by the card application identifier;
所述卡应用标识指示的卡应用103,具体用于:The card application 103 indicated by the card application identifier is specifically used for:
根据所述消费初始化指令,生成消费密钥;将所述消费密钥携带在消费响应消息中发送给所述SIM卡102;接收SIM卡102发送的加密后的第一扣费密钥;根据所述消费密钥,以及所述加密后的第一扣费指令中携带的消费金额和消费密码完成扣费。Generate a consumption key according to the consumption initialization instruction; carry the consumption key in the consumption response message and send it to the SIM card 102; receive the encrypted first deduction key sent by the SIM card 102; The consumption key, and the consumption amount and consumption password carried in the encrypted first deduction instruction are used to complete deduction.
其中,所述第一卡应用操作指令为转账指令,且所述转账指令中携带有卡应用标识、转账金额和转账密码,且所述卡应用标识包括:转出账户标识和转入账户标识;所述第二卡应用操作指令为向所述卡应用标识中的转出账户标识指示的卡应用发送的转账初始化指令;Wherein, the first card application operation instruction is a transfer instruction, and the transfer instruction carries a card application identifier, a transfer amount, and a transfer password, and the card application identifier includes: a transfer-out account identifier and a transfer-in account identifier; The second card application operation instruction is a transfer initialization instruction sent to the card application indicated by the transfer-out account identifier in the card application identifier;
所述SIM卡102,具体用于:The SIM card 102 is specifically used for:
向所述卡应用标识中的转出账户标识指示的卡应用103发送转账初始化指令;接收所述转出账户标识指示的卡应用103反馈的转账响应消息;其中,所述转账响应消息中携带转账密钥;根据所述转账密钥,生成加密后的第二扣费指令;其中,所述加密后的第二扣费指令中携带所述转账金额和转账密码;将所述加密后的第二扣费指令发送给所述转出账户标识指示的卡应用103;以及向所述转入账户标识指示的卡应用103发送携带所述转账金额的第一转账指令;Sending a transfer initialization instruction to the card application 103 indicated by the transfer-out account identifier in the card application identifier; receiving a transfer response message fed back by the card application 103 indicated by the transfer-out account identifier; wherein, the transfer response message carries the transfer key; according to the transfer key, an encrypted second deduction instruction is generated; wherein, the encrypted second deduction instruction carries the transfer amount and the transfer password; the encrypted second The deduction instruction is sent to the card application 103 indicated by the transfer-out account identifier; and the first transfer instruction carrying the transfer amount is sent to the card application 103 indicated by the transfer-in account identifier;
所述转出账户标识指示的卡应用103,具体用于:The card application 103 indicated by the transfer-out account identifier is specifically used for:
根据所述转账初始化指令,生成转账密钥;将所述转账密钥携带在转账响应消息中发送给所述SIM卡102;接收所述SIM卡102发送的加密后的第二扣费指令,根据所述转账密钥,以及所述加密后的第二扣费指令中携带的转账金额和转账密码完成扣费;According to the transfer initialization instruction, generate a transfer key; carry the transfer key in the transfer response message and send it to the SIM card 102; receive the encrypted second deduction instruction sent by the SIM card 102, according to The transfer key, and the transfer amount and transfer password carried in the encrypted second deduction instruction complete the deduction;
所述转入账户标识指示的卡应用103,具体用于:The card application 103 indicated by the transfer-in account identifier is specifically used for:
接收所述SIM卡102发送的加密后的第一转账指令,根据所述第一转账指令中携带的转账金额完成转账。The encrypted first transfer instruction sent by the SIM card 102 is received, and the transfer is completed according to the transfer amount carried in the first transfer instruction.
为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本发明时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Certainly, when implementing the present invention, the functions of each module (or unit) can be implemented in one or more pieces of software or hardware.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (26)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410799630.XA CN105787723A (en) | 2014-12-19 | 2014-12-19 | Method, device and system for processing SIM card applications |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410799630.XA CN105787723A (en) | 2014-12-19 | 2014-12-19 | Method, device and system for processing SIM card applications |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105787723A true CN105787723A (en) | 2016-07-20 |
Family
ID=56385013
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410799630.XA Pending CN105787723A (en) | 2014-12-19 | 2014-12-19 | Method, device and system for processing SIM card applications |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105787723A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109474624A (en) * | 2018-12-25 | 2019-03-15 | 北京华大智宝电子系统有限公司 | A kind of application authentication system and method |
CN111400737A (en) * | 2020-03-17 | 2020-07-10 | 中孚信息股份有限公司 | Multi-application physical isolation encrypted SIM card implementation device, method and terminal |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1655507A (en) * | 2004-02-02 | 2005-08-17 | 松下电器产业株式会社 | Security device and mobile terminal for data exchange between card applications |
CN101605328A (en) * | 2009-05-25 | 2009-12-16 | 厦门敏讯信息技术股份有限公司 | Communication system, terminal, SIM and machine-card authentication method |
CN101620758A (en) * | 2008-07-01 | 2010-01-06 | 中国银联股份有限公司 | A Smart Card Supporting Web Services |
CN102509217A (en) * | 2011-09-30 | 2012-06-20 | 福源立信(北京)科技有限公司 | Mobile long-distance payment system |
CN102902553A (en) * | 2012-08-23 | 2013-01-30 | 福建富士通信息软件有限公司 | Remote card issuing method of mobile phone payment card based on JAVA card |
-
2014
- 2014-12-19 CN CN201410799630.XA patent/CN105787723A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1655507A (en) * | 2004-02-02 | 2005-08-17 | 松下电器产业株式会社 | Security device and mobile terminal for data exchange between card applications |
CN101620758A (en) * | 2008-07-01 | 2010-01-06 | 中国银联股份有限公司 | A Smart Card Supporting Web Services |
CN101605328A (en) * | 2009-05-25 | 2009-12-16 | 厦门敏讯信息技术股份有限公司 | Communication system, terminal, SIM and machine-card authentication method |
CN102509217A (en) * | 2011-09-30 | 2012-06-20 | 福源立信(北京)科技有限公司 | Mobile long-distance payment system |
CN102902553A (en) * | 2012-08-23 | 2013-01-30 | 福建富士通信息软件有限公司 | Remote card issuing method of mobile phone payment card based on JAVA card |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109474624A (en) * | 2018-12-25 | 2019-03-15 | 北京华大智宝电子系统有限公司 | A kind of application authentication system and method |
CN109474624B (en) * | 2018-12-25 | 2021-07-20 | 北京华大智宝电子系统有限公司 | Application program authentication system and method |
CN111400737A (en) * | 2020-03-17 | 2020-07-10 | 中孚信息股份有限公司 | Multi-application physical isolation encrypted SIM card implementation device, method and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2023202521B9 (en) | Method and Apparatus for Providing Secure Services Using a Mobile Device | |
CN113170299B (en) | System and method for password authentication of contactless cards | |
JP7483688B2 (en) | System and method for cryptographic authentication of contactless cards - Patents.com | |
CA2972895C (en) | Security for mobile payment applications | |
JP2022504072A (en) | Systems and methods for cryptographic authentication of contactless cards | |
CN112602104A (en) | System and method for password authentication of contactless cards | |
JP2025000781A (en) | Systems and methods for cryptographic authentication of contactless cards | |
AU2014353151A1 (en) | Automated account provisioning | |
WO2020072440A1 (en) | Systems and methods for cryptographic authentication of contactless cards | |
CN113168631A (en) | System and method for password authentication of contactless cards | |
CN113169873A (en) | System and method for password authentication of contactless cards | |
CN105787723A (en) | Method, device and system for processing SIM card applications | |
HK40053284A (en) | Systems and methods for cryptographic authentication of contactless cards | |
HK40053700A (en) | Systems and methods for cryptographic authentication of contactless cards | |
HK40050746A (en) | Systems and methods for cryptographic authentication of contactless cards | |
HK40054655A (en) | Systems and methods for cryptographic authentication of contactless cards |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160720 |
|
RJ01 | Rejection of invention patent application after publication |