CN116051096A - Offline payment method and related equipment - Google Patents

Offline payment method and related equipment Download PDF

Info

Publication number
CN116051096A
CN116051096A CN202111264697.XA CN202111264697A CN116051096A CN 116051096 A CN116051096 A CN 116051096A CN 202111264697 A CN202111264697 A CN 202111264697A CN 116051096 A CN116051096 A CN 116051096A
Authority
CN
China
Prior art keywords
sim card
payment
bluetooth module
data packet
certificate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111264697.XA
Other languages
Chinese (zh)
Inventor
傅镜艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN202111264697.XA priority Critical patent/CN116051096A/en
Publication of CN116051096A publication Critical patent/CN116051096A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/325Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices using wireless networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction

Abstract

The invention discloses an offline payment method and related equipment, relates to the technical field of communication, and aims to solve the problem that the current mobile payment method cannot be carried out under the condition that two terminal equipment are in an offline state. The method is applied to a first SIM card of first terminal equipment, the first terminal equipment comprises a first SIM card and a first Bluetooth module, the first SIM card is connected with the first Bluetooth module, and the first Bluetooth module is connected with a second SIM card of second terminal equipment in a Bluetooth way, and the method comprises the following steps: transmitting a transaction request to a second SIM card through a first Bluetooth module; acquiring a first data packet received by a first Bluetooth module from a second SIM card, and verifying a first signature and a first certificate; in case the verification is passed, performing a payment operation; and sending the second data packet to the second SIM card through the first Bluetooth module. The embodiment of the invention can enable two terminal devices to realize offline payment.

Description

Offline payment method and related equipment
Technical Field
The invention relates to the field of data service, in particular to an offline payment method and related equipment.
Background
With the continuous development of electronic commerce and the internet, mobile payment methods such as internet banking payment, weChat mobile payment, payment bank payment and the like are becoming more popular. When payment is carried out between two terminal devices through a mobile payment method, at least one terminal device needs to interact information with a business server through a payment application built in the terminal device, so that at least one terminal device needs to be online.
Therefore, the current mobile payment method cannot be performed under the condition that both terminal devices are in an offline state, so that the application range of the mobile payment method is smaller.
Disclosure of Invention
The embodiment of the invention provides an offline payment method and related equipment, which are used for solving the problem that the current mobile payment method cannot be carried out under the condition that two terminal equipment are in an offline state.
In a first aspect, an embodiment of the present invention provides an offline payment method, which is applied to a first SIM card of a first terminal device, where the first terminal device includes the first SIM card and a first bluetooth module, the first SIM card is connected to the first bluetooth module, and the first bluetooth module is connected to a second SIM card of a second terminal device by bluetooth, and the method includes:
transmitting a transaction request to the second SIM card through the first Bluetooth module;
acquiring a first data packet received by the first Bluetooth module from the second SIM card, wherein the first data packet comprises a first certificate and a first signature corresponding to the second SIM card;
verifying the first signature and the first certificate;
in case the verification is passed, performing a payment operation;
Sending a second data packet to the second SIM card through the first Bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation.
Optionally, after the sending, by the first bluetooth module, the second data packet to the second SIM card, the method further includes:
acquiring a state confirmation request carrying a transaction result received by the first Bluetooth module from the second SIM card;
determining a payment status based on the transaction result;
and sending the payment state to the second SIM card through the first Bluetooth module.
Optionally, after performing the payment operation in case of verification pass, the method further comprises:
acquiring payment credentials based on the payment operation; wherein the second data packet includes the payment credential.
Optionally, the first data packet further includes a preset random number and a first public key, wherein the first public key is generated based on the preset random number;
after performing the payment operation if the verification is passed, the method further comprises:
generating a second public key and a second private key based on the preset random number, wherein the second public key is matched with the second private key;
Determining a session key based on the first public key and the second private key;
encrypting the payment credential using the session key; wherein the second data packet further comprises the second public key.
Optionally, the first terminal device further comprises a first payment application; the first payment application is connected with the first SIM card through the first Bluetooth module;
before the transaction request is sent to the second SIM card through the first bluetooth module, the method further includes:
receiving a second certificate sent by a card service server through the first payment application;
the second certificate is sent after the card service server receives a request for opening the SIM payment function sent by the first payment application through the payment service server.
Optionally, after the second certificate sent by the card service server is received by the first payment application, the method further includes:
and sending an open state confirmation request carrying a receiving result to the card service server.
Optionally, the receiving, by the first payment application, the second certificate sent by the card service server includes:
and receiving a second certificate and a first initial private key sent by the card service server through the first payment application.
Optionally, the second signature is generated based on the first initial private key.
Optionally, the first SIM card and the first bluetooth module are bluetooth connected.
In a second aspect, an embodiment of the present invention provides an offline payment method, which is applied to a second SIM card of a second terminal device, where the second SIM card is connected to a first bluetooth module of a first terminal device, and the method includes:
responding to a transaction request sent by a first SIM card through the first Bluetooth module, and sending a first data packet to the first SIM card through the first Bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation;
receiving a second data packet sent by the first SIM card through the first Bluetooth module, wherein the second data packet comprises a second certificate and a second signature corresponding to the first SIM card;
verifying the second signature and the second certificate;
in the case that the verification is passed, a collection operation is performed.
Optionally, after performing the collection operation in the case that the verification is passed, the method further includes:
and sending a state confirmation request carrying a transaction result to the first SIM card through the first Bluetooth module so as to request the first SIM card to confirm the payment state.
Optionally, before the first data packet is sent to the first SIM card by the first bluetooth module in response to the transaction request sent by the first SIM card by the first bluetooth module, the method further includes:
generating a preset random number, and generating a first public key and a first private key based on the preset random number;
wherein the first public key and the first private key are matched; the first data packet further includes the preset random number and the first public key.
Optionally, the second data packet further includes a second public key and a payment credential, the second public key being generated based on the preset random number; the payment credential is obtained by the first SIM card based on the payment operation;
the performing a checkout operation in the case of verification passing includes:
determining a session key based on the second public key and the first private key;
decrypting the payment credential using the session key;
in case the decryption is successful, the collection operation is performed.
Optionally, the second terminal device further includes a second payment application and a second bluetooth module; the second payment application is connected with the second SIM card through the second Bluetooth module;
The method further comprises the steps of, before the second Bluetooth module sends a first data packet to the second SIM card in response to a transaction request sent by the second SIM card through the second Bluetooth module:
receiving a first certificate sent by a card service server through the second payment application;
the first certificate is sent after the card service server receives a request for opening a SIM payment function sent by the second payment application through the payment service server.
Optionally, after the receiving, by the second payment application, the first certificate sent by the card service server, the method further includes:
and sending an open state confirmation request carrying a receiving result to the card service server.
Optionally, the receiving, by the second payment application, the first certificate sent by the card service server includes:
and receiving a first certificate and a second initial private key sent by the card business server through the second payment application.
Optionally, the first signature is generated based on the second initial private key.
In a third aspect, an embodiment of the present invention further provides a first SIM card, which is applied to a first terminal device, where the first terminal device includes the first SIM card and a first bluetooth module, the first SIM card is connected to the first bluetooth module, and the first bluetooth module is connected to a second SIM card bluetooth of a second terminal device; the first SIM card comprises:
The first sending module is used for sending a transaction request to the second SIM card through the first Bluetooth module;
the first acquisition module is used for acquiring a first data packet received by the first Bluetooth module from the second SIM card, wherein the first data packet comprises a first certificate and a first signature corresponding to the second SIM card;
the first verification module is used for verifying the first signature and the first certificate;
the first execution module is used for executing payment operation under the condition that verification is passed;
the second sending module is used for sending a second data packet to the second SIM card through the first Bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation.
In a fourth aspect, an embodiment of the present invention further provides a second SIM card, which is applied to a second terminal device, where the second SIM card is connected to a first bluetooth module of a first terminal device, and the second SIM card includes:
the third sending module is used for responding to a transaction request sent by the first SIM card through the first Bluetooth module and sending a first data packet to the first SIM card through the first Bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation;
The first receiving module is used for receiving a second data packet sent by the first SIM card through the first Bluetooth module, wherein the second data packet comprises a second certificate and a second signature corresponding to the first SIM card;
the second verification module is used for verifying the second signature and the second certificate;
and the second execution module is used for executing the collection operation under the condition that the verification is passed.
In a fifth aspect, an embodiment of the present invention further provides a first SIM card, including: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; the processor is configured to read a program in the memory to implement the steps in the offline payment method according to the first aspect.
In a sixth aspect, an embodiment of the present invention further provides a second SIM card, including: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; the processor is configured to read a program in the memory to implement the steps in the offline payment method according to the second aspect.
In a seventh aspect, embodiments of the present invention further provide a readable storage medium having stored thereon a program which when executed by a processor implements the steps of the offline payment method according to the first or second aspect.
In the embodiment of the invention, the first terminal device comprises the first SIM card and a first Bluetooth module, the first SIM card is connected with the first Bluetooth module, the first Bluetooth module is connected with a second SIM card Bluetooth of the second terminal device, the second SIM card is applied to the second terminal device, and the second SIM card is connected with the first Bluetooth module Bluetooth of the first terminal device. Through the arrangement, under the condition that the first terminal equipment and the second terminal equipment are in an offline state, offline payment can be realized through information interaction between the first SIM card and the second SIM card, so that the application range of the mobile payment method is improved, and the using convenience of the offline payment is improved. Meanwhile, the SIM card is used as trusted security hardware, so that the financial security can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is one of the flowcharts of an offline payment method provided by an embodiment of the present invention;
FIG. 2 is a second flowchart of an offline payment method according to an embodiment of the present invention;
FIG. 3 is a third flowchart of an offline payment method according to an embodiment of the present invention;
FIG. 4 is an offline payment scenario provided by an embodiment of the present invention;
FIG. 5 is an offline payment provisioning scheme provided by an embodiment of the present invention;
fig. 6 is a flow chart of an offline payment opening method according to an embodiment of the present invention;
fig. 7 is one of the block diagrams of the first SIM card provided in the embodiment of the present invention;
fig. 8 is one of the block diagrams of the second SIM card provided in the embodiment of the present invention;
FIG. 9 is a second block diagram of a first SIM card according to an embodiment of the present invention;
fig. 10 is a second block diagram of a second SIM card according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is one of flowcharts of an offline payment method provided by an embodiment of the present invention, where the method is applied to a first SIM card of a first terminal device, the first terminal device includes the first SIM card and a first bluetooth module, the first SIM card is connected with the first bluetooth module, and the first bluetooth module is connected with a second SIM card bluetooth of a second terminal device.
As shown in fig. 1, the method comprises the steps of:
and step 101, sending a transaction request to the second SIM card through the first Bluetooth module.
It should be understood that the first SIM card is connected to the first bluetooth module, and the first bluetooth module is connected to the second SIM card bluetooth of the second terminal device. The second SIM card is applied to the second terminal equipment and is connected with the first Bluetooth module of the first terminal equipment.
It should be understood that, in the embodiment of the present invention, the first SIM card should be integrated with a bluetooth chip, and simultaneously have the communication capability of a common SIM card and the capability of establishing a bluetooth communication link with a bluetooth module of the terminal device. Meanwhile, in order to enable the SIM card to have a payment function, in some embodiments, a corresponding payment card application is integrated in each of the first SIM card and the second SIM card, and the payment card application may be used to store certificates and keys related to the payment service. It should be understood that the payment card application may be deployed into the corresponding SIM card in a pre-configured or post-downloaded manner prior to card issuing.
It should be understood that the first SIM card stores account information corresponding to the user, and the second SIM card also stores account information corresponding to the user, such as balance information. In actual use, according to a preset rule, the first SIM card may synchronize the account information stored in the first SIM card with the card service server under the condition that a network exists. Similarly, according to a preset rule, the second SIM card may synchronize the account information stored in the second SIM card with the card service server under the condition that a network exists.
It should be understood that, in the specific implementation, a third party payment application is typically provided in the first terminal device, and the third party payment application may be a payment device, a WeChat, an online bank, or the like. Similarly, a third party payment application is typically also provided in the second terminal device. In particular implementations, a third party payment application may be used to display notifications of operational results.
It will be appreciated that in the course of offline payment, the third party payment applications used in the first and second terminal devices are typically the same. In some embodiments, the third party payment applications used in the first and second terminal devices may also be different.
It should be appreciated that in some embodiments, to enable bluetooth connection of the first SIM card with the first bluetooth module, a SIM payment software development kit (Software Development Kit, SDK) is integrated in the first terminal device. A third party payment application interacts with the first SIM card information by invoking a SIM payment SDK.
In this embodiment, the first SIM card forwards information to the first bluetooth module through the SIM payment SDK; and the first Bluetooth module forwards the information to the second SIM card. And similarly, the second SIM card sends information to the first Bluetooth module, and the first Bluetooth module forwards the information to the first SIM through the SIM payment SDK.
In a specific implementation, the SIM payment SDK may be integrated in a first bluetooth module of the first terminal device, or may be integrated on a third party payment application of the first terminal device. Of course, in some embodiments, the SIM payment SDK may also be integrated on the SIM card. The SIM payment SDK can be integrated and called by a third party payment application, provides Bluetooth link and communication functions with the SIM card, and completes the payment function.
It should be appreciated that the SIM payment SDK is typically integrated in a third party payment application. When the user uses the SIM payment SDK, the third party payment application integrated with the SIM payment SDK can be installed into the terminal equipment, so that the user can complete various operations through the third party payment application. Because the SIM payment SDK is integrated in a third party payment application, in some embodiments, the SIM payment SDK may be considered to be either a third party payment application or a stand-alone component.
In this embodiment of the present invention, the first SIM card sending, through the first bluetooth module, a transaction request to the second SIM card may be understood that bluetooth connection is established between the first bluetooth module and the second SIM card, and the second SIM card may perform information interaction with the first SIM card through bluetooth connection with the first bluetooth module.
In the embodiment of the present invention, the process of establishing the bluetooth connection between the first bluetooth module and the second SIM card is not limited herein. For example, in some embodiments, the second SIM card continues to broadcast data, and the first bluetooth module filters the received broadcast data according to the acquired media access control (Media Access Control, MAC) address of the second SIM card, so as to bluetooth connect with the second SIM card and establish a bluetooth communication link.
It should be understood that the specific connection manner of the first SIM card and the first bluetooth module is not limited herein. Optionally, in some embodiments, the first SIM card and the first bluetooth module are bluetooth connections. Of course, in other embodiments, other transmission channels are provided in the first terminal device, and the first SIM card may be connected to the first bluetooth module through other transmission channels.
For example, in some embodiments, the first terminal device includes a third party payment application and the second terminal device also includes the third party payment application described above. And opening a third party payment application in the second terminal equipment by a user holding the second terminal equipment so as to enable the second terminal equipment to display the two-dimension code. A user with first terminal equipment uses a third party payment application in the first terminal equipment to scan a two-dimensional code, obtain the MAC address of the second SIM card, and send a Bluetooth starting request carrying payment information to the first Bluetooth module; wherein the payment information comprises the MAC address of the second SIM card, the payment amount and the like.
In this embodiment, since the first SIM card and the first bluetooth module are connected by bluetooth, the method may be applied to any SIM card integrated with a bluetooth chip, and may be applied to different terminal device operating systems, such as an android operating system and an apple operating system. The existing terminal equipment is usually integrated with a Bluetooth module, so that the application range of the method is expanded through the arrangement.
And the first SIM card sends a transaction request to the second SIM card through the first Bluetooth module. After the second SIM card receives the transaction request, responding to the transaction request, and sending a first data packet to the first SIM card by the second SIM card through the first Bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation, and the first data packet comprises a first certificate and a first signature corresponding to the second SIM card.
Step 102, obtaining a first data packet received by the first bluetooth module from the second SIM card, where the first data packet includes a first certificate and a first signature corresponding to the second SIM card.
And the first Bluetooth module forwards the first data packet to the first SIM card after receiving the first data packet. After the first SIM card receives the first data packet, a first certificate and a first signature corresponding to the second SIM card can be extracted from the first data packet.
In the embodiment of the present invention, a specific process of the second SIM card requesting the card service server to issue the first certificate is not limited herein.
Optionally, the second terminal device further includes a second payment application and a second bluetooth module; the second payment application is connected with the second SIM card through the second Bluetooth module;
The method further comprises the steps of, before the second Bluetooth module sends a first data packet to the second SIM card in response to a transaction request sent by the second SIM card through the second Bluetooth module:
receiving a first certificate sent by a card service server through the second payment application;
the first certificate is sent after the card service server receives a request for opening a SIM payment function sent by the second payment application through the payment service server.
It should be understood that, the second SIM card requesting the card service server to issue the first certificate may also be understood that the second SIM card requests to open a SIM payment function. The second payment application may interact with the payment service server in information. The second SIM card can perform information interaction with the card service end. The payment service server can perform information interaction with the card service server.
In specific implementation, the user sends a request for opening the SIM payment function to the payment service server through a second payment application on the second terminal device. And the payment service server forwards the SIM payment function opening request to the card service server so as to request the card service server to issue the first certificate. The card service server responds to the SIM payment function opening request and sends the first certificate to the second payment application, and the second payment application sends the first certificate to the second SIM card through the second Bluetooth module.
Optionally, after the receiving, by the second payment application, the first certificate sent by the card service server, the method further includes:
and sending an open state confirmation request carrying a receiving result to the card service server.
It should be understood that, the sending, to the card service server, an open state confirmation request carrying a receiving result may be understood that the second SIM card sends, to the card service server, an open state confirmation request carrying a receiving state. And the card service server confirms the opening state according to the receiving state and sends an opening state notification to the payment service server and the second payment application. And after receiving the open state notification, the second payment application can display the open state to remind the user.
In this embodiment, when the second SIM card receives the first certificate sent by the card service server through the second payment application, the second SIM card may also send an open state confirmation request carrying the receiving result to the card service server. Through the setting, the customer can be timely reminded of processing under the condition that the SIM payment function is opened and fails, so that the operation reliability of opening the SIM payment function is improved.
Optionally, the receiving, by the second payment application, the first certificate sent by the card service server includes:
and receiving a first certificate and a second initial private key sent by the card business server through the second payment application.
Optionally, the first signature is generated based on the second initial private key.
It should be understood that, in response to the request for opening the SIM payment function, the card service server sends the first certificate and the second personalized data to the second payment application, and the second payment application sends the first certificate and the second personalized data to the second SIM card through the second bluetooth module.
It should be appreciated that in some embodiments, the second personalization data includes the second initial private key. In other embodiments, the second personalization data includes a second initial public key and the second initial private key, the second initial public key and the second initial private key matching, the second initial public key and the second initial private key being a pair of public-private key pairs.
It should be appreciated that in some embodiments, the second personalization data is protected by the initial key. After the second SIM card receives the first certificate and the second personalized data, the second personalized data may be decrypted using an initial key, and the first certificate and the second personalized data may be stored.
In this embodiment, the second SIM card receives, through the second payment application, the first certificate and the second initial private key sent by the card service server. The second initial private key may be used to encrypt a signature of the second SIM card. Optionally, the first signature is generated based on the second initial private key.
In this embodiment, the information sent by the second SIM card may be further encrypted by using the second initial private key, so that confidentiality of information transmission is further improved.
Step 103, verifying the first signature and the first certificate.
It should be understood that verifying the first signature and the first certificate by the first SIM card may be understood that the first SIM card determines the validity of the first certificate and the integrity of the first data packet by verifying the first signature and the first certificate.
It should be appreciated that in some embodiments, the first certificate includes a second initial public key of the second SIM card, a signature of the second initial public key by the card transaction server, and a public key of the card transaction server. The first signature is obtained by signing the first data packet with the second initial private key.
The first SIM card verifying the first certificate may be understood as that the first SIM card verifies the signature of the card service server to the second initial public key by using the public key of the card service server, thereby verifying the validity of the first certificate. Verifying the first signature by the first SIM card may be understood as verifying the first signature by the first SIM card using the second initial public key, thereby verifying the integrity of the first data packet.
Step 104, in case of passing the verification, performing a payment operation.
And the first SIM card executes payment operation under the condition that the identity of the second SIM card passes verification. In a specific implementation, the payment operation performed by the first SIM card may be understood as performing a deduction operation on an account corresponding to the first SIM card.
Optionally, after the step 104, the method further includes:
acquiring payment credentials based on the payment operation; wherein the second data packet includes the payment credential.
It should be appreciated that the payment credentials may be automatically generated after the first SIM card performs a payment operation. The second data packet including the payment credential may be understood as the payment credential is to be sent to the second SIM card. In this embodiment, the payment credential may include at least one of: transaction information, account information corresponding to the first SIM card and account information corresponding to the second SIM card.
In this embodiment, after performing the payment operation if the verification is passed, the method further includes acquiring a payment credential based on the payment operation; wherein the second data packet includes the payment credential. Through the payment certificate, the payment information can be queried after the offline payment is completed, and convenience of user information query after the offline payment is improved.
Optionally, the first data packet further includes a preset random number and a first public key, wherein the first public key is generated based on the preset random number;
after performing the payment operation if the verification is passed, the method further comprises:
generating a second public key and a second private key based on the preset random number, wherein the second public key is matched with the second private key;
determining a session key based on the first public key and the second private key;
encrypting the payment credential using the session key; wherein the second data packet further comprises the second public key.
It should be appreciated that in this embodiment, the second data packet includes the first certificate, the first signature, the preset random number, and the first public key. Wherein the preset random number and the first public key are both generated by the second SIM card.
Optionally, the second SIM card generates a preset random number in response to a transaction request sent by a first SIM card through the first bluetooth module, and generates a first public key and a first private key based on the preset random number before sending a first data packet to the first SIM card through the first bluetooth module; wherein the first public key and the first private key are matched. The first public key and the first private key are a pair of public and private key pairs.
It should be appreciated that in some embodiments, the preset random number may be two random large primes. The first public key, the second private key and the second private key are generated based on the preset random number. In practical use, only the corresponding private key can decrypt the data encrypted with the public key, and only the corresponding public key can decrypt the data encrypted with the private key.
It should be appreciated that the first SIM card generates a second public key and a second private key based on the received preset random number, the second public key matching the second private key. The second public key and the second private key are a pair of public and private key pairs. The session key is determined based on the first public key and the second private key. The first public key is sent by the second SIM card, and the second private key is generated by the first SIM card. In some embodiments, the session key may be calculated by the preset random number, the first public key, the second public key, and the second private key.
It will be appreciated that the first SIM card encrypts the payment credentials using the session key, and on the other hand sends the second public key to the second SIM card. In this embodiment, the second data packet includes a second certificate, a second signature, a second public key, and an encrypted payment credential.
In this embodiment, the specific steps of executing the collection operation when the second SIM card passes the verification include:
determining a session key based on the second public key and the first private key;
decrypting the payment credential using the session key;
in case the decryption is successful, the collection operation is performed.
It should be appreciated that the second public key is sent by the first SIM card and the first private key is generated by the second SIM card. Thus, the second SIM card may determine a session key based on the second public key and the first private key and decrypt the payment credential using the session key. And under the condition that decryption is successful, the second SIM card executes a collection operation. In some embodiments, the session key may be calculated by the preset random number, the first public key, the second public key, and the first private key.
In this embodiment, the payment credentials are encrypted using an asymmetric algorithm. The second data packet comprises the encrypted payment certificate, and the second SIM card can only execute the collection operation under the condition that the payment certificate is decrypted, so that the safety of the offline payment operation is improved.
Step 105, sending a second data packet to the second SIM card through the first bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation.
It should be appreciated that in some embodiments, the second certificate may be issued by the card transaction server. The first SIM card may request the card service server to issue a corresponding second certificate. Similarly, the first certificate may be issued by the card service server, and the second SIM card may request the card service server to issue a corresponding second certificate.
In the embodiment of the present invention, a specific process of the first SIM card requesting the card service server to issue the second certificate is not limited herein.
For example, optionally, in an embodiment, the first terminal device further comprises a first payment application; the first payment application is connected with the first SIM card through the first Bluetooth module;
Prior to the step 101, the method further includes:
receiving a second certificate sent by a card service server through the first payment application;
the second certificate is sent after the card service server receives a request for opening the SIM payment function sent by the first payment application through the payment service server.
It should be understood that, the first SIM card requesting the card service server to issue the second certificate may also be understood that the first SIM card requests to open a SIM payment function. The first payment application may interact with the payment service server in information. The first SIM card can perform information interaction with the card service server. The payment service server can perform information interaction with the card service server.
In specific implementation, a user sends a request for opening a SIM payment function to the payment service server through a first payment application on the first terminal device. And the payment service server forwards the SIM payment function opening request to the card service server so as to request the card service server to issue the second certificate. The card service server responds to the SIM payment function opening request and sends the second certificate to the first payment application, and the first payment application sends the second certificate to the first SIM card through the first Bluetooth module.
Optionally, in some embodiments, after the receiving, by the first payment application, the second certificate sent by the card service server, the method further includes:
and sending an open state confirmation request carrying a receiving result to the card service server.
It should be understood that, the sending, to the card service server, an open state confirmation request carrying a receiving result may be understood that the first SIM card sends, to the card service server, an open state confirmation request carrying a receiving state. And the card service server confirms the opening state according to the receiving state and sends an opening state notification to the payment service server and the first payment application. After receiving the open state notification, the first payment application may display an open state to remind the user.
In this embodiment, when the first SIM card receives the second certificate sent by the card service server through the first payment application, the first SIM card may also send an open state confirmation request carrying the receiving result to the card service server. Through the setting, the customer can be timely reminded of processing under the condition that the SIM payment function is opened and fails, so that the operation reliability of opening the SIM payment function is improved.
Optionally, the receiving, by the first payment application, the second certificate sent by the card service server includes:
and receiving a second certificate and a first initial private key sent by the card service server through the first payment application.
It should be understood that, in response to the request for opening the SIM payment function, the card service server sends the second certificate and the first personalized data to the first payment application, and the first payment application sends the second certificate and the first personalized data to the first SIM card through the first bluetooth module.
It should be appreciated that in some embodiments, the first personalization data includes the first initial private key. In other embodiments, the first personalization data includes a first initial public key and the first initial private key, the first initial public key and the first initial private key matching, the first initial public key and the first initial private key being a pair of public-private key pairs.
It should be appreciated that in some embodiments, the first personalization data is protected by an initial key. After the first SIM card receives the second certificate and the first personalized data, the first personalized data may be decrypted using an initial key, and the first certificate and the first personalized data may be stored.
In this embodiment, the first SIM card receives, through the first payment application, the second certificate and the first initial private key sent by the card service server. The first initial private key may be used to encrypt a signature of the first SIM card. Optionally, the second signature is generated based on the first initial private key.
In this embodiment, the information sent by the first SIM card may be further encrypted by using the first initial private key, so that confidentiality of information transmission is further improved.
After the first SIM card finishes the payment operation, the second data packet is sent to the first Bluetooth module, so that the second data packet is sent to the second SIM card through the first Bluetooth module, and the second SIM card is requested to execute the collection operation. The second data packet includes a second certificate and a second signature corresponding to the first SIM card.
And the second SIM card receives a second data packet sent by the first SIM card through the first Bluetooth module, verifies the second signature and the second certificate, and executes a collection operation under the condition that the verification is passed.
It should be understood that after the second data packet is received by the second SIM card, a second certificate and a second signature corresponding to the first SIM card may be extracted, and the second certificate and the second signature may be respectively verified, so as to determine validity of the second certificate and integrity of the second data packet.
It should be appreciated that in some embodiments, the second certificate includes a first initial public key of the first SIM card, a signature of the first initial public key by the card transaction server, and a public key of the card transaction server. The second signature is obtained by signing the second data packet and the payment credential with the first initial private key.
The second SIM card verifying the second certificate may be understood as that the second SIM card verifies the signature of the card service server to the first initial public key by using the public key of the card service server, thereby verifying the validity of the second certificate. Verifying the second signature by the second SIM card may be understood as verifying the second signature by the second SIM card using the first initial public key, thereby verifying the integrity of the second data packet.
And the second SIM card executes a collection operation under the condition that the identity of the first SIM card passes verification. In a specific implementation, the second SIM card performs the payment collecting operation may be understood that the money deducted from the account corresponding to the first SIM card enters the account corresponding to the second SIM card.
Optionally, in some embodiments, after the step 105, the method further includes:
acquiring a state confirmation request carrying a transaction result received by the first Bluetooth module from the second SIM card;
determining a payment status based on the transaction result;
and sending the payment state to the second SIM card through the first Bluetooth module.
It should be appreciated that in some embodiments, after performing the payment collecting operation in the case of passing the verification, the second SIM card sends a status confirmation request carrying the transaction result to the first SIM card through the first bluetooth module to request the first SIM card to confirm the payment status.
It should be appreciated that after the second SIM card performs the collection operation successfully, the transaction result may be that the transaction is successful. After the second SIM card fails to perform the collection operation, the transaction result may be a transaction failure. The first SIM card determining the payment status based on the transaction result may be understood that, in the case where the transaction result is that the transaction is successful, the payment status may be that the payment is successful, and the transaction is completed. And under the condition that the transaction result is transaction failure, the payment state can be payment failure, and the deducted fee is returned to the account corresponding to the first SIM card when the first SIM card executes the deduction operation.
The first SIM card sends the payment state to the first Bluetooth module, and the first Bluetooth module sends the payment state to the second SIM card. In a specific implementation, the payment state may be displayed in the third party payment application corresponding to the first SIM card, so as to remind the user. Similarly, after receiving the payment status, the second SIM card may display the payment status in the corresponding third party payment application, so as to remind the user.
In this embodiment, after the second SIM card performs the payment collecting operation, the transaction result is sent to the first SIM card through the first bluetooth module. And the second SIM card determines a payment state according to the transaction result and sends the payment state to the second SIM card through the first Bluetooth module. In this embodiment, due to the execution of the steps, the first SIM card and the second SIM card can both confirm the payment result, and can prompt the user to process in time in the case of a transaction failure, thereby ensuring the success of offline payment and improving the reliability and flexibility of offline payment.
It should be understood that in the actual use process, the user may choose to use online payment or mobile payment according to the actual requirements. In some embodiments, the third party payment application may obtain the network condition of the corresponding terminal device, and prompt the user to select the payment method according to the network request of the terminal device. In other embodiments, the third party payment application defaults to using an offline payment method if a preset condition is met, where the preset condition may be set according to actual needs.
In the embodiment of the invention, the first terminal device comprises the first SIM card and a first Bluetooth module, the first SIM card is connected with the first Bluetooth module, the first Bluetooth module is connected with a second SIM card Bluetooth of the second terminal device, the second SIM card is applied to the second terminal device, and the second SIM card is connected with the first Bluetooth module Bluetooth of the first terminal device. Through the arrangement, under the condition that the first terminal equipment and the second terminal equipment are in an offline state, offline payment can be realized through information interaction between the first SIM card and the second SIM card, so that the application range of the mobile payment method is improved, and the practical convenience of the offline payment is improved. Meanwhile, the SIM card is used as trusted security hardware, so that the financial security can be realized.
As shown in fig. 2, an embodiment of the present invention provides an offline payment method, which is applied to a second SIM card of a second terminal device, where the second SIM card is connected with a first bluetooth module of a first terminal device, and the method includes:
step 201, responding to a transaction request sent by a first SIM card through a first Bluetooth module, and sending a first data packet to the first SIM card through the first Bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation;
Step 202, receiving a second data packet sent by the first SIM card through the first bluetooth module, where the second data packet includes a second certificate and a second signature corresponding to the first SIM card;
step 203, verifying the second signature and the second certificate;
step 204, in case of passing the verification, a collection operation is performed.
The implementation of this method may be referred to as the description of the method shown in fig. 1, and for avoiding repetition, the description is omitted here. It should be noted that, in this embodiment, as an implementation manner of the second SIM card of the second terminal device corresponding to the example shown in fig. 1, a specific implementation manner of the second SIM card may be referred to the related description in the embodiment shown in fig. 1, and in order to avoid repetition, a description is omitted here.
Optionally, after performing the collection operation in the case that the verification is passed, the method further includes:
and sending a state confirmation request carrying a transaction result to the first SIM card through the first Bluetooth module so as to request the first SIM card to confirm the payment state.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Optionally, before the first data packet is sent to the first SIM card by the first bluetooth module in response to the transaction request sent by the first SIM card by the first bluetooth module, the method further includes:
generating a preset random number, and generating a first public key and a first private key based on the preset random number;
wherein the first public key and the first private key are matched; the first data packet further includes the preset random number and the first public key.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Optionally, the second data packet further includes a second public key and a payment credential, the second public key being generated based on the preset random number; the payment credential is obtained by the first SIM card based on the payment operation;
the performing a checkout operation in the case of verification passing includes:
determining a session key based on the second public key and the first private key;
decrypting the payment credential using the session key;
in case the decryption is successful, the collection operation is performed.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Optionally, the second terminal device further includes a second payment application and a second bluetooth module; the second payment application is connected with the second SIM card through the second Bluetooth module;
the method further comprises the steps of, before the second Bluetooth module sends a first data packet to the second SIM card in response to a transaction request sent by the second SIM card through the second Bluetooth module:
receiving a first certificate sent by a card service server through the second payment application;
the first certificate is sent after the card service server receives a request for opening a SIM payment function sent by the second payment application through the payment service server.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Optionally, after the receiving, by the second payment application, the first certificate sent by the card service server, the method further includes:
and sending an open state confirmation request carrying a receiving result to the card service server.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Optionally, the receiving, by the second payment application, the first certificate sent by the card service server includes:
and receiving a first certificate and a second initial private key sent by the card business server through the second payment application.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Optionally, the first signature is generated based on the second initial private key.
This embodiment can also be applied to the corresponding example of fig. 1 and achieve the same advantageous effects. To avoid repetition, no further description is provided here.
Fig. 3 is a third flowchart of an offline payment method according to an embodiment of the present invention. As a specific example, an offline payment method according to an embodiment of the present invention will be described with reference to fig. 3.
As shown in fig. 4, fig. 4 is an offline payment scenario. The first terminal device comprises a first SIM card, a first Bluetooth module and a first payment application, wherein the first SIM card is connected with the first Bluetooth module in a Bluetooth mode, and the first Bluetooth module is connected with a second SIM card of the second terminal device in a Bluetooth mode. The second terminal device comprises a second SIM card, the second SIM card and a second payment application. The first payment application has a SIM payment SDK integrated therein. And the first payment application is connected with the first SIM card Bluetooth by calling the SIM payment SDK to realize offline payment. For convenience of description, the corresponding user of the first terminal device is a first user, and the corresponding user of the second terminal device is a second user.
It should be understood that, in the process of performing data interaction between the second SIM card and the first terminal device, the second SIM card sends data to the first bluetooth module of the first terminal device, and the first bluetooth module forwards the data to the corresponding SIM payment SDK. In some embodiments, the first SIM sends data to the SIM payment SDK, which forwards data to the first bluetooth module, which may also be understood as the first SIM sending data to the first bluetooth module. The second SIM sending data to the first bluetooth module, the first bluetooth module forwarding data to the SIM payment SDK may also be understood as the second SIM card sending data to the SIM payment SDK.
In order to realize the SIM offline payment, an offline payment function needs to be opened on the terminal device. In the embodiment of the invention, the first SIM card and the second SIM card both need to open an offline payment function, and in specific implementation, the method for opening the offline payment function by the first terminal device and the second terminal device is the same. As shown in fig. 5 and 6, fig. 5 is an offline payment opening scheme, and fig. 6 is a flow chart of an offline payment opening method. The specific flow of the method for opening the offline payment function of the first SIM card will be described below by taking the first SIM card as an example.
First, the first user may request to open the SIM payment function in the first payment application, and the first payment application may also actively remind the first user to confirm whether to open the SIM payment function. And under the condition that the first user determines to open the SIM payment function, the first payment application sends a request for opening the SIM payment function to the corresponding payment service server. And the payment service server requests the card service server to generate the first personalized data and the second certificate after receiving the SIM payment function opening request. In the embodiment of the invention, the first personalized data is a first initial public key and a first initial private key. The card service server generates the first personalized data and the second certificate, and sends the first personalized data and the second certificate to the SIM payment SDK in the first terminal equipment. And after the SIM payment SDK receives the first personalized data and the second certificate, the first personalized data and the second certificate are sent to the first SIM card through the first Bluetooth module. And after receiving the first personalized data and the second certificate, the first SIM card sends an opening state confirmation request carrying a receiving result to the card service server. And under the condition that the first SIM card successfully receives the first personalized data and the second certificate, the card service server determines that the opening is completed and sends an opening success notice to the payment service server and the SIM payment SDK. And under the condition that the first SIM card does not receive the first personalized data and the second certificate, the card service server determines the opening failure and sends an opening failure notification to the payment service server and the SIM payment SDK. The first payment application will prompt the first user for an activation result.
And when the first SIM card and the second SIM card carry out offline payment, the first SIM card and the second SIM card have both the SIM payment functions opened. For convenience of description, the second user may be considered as a payee, and the second terminal device displays the two-dimensional code in the second payment application. The first user is a payer, and the first terminal device scans the two-dimensional code through a first payment application and inputs a payment amount. In the process of scanning the checkout code by the first terminal equipment, the first terminal equipment can obtain the MAC address of the second SIM card. And the first payment application of the first terminal equipment sends the obtained information to the SIM payment SDK. And the SIM payment SDK sends a Bluetooth connection request carrying the MAC address of the second SIM card to the first Bluetooth module. At this time, the bluetooth interface of the second SIM card has been opened and continues to broadcast normal data. And the first Bluetooth module of the first terminal equipment filters the scanned common data according to the MAC address of the second SIM card, is connected with the second SIM card in a Bluetooth way and establishes a Bluetooth transmission channel. And the SIM payment SDK sends a transaction request to the second SIM card. And the second SIM card responds to the transaction request and sends a first data packet to the first Bluetooth module. In the embodiment of the invention, the first data packet comprises a preset random number, a first public key, a first signature and a first certificate. Wherein the preset random number comprises two random large prime numbers. And the second SIM card signs the first data packet by using the second initial private key to obtain the first signature.
The first SIM card receives the first data packet forwarded by the first Bluetooth module. The first SIM card verifies the first signature and the first certificate. In case of authentication failure, the offline payment is terminated. And under the condition that verification is passed, the first SIM card generates a key pair, namely a second private key and a second public key according to the preset random number, and simultaneously obtains a session key based on the generated second private key and the first public key and the preset random number in the first data packet. And the first SIM card executes payment operation to obtain a payment certificate, encrypts the payment certificate by using the session key, and simultaneously signs a second data packet by using the first initial private key to obtain a second signature. And the first SIM card sends a second data packet to the first Bluetooth module, wherein the second data packet comprises the encrypted payment certificate, a second public key, a second signature and a second certificate. And after receiving the second data packet, the first Bluetooth module forwards the second data packet to the second SIM card.
And after receiving the second data packet, the second SIM card verifies the second signature and the second certificate. In case of authentication failure, the offline payment is terminated. And under the condition that verification is passed, the second SIM card calculates a session key according to the received second public key, a preset random number and a first private key which is generated in advance, and decrypts the payment certificate by using the session key. After decrypting the payment credential is successful, the second SIM performs a collection operation. And the second SIM card sends the transaction result notice to the first Bluetooth module. In case of decryption failure, offline payment is terminated.
And after receiving the transaction result notification, the first Bluetooth module forwards the transaction result notification to the first SIM card, and requests the first SIM card to confirm the payment state. In a specific implementation, when the transaction result is notified that the collection is successful, the payment state is successful. And when the transaction result is notified as the collection failure, the payment state is the payment failure. The first SIM card sends the payment state to the first Bluetooth module, and the first Bluetooth module prompts a transaction result to a user through a first payment application.
Referring to fig. 7, fig. 7 is a block diagram of a first SIM card according to an embodiment of the present invention. Since the principle of the first SIM card 700 for solving the problem is similar to that of the offline payment method in the embodiment provided in fig. 1, the implementation of the first SIM card may refer to the implementation of the method, and the repetition is omitted.
As shown in fig. 7, the embodiment of the present invention further provides a first SIM card 700, which is applied to a first terminal device, where the first terminal device includes the first SIM card 700 and a first bluetooth module, the first SIM card 700 is connected with the first bluetooth module, and the first bluetooth module is connected with a second SIM card bluetooth of a second terminal device; the first SIM card 700 includes:
A first sending module 701, configured to send a transaction request to the second SIM card through the first bluetooth module;
a first obtaining module 702, configured to obtain a first data packet received by the first bluetooth module from the second SIM card, where the first data packet includes a first certificate and a first signature corresponding to the second SIM card;
a first verification module 703, configured to verify the first signature and the first certificate;
a first execution module 704, configured to execute a payment operation if the verification is passed;
a second sending module 705, configured to send a second data packet to the second SIM card through the first bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation.
Optionally, the first SIM card 700 further includes:
the second acquisition module is used for acquiring a state confirmation request carrying a transaction result received by the first Bluetooth module from the second SIM card;
a confirmation module for determining a payment status based on the transaction result;
and the fourth sending module is used for sending the payment state to the second SIM card through the first Bluetooth module.
Optionally, the first SIM card 700 further includes:
A third acquisition module for acquiring payment credentials based on the payment operation; wherein the second data packet includes the payment credential.
Optionally, the first data packet further includes a preset random number and a first public key, wherein the first public key is generated based on the preset random number;
the first SIM card 700 further includes:
the first generation module is used for generating a second public key and a second private key based on the preset random number, and the second public key is matched with the second private key;
a determining module configured to determine a session key based on the first public key and the second private key;
an encryption module for encrypting the payment credential using the session key; wherein the second data packet further comprises the second public key.
Optionally, the first terminal device further comprises a first payment application; the first payment application is connected with the first SIM card 700 through the first bluetooth module;
the first SIM card 700 further includes:
the second receiving module is used for receiving a second certificate sent by the card business server through the first payment application;
the second certificate is sent after the card service server receives a request for opening the SIM payment function sent by the first payment application through the payment service server.
Optionally, the first SIM card 700 further includes:
and the fifth sending module is used for sending an open state confirmation request carrying a receiving result to the card service server.
Optionally, the second receiving module includes:
and the first receiving unit is used for receiving the second certificate and the first initial private key sent by the card service server through the first payment application.
Optionally, the second signature is generated based on the first initial private key.
Optionally, the first SIM card 700 and the first bluetooth module are bluetooth connections.
The first SIM card provided by the embodiment of the present invention can implement each process implemented by the method embodiment shown in fig. 1, and can obtain the same beneficial effects, so that repetition is avoided, and details are not repeated here.
Referring to fig. 8, fig. 8 is a block diagram of a second SIM card 800 according to an embodiment of the present invention. Since the principle of the second SIM card 800 for solving the problem is similar to that of the offline payment method in the embodiment provided in fig. 2, the implementation of the terminal may refer to the implementation of the method, and the repetition is omitted.
The embodiment of the present invention further provides a second SIM card 800, which is applied to a second terminal device, where the second SIM card 800 is connected with a first bluetooth module of a first terminal device, and the second SIM card 800 includes:
A third sending module 801, configured to send, by using a first bluetooth module, a first data packet to a first SIM card in response to a transaction request sent by the first SIM card by using the first bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation;
a first receiving module 802, configured to receive a second data packet sent by the first SIM card through the first bluetooth module, where the second data packet includes a second certificate and a second signature corresponding to the first SIM card;
a second verification module 803 for verifying the second signature and the second certificate;
and a second execution module 804 for executing a collection operation in case of passing the verification.
Optionally, the second SIM card 800 further includes:
and the sixth sending module is used for sending a state confirmation request carrying a transaction result to the first SIM card through the first Bluetooth module so as to request the first SIM card to confirm the payment state.
Optionally, the second SIM card 800 further includes:
the second generation module is used for generating a preset random number and generating a first public key and a first private key based on the preset random number;
wherein the first public key and the first private key are matched; the first data packet further includes the preset random number and the first public key.
Optionally, the second data packet further includes a second public key and a payment credential, the second public key being generated based on the preset random number; the payment credential is obtained by the first SIM card based on the payment operation;
the second execution module 804 includes:
a determining unit configured to determine a session key based on the second public key and the first private key;
a decryption unit configured to decrypt the payment credential using the session key;
and the execution unit is used for executing the collection operation under the condition that decryption is successful.
Optionally, the second terminal device further includes a second payment application and a second bluetooth module; the second payment application is connected with the second SIM card 800 through the second bluetooth module;
the second SIM card 800 further includes:
the third receiving module is used for receiving the first certificate sent by the card business server through the second payment application;
the first certificate is sent after the card service server receives a request for opening a SIM payment function sent by the second payment application through the payment service server.
Optionally, the second SIM card 800 further includes:
and the seventh sending module is used for sending an open state confirmation request carrying a receiving result to the card service server.
Optionally, the third receiving module includes:
and the second receiving unit is used for receiving the first certificate and the second initial private key sent by the card service server through the second payment application.
Optionally, the first signature is generated based on the second initial private key.
The second SIM card 800 provided in the embodiment of the present invention can implement each process implemented by the method embodiment shown in fig. 2, and can obtain the same beneficial effects, so that repetition is avoided, and details are not repeated here.
The embodiment of the invention also provides a first SIM card. Since the principle of the first SIM card for solving the problem is similar to that of the offline payment method shown in fig. 1, the implementation of the first SIM card may refer to the implementation of the method, and the repetition is omitted. As shown in fig. 9, a first SIM card according to an embodiment of the present invention includes: processor 900, for reading the program in memory 920, performs the following procedures:
verifying the first signature and the first certificate;
in case the verification is passed, performing a payment operation;
processor 900, for reading the program in memory 920, performs the following procedures: transmitting a transaction request to the second SIM card through the first bluetooth module through the transceiver 910; sending a second data packet to the second SIM card through the first Bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation; or obtain, through the transceiver 910, a first data packet received by the first bluetooth module from the second SIM card, where the first data packet includes a first certificate and a first signature corresponding to the second SIM card;
A transceiver 910 for receiving and transmitting data under the control of the processor 900.
Wherein in fig. 9, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by processor 900 and various circuits of memory represented by memory 920, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 910 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 900 is responsible for managing the bus architecture and general processing, and the memory 920 may store data used by the processor 900 in performing operations.
Optionally, the processor 900 is further configured to read the program in the memory 920, and perform the following steps:
acquiring a state confirmation request carrying a transaction result received by the first Bluetooth module from the second SIM card through a transceiver 910;
determining a payment status based on the transaction result;
The payment status is transmitted to the second SIM card through the first bluetooth module by the transceiver 910.
Optionally, the processor 900 is further configured to read the program in the memory 920, and perform the following steps:
obtaining, by transceiver 910, payment credentials based on the payment operation; wherein the second data packet includes the payment credential.
Optionally, the processor 900 is further configured to read the program in the memory 920, and perform the following steps:
generating a second public key and a second private key based on the preset random number, wherein the second public key is matched with the second private key;
determining a session key based on the first public key and the second private key;
encrypting the payment credential using the session key; wherein the second data packet further comprises the second public key.
Optionally, the processor 900 is further configured to read the program in the memory 920, and perform the following steps:
receiving, by the transceiver 910, a second certificate sent by the card service server through the first payment application;
the second certificate is sent after the card service server receives a request for opening the SIM payment function sent by the first payment application through the payment service server.
Optionally, the processor 900 is further configured to read the program in the memory 920, and perform the following steps:
and sending an open state confirmation request carrying a receiving result to the card service server through the transceiver 910.
Optionally, the processor 900 is further configured to read the program in the memory 920, and perform the following steps:
the second certificate and the first initial private key sent by the card transaction server are received by the first payment application via transceiver 910.
The first SIM card provided in the embodiment of the present invention may perform the embodiment of the offline payment method shown in fig. 1, and its implementation principle and technical effects are similar, which is not described herein again.
The embodiment of the invention also provides a second SIM card. Since the principle of the second SIM card for solving the problem is similar to that of the offline payment method shown in fig. 2, the implementation of the second SIM card may refer to the implementation of the method, and the repetition is omitted. As shown in fig. 10, a second SIM card according to an embodiment of the present invention includes: processor 1000, for reading the program in memory 1020, performs the following processes:
verifying the second signature and the second certificate;
in the case that the verification is passed, performing a collecting operation;
Processor 1000, for reading the program in memory 1020, performs the following processes: transmitting a first data packet to a first SIM card through the first bluetooth module through a transceiver 1010 in response to a transaction request transmitted by the first SIM card through the first bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation; receiving, by the transceiver 1010, a second data packet sent by the first SIM card through the first bluetooth module, where the second data packet includes a second certificate and a second signature corresponding to the first SIM card;
a transceiver 1010 for receiving and transmitting data under the control of the processor 1000.
Wherein in fig. 10, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by the processor 1000 and various circuits of the memory, represented by the memory 1020, are chained together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 1010 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 1000 is responsible for managing the bus architecture and general processing, and the memory 1020 may store data used by the processor 1000 in performing operations.
Optionally, the processor 1000 is further configured to read the program in the memory 1020, and perform the following steps:
and sending a state confirmation request carrying a transaction result to the first SIM card through the first bluetooth module by the transceiver 1010, so as to request the first SIM card to confirm the payment state.
Optionally, the processor 1000 is further configured to read the program in the memory 1020, and perform the following steps:
generating a preset random number, and generating a first public key and a first private key based on the preset random number;
wherein the first public key and the first private key are matched; the first data packet further includes the preset random number and the first public key.
Optionally, the processor 1000 is further configured to read the program in the memory 1020, and perform the following steps:
determining a session key based on the second public key and the first private key;
decrypting the payment credential using the session key;
in case the decryption is successful, the collection operation is performed.
Optionally, the processor 1000 is further configured to read the program in the memory 1020, and perform the following steps:
receiving, by the transceiver 1010, a first certificate sent by the card service server through the second payment application;
The first certificate is sent after the card service server receives a request for opening a SIM payment function sent by the second payment application through the payment service server.
Optionally, the processor 1000 is further configured to read the program in the memory 1020, and perform the following steps:
and sending an open state confirmation request carrying a receiving result to the card service server through the transceiver 1010.
Optionally, the processor 1000 is further configured to read the program in the memory 1020, and perform the following steps:
the first certificate and the second initial private key sent by the card transaction server are received by the second payment application via transceiver 1010.
The second SIM card provided in the embodiment of the present invention may perform the embodiment of the offline payment method shown in fig. 2, and its implementation principle and technical effects are similar, which is not described herein again.
The embodiment of the application further provides a readable storage medium, on which a program is stored, and when the program is executed by a processor, the processes of the above embodiment of the offline payment method are implemented, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here. Wherein the readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (22)

1. An offline payment method applied to a first SIM card of a first terminal device, wherein the first terminal device comprises the first SIM card and a first Bluetooth module, the first SIM card is connected with the first Bluetooth module, and the first Bluetooth module is connected with a second SIM card of a second terminal device in a Bluetooth manner, the method comprises the following steps:
transmitting a transaction request to the second SIM card through the first Bluetooth module;
acquiring a first data packet received by the first Bluetooth module from the second SIM card, wherein the first data packet comprises a first certificate and a first signature corresponding to the second SIM card;
verifying the first signature and the first certificate;
in case the verification is passed, performing a payment operation;
Sending a second data packet to the second SIM card through the first Bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation.
2. The method of claim 1, wherein after the sending, by the first bluetooth module, a second data packet to the second SIM card, the method further comprises:
acquiring a state confirmation request carrying a transaction result received by the first Bluetooth module from the second SIM card;
determining a payment status based on the transaction result;
and sending the payment state to the second SIM card through the first Bluetooth module.
3. The method of claim 1, wherein, in the event of verification passing, after performing a payment operation, the method further comprises:
acquiring payment credentials based on the payment operation; wherein the second data packet includes the payment credential.
4. The method of claim 3, wherein the first data packet further comprises a preset random number and a first public key, wherein the first public key is generated based on the preset random number;
after performing the payment operation if the verification is passed, the method further comprises:
Generating a second public key and a second private key based on the preset random number, wherein the second public key is matched with the second private key;
determining a session key based on the first public key and the second private key;
encrypting the payment credential using the session key; wherein the second data packet further comprises the second public key.
5. The method of claim 1, wherein the first terminal device further comprises a first payment application; the first payment application is connected with the first SIM card through the first Bluetooth module;
before the transaction request is sent to the second SIM card through the first bluetooth module, the method further includes:
receiving a second certificate sent by a card service server through the first payment application;
the second certificate is sent after the card service server receives a request for opening the SIM payment function sent by the first payment application through the payment service server.
6. The method of claim 5, wherein after receiving, by the first payment application, the second certificate sent by the card service server, the method further comprises:
and sending an open state confirmation request carrying a receiving result to the card service server.
7. The method of claim 5, wherein receiving, by the first payment application, the second certificate sent by the card service server, comprises:
and receiving a second certificate and a first initial private key sent by the card service server through the first payment application.
8. The method of claim 7, wherein the second signature is generated based on the first initial private key.
9. The method of claim 1, wherein the first SIM card and the first bluetooth module are bluetooth connections.
10. An offline payment method applied to a second SIM card of a second terminal device, wherein the second SIM card is connected with a first bluetooth module of a first terminal device, the method comprising:
responding to a transaction request sent by a first SIM card through the first Bluetooth module, and sending a first data packet to the first SIM card through the first Bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation;
receiving a second data packet sent by the first SIM card through the first Bluetooth module, wherein the second data packet comprises a second certificate and a second signature corresponding to the first SIM card;
Verifying the second signature and the second certificate;
in the case that the verification is passed, a collection operation is performed.
11. The method of claim 10, wherein, in the event of verification passing, after performing a checkout operation, the method further comprises:
and sending a state confirmation request carrying a transaction result to the first SIM card through the first Bluetooth module so as to request the first SIM card to confirm the payment state.
12. The method of claim 10, wherein the method further comprises, prior to transmitting a first data packet to the first SIM card via the first bluetooth module in response to a transaction request transmitted by the first SIM card via the first bluetooth module:
generating a preset random number, and generating a first public key and a first private key based on the preset random number;
wherein the first public key and the first private key are matched; the first data packet further includes the preset random number and the first public key.
13. The method of claim 12, wherein the second data packet further comprises a second public key and a payment credential, the second public key generated based on the preset random number; the payment credential is obtained by the first SIM card based on the payment operation;
The performing a checkout operation in the case of verification passing includes:
determining a session key based on the second public key and the first private key;
decrypting the payment credential using the session key;
in case the decryption is successful, the collection operation is performed.
14. The method of claim 10, wherein the second terminal device further comprises a second payment application and a second bluetooth module; the second payment application is connected with the second SIM card through the second Bluetooth module;
the method further comprises the steps of, before the second Bluetooth module sends a first data packet to the second SIM card in response to a transaction request sent by the second SIM card through the second Bluetooth module:
receiving a first certificate sent by a card service server through the second payment application;
the first certificate is sent after the card service server receives a request for opening a SIM payment function sent by the second payment application through the payment service server.
15. The method of claim 14, wherein after the receiving, by the second payment application, the first certificate sent by the card service server, the method further comprises:
And sending an open state confirmation request carrying a receiving result to the card service server.
16. The method of claim 14, wherein receiving, by the second payment application, the first certificate sent by the card service server, comprises:
and receiving a first certificate and a second initial private key sent by the card business server through the second payment application.
17. The method of claim 16, wherein the first signature is generated based on the second initial private key.
18. The first SIM card is applied to first terminal equipment and is characterized in that the first terminal equipment comprises the first SIM card and a first Bluetooth module, the first SIM card is connected with the first Bluetooth module, and the first Bluetooth module is connected with a second SIM card Bluetooth of second terminal equipment; the first SIM card comprises:
the first sending module is used for sending a transaction request to the second SIM card through the first Bluetooth module;
the first acquisition module is used for acquiring a first data packet received by the first Bluetooth module from the second SIM card, wherein the first data packet comprises a first certificate and a first signature corresponding to the second SIM card;
The first verification module is used for verifying the first signature and the first certificate;
the first execution module is used for executing payment operation under the condition that verification is passed;
the second sending module is used for sending a second data packet to the second SIM card through the first Bluetooth module; the second data packet is used for requesting the second SIM card to execute a collection operation.
19. A second SIM card applied to a second terminal device, wherein the second SIM card is connected with a first bluetooth module of a first terminal device, and the second SIM card includes:
the third sending module is used for responding to a transaction request sent by the first SIM card through the first Bluetooth module and sending a first data packet to the first SIM card through the first Bluetooth module; the first data packet is used for requesting the first SIM card to execute payment operation;
the first receiving module is used for receiving a second data packet sent by the first SIM card through the first Bluetooth module, wherein the second data packet comprises a second certificate and a second signature corresponding to the first SIM card;
the second verification module is used for verifying the second signature and the second certificate;
And the second execution module is used for executing the collection operation under the condition that the verification is passed.
20. A first SIM card comprising: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; -characterized in that the processor is arranged to read a program in a memory for implementing the steps in the off-line payment method according to any one of claims 1 to 9.
21. A second SIM card, comprising: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; -characterized in that the processor is arranged to read a program in a memory for implementing the steps in the off-line payment method according to any one of claims 10 to 17.
22. A readable storage medium, characterized in that it has stored thereon a program which, when executed by a processor, implements the steps of the offline payment method according to any of claims 1 to 9; or to implement the steps in an offline payment method as recited in any one of claims 10 to 17.
CN202111264697.XA 2021-10-28 2021-10-28 Offline payment method and related equipment Pending CN116051096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111264697.XA CN116051096A (en) 2021-10-28 2021-10-28 Offline payment method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111264697.XA CN116051096A (en) 2021-10-28 2021-10-28 Offline payment method and related equipment

Publications (1)

Publication Number Publication Date
CN116051096A true CN116051096A (en) 2023-05-02

Family

ID=86131930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111264697.XA Pending CN116051096A (en) 2021-10-28 2021-10-28 Offline payment method and related equipment

Country Status (1)

Country Link
CN (1) CN116051096A (en)

Similar Documents

Publication Publication Date Title
US11868997B2 (en) Secure payments using a mobile wallet application
US10595201B2 (en) Secure short message service (SMS) communications
JP6701431B2 (en) Establishing a secure channel
EP1807966B1 (en) Authentication method
US20180144310A1 (en) Data processing method and device, and pos transaction system
US20100153273A1 (en) Systems for performing transactions at a point-of-sale terminal using mutating identifiers
CN110278180B (en) Financial information interaction method, device, equipment and storage medium
WO2015077247A1 (en) Automated account provisioning
US20180025332A1 (en) Transaction facilitation
CN112766962A (en) Method for receiving and sending certificate, transaction system, storage medium and electronic device
JP2015537399A (en) Application system for mobile payment and method for providing and using mobile payment means
US11956349B2 (en) Efficient authentic communication system and method
JP2001134534A (en) Authentication delegate method, authentication delegate service system, authentication delegate server device, and client device
EP2138970A1 (en) Ordering scheme
JP2022502891A (en) Systems and methods for cryptographic authentication of non-contact cards
CA3110585A1 (en) Contactless card with multiple rotating security keys
US11451376B2 (en) Systems and methods for secure communication
CN116051096A (en) Offline payment method and related equipment
JP3497936B2 (en) Personal authentication method
EP4250208B1 (en) Devices, methods and a system for secure electronic payment transactions
EP4250210A1 (en) Devices, methods and a system for secure electronic payment transactions
US11960581B2 (en) Mobile device secret protection system and method
EP4250207A1 (en) Devices, methods and a system for secure electronic payment transactions
JP4148465B2 (en) Electronic value distribution system and electronic value distribution method
KR20230089969A (en) An identity authentication device for non-face-to-face account opening and method of operation it

Legal Events

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