CN113159763A - Transaction method and transaction system of electronic signature device and electronic signature device - Google Patents
Transaction method and transaction system of electronic signature device and electronic signature device Download PDFInfo
- Publication number
- CN113159763A CN113159763A CN202110217406.5A CN202110217406A CN113159763A CN 113159763 A CN113159763 A CN 113159763A CN 202110217406 A CN202110217406 A CN 202110217406A CN 113159763 A CN113159763 A CN 113159763A
- Authority
- CN
- China
- Prior art keywords
- electronic signature
- signature device
- unit data
- data packet
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 238000004891 communication Methods 0.000 claims description 88
- 230000008859 change Effects 0.000 description 35
- 238000012790 confirmation Methods 0.000 description 22
- 230000005540 biological transmission Effects 0.000 description 14
- 230000008569 process Effects 0.000 description 13
- 230000003993 interaction Effects 0.000 description 10
- 230000006855 networking Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 230000004044 response Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000002427 irreversible effect Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3825—Use of electronic signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a transaction method and a transaction system of electronic signature equipment and the electronic signature equipment, wherein the transaction method comprises the following steps: in the invention, a first electronic signature device receives a transaction request sent by a second electronic signature device, wherein the transaction request at least comprises: a transaction amount; the first electronic signature device acquires at least one second unit data packet from the security chip of the first electronic signature device, wherein each second unit data packet represents one currency denomination in a plurality of currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount; and the first electronic signature device transmits the at least one second unit data packet to the second electronic signature device. By adopting the technical scheme provided by the invention, safe off-line electronic transaction can be realized.
Description
The application is a divisional application of Chinese patent application with application number of 201610179102.3, invention name of 'transaction method of electronic signature device, transaction system and electronic signature device', and application date of 2016, 3, month and 25.
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a transaction method and a transaction system for an electronic signature device, and an electronic signature device.
Background
In existing electronic transactions, the user's funds are stored in the account in the form of numbers, such as: the user holds 100 dollars of funds, which are stored in the user account of the bank server in a digital form, and after the user consumes 10 dollars, the bank server needs to rewrite the funds 100 in the user account to 90 dollars to complete the clearing of the account. To secure the value of the funds, the rewritten value of the funds 90 is signed after the bank server has rewritten the value. Since the value of the amount of money in the account changes every time the user makes a transaction, the bank server processes the value after each change. That is, the existing electronic transaction depends on the bank server, and the electronic transaction performed by the user needs to be synchronized with the bank server in real time, so that the multi-offline transaction cannot be independently completed without networking.
Disclosure of Invention
The present invention is directed to solving at least one of the problems set forth above.
The invention mainly aims to provide a transaction method of electronic signature equipment.
Another object of the present invention is to provide an electronic signature apparatus.
It is yet another object of the present invention to provide a transaction system.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in the scheme 1, a transaction method of an electronic signature device includes: the first electronic signature device receives a transaction request sent by a second electronic signature device, wherein the transaction request at least comprises: a transaction amount; the first electronic signature device acquires at least one second unit data packet from a security chip of the first electronic signature device, wherein each second unit data packet represents one currency denomination in a plurality of currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount; the first electronic signature device transmits the at least one second unit packet to the second electronic signature device.
Scheme 2, the transaction method according to scheme 1, wherein after the first electronic signature device sends the at least one second unit data packet to the second electronic signature device, the method further comprises: the first electronic signature device deletes the acquired at least one second unit packet.
Scheme 3, the transaction method according to scheme 1, wherein the first electronic signature device sends the at least one second unit data packet to the second electronic signature device, and the transaction method comprises: and the first electronic signature device encrypts the at least one second unit data packet to obtain at least one third unit data packet, and sends the at least one third unit data packet to the second electronic signature device.
Scheme 4, the transaction method according to scheme 3, wherein the first electronic signature device encrypts the at least one second unit data packet, and the method comprises: and the first electronic signature device encrypts at least the second unit data in each second unit data packet by using the public key of the second electronic signature device.
Scheme 5, the transaction method according to scheme 4, wherein after the first electronic signature device encrypts the at least one second unit data packet, the method further comprises: the first electronic signature device overwrites each second unit data packet stored in the security chip with each third unit data packet.
Scheme 6. the transaction method according to scheme 3, wherein the first electronic signature device encrypts the at least one second unit data packet, and comprises: the first electronic signature device encrypts at least the second unit data of each second unit data packet using a symmetric key associated with the second electronic signature device.
Scheme 7, the transaction method according to scheme 6, wherein after the first electronic signature device encrypts the at least one second unit data packet, the method further comprises: and the first electronic signature device covers each second unit data packet stored in the security chip with each third unit data packet, and deletes the symmetric key.
Scheme 8, the transaction method according to scheme 6 or 7, wherein the symmetric key is an exclusive or factor associated with the second electronic signature device; the first electronic signing device encrypts at least the second unit data in each second unit data packet using a symmetric key associated with the second electronic signing device, comprising: the first electronic signature device performs an exclusive-or operation on at least the second unit data in each second unit data packet by using the exclusive-or factor.
Scenario 9, the transaction method according to any of scenarios 1 to 8, the transaction request comprising at least: a device identification of the second electronic signature device.
Scheme 10, before the transaction method according to scheme 9, where the first electronic signature device obtains at least one second unit data packet from a security chip of the first electronic signature device, the method further includes: and the first electronic signature device prompts the transaction amount and the device identification of the second electronic signature device to a holding user and receives confirmation information of the holding user.
Scheme 12, the transaction method according to scheme 11, wherein the obtaining at least one third unit data packet includes: the first electronic signature device adds the device identification of the second electronic signature device to each of the third unit packets.
Scheme 13 the transaction method of any of schemes 1 to 12, wherein the second unit data packet comprises: and identifying the data packet.
In the transaction method according to the claim 13, in scheme 14, the packet identifier is a packet identifier corresponding to each second unit packet acquired by the first electronic signature device from the second electronic signature device; or the data packet identifier is a data packet identifier corresponding to each second unit data packet obtained by the first electronic signature device by acquiring a data packet identifier starting value from the second electronic signature device, and calculating according to the total number of the second unit data packets to be sent to the second electronic signature device based on the data packet identifier starting value.
Scheme 15, the transaction method according to scheme 13 or 14, further comprising, after the first electronic signature device sends the at least one second unit data packet to the second electronic signature device: and the first electronic signature device receives a retransmission request of the second electronic signature device and sends retransmission information to the second electronic signature device according to the retransmission request, wherein the retransmission request at least comprises a device identifier of the second electronic signature device and/or a data packet identifier corresponding to each second unit data packet.
Scheme 16. the transaction method of scheme 15, wherein the retransmission information comprises the at least one second unit data packet.
Scheme 17, the transaction method according to scheme 15, wherein the retransmission information includes a second unit data packet that is not received by the second electronic signature device.
Scenario 18, the transaction method according to any of scenarios 4 to 17, the second unit data comprising at least: currency denomination data, or, a currency number and currency denomination data; the second unit packet includes at least one of: issuing bank identification and bank certificate serial number.
Scheme 19, the transaction method according to any of schemes 1 to 18, further comprising, after the first electronic signature device sends the at least one second unit data packet to the second electronic signature device: and the first electronic signature device subtracts the transaction amount from the account amount to obtain the current account balance, and displays the transaction amount and/or the current account balance to a holding user.
Scheme 20, according to the transaction method of any one of schemes 15 to 19, the security chip of the first electronic signature device allocates a storage space for storing the at least one third unit data packet, and stores the at least one third unit data packet in the corresponding storage space; after the first electronic signature device transmits retransmission information to the second electronic signature device according to the retransmission request, the method further includes: and the first electronic signature device receives the confirmation information of successful reception returned by the second electronic signature device, and modifies the state word of the storage space in which the at least one third unit data packet is stored previously to be transaction completion or clears the storage space.
Scheme 21, an electronic signature device, comprising: an obtaining module, configured to receive a transaction request sent by an opposite-end electronic signature device, where the transaction request at least includes: a transaction amount; the safety module is used for acquiring at least one second unit data packet stored by the safety module, wherein each second unit data packet represents one currency denomination in a plurality of currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount; and the communication module is used for sending the at least one second unit data packet to the opposite-end electronic signature device.
In the aspect 22, the electronic signature device according to the aspect 21, the security module is further configured to delete the obtained at least one second unit data packet after the communication module sends the at least one second unit data packet to the opposite-end electronic signature device.
Scheme 23, the electronic signature device according to scheme 21, wherein the communication module is configured to send the at least one second unit packet to the opposite-end electronic signature device, and includes: and the communication module is used for encrypting the at least one second unit data packet to obtain at least one third unit data packet, and sending the at least one third unit data packet to the opposite-end electronic signature device.
Scheme 24, the electronic signature device according to scheme 23, wherein the communication module is configured to encrypt the at least one second unit packet, and includes: and the communication module is used for encrypting at least the second unit data in each second unit data packet by using the public key of the opposite-end electronic signature device.
Case 25, the electronic signature device according to case 24, wherein the security module is further configured to overwrite each of the second unit packets stored therein with each of the third unit packets after the communication module encrypts the at least one of the second unit packets.
Scheme 26, the electronic signature device according to scheme 23, wherein the communication module is configured to encrypt the at least one second unit packet, and includes: the communication module is configured to encrypt at least the second unit data in each second unit data packet using a symmetric key associated with the peer electronic signature device.
Scheme 27, the electronic signature device according to scheme 26, wherein the security module is further configured to overwrite each of the second unit packets stored therein with each of the third unit packets and delete the symmetric key after the communication module encrypts the at least one second unit packet.
Scheme 28, the electronic signature device according to scheme 26 or 27, wherein the symmetric key is an exclusive or factor associated with the opposite-end electronic signature device; the communication module is configured to encrypt at least the second unit data in each second unit data packet by using a symmetric key associated with the peer electronic signature device, and includes: the communication module is configured to perform an exclusive-or operation on at least the second unit data in each second unit data packet by using the exclusive-or factor.
Scheme 29, the electronic signature device according to any of the schemes 21 to 28, the transaction request including at least: and the equipment identifier of the opposite-end electronic signature equipment.
Scheme 30, the electronic signature device according to scheme 29, further comprising: and the interaction module is used for prompting the transaction amount and the equipment identifier of the opposite-end electronic signature equipment to a holding user and receiving confirmation information of the holding user.
Scheme 31 the electronic signature device according to scheme 29, wherein each of the third unit packets further comprises: and the equipment identifier of the opposite-end electronic signature equipment.
Scheme 32, according to the right 31, the security module is further configured to add the device identifier of the peer electronic signature device to each third unit data packet.
Scheme 33 the electronic signature device according to any of the schemes 21 to 32, wherein the second unit packet includes: and identifying the data packet.
In a scheme 34, according to the electronic signature device in the scheme 33, the packet identifier is a packet identifier corresponding to each second unit packet acquired by the electronic signature device from the opposite-end electronic signature device; or, the data packet identifier is a data packet identifier corresponding to each second unit data packet obtained by the electronic signature device from the opposite-end electronic signature device, based on the data packet identifier initial value, and calculated according to the total number of the second unit data packets to be sent to the opposite-end electronic signature device.
The electronic signature device according to the scheme 35 or the scheme 33 or 34, wherein the obtaining module is further configured to receive a retransmission request of the opposite-end electronic signature device; the communication module is further configured to send retransmission information to the opposite-end electronic signature device according to the retransmission request, where the retransmission request at least includes a device identifier of the opposite-end electronic signature device and/or a packet identifier corresponding to each second unit packet.
Scheme 36 the electronic signature device according to scheme 35, wherein the retransmission information includes the at least one second unit packet.
Scheme 37, the electronic signature device according to scheme 35, wherein the retransmission information includes a second unit packet that is not received by the peer electronic signature device.
Scheme 38, the electronic signature device according to any of the schemes 24 to 37, wherein the second unit data includes at least: currency denomination data, or, a currency number and currency denomination data; the second unit packet includes at least one of: issuing bank identification and bank certificate serial number.
Scheme 39, in the electronic signature device according to any one of the schemes 30 to 38, the security module is further configured to subtract the transaction amount from the account amount of the electronic signature device to obtain a current account balance; and the interaction module is also used for displaying the transaction amount and/or the current account balance to a holding user.
Scheme 40, where the security module is configured to allocate a storage space for storing the at least one third unit packet, and store the at least one third unit packet in the corresponding storage space; the obtaining module is further configured to receive, after the communication module sends retransmission information to the opposite-end electronic signature device according to the retransmission request, confirmation information of successful reception returned by the opposite-end electronic signature device; the security module is further configured to modify a status word of a storage space where the at least one third unit data packet is previously stored to be transaction completion, or to empty the storage space.
Scheme 41, a transaction system, comprising: a first electronic signature device and a second electronic signature device, wherein: the first electronic signature device employs the electronic signature device according to any one of aspects 21 to 40; and the second electronic signature device is used for sending the transaction request to the first electronic signature device, receiving the at least one second unit data packet from the first electronic signature device, and storing the at least one second unit data packet in a security chip.
According to the technical scheme provided by the invention, the invention provides a transaction method and a transaction system of electronic signature equipment and the electronic signature equipment. By adopting the technical scheme provided by the invention, the funds of the user are stored in the electronic signature equipment of the user in the form of at least one second unit data packet. When a user consumes, funds are not stored in the electronic signature device in a numerical form any more, so that the electronic signature device does not need to change the balance value in an account through a server, and only needs to send one or more second unit data packets which accord with the consumption amount to a payee, so that the electronic signature device does not need to rely on the server for networking payment when performing electronic transaction with other electronic signature devices, and the server does not need to supervise the electronic signature device, thereby really realizing off-line electronic transaction.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a transaction method of an electronic signature device according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a transaction system according to embodiment 2 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or quantity or location.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Example 1
Fig. 1 is a flowchart of a transaction method of an electronic signature device according to this embodiment. As shown in FIG. 1, the transaction method includes the following steps S11-S13:
step S11, the first electronic signature device receives a transaction request sent by the second electronic signature device, where the transaction request at least includes: a transaction amount;
in this embodiment, the first electronic signature device and the second electronic signature device may perform offline transaction (i.e. transaction is completed without networking with a server), and both may be electronic devices with signature function, for example, smart cards with signature function (bus cards, bank cards, shopping cards, etc.), U-shields of workers, and so on. In an optional implementation manner of this embodiment, both the first electronic signature device and the second electronic signature device may be provided with a wired interface or a wireless interface, and the first electronic signature device may establish a communication connection with the second electronic signature device through a wired or wireless connection manner, where the wireless connection manner includes, but is not limited to: bluetooth, NFC near field communication, or WIFI. Of course, the first electronic signature device may also establish a connection with an external device through a wired or wireless connection manner, receive a transaction request from the second electronic signature device through the external device, and the second electronic signature device may also establish a connection with the external device through a wired or wireless connection manner, send the transaction request to the first electronic signature device through the external device, where the external device includes but is not limited to: and electronic equipment such as a mobile phone, a PC or a tablet computer and the like capable of communicating. Therefore, the two electronic signature devices can directly receive the transaction request of the other side, and then execute the subsequent transaction process, the transaction request of the other side does not need to be acquired through networking with the background server, the subsequent transaction process is executed, and the real offline transaction can be realized.
For example, when a user shops in a shopping mall and needs to pay, a second electronic signature device on a cashier desk of the shopping mall sends a transaction request carrying a transaction amount to a first electronic signature device of the user, wherein the transaction amount is the amount of money to be paid when the user shops, so that the first electronic signature device sends a second unit data packet corresponding to the transaction amount to the second electronic signature device (namely, the sum of the currency values of the second unit data packet sent by the first electronic signature device is equal to the transaction amount), the two electronic signature devices can be completely independent devices without being networked, for example, the above-mentioned transaction can be realized between two cards, the offline transaction is realized, and the transaction is simple and rapid.
In order to further improve the security of data transmission between two electronic signature devices, before step S11, in an optional implementation manner of this embodiment, a secure channel may be established between the first electronic signature device and the second electronic signature device, and in the method flow provided in this embodiment, data transmission may be performed using the secure channel. For example, the second electronic signature device may encrypt the transaction request by using the public key of the first electronic signature device to obtain a transaction request ciphertext M1, the first electronic signature device receives the transaction request ciphertext M1 sent by the second electronic signature device, and decrypts the transaction request ciphertext M1 by using its own private key to obtain a transaction request plaintext; for another example, the second electronic signature device may further encrypt the transaction request by using a negotiation key negotiated with the first electronic signature device to obtain a ciphertext M2, and the first electronic signature device receives the transaction request ciphertext M2 sent by the second electronic signature device and decrypts the transaction request ciphertext M2 by using the corresponding negotiation key to obtain a transaction request plaintext. Of course, the first electronic signature device and the second electronic signature device may also establish a secure channel for transmitting data in other manners, so that security of data transmission between the first electronic signature device and the second electronic signature device may be improved.
In step S12, the first electronic signature device obtains at least one second unit data packet from the security chip of the first electronic signature device, wherein each second unit data packet represents one currency denomination of the multiple currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount.
In this embodiment, each second unit data packet represents one currency denomination of the multiple currency denominations, that is, the currency denominations are multiple, and when the first electronic signature device obtains only one second unit data packet from its security chip, the second unit data packet represents only one currency denomination. When the first electronic signature device obtains a plurality of second unit data packets from the security chip thereof, the plurality of second unit data packets may represent a plurality of different currency values, for example, the number of the second unit data packets is 3, and each second unit data packet represents 1, 2 and 5 currency values respectively; alternatively, a plurality of second unit packets may represent the same currency denomination, for example, the number of the second unit packets is 3, and each second unit packet represents 1 unit of the currency denomination; still alternatively, the currency values represented by the second unit data packets include both identical and different currency values, for example, the number of the second unit data packets is 3, and each second unit data packet represents a currency value of 1 unit, and 2 units. Therefore, the currency values represented by the at least one second unit data packet acquired by the first electronic signature device from the security chip of the first electronic signature device have flexible combination modes.
In an optional implementation manner of this embodiment, a security chip is disposed in the first electronic signature device, and the security chip has an independent processor and a storage unit inside, and can store a PKI digital certificate and a secret key, and other feature data, and perform encryption and decryption operations on the data to provide data encryption and identity security authentication services for a user.
In an optional implementation manner of this embodiment, the second unit data packet includes at least second unit data, and the second unit data includes at least: currency denomination data, or, alternatively, currency number and currency denomination data. The currency face value data is the currency face value represented by the second unit data packet so as to identify the currency face value represented by the second unit data packet, and the currency serial number is the unique serial number of each second unit data packet, namely the currency serial numbers in different second unit data packets are different. Therefore, the uniqueness of each second unit data packet can be ensured, so that the authenticity of the second unit data packet can be identified conveniently. As an optional implementation, the second unit data packet further includes at least one of: issuing bank identification and bank certificate serial number. The issuing bank identifier is identification information of a bank issuing the second unit data packet, so that the first electronic signature device can inquire relevant information of a corresponding issuing bank according to the identifier, and the first electronic signature device can acquire a bank certificate of the corresponding issuing bank according to the issuing bank identifier and a bank certificate serial number, wherein the bank certificate contains a public key of the issuing bank, so that the following first electronic signature device or second electronic signature device can verify the signature of the second unit data by using the public key of the issuing bank.
In this embodiment, after receiving a transaction request sent by the second electronic signature device, the first electronic signature device deducts a transaction amount requested by the second electronic signature device from its own account balance, issues at least one second unit data packet for the second electronic signature device, where the sum of monetary denominations is equal to the transaction amount, and completes an offline transaction after the second electronic signature device receives the second unit data packets, if the transfer is successful, and the first electronic signature device can transfer the transfer to the second electronic signature device without networking with a server (i.e., the second unit data packet is forwarded to the second electronic signature device). The currency denomination represented by each second unit data packet may be the same or different, the number of the second unit data packets sent by the first electronic signature device to the second electronic signature device and the currency denomination represented by each second unit data packet may be determined by the first electronic signature device according to the transaction amount, or the second electronic signature device may notify the first electronic signature device after determining the transaction amount. The first electronic signature device can flexibly realize the issuing of the second unit data packet, and the second electronic signature device can meet the requirements of the user of the second electronic signature device on the number and the face value of the second unit data packet. In an alternative embodiment of this embodiment, each second unit data packet represents one currency denomination of the plurality of currency denominations, for example, the currency denomination represented by the second unit data packet comprises: 1 yuan, 2 yuan, 5 yuan, 10 yuan, 20 yuan, 50 yuan and 100 yuan, and of course, if a future country issues a new currency denomination or currency denominations of other regions and countries except for using the renminbi also belong to the protection scope of the present invention, and the embodiment is only exemplified by the renminbi denomination. For example, the first electronic signature device receives a transaction request sent by the second electronic signature device, wherein the transaction request includes a transaction amount of 10 yuan, the first electronic signature device sends 5 second unit data packets to the second electronic signature device, the currency values represented by the 5 second unit data packets are 1 yuan, 2 yuan and 5 yuan respectively, and the sum of the currency values represented by the 5 second unit data packets is 10 yuan, which is equal to the transaction amount. Of course, when the transaction amount included in the transaction request is 10 dollars, the first electronic signature device may also send 10 second unit packets representing 1 dollar denomination of money, or 2 second unit packets representing 5 dollar denomination of money, or 1 second unit packet representing 10 dollar denomination of money to the second electronic signature device. That is, the currency denominations and numbers represented by the second electronic unit currency data packets can be flexibly combined, and only the sum of the currency denominations represented by the sent at least one second unit currency data packet needs to be equal to the transaction amount, which is only taken as an example that the transaction amount is 10 yuan, and the principle of the numerical values of other amounts is the same, and will not be illustrated here. Therefore, under the condition that the first electronic signature device determines the number of the second unit data packets and the amount represented by each second unit data packet according to the transaction amount, the first electronic signature device can flexibly realize the issuing of the second unit data packets and can have various combinations; in the case where the second electronic signature device determines the number of the second unit packets and the denomination of money represented by each second unit packet according to the transaction amount, the requested number and the denomination of money represented by the corresponding second unit packet may be sent to the first electronic signature device, whereby the user of the second electronic signature device may be satisfied with the demand for the number and denomination of money of the second unit packets.
For the case that the second electronic signature device determines the number of the second unit data packets according to the transaction amount and the currency denomination represented by each second unit data packet, it is very likely that no second unit data packet corresponding to the currency denomination requested by the second electronic signature device is stored in the security chip of the first electronic signature device or the number of the stored requests is insufficient, as an optional implementation manner in this embodiment, the first electronic signature device may send prompt information to the second electronic signature device, where the prompt information may include: the second electronic signature device may replace the combination policy of the denomination and number of the money represented by the second electronic unit money data packet according to the transaction amount, or replace the combination policy of the denomination and number of the money represented by the second electronic unit money data packet according to the transaction amount by the first electronic signature device. For example, if the first electronic signing device receives a transaction request for transferring 10 units from the second electronic signing device and requests to send 5 second unit data packets representing 2 units (hereinafter referred to as 2-metadata packets), but the first electronic signing device has only 4 2-metadata packets, then sends a prompt message that only 4 2-metadata packets and the number of 2-metadata packets are insufficient to the second electronic signing device, at this time, the second electronic signing device may change the combination policy, for example, a response requesting to send 4 2-metadata packets and 2 1-metadata packets is returned to the first electronic signing device, or a confirmation response of the second electronic signing device is received after the first electronic signing device sends the prompt message to the second electronic signing device, and the first electronic signing device may randomly determine a combination policy, for example, 4 2-metadata packets and 2 1-metadata packets are sent to the second electronic signing device, therefore, the problem that the number of the second unit data packets stored in the security chip of the first electronic signature device is insufficient or nonexistent is solved.
In addition, in a specific implementation, there is a problem that the currency denomination represented by the second unit data packet stored in the security chip of the first electronic signature device cannot be used to piece up the at least one second unit data packet equal to the transaction amount, and to solve this problem, in an optional implementation manner of this embodiment, after the first electronic signature device receives the transaction request, before step S12, the method provided in this embodiment further includes: the first electronic signature device sends the information to be changed to the second electronic signature device, wherein the information to be changed is determined by the first electronic signature device according to the transaction amount and the currency denomination represented by the second unit data packet stored in the self security chip, for example, the information to be changed may include the currency denomination of change to be returned by the second electronic signature device. If the second electronic signature device stores the second unit data packet representing the currency denomination of the change, or the sum of the stored currency denominations is equal to the second unit data packet of the change, the second electronic signature device can return a confirmation response to the first electronic signature device, that is, the first electronic signature device is informed that the second unit data packet for change is stored, and after the first electronic signature device receives the change information sent by the second electronic signature device, the first electronic signature device obtains at least one second unit data packet from the security chip, wherein the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount plus the currency denomination of the change.
For example, the transaction amount is 7 yuan, 5 second unit data packets (hereinafter referred to as 2-metadata packets) respectively representing 2-yuan currency denomination are stored in the security chip of the first electronic signature device, the first electronic signature device cannot use the 5 2-metadata packets to piece up a 7-element currency face value, the first electronic signature device can only use the 5 2-metadata packets stored in the security chip to piece up a currency face value which is closest to the 7-element transaction amount and is larger than the transaction amount, namely, the first electronic signature device can use 4 2-element data packets to spell out 8-element currency face value, and the second electronic signature device is required to retrieve 1-element change, that is, after the first electronic signature apparatus transmits 4 2-metadata packets to the second electronic signature apparatus, the second electronic signature apparatus needs to return 1-metadata packet (a second unit packet representing a denomination of 1-dollar currency) to the first electronic signature apparatus. The first electronic signature device sends change-to-be-changed information carrying 1-element change to the second electronic signature device, wherein the change-to-be-changed information is used for inquiring whether the second electronic signature device can change a second unit data packet with the sum of the currency face values represented by the change-to-be-changed information being 1-element. And if the second unit data packet with the represented currency denomination sum of 1 yuan is stored in the security chip of the second electronic signature device, sending change information to the first electronic signature device, namely, agreeing to return the second unit data packet with the represented currency denomination sum of 1 yuan to the first electronic signature device. After receiving the change information, the first electronic signature device acquires 4 2-metadata packets from the security chip and sends the 2-metadata packets to the second electronic signature device, and the second electronic signature device returns 1-metadata packet (a second unit packet representing a denomination of 1-yuan) to the first electronic signature device. Therefore, when the second unit data packet with the represented currency face value sum equal to the transaction amount cannot be pieced together, the electronic transaction can be completed through the change making mechanism, so that the electronic transaction is more convenient.
In step S13, the first electronic signature device transmits the at least one second unit packet to the second electronic signature device.
In this embodiment, in order to prevent the electronic signature device from illegally reusing the same second unit data packet, which causes confusion of electronic financial circulation, and ensure uniqueness of the same second unit data packet in the payment process, this embodiment provides one of at least two ways:
the first method is as follows:
after step S13, i.e., after the first electronic signature apparatus transmits the at least one second unit data packet to the second electronic signature apparatus, the first electronic signature apparatus deletes the acquired at least one second unit data packet, since the first electronic signature device acquires the at least one second unit data packet according to the transaction amount and transmits the at least one second unit data packet to the second electronic signature device, the second unit packets sent are actually kept locally, and the deletion action is not automatically executed, in this mode, therefore, in order to ensure that the first electronic signature device can no longer reuse the second unit data, after the first electronic signature device transmits at least one second unit data packet to the second electronic signature device, the second unit packets that have been sent are forcibly deleted and the status word of the corresponding storage space is set as unoccupied. Therefore, the first electronic signature device can delete the paid second unit data packet stored in the first electronic signature device after paying the second unit data packet, so that the first electronic signature device cannot be used repeatedly and cannot recover the sent second unit data packet, namely, the uniqueness of the same second unit data packet in the payment process is ensured.
The second method comprises the following steps:
in step S13, the first electronic signature device transmits the at least one second unit packet to a second electronic signature device, including: the first electronic signature device encrypts the at least one second unit data packet to obtain at least one third unit data packet, and sends the at least one third unit data packet to the second electronic signature device. For example, the first electronic signature device obtains 5 second unit data packets representing 2-bit, and encrypts each second unit data packet representing 2-bit to obtain 5 third unit data packets representing 2-bit. In this embodiment, the encryption operation performed by the first electronic signature device on the at least one second unit data packet is an irreversible operation, that is, the first electronic signature device can encrypt the third unit data packet and cannot decrypt the second unit data packet from the third unit data packet, so when the obtained at least one third unit data packet covers the corresponding at least one second unit data packet, only the encrypted third unit data packet is stored in the first electronic signature device, and since the encrypted third unit data packet cannot be decrypted, the second unit data packet cannot be recovered, and thus the second unit data packets cannot be reused.
Specifically, as an optional implementation manner, the first electronic signature device encrypts at least one second unit data packet, and includes: the first electronic signature device encrypts at least the second unit data in each second unit data packet using the public key of the second electronic signature device. As another optional implementation, the first electronic signature device encrypts at least one second unit data packet, and includes: the first electronic signing device encrypts at least the second unit data in each second unit data packet using a symmetric key associated with the second electronic signing device.
For the former alternative, the second electronic signature device may further include a public key of the second electronic signature device in the transaction request sent to the first electronic signature device, or the first electronic signature device may obtain a digital certificate of the second electronic signature device from the third party authentication platform, where the public key of the second electronic signature device is stored in the digital certificate. Thus, the first electronic signature device can acquire the public key of the second electronic signature device.
After the first electronic signature device encrypts the at least one second unit data packet, the first electronic signature device overwrites each second unit data packet stored in the security chip with each third unit data packet. In this embodiment, to cover each second unit data packet stored in the security chip with each third unit data packet means that the first electronic signature device writes each generated third unit data packet into a storage space of the corresponding original second unit data packet, and replaces the original second unit data packet. For example, a second unit packet identified by 1 x is encrypted to generate a third unit packet, and the third unit packet is written into the storage space corresponding to 1 x. Therefore, after the first electronic signature device carries out electronic payment, for the second unit data packet sent to the second electronic signature device, the security chip of the first electronic signature device only stores the corresponding third unit data packet obtained by encrypting the public key of the second electronic signature device, and the first electronic signature device does not have the private key of the second electronic signature device, so that the first electronic signature device cannot decrypt the third unit data packet, cannot recover the second unit data packet, cannot reuse the second unit data packets, ensures the uniqueness of the same second unit data packet, and the third unit data packet is encrypted by using the public key of the second electronic signature device, so that the third unit data packet can only be decrypted by the second electronic signature device (only the second electronic signature device stores the private key of the third unit data packet), therefore, only the payee (namely, the second electronic signature device) can own and use the unencrypted second unit data packet, and even if other electronic signature devices illegally obtain the third unit data packet, the other electronic signature devices cannot decrypt the second unit data packet which cannot be obtained due to the absence of the private key of the second electronic signature device, so that the safety of circulation of the second unit data packet is ensured.
For the latter alternative, the symmetric key associated with the second electronic signature device is obtained by the first electronic signature device and the second electronic signature device through negotiation. After the first electronic signature device encrypts at least one second unit data packet, the first electronic signature device overwrites each second unit data packet stored in the security chip with each third unit data packet and deletes the symmetric key. In this embodiment, to cover each second unit data packet stored in the security chip with each third unit data packet means that the first electronic signature device writes each generated third unit data packet into a storage space of the corresponding original second unit data packet, and replaces the original second unit data packet. For example, a second unit packet identified by 1 x is encrypted to generate a third unit packet, and the third unit packet is written into the storage space corresponding to 1 x. In this way of encryption and decryption by using a symmetric key, if the first electronic signing device also possesses the symmetric key, the third unit data packet can be decrypted and recovered to the second unit data packet, therefore, in this embodiment, after the first electronic signing device sends at least one second unit data packet to the second electronic signing device, it is necessary to forcibly delete the symmetric key, so that, after the first electronic signing device performs electronic payment, for the second unit data packet sent to the second electronic signing device, the security chip of the first electronic signing device only stores the corresponding third unit data packet obtained by the second electronic signing device after being encrypted by using the symmetric key, and since the first electronic signing device has deleted the symmetric key used for encryption, the first electronic signing device cannot decrypt the third unit data packet any more, the second unit data packet cannot be recovered, that is, the second unit data packets cannot be reused, the uniqueness of the same second unit data packet is ensured, and the symmetric key is only known by the first electronic signature device and the second electronic signature device, so that the third unit data packet can be decrypted only by the second electronic signature device, only the payee (i.e., the second electronic signature device) can own and use the unencrypted second unit data packet, and even if other electronic signature devices illegally acquire the third unit data packet, the other electronic signature devices cannot acquire the second unit data packet by decryption because of the absence of the symmetric key, thereby ensuring the security of circulation of the second unit data packet.
In this optional embodiment, as an optional manner, the symmetric key may be an exclusive-or factor associated with the second electronic signature device, where the exclusive-or factor may be a group of characters or a sequence of numbers negotiated by the first electronic signature device and the second electronic signature device, and is used for performing an exclusive-or operation; specifically, the first electronic signature device encrypts at least the second unit data in each second unit data packet using a symmetric key associated with the second electronic signature device, including: the first electronic signature device exclusive-ors at least the second unit data in each second unit data packet by an exclusive-or factor. The exclusive-or operation also belongs to a symmetric encryption operation mode, but the speed of the exclusive-or operation is higher than that of other symmetric encryption operation modes, so that the efficiency of encrypting the second unit data packet by the first electronic signature device to generate the third unit data packet can be improved.
In this embodiment, in step S13, it can be prevented that the electronic signature device illegally reuses the same second unit data packet in at least the above manners, which causes confusion of circulation of the second unit data packet, and ensures uniqueness of the same second unit data packet in the payment process. Of course, this embodiment does not exclude other embodiments as long as the same technical effects can be achieved. In addition, it should be noted that, in this embodiment, the second unit packet may be understood as including: in the first mode, the second unit data packet can be understood as a data packet without encryption, namely, the plaintext mode of the second unit data packet, and in the second mode, the third unit data packet can be understood as one of the second unit data packets, namely, the data packet after the second unit data packet is encrypted, namely, the ciphertext mode of the second unit data packet.
In addition, in the second mode, the third unit data packet is a ciphertext, so that the security of data transmission is ensured, and the third unit data packet is difficult to crack even if intercepted by other equipment, and the security of circulation of the second unit data packet is further improved. In addition, after the first electronic signature device receives the transaction request, in order to ensure the security of the transaction, it needs to be confirmed by the user to perform the subsequent transaction operation (steps S12-S13), in an alternative implementation manner of this embodiment, the transaction request received by the first electronic signature device at least includes: a device identification of the second electronic signature device. Before step S12, the transaction method provided in this embodiment further includes: the first electronic signature device prompts the transaction amount and the device identification of the second electronic signature device to the holding user and receives confirmation information of the holding user. In an optional implementation manner of this embodiment, the transaction request received by the first electronic signature device from the second electronic signature device at least includes: a device identification of the second electronic signature device. Specifically, the device identifier of the second electronic signature device may be a factory serial number of the second electronic signature device, a device name of the second electronic signature device, or a name of a user held by the second electronic signature device. Through the device identification, the user can confirm whether the second electronic signature device is a transaction object agreed by the user, and only after the user approves the transaction amount and the transaction object, the user can select to confirm the transaction, so that the safety of the transaction is ensured through the confirmation of the user on the transaction.
As an optional implementation manner, the first electronic signature device is provided with a display screen or a speaker, and the transaction amount and the device identifier of the second electronic signature device are displayed through the display screen or broadcasted through the speaker; or the first electronic signature device is connected with the external device, and the transaction amount and the device identification of the second electronic signature device are prompted to the holding user through a display screen or a loudspeaker of the external device. Therefore, the user can conveniently confirm whether the payment amount and the payee are correct. As an alternative embodiment, the first electronic signature device may be provided with a confirmation key, and the user confirms through the confirmation key. Of course, the first electronic signature device may further include a confirmation information input component, where the confirmation information input component specifically includes: a PIN code input keypad or a fingerprint input component. Therefore, the user can input the confirmation information by inputting the PIN code or the fingerprint, the first electronic signature device can verify the identity of the user while confirming the relevant information of the electronic transaction, and the safety of the electronic transaction is further improved.
In this embodiment, after step S13, after receiving the third unit data packet sent by the first electronic signature device, the second electronic signature device decrypts the third unit data packet to obtain a second unit data packet, and calculates whether the total amount of the second unit data packet is equal to the requested transaction amount, if the total amount of the second unit data packet is less than the transaction amount, the second unit data packet may be requested to be retransmitted to the first electronic signature device, and the first electronic signature device may select a part or all of the third unit data packet corresponding to the second electronic signature device to retransmit. When there are multiple transactions and/or transactions with multiple second electronic signature devices, the first electronic signature device needs to add the device identifier association of the second electronic signature device in a third unit data packet (or a second unit data packet) to identify which third unit data packet belongs to the second electronic signature device to which the device identifier points, and resend the data packet to the corresponding second electronic signature device. Therefore, in an alternative implementation manner of this embodiment, each third unit data packet further includes: a device identification of the second electronic signature device. Specifically, regarding the second mode in step S13, the encrypting, by the first electronic signature device, the at least one second unit data packet to obtain at least one third unit data packet includes: after the first electronic signature device encrypts the at least one second unit data packet to obtain at least one third unit data packet, the device identifier of the second electronic signature device is added to each third unit data packet, for example, after the first electronic signature device generates at least one third unit data packet in a transaction with the second electronic signature device with the device identifier a, the device identifier a of the second electronic signature device may be added to each third unit data packet in the transaction, so as to identify the third unit data packet sent to the second electronic signature device. Therefore, because each third unit data packet stored in the security chip of the first electronic signature device includes the identification information of the second electronic signature device, the first electronic signature device can know the payee (i.e., the second electronic signature device) corresponding to each third unit data packet, so that when the second electronic signature device requests the first electronic signature device to retransmit, the first electronic signature device can find the third unit data packet corresponding to the second electronic signature device according to the device identification to perform corresponding operations of retransmission.
In addition, in this embodiment, when the first electronic signing device receives the second unit data packet which is requested by the second electronic signing device to be retransmitted and is not received in part, before the first electronic signing device sends retransmission information to the second electronic signing device, it needs to determine which second unit data packets need to be retransmitted specifically, and therefore, in this embodiment, the second unit data packet may further include: a packet identifier by which a second unit packet can be uniquely identified. In addition, in this embodiment, the third unit data packet obtained by encrypting the second unit data in the second unit data packet by the first electronic signature device also includes the data packet identifier, so that one third unit data packet can be uniquely identified. In this embodiment, the second unit electronic data packet stored in the second electronic signature device is identical to the data packet identifier of the third unit data packet covering the second unit data packet in the first electronic signature device, so that the first electronic signature device can retransmit the third unit data packet corresponding to the data packet identifier requested to be retransmitted by the second electronic signature device. The data packet identifier may be obtained in a variety of manners, which is only illustrated in this embodiment by way of example, and specifically includes, but is not limited to, the following manners:
the first method is as follows: the data packet identifier is the data packet identifier corresponding to each second unit data packet acquired by the first electronic signature device from the second electronic signature device.
The packet identifier includes, but is not limited to: the second electronic signature device uses the count value obtained by the counting of the counter or the random number generated by the second electronic signature device, the data packet identifier can be used for the first electronic signature device to find out the second unit data packet or the third unit data packet corresponding to the data packet identifier and resend the second unit data packet or the third unit data packet to the second electronic signature device, and the data packet identifier is determined by the second electronic signature device, so that replay attack can be prevented through the data packet identifier.
Specifically, the first electronic signature device may obtain a corresponding data packet identifier from the second electronic signature device before sending each second unit data packet or third unit data packet, or obtain a plurality of data packet identifiers corresponding to each second unit data packet from the second electronic signature device before sending all the second unit data packets or third unit data packets corresponding to the transaction amount, add the corresponding data packet identifiers to the second unit data packets, and then send the second unit data packets or third unit data packets generated by the second unit data packets to the second electronic signature device. Therefore, the data packet identifier generated by the second electronic signature device is added to the second unit data packet to be sent, so that the second electronic signature device can conveniently check whether the received second unit data packet (namely, the second unit data packet obtained by decryption after the third unit data packet is received) is replay data, and the second electronic signature device can judge whether the second unit data packet corresponding to all the data packet identifiers is received or not to judge whether a retransmission request needs to be initiated or not because the data packet identifier is distributed by the second electronic signature device. To prevent replay attacks, for example, when the packet identifier is the random number R1 generated by the second electronic signature device, the first electronic signature device obtains the packet identifier, i.e., the random number R1, from the second electronic signature device before transmitting a second unit packet, and transmits the second unit packet including the random number R1 to the second electronic signature device. The second electronic signature device may check whether the packet identifier carried in the received second unit packet is the random number R1, and if so, consider the received second unit packet to be legitimate; otherwise, the received second unit data packet is considered as replay data, and the data is discarded. Thereby, the second electronic signature device can be prevented from being attacked by replay.
The second method comprises the following steps: the data packet identifier may also be a data packet identifier starting value obtained by the first electronic signature device from the second electronic signature device, and the data packet identifier corresponding to each second unit data packet is calculated based on the data packet identifier starting value and according to the total number of the second unit data packets to be sent to the second electronic signature device.
In this manner, the first electronic signature device determines the packet identifier of each second unit packet to be sent according to the packet identifier start value and the number of packets to be sent, and specifically, the packet identifier start value may be a count value counted by the second electronic signature device using the counter thereof. For example, when the transaction amount is 8 dollars, the first electronic signature device needs to send three second unit packets to the second electronic signature device, where the three second unit packets represent 1 dollar, 2 dollars, and 5 dollars of currency denomination, respectively. The data packet identification starting value obtained by the first electronic signature device from the second electronic signature device is 30, where the data packet identification starting value may be obtained by adding 1 to the number of current data packets accumulated by the counter count of the second electronic signature device, for example, before initiating the transaction, the second electronic signature device stores 29 second unit data packets in total, the data packet identifications of the 29 second unit data packets may be from 1 to 29, then, the next received data packet may start to be identified from 30, and then the first electronic signature device calculates based on the data packet identification starting value 30: in this embodiment, after receiving the 3 second unit data packets, the second electronic signature device also performs association storage according to the corresponding data packet identifiers. Therefore, the first electronic signature device can flexibly calculate the data packet identifier corresponding to each second unit data packet according to the number of the second unit data packets to be sent to the second electronic signature device by only acquiring the initial value of the data packet identifier from the second electronic signature device. Therefore, the first electronic signature device can realize retransmission of part of the second unit data packet or the third unit data packet according to the data packet identification, and the second electronic signature device can judge whether the received second unit data packet is replay data or not according to the data packet identification, so that replay attack on the second electronic signature device is avoided.
After step S13, if the second electronic signature device does not receive all the second unit data packets corresponding to the requested transaction amount, in an optional implementation manner of this embodiment, the method provided by this embodiment further includes: the first electronic signature device receives a retransmission request of the second electronic signature device and sends retransmission information to the second electronic signature device according to the retransmission request, wherein the retransmission request at least comprises a device identifier of the second electronic signature device and/or a data packet identifier corresponding to each second unit data packet, so that the first electronic signature device can determine retransmission information according to the retransmission request, and the retransmission information is all or part of data packets selected by the first electronic signature device from third unit data packets corresponding to one transaction for the second electronic signature device, so that the second electronic signature device can obtain all second unit data packets of one transaction. It should be noted that, as described in the second embodiment of the manner for guaranteeing uniqueness of the paid data package, the first electronic signature device encrypts the at least one second unit data package to obtain the corresponding at least one third unit data package, and after the first electronic signature device transmits the at least one third unit data package to the second electronic signature device, the corresponding second unit data package is already covered by the at least one third unit data package. For example, the retransmission request includes: the device id and the packet id 30 of the second electronic signature device, the retransmission information sent by the first electronic signature device needs to include a third unit packet obtained by encrypting the second unit data in the second unit packet containing the device id and the packet id 30 of the second electronic signature device. Thus, the first electronic signature device can determine the second unit data packet that needs to be retransmitted.
In this embodiment, as an alternative, the second electronic signing device may request the first electronic signing device to retransmit all the second unit data packets of a transaction, or as another alternative, the second electronic signing device may request only to retransmit the second unit data packets that are not received. As for the former, the retransmission request of the second electronic signature device at least includes the device identifier of the second electronic signature device, and the retransmission information of the first electronic signature device includes at least one second unit data packet, that is, all second unit data packets corresponding to the transaction amount of one transaction are retransmitted, as an optional manner, the first electronic signature device may transmit the at least one second unit data packet to the second electronic signature device in a form of a ciphertext, that is, transmit at least one third unit data packet to the second electronic signature device, and it is understood that the retransmission information herein includes at least one third unit data packet; for the latter, the retransmission request of the second electronic signature device includes at least: the packet identifier of the second unit packet that is not received may further include: as an alternative, the first electronic signature device may send the second unit data packet indicated by the data packet identifier to the second electronic signature device in a ciphertext form, that is, send the third unit data packet indicated by the data packet identifier to the second electronic signature device, and it may be understood that the retransmission information here includes the third unit data packet indicated by the data packet identifier.
For the former, for example, for a transaction with a number of 1 × × the transaction amount in the transaction request of the second electronic signature device is 10 dollars, the first electronic signature device sends 5 second unit data packets respectively representing 2 dollar denomination values to the second electronic signature device, but due to data loss during transmission, the second electronic signature device only receives 4 second unit data packets respectively representing 2 dollar denomination values, the sum of the currency denomination values is 8 dollars, and is not equal to the transaction amount of 10 dollars. After the first electronic signature device receives the retransmission request sent by the second electronic signature device, all the corresponding third unit data packets of the transaction of the second electronic signature device can be inquired, and the 5 third unit data packets are carried in retransmission information and sent to the second electronic signature device, that is, the 5 second unit data packets respectively representing 2-unit currency face values are carried in the retransmission information in a form of ciphertext and sent to the second electronic signature device. Therefore, the first electronic signature device has the function of responding to the retransmission of the second electronic signature device, so that the second electronic signature device can receive all data packets required by the electronic transaction, and the transaction can be smoothly completed.
For the latter, for example, for a transaction with a number of 1 x, the transaction amount in the transaction request of the second electronic signature device is 5 yuan, the second electronic signature device receives 2 second unit data packets (2-yuan data packets for short) respectively representing 2 yuan denomination sent by the first electronic signature device and 1 second unit data packet (1-yuan data packet for short) representing 1 yuan denomination, but because data is lost during transmission, the second electronic signature device only receives 2 yuan data packets, the sum of the currency denomination is 4 yuan, which is not equal to the transaction amount of 5 yuan. For the transaction, the second electronic signature device sends a retransmission request to the first electronic signature device, where the retransmission request carries at least the device identifier of the second electronic signature device and the packet identifier of the unreceived packet (i.e. the packet identifier of the 1-bit packet) or the packet identifier of the received 2-bit packet, and after the first electronic signature device receives the retransmission request sent by the second electronic signature device, the transaction for the second electronic signature device may query the corresponding third unit packet according to the packet identifier of the 1-bit packet, or determine the third unit packet corresponding to the packet identifier of the 1-bit packet that is not successfully sent according to the packet identifiers of 4 2-bit packets, and send the retransmission information carried by the third unit packet corresponding to the 1-bit packet identifier to the second electronic signature device, the second unit data packet corresponding to the data packet identification is carried in the retransmission information in the form of the ciphertext and sent to the second electronic signature device. Therefore, the first electronic signature device can resend the second unit data packet which is not received by the second electronic signature device, the transmission quantity of the resending data is reduced, and the second electronic signature device can receive all the data packets required by the electronic transaction.
In an alternative implementation manner of this embodiment, the security chip of the first electronic signature device allocates a storage space for storing at least one third unit data packet (or second unit data packet), and these storage spaces of the security chip may store at least one second unit data packet, so that the first electronic signature device obtains the second unit data packet required for the transaction amount from the security chip after receiving the transaction request of the second electronic signature device, and after encrypting the at least one second unit data packet to obtain the at least one third unit data packet, and after the at least one third unit data packet covers the at least one second unit data packet, the at least one third unit data packet is stored in the corresponding storage space. After the first electronic signature device sends the retransmission information to the second electronic signature device according to the retransmission request, the first electronic signature device receives confirmation information of successful receiving returned by the second electronic signature device, and the first electronic signature device modifies the state word of the storage space where at least one third unit data packet is stored previously into transaction completion or clears the storage space and modifies the state word of the corresponding storage space into unoccupied storage space. Wherein, the status word is the memory space for transaction completion and can be covered by new data. Therefore, after the first electronic signature device confirms that the second electronic signature device receives all data packets required by the electronic transaction, the storage space of the security chip can be cleared, so that more storage space can be released, and the subsequent transaction can be carried out smoothly.
In an optional implementation manner of this embodiment, after step S13, the first electronic signature device subtracts the transaction amount from its account amount to obtain the current account balance, and displays the transaction amount and/or the current account balance to the holding user. Thus, a user holding the electronic signature device can query the transaction amount and the current account balance on his own device.
With the transaction method of the electronic signature device provided by the embodiment, the funds of the user are stored in the first electronic signature device of the user in the form of at least one second unit data packet. When a user consumes, funds are not stored in the first electronic signature device in a numerical form any more, so that the first electronic signature device does not need to change a balance value in an account through a server, and only needs to send one or more second unit data packets which accord with consumption amount to a payee, so that the first electronic signature device does not need to be networked for payment by the server when performing electronic transaction with the second electronic signature device, and the server does not need to supervise the electronic signature device, thereby really realizing off-line electronic transaction; in addition, the third unit data packet sent to the second electronic signature device by the first electronic signature device is a ciphertext, so that the safety of electronic transaction is further improved; in addition, the data packet identification and the device identification of the second electronic signature device are added in the second unit data packet, so that the second electronic signature device can be effectively prevented from being attacked by replay, and the first electronic signature device can conveniently determine the retransmission information.
Example 2
Fig. 2 is a schematic structural diagram of a transaction system according to this embodiment. As shown in fig. 2, the transaction system includes a first electronic signature device 20 and a second electronic signature device 30, where the electronic signature device (in this embodiment, the electronic signature device is the first electronic signature device 20) includes an obtaining module 201, a security module 202, and a communication module 203. The obtaining module 201 is configured to receive a transaction request sent by an opposite-end electronic signature device (in this embodiment, the opposite-end electronic signature device is the second electronic signature device 30), where the transaction request at least includes: the transaction amount. The security module 202 is configured to obtain at least one second unit data packet stored therein, wherein each second unit data packet represents one currency denomination of the currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount. A communication module 203, configured to send the at least one second unit data packet to the peer electronic signature device.
In the present embodiment, the first electronic signature device 20 and the second electronic signature device 30 can perform offline transaction (i.e. transaction is completed without networking with a server), and both can be electronic devices with signature function, for example, smart cards with signature function (bus cards, bank cards, shopping cards, etc.), U-shields of workers, and so on. In an optional implementation manner of this embodiment, the obtaining module 201 may include a wired interface or a wireless interface, and the obtaining module 201 may establish a communication connection with the opposite-end electronic signature device 30 through a wired or wireless connection manner, where the wireless connection manner includes but is not limited to: bluetooth, NFC approach communication or WIFI. Of course, the obtaining module 201 may also establish a connection with an external device through a wired or wireless connection manner, receive a transaction request from the second electronic signature device 30 through the external device, and the second electronic signature device 30 may also establish a connection with the external device through a wired or wireless connection manner, and send the transaction request to the first electronic signature device 20 through the external device, where the external device includes but is not limited to: and electronic equipment such as a mobile phone, a PC or a tablet computer and the like capable of communicating. Therefore, the two electronic signature devices can directly receive the transaction request of the other side, and then execute the subsequent transaction process, the transaction request of the other side does not need to be acquired through networking with the background server, the subsequent transaction process is executed, and the real offline transaction can be realized.
For example, when a user shops in a shopping mall and needs to pay, the second electronic signature device 30 at a checkout counter of the shopping mall sends a transaction request carrying a transaction amount to the first electronic signature device 20 of the user, where the transaction amount is an amount that the user needs to pay for shopping, so that the first electronic signature device 20 sends a second unit data packet corresponding to the transaction amount to the second electronic signature device 30 (that is, the sum of the money values of the second unit data packet sent by the first electronic signature device 20 is equal to the transaction amount), and both the two electronic signature devices may be completely independent devices without networking, for example, the above-mentioned transaction can be realized between two cards, thereby realizing an offline transaction, and the transaction is simple and fast.
In order to further improve the security of data transmission between two electronic signature devices, in an optional implementation manner of this embodiment, the first electronic signature device 20 may establish a secure channel with the second electronic signature device 30, and perform data transmission using the secure channel. For example, the second electronic signature device 30 may encrypt the transaction request by using the public key of the first electronic signature device 20 to obtain a transaction request ciphertext M1, the obtaining module 201 receives the transaction request ciphertext M1 sent by the second electronic signature device 30, and the security module 202 decrypts the transaction request ciphertext M1 by using its own private key to obtain a transaction request plaintext; for another example, the second electronic signature device 30 may further encrypt the transaction request by using a negotiation key negotiated with the first electronic signature device 20 to obtain a ciphertext M2, and the obtaining module 201 receives the transaction request ciphertext M2 sent by the second electronic signature device 30, and decrypts the transaction request ciphertext M2 by using the corresponding negotiation key to obtain a transaction request plaintext. Of course, the first electronic signature device 20 and the second electronic signature device 30 may also establish a secure channel for transmitting data in other ways, so that the security of data transmission between the first electronic signature device 20 and the second electronic signature device 30 may be improved.
In this embodiment, the security module 202 is configured to obtain at least one second unit data packet stored therein, where each second unit data packet represents one currency denomination of the multiple currency denominations, that is, the currency denominations are multiple in total, and when the security module 202 obtains only one second unit data packet stored therein, the second unit data packet represents only one currency denomination thereof. When the security module 202 obtains a plurality of second unit data packets stored therein, the plurality of second unit data packets may represent a plurality of different currency values, for example, the number of the second unit data packets is 3, and each second unit data packet represents 1, 2 and 5 units of the currency value; alternatively, a plurality of second unit packets may represent the same currency denomination, for example, the number of the second unit packets is 3, and each second unit packet represents 1 unit of the currency denomination; still alternatively, the currency values represented by the second unit data packets include both identical and different currency values, for example, the number of the second unit data packets is 3, and each second unit data packet represents a currency value of 1 unit, and 2 units. Thus, the security module 202 has a flexible combination of obtaining the currency denomination represented by the at least one second unit data packet stored therein.
In an optional implementation manner of this embodiment, the security module 202 is integrated into a security chip, and the security chip has a separate processor and a storage unit inside, and can store a PKI digital certificate and a secret key, as well as other feature data, and perform encryption and decryption operations on the data to provide data encryption and identity security authentication services for a user.
In an optional implementation manner of this embodiment, the second unit data packet includes at least second unit data, and the second unit data includes at least: currency denomination data, or, alternatively, currency number and currency denomination data. The currency face value data is the currency face value represented by the second unit data packet so as to identify the currency face value represented by the second unit data packet, and the currency serial number is the unique serial number of each second unit data packet, namely the currency serial numbers in different second unit data packets are different. Therefore, the uniqueness of each second unit data packet can be ensured, so that the authenticity of the second unit data packet can be identified conveniently. As an optional implementation, the second unit data packet further includes at least one of: issuing bank identification and bank certificate serial number. The issuing bank identifier is identification information of the bank that issues the second unit data packet, so that the security module 202 can query relevant information of the corresponding issuing bank according to the identifier, and the security module 202 can obtain a bank certificate of the corresponding issuing bank according to the issuing bank identifier and the bank certificate serial number, where the bank certificate includes a public key of the issuing bank, so that the following first electronic signature device 20 or the second electronic signature device 30 completes verification of the signature of the second unit data by using the public key of the issuing bank.
In this embodiment, after the obtaining module 201 receives the transaction request sent by the second electronic signature device 30, the security module 202 deducts the transaction amount requested by the second electronic signature device 30 from the account balance of itself, and issues at least one second unit data packet whose sum of the denominations of money is equal to the transaction amount for the second electronic signature device 30, and after the second electronic signature device receives the second unit data packets, if the transfer is successful, the offline transaction is completed, and the first electronic signature device 20 can transfer the second unit data packet to the second electronic signature device 30 without networking with a server (i.e., the second unit data packet is forwarded to the second electronic signature device 30). The currency denomination represented by each second unit data packet may be the same or different, the number of the second unit data packets sent to the second electronic signature device 30 by the communication module 203 and the currency denomination represented by each second unit data may be determined by the first electronic signature device 20 according to the transaction amount, or the second electronic signature device 30 may notify the first electronic signature device 20 after determining the transaction amount, for example, as an optional implementation manner in this embodiment, the type and number of the required second unit data packets may also be carried in the transaction request sent by the second electronic signature device 30. The former first electronic signature device 20 can flexibly implement issuing the second unit data packet, and the latter can meet the requirement of the user of the second electronic signature device 30 on the number and face value of the second unit data packet. In an alternative embodiment of this embodiment, each second unit data packet represents one currency denomination of the plurality of currency denominations, for example, the currency denomination represented by the second unit data packet comprises: 1 yuan, 2 yuan, 5 yuan, 10 yuan, 20 yuan, 50 yuan and 100 yuan, and of course, if a new currency denomination is issued in a future country, or currency denominations of other regions and countries except for using the renminbi also belong to the protection scope of the present invention, and the embodiment is only exemplified by the renminbi denomination. For example, the first electronic signature device 20 receives a transaction request sent by the second electronic signature device 30, where the transaction request includes a transaction amount of 10 dollars, the first electronic signature device 20 sends 5 second unit packets to the second electronic signature device 30 through the communication module 203, the currency denominations represented by the 5 second unit packets are 1 dollar, 2 dollars, and 5 dollars, respectively, and the total sum of the currency denominations represented by the 5 second unit packets is 10 dollars, and is equal to the transaction amount. Of course, when the transaction amount included in the transaction request is 10 dollars, the first electronic signature device 20 may also send 10 second unit packets representing 1 dollar denomination of money, or 2 second unit packets representing 5 dollar denomination of money, or 1 second unit packet representing 10 dollar denomination of money to the second electronic signature device 30 through the communication module 203. That is, the currency denominations and numbers represented by the second electronic unit currency data packets can be flexibly combined, and only the sum of the currency denominations represented by the sent at least one second unit currency data packet needs to be equal to the transaction amount, which is only taken as an example that the transaction amount is 10 yuan, and the principle of the numerical values of other amounts is the same, and will not be illustrated here. Therefore, under the condition that the security module 202 determines the number of the second unit data packets and the amount represented by each second unit data packet according to the transaction amount, the first electronic signature device 20 can flexibly realize the issuing of the second unit data packets, and various combinations can be provided; in the case where the second electronic signature device 30 determines the number of the second unit packets and the denomination of money represented by each second unit packet according to the transaction amount, the requested number and the denomination of money represented by the corresponding second unit packet may be transmitted to the first electronic signature device 20, whereby the user of the second electronic signature device 30 can meet the demand for the number of the second unit packets and the denomination of money.
For the case where the second electronic signature device 30 determines the number of the second unit packets and the currency denomination represented by each second unit packet according to the transaction amount, it is highly probable that the security module 202 of the first electronic signature device 20 does not store the second unit packets corresponding to the currency denomination requested by the second electronic signature device or stores the number of the requests with insufficient number, as an optional implementation manner in this embodiment, the communication module 203 may send prompt information to the second electronic signature device 30, where the prompt information may include: the second electronic signature device 30 may replace the combination policy of the denomination and number of the money represented by the second electronic unit money packet according to the transaction amount, or the combination policy of the denomination and number of the money represented by the second electronic unit money packet according to the transaction amount by the security module 202 of the first electronic signature device 20. For example, if the obtaining module 201 receives a transaction request for transferring 10 units from the second electronic signing device 30 and requests to send 5 second unit data packets (hereinafter referred to as 2-metadata packets) representing 2 units, but there are only 4 2-metadata packets in the security module 202, the communication module 203 sends a prompt message that there are only 4 2-metadata packets and the number of 2-metadata packets is insufficient to the second electronic signing device 30, at this time, the second electronic signing device 30 may change the combination policy, for example, a response requesting to send 4 2-metadata packets and 2 1-metadata packets is returned to the first electronic signing device 20, or a confirmation response of the second electronic signing device 30 is received after the communication module 203 of the first electronic signing device 20 sends the prompt message to the second electronic signing device 30, and the security module 202 may randomly determine a combination policy, for example, a combination policy is determined by sending 4 2-metadata packets, The 2 1-metadata packets are transmitted to the second electronic signature apparatus 30, thereby solving the problem that the number of the second unit packets stored in the security module 202 of the first electronic signature apparatus 20 is insufficient or nonexistent.
In addition, in a specific implementation, there is a problem that the currency denomination represented by the second unit data packet stored by the security module 202 cannot be pieced together to form the at least one second unit data packet equal to the transaction amount, and in order to solve the problem, in an optional implementation manner of this embodiment, after the obtaining module 201 receives the transaction request, before the security module 202 obtains the at least one second unit data packet stored by itself, the first electronic signature device 20 sends the change waiting information to the second electronic signature device 30 through the communication module 203, where the change waiting information is determined by the security module 202 according to the transaction amount and the currency denomination represented by the second unit data packet stored by itself, and for example, the change waiting information may include the currency denomination of the change required to be returned by the second electronic signature device 30. If the second electronic signature device 30 stores the second unit packet representing the money denomination of the change, or the second unit packet storing the sum of money denominations equal to the change, the second electronic signature device 30 may return a confirmation response to the first electronic signature device 20, that is, inform the first electronic signature device 20 that the second unit packet for change is stored by itself. The secure module 202 is configured to obtain at least one second unit data packet stored in the secure module 201 after the obtaining module 201 receives the change information, where a sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount plus the currency denomination of the change.
For example, the transaction amount is 7 dollars, 5 second unit data packets (hereinafter referred to as 2-dollar data packets) respectively representing 2 dollar denomination values are stored in the security module 202, the security module 202 cannot use the 5 packets representing 2-metadata to piece up a 7-tuple currency denomination, the security module 202 can only use the stored 5 packets representing 2-metadata to piece up a currency denomination closest to and greater than the transaction amount of 7-tuple, that is, the security module 202 can use 4 packets representing 2-element data to spell out an 8-element currency face value, and the second electronic signature device 30 is required to retrieve 1-element change, that is, after the communication module 203 transmits 4 2-metadata packets to the second electronic signature device 30, the second electronic signature device 30 needs to return 1-bit data packet (second unit data packet representing a denomination of 1-bit currency) to the first electronic signature device 20. The communication module 203 sends the change information to be changed carrying 1-tuple change to the second electronic signature device 30, wherein the change information is used for inquiring whether the second electronic signature device 30 can change the second unit data packet with the sum of the face value of the represented currency of 1-tuple. If the second unit data packet with the currency denomination sum of 1 yuan represented by the second electronic signature device 30 is stored in the security chip, the change information is sent to the first electronic signature device 20, that is, the second unit data packet with the currency denomination sum of 1 yuan represented by the second electronic signature device is agreed to be returned to the first electronic signature device 20. After the obtaining module 201 receives the change information, the security module 202 obtains 4 2-metadata packets and sends the 2-metadata packets to the second electronic signature device 30, and the second electronic signature device 30 returns a 1-metadata packet (a second unit packet representing a denomination of 1-dollar currency) to the first electronic signature device 20. Therefore, when the second unit data packet with the represented currency face value sum equal to the transaction amount cannot be pieced together, the electronic transaction can be completed through the change making mechanism, so that the electronic transaction is more convenient.
A communication module 203, configured to send the at least one second unit data packet to the peer electronic signature device.
In this embodiment, in order to prevent the electronic signature device from illegally reusing the same second unit data packet, which causes confusion of financial circulation of the second unit data packet, and ensure uniqueness of the same second unit data packet in the payment process, this embodiment provides one of at least two ways:
the first method is as follows:
the security module 202 is further configured to delete the acquired at least one second unit data packet after the communication module 203 sends the at least one second unit data packet to the second electronic signature device 30, because the security module 202 actually retains the sent second unit data packets and does not automatically perform the deleting action after acquiring the at least one second unit data packet according to the transaction amount and sending the at least one second unit data packet to the second electronic signature device through the communication module 203, in this manner, in order to ensure that the first electronic signature device 20 cannot reuse the second unit data packets, after the communication module 203 sends the at least one second unit data packet to the second electronic signature device 30, the security module 202 may forcibly delete the sent second unit data packets, and the state word of the corresponding storage space is set as unoccupied. Therefore, the security module 202 may delete the paid second unit data packet stored therein after paying the second unit data packet, thereby ensuring that the first electronic signature device 20 cannot be reused and cannot recover the sent second unit data packet, i.e. ensuring the uniqueness of the same second unit data packet in the payment process.
The second method comprises the following steps:
the communication module 203 is further configured to encrypt the at least one second unit data packet to obtain at least one third unit data packet; the communication module 203 is further configured to send the at least one third unit data packet to the second electronic signature device 30. For example, the communication module 203 acquires 5 second unit data packets representing 2-bit, and encrypts each second unit data packet representing 2-bit to obtain 5 third unit data packets representing 2-bit. In this embodiment, the encryption operation performed by the communication module 203 on the at least one second unit data packet is an irreversible operation, that is, the communication module 203 may encrypt the third unit data packet but may not decrypt the second unit data packet from the third unit data packet, so when the obtained at least one third unit data packet covers the corresponding at least one second unit data packet, only the encrypted third unit data packet is stored in the security module 202, and since the encrypted third unit data packet cannot be decrypted, the second unit data packet cannot be recovered, and the second unit data packet cannot be reused. In this embodiment, the security module 202 and the communication module 203 are integrated in a security chip.
Specifically, as an optional implementation manner, the communication module 203 is further configured to encrypt the at least one second unit data packet, including: the communication module 203 is configured to encrypt at least the second unit data in each second unit data packet using the public key of the second electronic signature device 30. As another optional implementation, the communication module 203 is further configured to encrypt the at least one second unit data packet, including: the communication module 203 encrypts at least the second unit data in each second unit data packet with a symmetric key associated with the second electronic signature device 30.
For the former alternative, the second electronic signature device 30 may include the public key of the second electronic signature device 30 in the transaction request sent to the first electronic signature device 20, or the communication module 203 may obtain the digital certificate of the second electronic signature device, in which the public key of the second electronic signature device 30 is stored, from the third party authentication platform through the obtaining module 201. Thereby, the communication module 203 can acquire the public key of the second electronic signature device 30.
The security module 202 is further configured to overwrite each of the stored second unit packets with each of the third unit packets after the communication module 203 encrypts the at least one second unit packet. In this embodiment, to cover each second unit data packet stored in the security module 202 with each third unit data packet means that the security module 202 writes each third unit data packet generated by the communication module 203 into the storage space of the corresponding original second unit data packet, and replaces the original second unit data packet. For example, a second unit packet identified by 1 x is encrypted to generate a third unit packet, and the third unit packet is written into the storage space corresponding to 1 x. Thus, after the payment of the second unit data packet is performed, for the second unit data packet sent to the second electronic signature device 30, the security module 202 only stores the corresponding third unit data packet obtained by encrypting the public key of the second electronic signature device 30, and the security chip integrated with the communication module 203 does not have the private key of the second electronic signature device 30, so the communication module 203 cannot decrypt the third unit data packet, cannot recover the second unit data packet, and cannot reuse the second unit data packets, thereby ensuring the uniqueness of the same second unit data packet, and the third unit data packet is encrypted by the public key of the second electronic signature device 30, so the third unit data packet can only be decrypted by the second electronic signature device 30 (only the second electronic signature device 30 has its own private key), therefore, only the payee (i.e., the second electronic signature device 30) can own and use the unencrypted second unit data packet, and even if other electronic signature devices illegally obtain the third unit data packet, the other electronic signature devices cannot decrypt the second unit data packet which cannot be obtained because of the absence of the private key of the second electronic signature device 30, thereby ensuring the security of circulation of the second unit data packet.
For the latter alternative embodiment, the symmetric key associated with the second electronic signature device 30 is obtained by the first electronic signature device 20 and the second electronic signature device 30 through negotiation. The security module 202 is further configured to, after the communication module 203 encrypts the at least one second unit data packet, overwrite each second unit data packet stored therein with each third unit data packet, and delete the symmetric key. In this embodiment, to cover each second unit data packet stored in the security module 202 with each third unit data packet means that the security module 202 writes each third unit data packet generated by the communication module 203 into the storage space of the corresponding original second unit data packet, and replaces the original second unit data packet. For example, a second unit packet identified by 1 x is encrypted to generate a third unit packet, and the third unit packet is written into the storage space corresponding to 1 x. In this way of encryption and decryption by using a symmetric key, if the communication module 203 also possesses the symmetric key, the third unit data packet can be decrypted and recovered to obtain the second unit data packet, therefore, in this embodiment, after the communication module 203 sends the at least one second unit data packet to the second electronic signature device, the symmetric key in the communication module 203 must be forcibly deleted, so that, after payment of the second unit data packet is performed, for the second unit data packet sent to the second electronic signature device 30, the security module 202 only stores the corresponding third unit data packet obtained by the second electronic signature device 30 after being encrypted by using the symmetric key, and since the communication module 203 has deleted the symmetric key used for encryption, the communication module 203 cannot decrypt the third unit data packet any more and cannot recover the second unit data packet, the second unit data packets cannot be reused, the uniqueness of the same second unit data packet is ensured, and the symmetric key is only known by the first electronic signature device 20 and the second electronic signature device 30, so that the third unit data packet can be decrypted only by the second electronic signature device 30, so that only the payee (i.e. the second electronic signature device 30) can own and use the unencrypted second unit data packet, and even if other electronic signature devices illegally acquire the third unit data packet, the other electronic signature devices cannot decrypt the acquired second unit data packet because of the absence of the symmetric key, thereby ensuring the security of circulation of the second unit data packet.
In this optional embodiment, as an optional manner, the symmetric key may be an exclusive-or factor associated with the second electronic signature device 30, and the exclusive-or factor may be a group of characters or a sequence of numbers negotiated by the first electronic signature device 20 and the second electronic signature device 30, and is used for performing an exclusive-or operation; specifically, the communication module 203 is configured to encrypt at least the second unit data in each second unit data packet by using a symmetric key associated with the second electronic signature device 30, and includes: the communication module 203 is configured to perform an exclusive-or operation on at least the second unit data in each second unit data packet by using an exclusive-or factor. The exclusive-or operation belongs to a symmetric encryption operation method, but the speed of the exclusive-or operation is faster than that of other symmetric encryption operation methods, so that the efficiency of the communication module 203 for encrypting the second unit data packet to generate the third unit data packet can be improved.
In this embodiment, the security module 202 and the communication module 203 can at least prevent the electronic signature device from illegally reusing the same second unit data packet in the above several ways, which causes confusion of circulation of the second unit data packet, and ensures uniqueness of the same second unit data packet in the payment process. Of course, this embodiment does not exclude other embodiments as long as the same technical effects can be achieved. In addition, it should be noted that, in this embodiment, the second unit packet may be understood as including: in the first mode, the second unit data packet can be understood as a data packet without encryption, namely, the plaintext mode of the second unit data packet, and in the second mode, the third unit data packet can be understood as one of the second unit data packets, namely, the data packet after the second unit data packet is encrypted, namely, the ciphertext mode of the second unit data packet.
In addition, in the second mode, the third unit data packet is a ciphertext, so that the security of data transmission is ensured, and the third unit data packet is difficult to crack even if intercepted by other equipment, and the security of circulation of the second unit data packet is further improved.
In addition, after the obtaining module 201 of the first electronic signature device 20 receives the transaction request, in order to ensure the security of the transaction, it needs to be confirmed by the user to perform the subsequent transaction operation, in this embodiment, the transaction request received by the obtaining module 201 at least includes: in an optional implementation manner of the second electronic signature device 30, as shown in fig. 2, the first electronic signature device 20 is further provided with an interaction module 204, and the interaction module 204 is configured to prompt the transaction amount and the device identifier of the second electronic signature device 30 to the holding user, and receive confirmation information of the holding user. In an optional implementation manner of this embodiment, the obtaining module 201 at least includes, in the transaction request received from the second electronic signature device 30: the device identification of the second electronic signature device 30. Specifically, the device identifier of the second electronic signature device 30 may be a factory serial number of the second electronic signature device 30, a device name of the second electronic signature device 30, or a name of a user held by the second electronic signature device 30. Through the device identification, the user can confirm whether the second electronic signature device 30 is a transaction object agreed by the user, and the user can select to confirm the transaction only after the user approves both the transaction amount and the transaction object, so that the security of the transaction is ensured through the confirmation of the user on the transaction.
As an optional implementation manner, the interaction module 204 includes a display screen or a speaker, and the transaction amount and the device identifier of the second electronic signature device 30 are displayed through the display screen or are broadcasted through a speaker set by the interaction module itself; alternatively, the first electronic signature device 20 may also establish a connection with an external device through the interaction module 204, and prompt the transaction amount and the device identifier of the second electronic signature device 30 to the holding user through a display screen or a speaker of the external device. Therefore, the user can conveniently confirm whether the payment amount and the payee are correct. As an alternative embodiment, the interaction module 204 comprises a confirmation key by which the user confirms. Of course, the interaction module 204 may further include a confirmation information input component, which may specifically include: a PIN code input keypad or a fingerprint input component. Therefore, the user can input the confirmation information by inputting the PIN code or the fingerprint, the first electronic signature device can verify the identity of the user while confirming the relevant information of the electronic transaction, and the safety of the electronic transaction is further improved.
In this embodiment, after receiving the third unit data packet sent by the communication module 203 of the first electronic signature device 20, the second electronic signature device 30 decrypts the third unit data packet to obtain a second unit data packet, and calculates whether the total amount of the second unit data packet is equal to the requested transaction amount, if the total amount of the second unit data packet is less than the transaction amount, the second unit data packet may be requested to be retransmitted to the first electronic signature device 20, and the security module 202 of the first electronic signature device 20 may select a part or all of the third unit data packet corresponding to the second electronic signature device 30 to be retransmitted. When there are multiple transactions and/or transactions with multiple second electronic signature devices 30, the security module 202 needs to add the device identifier association of the second electronic signature device 30 to the third unit data packet (or the second unit data packet) to identify which third unit data packet belongs to the second electronic signature device 30 to which the device identifier points, and resend the data packet to the corresponding second electronic signature device 30. Therefore, each third unit data packet further includes: the device identification of the second electronic signature device 30. Specifically, for the second embodiment, the communication module 203 is configured to encrypt the at least one second unit data packet to obtain at least one third unit data packet, and includes: the communication module 203 is configured to encrypt at least one second unit data packet to obtain at least one third unit data packet, and add the device identifier of the second electronic signature device 30 to each third unit data packet, for example, after the first electronic signature device 20 generates at least one third unit data packet in a transaction with the second electronic signature device 30 with the device identifier a, the device identifier a of the second electronic signature device 30 may be added to each third unit data packet in the transaction, so as to identify the third unit data packet sent to the second electronic signature device 30. Therefore, because each third unit data packet stored by the security module 202 includes the identification information of the second electronic signature device 30, the first electronic signature device 20 can know the payee (i.e., the second electronic signature device 30) corresponding to each third unit data packet, so that when the second electronic signature device 30 requests the first electronic signature device 20 to retransmit, the security module 202 in the first electronic signature device 20 can find the third unit data packet corresponding to the second electronic signature device 30 according to the device identification to perform the corresponding retransmission operation.
In addition, in this embodiment, after the obtaining module 201 receives the second unit data packet which is requested by the second electronic signing device 30 to be retransmitted and is not partially received, before the communication module 203 sends retransmission information to the second electronic signing device 30, the security module 202 needs to determine which second unit data packets need to be retransmitted specifically, and therefore, in this embodiment, the second unit data packet may further include: a packet identifier by which a second unit packet can be uniquely identified. In addition, in this embodiment, the third unit data packet obtained by encrypting the second unit data in the second unit data packet by the communication module 203 also includes the data packet identifier, so that one third unit data packet can be uniquely identified. In this embodiment, the second unit data packet stored in the second electronic signature device 30 is identical to the data packet identifier of the third unit data packet covered by the security module 202 in the first electronic signature device 20, so that the security module 202 can retransmit the third unit data packet corresponding to the data packet identifier requested to be retransmitted by the second electronic signature device through the communication module 203. The data packet identifier may be obtained in a variety of manners, which is only illustrated in this embodiment by way of example, and specifically includes, but is not limited to, the following manners:
the first method is as follows: the packet identifier is a packet identifier corresponding to each second unit datagram acquired by the acquisition module 201 from the second electronic signature device 30.
The packet identifier includes, but is not limited to: the second electronic signature device 30 uses the count value counted by the counter thereof or the random number generated by the second electronic signature device 30, and the packet identifier not only can be used for the security module 202 to find the second unit data packet or the third unit data packet corresponding to the packet identifier to retransmit to the second electronic signature device 30, but also can prevent replay attack by the packet identifier because the packet identifier is determined by the second electronic signature device 30.
Specifically, the obtaining module 201 is configured to obtain a corresponding data packet identifier from the second electronic signature device 30 before the communication module 203 sends each second unit data packet or third unit data packet, and is also configured to obtain a plurality of data packet identifiers corresponding to each second unit data packet from the second electronic signature device 30 before the communication module 203 sends all second unit data packets or third unit data packets corresponding to the transaction amount, and after the corresponding data packet identifiers are added to the second unit data packets by the security module 202, the communication module 203 sends the third unit data packets generated by the second unit data packets to the second electronic signature device 30. Therefore, the addition of the packet identifier generated by the second electronic signature device 30 to the second unit packet to be sent facilitates the second electronic signature device 30 to verify whether the received second unit packet (i.e., the second unit packet decrypted by the received third unit packet) is the replay data, and since the packet identifier is assigned by the second electronic signature device 30, the second electronic signature device 30 can determine whether the second unit packet corresponding to all the packet identifiers has been received, so as to determine whether a retransmission request needs to be initiated. To prevent replay attacks, for example, when the packet identifier is the random number R1 generated by the second electronic signature device 30, before the communication module 203 transmits a second unit packet, the obtaining module 201 obtains the packet identifier, i.e., the random number R1, from the second electronic signature device 30, and transmits the second unit packet including the random number R1 to the second electronic signature device 30 through the communication module 203. The second electronic signature device 30 may check whether the packet identifier carried in the received second unit packet is the random number R1, and if so, consider the received second unit packet to be legitimate; otherwise, the received second unit data packet is considered as replay data, and the data is discarded. Thereby, the second electronic signature device 30 can be prevented from being attacked by replay.
The second method comprises the following steps: the packet identifier may also be a packet identifier corresponding to each second unit packet calculated according to the total number of the second unit packets to be sent to the second electronic signature device 30 based on the packet identifier start value obtained by the security module 202 through the obtaining module 201 from the second electronic signature device 30.
In this manner, the security module 202 determines the packet identifier of each second unit packet to be sent according to the packet identifier start value and the number of packets to be sent, and specifically, the packet identifier start value may be a count value counted by the second electronic signature device 30 using its counter. For example, when the transaction amount is 8 dollars, the communication module 203 needs to send three second unit packets to the second electronic signature device 30, where the three second unit packets represent the denomination of money 1 dollar, 2 dollars, and 5 dollars, respectively. The packet identification start value obtained by the obtaining module 201 from the second electronic signing device 30 is 30, and the packet identification start value may be obtained by adding 1 to the number of current packets accumulated by the counter count of the second electronic signing device 30, for example, before initiating the transaction, the second electronic signing device 30 stores 29 second unit packets in total, and the packet identifications of the 29 second unit packets may be from 1 to 29, then, the next received packet may start to be identified from 30, and then the security module 202 calculates based on the packet identification start value 30: in the present embodiment, after receiving the 3 second unit data packets, the second electronic signature device 30 performs association storage according to the corresponding data packet identifiers. Therefore, the first electronic signature device 20 can flexibly calculate the packet identifier corresponding to each second unit packet according to the number of the second unit packets to be sent to the second electronic signature device 30 by only acquiring an initial value of the packet identifier from the second electronic signature device 30. Thus, the first electronic signature device 20 can implement retransmission of a part of the second unit packet or the third unit packet based on the packet identifier, and the second electronic signature device 30 can determine whether the received second unit packet is replay data based on the packet identifier, thereby preventing the second electronic signature device 30 from being attacked by replay.
In an optional implementation manner of this embodiment, when the second electronic signature device 30 does not receive all the second unit data packets corresponding to the requested transaction amount, the obtaining module 201 is further configured to receive a retransmission request of the second electronic signature device 30; the communication module 203 is further configured to send retransmission information to the second electronic signature device 30 according to a retransmission request, where the retransmission request at least includes a device identifier of the second electronic signature device 30 and/or a packet identifier corresponding to each second unit of packet, so that the security module 202 may determine the retransmission information according to the retransmission request, where the retransmission information is all or part of packets selected by the security module 202 from a third unit of packet corresponding to one transaction given to the second electronic signature device 30, so as to ensure that the second electronic signature device 30 obtains all second unit of packets of one transaction. It should be noted that, as described in the second embodiment of the manner of guaranteeing uniqueness of the paid data packets, the communication module 203 encrypts the at least one second unit data packet to obtain at least one third unit data packet, and after the communication module 203 transmits the at least one third unit data packet to the second electronic signature device 30, the corresponding second unit data packet is already covered by the at least one third unit data packet. For example, the retransmission request includes: the device identifier and the packet identifier 30 of the second electronic signature device 30, the retransmission information sent by the communication module 203 needs to include a third unit packet obtained by encrypting the second unit data in the second unit packet containing the device identifier and the packet identifier 30 of the second electronic signature device 30. Thus, the first electronic signature device 20 can determine the second unit packet that needs to be retransmitted.
In this embodiment, as an alternative, the second electronic signature device 30 may request retransmission of all the second unit data packets of a transaction to the first electronic signature device 20, and as another alternative, the second electronic signature device 30 may request retransmission of only the second unit data packets that are not received. As for the former, the retransmission request of the second electronic signature device 30 at least includes the device identifier of the second electronic signature device 20, and the retransmission information sent by the first electronic signature device 20 through the communication module 203 includes at least one second unit data packet, that is, all second unit data packets corresponding to the transaction amount of one transaction are retransmitted, as an optional manner, the communication module 203 may send the at least one second unit data packet to the second electronic signature device 30 in a form of a ciphertext, that is, at least one third unit data packet to the second electronic signature device 30, and it is understood that the retransmission information includes at least one third unit data packet; for the latter, the retransmission request of the second electronic signature device includes at least: the packet identifier of the second unit packet that is not received may further include: as an alternative to the device identifier of the second electronic signature device 30, the retransmission information sent by the communication module 203 in the first electronic signature device 20 includes the second unit data packet that is not received by the second electronic signature device 30, that is, the second unit data packet indicated by the data packet identifier in the retransmission request, the communication module 203 in the first electronic signature device 20 may send the second unit data packet indicated by the data packet identifier to the second electronic signature device 30 in a form of ciphertext, that is, send the third unit data packet indicated by the data packet identifier to the second electronic signature device 30, where it is understood that the retransmission information includes the third unit data packet indicated by the data packet identifier.
For the former, for example, for a transaction with a number of 1 × × the transaction amount in the transaction request of the second electronic signature device 30 is 10 dollars, the communication module 203 sends 5 second unit data packets respectively representing 2 dollar denomination values to the second electronic signature device 30, but due to data loss during transmission, the second electronic signature device 30 only receives 4 second unit data packets respectively representing 2 dollar denomination values, and the sum of the currency denomination values is 8 dollars, which is not equal to the transaction amount of 10 dollars. For the transaction, the second electronic signature device 30 sends a retransmission request to the first electronic signature device, where the retransmission request at least carries the device identifier of the second electronic signature device 30, and the obtaining module 201 is configured to, after receiving the retransmission request sent by the second electronic signature device 30, query all the third unit data packets corresponding to the transaction of the second electronic signature device 30, carry 5 third unit data packets in retransmission information, and send the retransmission information to the second electronic signature device 30, that is, carry 5 second unit data packets respectively representing 2-bit currency denominations in the form of ciphertext, and send the retransmission information to the second electronic signature device 30. Therefore, the first electronic signature device 20 has a function of responding to the retransmission of the second electronic signature device 30, so as to ensure that the second electronic signature device 30 can receive all data packets required by the electronic transaction, and ensure that the transaction can be completed smoothly.
For the latter, for example, for a transaction with a number of 1 x, the transaction amount in the transaction request of the second electronic signature device 30 is 5 yuan, the second electronic signature device 30 receives 2 second unit data packets (2-yuan data packets for short) respectively representing 2 yuan denomination sent by the first electronic signature device and 1 second unit data packet (1-yuan data packet for short) representing 1 yuan denomination, but due to data loss during transmission, the second electronic signature device 30 receives only 2 yuan data packets, and the sum of the currency denomination is 4 yuan, which is not equal to 5 yuan of the transaction amount. For the transaction, the second electronic signature device 30 sends a retransmission request to the first electronic signature device 20, where the retransmission request carries at least the device identifier of the second electronic signature device 30 and the packet identifier of the unreceived packet (i.e. the packet identifier of the 1-bit packet) or the packet identifier of the received 2-bit packet, after receiving the retransmission request sent by the second electronic signature device 30, the obtaining module 201 may query a corresponding third unit packet for the transaction of the second electronic signature device 30 according to the packet identifier of the 1-bit packet, or determine a third unit packet corresponding to the packet identifier of the 1-bit packet that is not successfully sent according to the packet identifiers of 4 2-bit packets, and the communication module 203 carries the third unit packet corresponding to the 1-bit packet identifier in retransmission information and sends the retransmission information to the second electronic signature device, that is, the communication module 203 carries the retransmission information in the form of the ciphertext to the second unit data packet corresponding to the data packet identifier, and sends the retransmission information to the second electronic signature device 30. Therefore, the communication module 203 can retransmit the second unit data packet which is not received by the second electronic signature device 30, so that the transmission amount of retransmission data is reduced, and the second electronic signature device 30 can receive all data packets required by the electronic transaction.
In an alternative embodiment of this embodiment, the security module 202 is configured to allocate a storage space for storing at least one third unit data packet (or a second unit data packet), the storage space of the security module 202 may store at least one second unit data packet, so that after the obtaining module 203 receives a transaction request from the second electronic signature device 30, the security module 202 obtains the second unit data packet required for the transaction amount from its own storage space, and after the at least one third unit data packet is obtained by encrypting the at least one second unit data packet, and the at least one third unit data packet is stored in the corresponding storage space after the at least one third unit data packet covers the at least one second unit data packet. The obtaining module 201 is further configured to receive confirmation information of successful reception returned by the second electronic signature device 30 after the communication module 203 sends the retransmission information to the second electronic signature device 30 according to the retransmission request; the security module 202 is further configured to modify a status word of a storage space where the at least one third unit data packet is previously stored to be transaction completed, or to empty the storage space and modify a status word of a corresponding storage space to be unoccupied. Wherein, the status word is the memory space for transaction completion and can be covered by new data. Therefore, after the security module 202 confirms that the second electronic signature device 30 receives all the data packets required by the electronic transaction, the storage space of the security chip can be cleared, so that more storage space is released, and the subsequent transaction is guaranteed to be carried out smoothly.
In an optional implementation manner of this embodiment, the security module 202 is further configured to subtract the transaction amount from the account amount of the electronic signature device to obtain a current account balance; the interaction module 204 is further configured to display the transaction amount and/or the current account balance to the holding user. Thus, a user holding the electronic signature device can query the transaction amount and the current account balance on his own device.
In this embodiment, the second electronic signature device 30 is configured to send a transaction request to the first electronic signature device 20, receive at least one second unit data packet from the first electronic signature device 20, and store the at least one second unit data packet in the security chip. Thus, the second electronic signature device 30 can cooperate with the first electronic signature device to complete an offline electronic transaction.
With the first electronic signature device 20 provided in the present embodiment, the user's funds are stored in the first electronic signature device 20 of the user in the form of at least one second unit data packet. When a user consumes, funds are not stored in the first electronic signature device 20 in a numerical form any more, so that the first electronic signature device 20 does not need to change a balance value in an account through a server, and only needs to send one or more second unit data packets which accord with consumption amount to a payee, so that the first electronic signature device 20 does not need to rely on the server for networking payment when performing electronic transaction with the second electronic signature device 30, and the server does not need to supervise the electronic signature device, thereby really realizing offline electronic transaction; in addition, the third unit data packet sent by the first electronic signature device 20 to the second electronic signature device 30 is a ciphertext, so that the security of electronic transaction is further improved; in addition, the addition of the packet identifier and the device identifier of the second electronic signature device 30 to the second unit packet can effectively prevent the second electronic signature device 30 from being attacked by replay, and can facilitate the first electronic signature device 20 to determine the retransmission information.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (11)
1. A transaction method of an electronic signature device is characterized by comprising the following steps:
the first electronic signature device receives a transaction request sent by a second electronic signature device, wherein the transaction request at least comprises: a transaction amount;
the first electronic signature device acquires at least one second unit data packet from a security chip of the first electronic signature device, wherein each second unit data packet represents one currency denomination in a plurality of currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount; the second unit packet includes at least: a second unit of data, the second unit of data including at least: currency denomination data;
the first electronic signature device sends the at least one second unit data packet to the second electronic signature device;
the first electronic signature device deletes the acquired at least one second unit packet.
2. The transaction method according to claim 1,
the first electronic signature device transmits the at least one second unit packet to the second electronic signature device, including:
and the first electronic signature device encrypts the at least one second unit data packet to obtain at least one third unit data packet, and sends the at least one third unit data packet to the second electronic signature device.
3. The transaction method according to claim 2,
the first electronic signature device encrypts the at least one second unit data packet, including:
the first electronic signature device encrypts at least the second unit data of each second unit data packet using a symmetric key associated with the second electronic signature device.
4. The transaction method according to claim 3,
after the first electronic signature device encrypts the at least one second unit data packet, the method further comprises:
and the first electronic signature device covers each second unit data packet stored in the security chip with each third unit data packet, and deletes the symmetric key.
5. The transaction method according to claim 3 or 4,
the symmetric key is an exclusive or factor associated with the second electronic signature device;
the first electronic signing device encrypts at least the second unit data in each second unit data packet using a symmetric key associated with the second electronic signing device, comprising:
the first electronic signature device performs an exclusive-or operation on at least the second unit data in each second unit data packet by using the exclusive-or factor.
6. An electronic signature device, characterized in that the electronic signature device comprises:
an obtaining module, configured to receive a transaction request sent by an opposite-end electronic signature device, where the transaction request at least includes: a transaction amount;
the safety module is used for acquiring at least one second unit data packet stored by the safety module, wherein each second unit data packet represents one currency denomination in a plurality of currency denominations, and the sum of the currency denominations represented by the at least one second unit data packet is equal to the transaction amount; the second unit packet includes at least: a second unit of data, the second unit of data including at least: currency denomination data;
the communication module is used for sending the at least one second unit data packet to the opposite-end electronic signature device;
the security module is further configured to delete the acquired at least one second unit data packet.
7. The electronic signature device as claimed in claim 6,
the communication module is configured to send the at least one second unit data packet to the opposite-end electronic signature device, and includes:
and the communication module is used for encrypting the at least one second unit data packet to obtain at least one third unit data packet, and sending the at least one third unit data packet to the opposite-end electronic signature device.
8. The electronic signature device according to claim 7,
the security module is further configured to encrypt the at least one second unit data packet, and includes:
the security module is configured to encrypt at least the second unit data in each second unit data packet using a symmetric key associated with the peer electronic signature device.
9. The electronic signature device as claimed in claim 8,
and the security module is further configured to, after encrypting the at least one second unit data packet, overwrite each second unit data packet stored in the security module with each third unit data packet, and delete the symmetric key.
10. The electronic signature device according to claim 8 or 9,
the symmetric key is an exclusive or factor associated with the opposite-end electronic signature device;
the security module is configured to encrypt at least the second unit data in each second unit data packet using a symmetric key associated with the peer electronic signature device, and includes:
and the safety module is used for at least carrying out XOR operation on the second unit data in each second unit data packet by utilizing the XOR factor.
11. A transaction system, comprising: a first electronic signature device and a second electronic signature device, wherein:
the first electronic signature device employs the electronic signature device according to any one of claims 6 to 10;
and the second electronic signature device is used for sending the transaction request to the first electronic signature device, receiving the at least one second unit data packet from the first electronic signature device, and storing the at least one second unit data packet in a security chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110217406.5A CN113159763A (en) | 2016-01-22 | 2016-03-25 | Transaction method and transaction system of electronic signature device and electronic signature device |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610045339 | 2016-01-22 | ||
CN202110217406.5A CN113159763A (en) | 2016-01-22 | 2016-03-25 | Transaction method and transaction system of electronic signature device and electronic signature device |
CN201610179102.3A CN105931048A (en) | 2016-01-22 | 2016-03-25 | Electronic signature devices, and trading method and trading system thereof |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610179102.3A Division CN105931048A (en) | 2016-01-22 | 2016-03-25 | Electronic signature devices, and trading method and trading system thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113159763A true CN113159763A (en) | 2021-07-23 |
Family
ID=56744518
Family Applications (6)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110217406.5A Pending CN113159763A (en) | 2016-01-22 | 2016-03-25 | Transaction method and transaction system of electronic signature device and electronic signature device |
CN201610178324.3A Pending CN105913255A (en) | 2016-01-22 | 2016-03-25 | Trade method and trade system of electronic signature device, and electronic signature device |
CN201610178067.3A Active CN105956855B (en) | 2016-01-22 | 2016-03-25 | Transaction method and transaction system of electronic signature device |
CN201610178325.8A Pending CN105913256A (en) | 2016-01-22 | 2016-03-25 | Trade method and trade system of electronic signature device |
CN201610179102.3A Pending CN105931048A (en) | 2016-01-22 | 2016-03-25 | Electronic signature devices, and trading method and trading system thereof |
CN201610179104.2A Pending CN105931049A (en) | 2016-01-22 | 2016-03-25 | Electronic signature device, and trading method and trading system thereof |
Family Applications After (5)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610178324.3A Pending CN105913255A (en) | 2016-01-22 | 2016-03-25 | Trade method and trade system of electronic signature device, and electronic signature device |
CN201610178067.3A Active CN105956855B (en) | 2016-01-22 | 2016-03-25 | Transaction method and transaction system of electronic signature device |
CN201610178325.8A Pending CN105913256A (en) | 2016-01-22 | 2016-03-25 | Trade method and trade system of electronic signature device |
CN201610179102.3A Pending CN105931048A (en) | 2016-01-22 | 2016-03-25 | Electronic signature devices, and trading method and trading system thereof |
CN201610179104.2A Pending CN105931049A (en) | 2016-01-22 | 2016-03-25 | Electronic signature device, and trading method and trading system thereof |
Country Status (2)
Country | Link |
---|---|
CN (6) | CN113159763A (en) |
WO (1) | WO2017162164A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113159763A (en) * | 2016-01-22 | 2021-07-23 | 天地融科技股份有限公司 | Transaction method and transaction system of electronic signature device and electronic signature device |
CN106228349B (en) * | 2016-07-22 | 2021-01-15 | 天地融科技股份有限公司 | Transaction method of electronic signature device and electronic signature device |
CN107067241A (en) * | 2017-02-06 | 2017-08-18 | 吕文华 | A kind of runtime of binary system digital currency |
CN107665427A (en) | 2017-08-22 | 2018-02-06 | 阿里巴巴集团控股有限公司 | A kind of offline electronic payment, business processing, the method and device of payment processes |
CN111915431A (en) * | 2019-05-09 | 2020-11-10 | 天地融科技股份有限公司 | Off-line electronic money transaction method and system |
CN112184450B (en) * | 2020-10-13 | 2023-06-20 | 中国联合网络通信集团有限公司 | Transaction settlement method, transaction node, device and medium based on blockchain |
CN114612269B (en) * | 2022-05-11 | 2022-09-13 | 山东国盾网信息科技有限公司 | Electronic labor contract platform based on electronic signature technology |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1259215A (en) * | 1997-04-01 | 2000-07-05 | 卡迪斯企业国际公司 | Countable electronic monetary system and method |
CN1756150A (en) * | 2004-09-30 | 2006-04-05 | 飞力凯网路股份有限公司 | Information management apparatus, information management method, and program |
US20080040284A1 (en) * | 2004-09-07 | 2008-02-14 | Hazel Patrick K | Method and system for secured transactions |
CN101719251A (en) * | 2010-01-15 | 2010-06-02 | 陈发勇 | Internet electronic money system |
CN102468960A (en) * | 2010-11-16 | 2012-05-23 | 卓望数码技术(深圳)有限公司 | Off-line mode identity and transaction authentication method and terminal |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8285991B2 (en) * | 2000-10-25 | 2012-10-09 | Tecsec Inc. | Electronically signing a document |
EP1205889A1 (en) * | 2000-11-10 | 2002-05-15 | TELEFONAKTIEBOLAGET LM ERICSSON (publ) | Returning of change in an electronic payment system |
CN101051907B (en) * | 2007-05-14 | 2012-08-22 | 北京握奇数据***有限公司 | Safety certifying method and its system for facing signature data |
CN106355496A (en) * | 2008-11-21 | 2017-01-25 | 天地融科技股份有限公司 | Method, system and device for realizing batch electronic transactions as well as electronic signature tool |
CN101593338A (en) * | 2009-07-13 | 2009-12-02 | 招商银行股份有限公司 | A kind of method and system of handling electronic transaction request |
CN102694795B (en) * | 2012-05-06 | 2018-02-27 | 北京深思数盾科技股份有限公司 | A kind of method for using application service in off-line case |
CN102999570B (en) * | 2012-11-09 | 2016-06-08 | 北京深思数盾科技股份有限公司 | The Off-line control method of application program critical data and system in mobile equipment |
CN103413159B (en) * | 2013-08-15 | 2016-09-21 | 成都市易恒信科技有限公司 | A kind of RFID electronic certificate off-line false proof realization method and system of Jianzhen based on CPK |
CN103560886B (en) * | 2013-11-04 | 2016-08-17 | 北京旋极信息技术股份有限公司 | Authentication method for electronic signature equipment |
EP2924637A1 (en) * | 2014-03-24 | 2015-09-30 | The Roberto Giori Company Ltd. | System and method for electronic money transfer of fractional amounts |
CN113159763A (en) * | 2016-01-22 | 2021-07-23 | 天地融科技股份有限公司 | Transaction method and transaction system of electronic signature device and electronic signature device |
-
2016
- 2016-03-25 CN CN202110217406.5A patent/CN113159763A/en active Pending
- 2016-03-25 CN CN201610178324.3A patent/CN105913255A/en active Pending
- 2016-03-25 CN CN201610178067.3A patent/CN105956855B/en active Active
- 2016-03-25 CN CN201610178325.8A patent/CN105913256A/en active Pending
- 2016-03-25 CN CN201610179102.3A patent/CN105931048A/en active Pending
- 2016-03-25 CN CN201610179104.2A patent/CN105931049A/en active Pending
-
2017
- 2017-03-22 WO PCT/CN2017/077652 patent/WO2017162164A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1259215A (en) * | 1997-04-01 | 2000-07-05 | 卡迪斯企业国际公司 | Countable electronic monetary system and method |
US20080040284A1 (en) * | 2004-09-07 | 2008-02-14 | Hazel Patrick K | Method and system for secured transactions |
CN1756150A (en) * | 2004-09-30 | 2006-04-05 | 飞力凯网路股份有限公司 | Information management apparatus, information management method, and program |
CN101719251A (en) * | 2010-01-15 | 2010-06-02 | 陈发勇 | Internet electronic money system |
CN102468960A (en) * | 2010-11-16 | 2012-05-23 | 卓望数码技术(深圳)有限公司 | Off-line mode identity and transaction authentication method and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN105913255A (en) | 2016-08-31 |
WO2017162164A1 (en) | 2017-09-28 |
CN105931049A (en) | 2016-09-07 |
CN105913256A (en) | 2016-08-31 |
CN105931048A (en) | 2016-09-07 |
CN105956855B (en) | 2022-02-22 |
CN105956855A (en) | 2016-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105956855B (en) | Transaction method and transaction system of electronic signature device | |
US11687920B2 (en) | Facilitating a fund transfer between user accounts | |
CN109493016B (en) | Offline payment method, terminal and agent releasing equipment based on digital currency | |
US20210004454A1 (en) | Proof of affinity to a secure event for frictionless credential management | |
KR102293822B1 (en) | Cloud-based transactions methods and systems | |
CA3026191C (en) | Secure channel establishment | |
WO2020117559A1 (en) | Secured extended range application data exchange | |
CA2730175A1 (en) | Secure wireless deposit system and method | |
CN103731259A (en) | Method and system for safe downloading of TMK | |
KR20160119803A (en) | Authentication system and method | |
WO2014111888A1 (en) | Mobile payment system | |
CN103903129A (en) | Remitting system and remitting method realized based on text message mode | |
CN106022081B (en) | A kind of card reading method of identity card card-reading terminal, identity card card-reading terminal and system | |
FI108373B (en) | Procedures and systems for realizing a digital signature | |
CN106027457B (en) | A kind of ID card information transmission method and system | |
US20230103038A1 (en) | Method for directly transferring electronic coin data sets between terminals, payment system, currency system and monitoring unit | |
US20230259899A1 (en) | Method, participant unit, transaction register and payment system for managing transaction data sets | |
CN113874876A (en) | Security model for distributed computing systems | |
CN112288422A (en) | Digital currency transaction method and device | |
CN106228349B (en) | Transaction method of electronic signature device and electronic signature device | |
Kisore et al. | A secure SMS protocol for implementing digital cash system | |
US20230415595A1 (en) | System for authenticating a user at and reporting about use of a charging device | |
WO2020142994A1 (en) | Control method, ticketing rule server, ticket checking rule server and apparatus | |
KR20150145208A (en) | A mobile payment system and mobile payment method based on biometric authentication | |
KR20180089951A (en) | Method and system for processing transaction of electronic cash |
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 |