CN115422558A - Method, collection equipment and device for preventing double off-line transaction amount from being tampered - Google Patents

Method, collection equipment and device for preventing double off-line transaction amount from being tampered Download PDF

Info

Publication number
CN115422558A
CN115422558A CN202210815567.9A CN202210815567A CN115422558A CN 115422558 A CN115422558 A CN 115422558A CN 202210815567 A CN202210815567 A CN 202210815567A CN 115422558 A CN115422558 A CN 115422558A
Authority
CN
China
Prior art keywords
amount
collection
security chip
keyboard
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210815567.9A
Other languages
Chinese (zh)
Inventor
李娟�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing National Digital Financial Technology Testing Center Co ltd
Guangzhou Yuntong Shuda Technology Co ltd
Original Assignee
Guangzhou Yuntong Shuda Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Yuntong Shuda Technology Co ltd filed Critical Guangzhou Yuntong Shuda Technology Co ltd
Priority to CN202210815567.9A priority Critical patent/CN115422558A/en
Publication of CN115422558A publication Critical patent/CN115422558A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a method, a collection device and a device for preventing double off-line transaction amount from being tampered, which are used for preventing the transaction amount from being maliciously tampered, wherein the method comprises the steps that a collection party inputs the collection amount by using a keyboard of the collection device; the security chip of the collection device checks the collection amount, generates offline payment initialization information according to the collection amount after the check is passed, and sends the offline payment initialization information to the payment device; and the payment equipment receives the payment initialization information and executes the double off-line transaction. By adopting the technical scheme, when the transaction is carried out, the money receiving equipment can encrypt and check the input amount of money, so that the safety of the digital currency hard wallet is improved, the condition that the balance of a payer is deducted more is avoided, the experience of the user using the hardware wallet can be obviously improved, and the habit of the user using the hardware wallet to carry out digital RMB payment is developed.

Description

Method, collection equipment and device for preventing double off-line transaction amount from being tampered
Technical Field
The invention relates to the field of computer information processing, in particular to a digital currency payment method, device and system based on a hardware cloud wallet.
Background
Digital currency is currency that converts cash values into a series of electronically encrypted serial numbers, and the security of the currency itself relies on cryptographic algorithms to protect it. In the aspect of cryptographic algorithm, the security of the digital currency system relates to symmetric passwords, asymmetric passwords, a message digest algorithm and an identity-based cryptographic system, and the overall security of the cryptographic system, the selection of the cryptographic algorithm, the implementation of the cryptographic algorithm, the design of an interaction protocol, the compatibility of international and domestic standards and the like must be deeply considered in the aspect of system implementation to ensure the transaction security of the digital currency.
The digital national currency of digital form is also put forward by the Chinese people bank, is equivalent to paper money and coins, has value characteristics and legal compensation, supports controllable anonymity, and is gradually applied to various transaction scenes in life.
In the current practical application, the payee device inputs the amount of money to be collected through a keyboard, and then generates payment initialization data to the payer device, and the payer device pays money according to the payment initialization data. However, sometimes the payee device is invaded by malicious software and is maliciously tampered when inputting the amount of money to be collected, so that the balance of the payer is deducted more.
Disclosure of Invention
The invention aims to solve the problem that the transaction amount of the existing digital currency is possibly tampered by malicious software in the transaction process.
In order to solve the technical problem, a first aspect of the present invention provides a method for preventing a double offline transaction amount from being tampered, the method being used for an offline transaction of digital money, and the method including:
the payee uses the keyboard of the collection device to input the collection amount;
the security chip of the collection device checks the collection amount, generates offline payment initialization information according to the collection amount after the check is passed, and sends the offline payment initialization information to the payment device;
and the payment equipment receives the payment initialization information and executes the double off-line transaction.
According to a preferred embodiment of the invention, the keyboard and the security chip of the checkout device share a set of shared keys.
According to a preferred embodiment of the present invention, the verifying the collection amount by the security chip of the collection device further comprises:
the keyboard encrypts the collection amount by using the shared secret key to generate first encryption information;
sending the first encrypted information to a security chip of the money receiving device;
and the security chip of the money receiving equipment decrypts the first encrypted information by using the shared secret key to obtain the money receiving amount, and generates off-line payment initialization information by using the money receiving amount.
According to a preferred embodiment of the present invention, the keyboard of the payment receiving device generates a set of public key and private key, and sends the public key to the security chip of the payment receiving device.
According to a preferred embodiment of the present invention, the verifying the collection amount by the security chip of the collection device further comprises:
the keyboard uses the private key to sign the collection amount to obtain a digital signature, and second encryption information is generated;
sending the second encrypted information to a security chip of the money receiving device, wherein the second encrypted information comprises the money receiving amount and the digital signature;
and the security chip of the collection device verifies the digital signature in the second encrypted information by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
According to a preferred embodiment of the present invention, the keyboard and the security chip of the payment receiving device share a set of shared secret keys, and the keyboard of the payment receiving device generates a set of public key and private key, and sends the public key to the security chip of the payment receiving device.
According to a preferred embodiment of the present invention, the keyboard uses the private key to sign the amount of collection to obtain a digital signature, and uses the shared key to encrypt the amount of collection and the digital signature to generate third encrypted information;
sending the third encrypted information to a security chip of the money receiving device;
the security chip of the money receiving device decrypts the third encrypted information by using the shared secret key to obtain the money receiving amount and the digital signature;
and the safety chip of the collection device verifies the digital signature by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
A second aspect of the present invention provides a receiving apparatus for preventing a double offline transaction amount from being tampered, the receiving apparatus being used for an offline transaction of digital money, the receiving apparatus including:
the keyboard is connected with the security chip, stores a shared key shared with the security chip, encrypts the collection amount input by a collection user by using the shared key to generate first encryption information, and sends the first encryption information to the security chip;
and the security chip receives the first encrypted information, decrypts the first encrypted information by using the shared secret key, acquires the collection amount and generates payment initialization information according to the collection amount.
A third aspect of the present invention provides a receiving apparatus for preventing a double offline transaction amount from being tampered, the receiving apparatus being used for an offline transaction of digital money, the receiving apparatus comprising:
the keyboard is connected with the security chip, a private key is stored, a collection amount input by a user is signed by using the private key to obtain a digital signature, second encryption information is generated according to the collection amount and the digital signature, and the second encryption information is sent to the security chip;
and the security chip stores a public key which is generated by the keyboard and corresponds to the private key, verifies the digital signature in the second encrypted information by using the public key, and generates payment initialization information according to the collection amount after the verification is passed.
A fourth aspect of the present invention provides a cash registering device for preventing the amount of a double offline transaction from being tampered, wherein the cash registering device is used for an offline transaction with digital money, and the cash registering device comprises:
the keyboard is connected with the security chip, a private key and a shared key are stored, the private key is used for signing the collection amount input by a user to obtain a digital signature, the shared key is used for encrypting the collection amount and the digital signature to generate third encryption information, and the third encryption information is sent to the security chip;
and the security chip stores a public key and a shared key which are generated by the keyboard and correspond to the private key, decrypts the third encrypted information by using the shared key to obtain the collection amount and the digital signature, verifies the digital signature by using the public key, and generates payment initialization information according to the collection amount after the verification is passed.
A fifth aspect of the present invention provides an apparatus for preventing a double offline transaction amount from being tampered, the apparatus being used for an offline transaction of digital money, the apparatus comprising:
the input module is suitable for a payee to input a collection amount by using a keyboard of the collection device;
the verification module is suitable for verifying the collection amount by the security chip of the collection device, and after the verification is passed, the security chip of the collection device generates offline payment initialization information according to the collection amount and sends the offline payment initialization information to the payment device;
and the payment execution module is suitable for the payment equipment to receive the payment initialization information and execute the double off-line transaction.
By adopting the technical scheme, when the transaction is carried out, the money receiving equipment can encrypt and check the input amount of money, so that the safety of the digital currency hard wallet is improved, the condition that the balance of a payer is deducted more is avoided, the experience of the user using the hardware wallet can be obviously improved, and the habit of the user using the hardware wallet to carry out digital RMB payment is developed.
Drawings
In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects obtained more clear, the following will describe in detail the embodiments of the present invention with reference to the accompanying drawings. It should be noted, however, that the drawings described below are only illustrations of exemplary embodiments of the invention, from which other embodiments can be derived by those skilled in the art without inventive step.
FIG. 1 is a flow diagram illustrating a flow diagram of a transaction performed by a digital currency wallet in accordance with an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for preventing a double offline transaction amount from being tampered in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a cash register device for preventing double offline transaction amount from being tampered in the embodiment of the invention;
FIG. 4 is a schematic structural diagram of an apparatus for preventing a double offline transaction amount from being tampered in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a structural framework of a system for preventing double offline transaction amount from being tampered in the embodiment of the invention;
fig. 6 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention may be embodied in many specific forms, and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art.
The structures, properties, effects or other characteristics described in a certain embodiment may be combined in any suitable manner in one or more other embodiments, while still complying with the technical idea of the invention.
In describing particular embodiments, specific details of structures, properties, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by one skilled in the art. However, it is not excluded that a person skilled in the art may carry out the invention in a specific case in a solution that does not contain the above-mentioned structures, properties, effects or other features.
The flow chart in the drawings is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flow chart are necessarily included in the scheme of the invention, nor does it represent that the execution is necessarily performed in the order shown in the drawings. For example, some operations/steps in the flowcharts may be divided, some operations/steps may be combined or partially combined, and the like, and the execution order shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and/or processing unit devices and/or microcontroller devices.
The same reference numerals denote the same or similar elements, components, or parts throughout the drawings, and thus, a repetitive description thereof may be omitted hereinafter. It will also be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, or sections, these elements, components, or sections should not be limited by these terms. That is, these phrases are used only to distinguish one from another. For example, a first device may also be referred to as a second device without departing from the spirit of the present invention. Furthermore, the term "and/or", "and/or" is intended to include all combinations of any one or more of the listed items.
Fig. 1 is a flow diagram illustrating a flow of transactions performed by a digital currency wallet in accordance with an embodiment of the present invention. As shown in fig. 1, the digital money wallet can conduct transactions in a double offline state, as follows:
s101, transaction occurs;
s102, the payer sends the information of the party to the payee, wherein the information comprises a hardware ID, a secret key, a certificate and the like;
and S103, the payee carries out identity verification according to the received payer information, and if the identity verification is passed, S106 is executed, otherwise, S104 is executed.
And S104, failing to pass the authentication, abnormal wallet of the payer, terminating the transaction and feeding back information to the payer.
And S105, the payer receives the feedback information, and the transaction is terminated.
S106, the identity authentication is passed, the payee inputs the transaction amount, generates off-line payment initialization information according to the transaction amount, and sends the identity information of the party and the payment initialization information to the payer;
s107, the payer verifies the identity according to the received payee information, and if the identity passes the step S110, the payer executes the step S108;
s108, if the identity verification fails, the purse of the payee is abnormal, the transaction is terminated, and information is fed back to the payee;
s109, the payee receives the feedback information and terminates the transaction;
s110, after the identity authentication is passed, generating and sending an expenditure certificate according to the off-line payment initialization information;
s111, the payee verifies the payment certificate, if the payment certificate passes the verification, S114 is executed, and if the payment certificate does not pass the verification, S112 is executed;
s112, the payment certificate is not verified, the transaction is terminated, and information is fed back to the payer;
s113, the payer receives the feedback information, and the transaction is terminated;
s114, the payment certificate passes verification, the collection is completed, and a transaction receipt is sent to the payer;
s115, the payer receives the transaction receipt and completes payment.
Each digital currency wallet has a unique wallet ID, the wallet ID is unique, the wallet ID is a collection address in the transaction process and is equivalent to a bank card number of the current online transaction of a user, and a specific digital currency terminal can be accurately determined through the wallet ID.
The transaction elements include a wallet ID, a key, and a certificate associated with the digital currency wallet. The wallet ID is a transaction address, has uniqueness, and can accurately locate a terminal participating in a transaction. When the transaction is carried out, the legality and the safety of the transaction are verified through the key and the certificate, so that the transaction safety of both parties is guaranteed.
However, during the transaction, the amount of money input by the money receiving device may be distorted by malicious software to cause the balance of the payer to be deducted, so the application provides a method for preventing the amount of double offline transaction from being distorted, as shown in fig. 2, for the digital currency offline transaction, the method includes:
s201, the payee inputs the collection amount by using a keyboard of the collection device.
During the transaction, the payee enters the transaction amount on the keyboard of the checkout device. The keyboard may be a physical keyboard or a touch screen.
In this embodiment, in order to improve the security of the transaction, an authentication unit may be disposed on the keyboard for authenticating the identity of the user. The authentication unit includes password identification and/or biometric identification. The user can only input the transaction amount on the keyboard after the user passes the authentication.
S202, the security chip of the collection device verifies the collection amount, after verification is passed, the security chip of the collection device generates off-line payment initialization information according to the collection amount, and sends the off-line payment initialization information to payment equipment.
On the basis of the technical scheme, the keyboard and the security chip of the cash register device further share a group of shared keys.
On the basis of the above technical solution, further, the verifying the collection amount by the security chip of the collection device further includes:
the keyboard encrypts the collection amount by using the shared secret key to generate first encryption information;
sending the first encrypted information to a security chip of the money receiving device;
and the security chip of the money receiving equipment decrypts the first encrypted information by using the shared secret key to obtain the money receiving amount, and generates off-line payment initialization information by using the money receiving amount.
In this embodiment, a set of shared keys is stored in advance in the security chip of the payment receiving device and the keyboard of the payment receiving device, and after the transaction amount is input by the keyboard, the transaction amount is encrypted by using the shared keys to generate a ciphertext. And sending the ciphertext to the security chip, and decrypting the ciphertext by using the shared key by the security chip to obtain the plaintext of the transaction amount. And generating offline payment initialization information according to the plaintext of the transaction amount, and deducting the balance by the payer according to the offline payment initialization information.
In this embodiment, after the transaction amount is input by the keyboard, the transaction amount is not transmitted to the security chip in a plaintext manner, but encrypted by the shared key and transmitted in a ciphertext manner. Even if malicious software exists, because the shared secret key is not available, the ciphertext cannot be cracked or forged, and therefore the safety of the transaction amount is guaranteed.
In other embodiments, the secure chip and the keyboard of the checkout device may store a matrix of shared keys, each set of shared keys being provided with a corresponding key ID. Every time the transaction amount is input, the keyboard can randomly select a group of shared keys from the shared key matrix to encrypt the transaction amount, a key ID for encryption and a ciphertext of the encrypted transaction amount are sent to the security chip, and the security chip selects a corresponding shared key according to the key ID to decrypt the transaction amount.
On the basis of the technical scheme, further, the keyboard of the money receiving device generates a group of public keys and private keys, and the public keys are sent to the security chip of the money receiving device.
On the basis of the above technical solution, further, the verifying the collection amount by the security chip of the collection device further includes:
the keyboard uses the private key to sign the collection amount to obtain a digital signature, and second encryption information is generated;
sending the second encrypted information to a security chip of the collection device, wherein the second encrypted information comprises the collection amount and the digital signature;
and the security chip of the collection device verifies the digital signature in the second encrypted information by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
In this embodiment, the keyboard of the cash register device generates a set of public key and private key, and sends the public key to the security chip. After the user inputs the transaction amount through the keyboard of the money receiving device, the keyboard can use the private key to carry out digital signature on the transaction amount, and the transaction amount and the digital signature are sent to the security chip together. The security chip verifies the digital signature information by using a public key sent by the keyboard, if the verification is passed, the transaction amount is not forged and is a real and effective transaction amount input by a user, and offline payment initialization information is generated by using the transaction amount; otherwise, the transaction amount is false, and the transaction is stopped.
In this embodiment, the public key and the private key are generated by the keyboard and sent to the security chip before the transaction is performed. Since the public key is used for verification and cannot be signed, even if the malicious software acquires the public key, the transaction amount cannot be forged and signed. To promote security, the keyboard may generate the public and private keys periodically, such as once per day, once every 4 hours, and so on. The key generation unit can be arranged on a keyboard, and when a new public key and a new private key need to be generated, the key generation unit is triggered to generate the new public key and the new private key.
On the basis of the technical scheme, further, the keyboard and the security chip of the money receiving device share a group of shared keys, and meanwhile, the keyboard of the money receiving device generates a group of public keys and private keys and sends the public keys to the security chip of the money receiving device.
On the basis of the technical scheme, further, the keyboard signs the collection amount by using the private key to obtain a digital signature, and encrypts the collection amount and the digital signature by using the shared key to generate third encrypted information;
sending the third encrypted information to a security chip of the money receiving device;
the security chip of the money receiving device decrypts the third encrypted information by using the shared secret key to obtain the money receiving amount and the digital signature;
and the safety chip of the collection device verifies the digital signature by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
In this embodiment, a set of public keys is pre-stored in the keyboard and the security chip of the cash register, and the keyboard generates a set of public keys and private keys and sends the public keys to the security chip. After the user inputs the transaction amount through the keyboard, the digital signature is firstly carried out through the private key. And then encrypting the digital signature and the transaction amount by using the shared secret key to generate a ciphertext containing the digital signature and the transaction amount, and sending the ciphertext to the security chip. The security chip firstly uses the corresponding shared secret key to decrypt, obtains the transaction amount and the digital signature, then uses the public key corresponding to the private key to verify, judges whether the transaction amount is real, and generates the off-line payment initialization information according to the transaction amount after the transaction amount is passed.
In the embodiment, the second encryption is used, the first encryption is firstly carried out by using the private key for digital signature, and the second encryption is carried out by using the shared key for encryption, so that the safety of the transaction amount is protected to the maximum extent.
In other embodiments, the secure chip and keyboard of the checkout device may store a matrix of shared keys, each set of shared keys being provided with a corresponding key ID. Every time the transaction amount is input, the keyboard can randomly select a group of shared keys from the shared key matrix for encryption, corresponding key IDs are sent when the shared keys are sent, and the corresponding shared keys are selected by the security chip according to the corresponding key IDs.
In other embodiments, the keyboard may generate the public and private keys periodically, such as once per day, once every 4 hours, and so on. The key generation unit can be arranged on a keyboard, and when a new public key and a new private key need to be generated, the key generation unit is triggered to generate the new public key and the new private key.
By encrypting and/or digitally preceding the transaction amount input by the user, the condition that the transaction amount is tampered by malicious software is avoided, and the use experience and the safety of the user are improved.
S203, the payment device receives the payment initialization information and executes the double off-line transaction.
Because the transaction amount cannot be maliciously tampered, the money receiving equipment can operate as usual according to a normal flow after receiving the off-line payment initialization information, and the safety of the transaction of both parties is guaranteed.
Fig. 3 is a schematic structural diagram of a money receiving device for preventing a double offline transaction amount from being tampered in the embodiment of the present invention, as shown in fig. 3:
in one embodiment, the checkout device 300 includes,
the keyboard 301 is connected with the security chip 302, stores a shared key shared with the security chip 302, encrypts a collection amount input by a collection user by using the shared key to generate first encryption information, and sends the first encryption information to the security chip 302;
and the security chip 302 is configured to receive the first encrypted information, decrypt the first encrypted information using the shared key, obtain the collection amount, and generate payment initialization information according to the collection amount.
In another embodiment, the checkout device 300 includes,
the keyboard 301 is connected with the security chip 302, stores a private key, signs the collection amount input by the user by using the private key to obtain a digital signature, generates second encryption information according to the collection amount and the digital signature, and sends the second encryption information to the security chip 302;
and the security chip 302 stores a public key corresponding to the private key generated by the keyboard 301, verifies the digital signature in the second encrypted information by using the public key, and generates payment initialization information according to the amount of money collected after verification is passed.
In another embodiment, the checkout device 300 includes,
the keyboard 301 is connected with the security chip 302, stores a private key and a shared key, signs a collection amount input by a user by using the private key to obtain a digital signature, encrypts the collection amount and the digital signature by using the shared key to generate third encrypted information, and sends the third encrypted information to the security chip 302;
the secure chip 302 stores a public key and a shared key corresponding to the private key, which are generated by the keyboard 301, decrypts the third encrypted information by using the shared key to obtain the collection amount and the digital signature, verifies the digital signature by using the public key, and generates payment initialization information according to the collection amount after the verification is passed.
Fig. 4 is a schematic structural diagram of an apparatus for preventing a double offline transaction amount from being tampered in an embodiment of the present invention, and as shown in fig. 4, the present invention provides an apparatus 400 for preventing a double offline transaction amount from being tampered, where the apparatus 400 is used for digital currency offline transactions, and includes:
the input module 401 is adapted to input the amount of money to be collected by the payee using the keyboard of the collection device.
During the transaction, the payee enters the transaction amount on the keyboard of the checkout device. The keyboard may be a physical keyboard or a touch screen.
In this embodiment, in order to improve the security of the transaction, an authentication unit may be disposed on the keyboard for authenticating the identity of the user. The authentication unit includes password identification and/or biometric identification. The user can only input the transaction amount on the keyboard after the user passes the authentication.
The verification module 402 is adapted to verify the collection amount by the security chip of the collection device, generate offline payment initialization information according to the collection amount after verification is passed, and send the offline payment initialization information to a payment device.
On the basis of the technical scheme, the keyboard and the security chip of the money receiving device further share a group of shared keys.
On the basis of the above technical solution, further, the verifying the collection amount by the security chip of the collection device further includes:
the keyboard encrypts the collection amount by using the shared secret key to generate first encryption information;
sending the first encrypted information to a security chip of the money receiving device;
and the security chip of the money receiving equipment decrypts the first encrypted information by using the shared secret key to obtain the money receiving amount, and generates off-line payment initialization information by using the money receiving amount.
In this embodiment, a set of shared keys is stored in advance in the security chip of the payment receiving device and the keyboard of the payment receiving device, and after the transaction amount is input by the keyboard, the transaction amount is encrypted by using the shared keys to generate a ciphertext. And sending the ciphertext to the security chip, and decrypting the ciphertext by using the shared key by the security chip to obtain the plaintext of the transaction amount. And generating offline payment initialization information according to the plaintext of the transaction amount, and deducting the balance by the payer according to the offline payment initialization information.
In this embodiment, after the transaction amount is input by the keyboard, the transaction amount is not transmitted to the security chip in a plaintext manner, but encrypted by the shared key and transmitted in a ciphertext manner. Even if malicious software exists, because the shared secret key is not available, the ciphertext cannot be cracked or forged, and therefore the safety of the transaction amount is guaranteed.
In other embodiments, the secure chip and keyboard of the checkout device may store a matrix of shared keys, each set of shared keys being provided with a corresponding key ID. Every time the transaction amount is input, the keyboard can randomly select a group of shared keys from the shared key matrix to encrypt the transaction amount, a key ID for encryption and a ciphertext of the encrypted transaction amount are sent to the security chip, and the security chip selects a corresponding shared key according to the key ID to decrypt the transaction amount.
On the basis of the technical scheme, further, a keyboard of the money receiving device generates a group of public keys and private keys, and the public keys are sent to a security chip of the money receiving device.
On the basis of the above technical solution, further, the verifying the collection amount by the security chip of the collection device further includes:
the keyboard signs the collection amount by using the private key to obtain a digital signature and generates second encryption information;
sending the second encrypted information to a security chip of the money receiving device, wherein the second encrypted information comprises the money receiving amount and the digital signature;
and the security chip of the collection device verifies the digital signature in the second encrypted information by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
In this embodiment, the keyboard of the cash register device generates a set of public key and private key, and sends the public key to the security chip. After the user inputs the transaction amount through the keyboard of the money receiving device, the keyboard can use the private key to carry out digital signature on the transaction amount, and the transaction amount and the digital signature are sent to the security chip together. The security chip verifies the digital signature information by using a public key sent by a keyboard, if the verification is passed, the transaction amount is not forged and is a real and effective transaction amount input by a user, and offline payment initialization information is generated by using the transaction amount; otherwise, the transaction amount is forged, and the transaction is stopped.
In this embodiment, the public key and private key are generated by the keyboard and sent to the security chip prior to the transaction. Since the public key is used for verification and cannot be signed, even if the malicious software acquires the public key, the transaction amount cannot be forged and signed. To promote security, the keyboard may generate the public and private keys periodically, such as once per day, once every 4 hours, and so on. The key generation unit can be arranged on a keyboard, and when a new public key and a new private key need to be generated, the key generation unit is triggered to generate the new public key and the new private key.
On the basis of the technical scheme, further, the keyboard and the security chip of the money receiving device share a group of shared keys, and meanwhile, the keyboard of the money receiving device generates a group of public keys and private keys and sends the public keys to the security chip of the money receiving device.
On the basis of the technical scheme, further, the keyboard signs the collection amount by using the private key to obtain a digital signature, and encrypts the collection amount and the digital signature by using the shared key to generate third encrypted information;
sending the third encrypted information to a security chip of the money receiving device;
the security chip of the money receiving device decrypts the third encrypted information by using the shared secret key to obtain the money receiving amount and the digital signature;
and the safety chip of the collection device verifies the digital signature by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
In this embodiment, a set of public keys is pre-stored in the keyboard and the security chip of the cash register, and the keyboard generates a set of public keys and private keys and sends the public keys to the security chip. After the user inputs the transaction amount through the keyboard, the digital signature is firstly carried out through the private key. And then encrypting the digital signature and the transaction amount by using the shared secret key to generate a ciphertext containing the digital signature and the transaction amount, and sending the ciphertext to the security chip. The security chip firstly uses the corresponding shared secret key to decrypt, obtains the transaction amount and the digital signature, then uses the public key corresponding to the private key to verify, judges whether the transaction amount is real or not, and generates the off-line payment initialization information according to the transaction amount after the transaction amount is passed.
In the embodiment, the second encryption is used, the first encryption is firstly carried out by using the private key for digital signature, and the second encryption is carried out by using the shared key for encryption, so that the safety of the transaction amount is protected to the maximum extent.
In other embodiments, the secure chip and the keyboard of the checkout device may store a matrix of shared keys, each set of shared keys being provided with a corresponding key ID. Every time the transaction amount is input, the keyboard can randomly select a group of shared keys from the shared key matrix for encryption, corresponding key IDs are sent when the shared keys are sent, and the corresponding shared keys are selected by the security chip according to the corresponding key IDs.
In other embodiments, the keyboard may generate the public and private keys periodically, such as once per day, once every 4 hours, and so forth. The key generation unit can be arranged on a keyboard, and when a new public key and a new private key need to be generated, the key generation unit is triggered to generate the new public key and the new private key.
By encrypting and/or digitally preceding the transaction amount input by the user, the condition that the transaction amount is tampered by malicious software is avoided, and the use experience and the safety of the user are improved.
A payment executing module 403, adapted to receive the payment initialization information by the payment device, and execute a dual offline transaction.
Because the transaction amount cannot be maliciously tampered, the money receiving equipment can operate as usual according to a normal flow after receiving the off-line payment initialization information, and the safety of the transaction of both parties is guaranteed.
As shown in fig. 5, a system for preventing a double offline transaction amount from being tampered is further disclosed in an embodiment of the present invention, and the system for preventing a double offline transaction amount from being tampered shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
The system 500 for preventing a double offline transaction amount from being tampered includes a storage unit 520 for storing a computer executable program; a processing unit 510 for reading the computer executable program in the storage unit to perform the steps of various embodiments of the present invention.
The system 500 for preventing the double offline transaction amount from being tampered in this embodiment further includes a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), a display unit 540, and the like.
The storage unit 520 stores a computer readable program, which may be a code of a source program or a read-only program. The program may be executed by the processing unit 510 such that the processing unit 510 performs the steps of various embodiments of the present invention. For example, the processing unit 510 may perform the steps as shown in fig. 2.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM) 5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203. The memory unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The system 500 for preventing tampering with dual offline transaction amounts may also communicate with one or more external devices 570 (e.g., keyboard, display, network device, bluetooth device, etc.) such that a user can interact with the processing unit 510 via input/output (I/O) interface 550 via these external devices 570, and may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via network adapter 560. Network adapter 560 may communicate over bus 530 with other modules of system 500 that prevent tampering with the dual offline transaction amount. It should be appreciated that, although not shown in the figures, other hardware and/or software modules may be used in the system 500 to prevent tampering with the dual offline transaction amount, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
FIG. 6 is a schematic diagram of one computer-readable medium embodiment of the present invention. As shown in fig. 6, the computer program may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory unit (RAM), a read-only memory unit (ROM), an erasable programmable read-only memory unit (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory unit (CD-ROM), an optical storage unit, a magnetic storage unit, or any suitable combination of the foregoing. The computer program, when executed by one or more data processing devices, enables the computer-readable medium to implement the above-described method of the invention, namely:
s201, a payee inputs a collection amount by using a keyboard of collection equipment;
s202, the security chip of the collection device verifies the collection amount, generates offline payment initialization information according to the collection amount after verification is passed, and sends the offline payment initialization information to payment equipment;
s203, the payment device receives the payment initialization information and executes the double off-line transaction.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a data processing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the present invention can be implemented as a method, an apparatus, an electronic device, or a computer-readable medium executing a computer program. Some or all of the functions of the present invention may be implemented in practice using general purpose data processing equipment such as a micro-processing unit or a digital signal processing unit (DSP).
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The present invention is not limited to the above embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method of preventing tampering with a dual offline transaction amount for a digital currency offline transaction, the method comprising:
the payee uses the keyboard of the collection device to input the collection amount;
the security chip of the collection device checks the collection amount, generates offline payment initialization information according to the collection amount after the check is passed, and sends the offline payment initialization information to the payment device;
and the payment equipment receives the payment initialization information and executes the double off-line transaction.
2. The method of preventing tampering with an amount for a dual offline transaction of claim 1, wherein a keyboard and a secure chip of said payee device share a set of shared keys.
3. The method of preventing tampering with a dual offline transaction amount of claim 2, wherein the verifying the collect amount by the security chip of the collection device further comprises:
the keyboard encrypts the collection amount by using the shared secret key to generate first encryption information;
sending the first encrypted information to a security chip of the money receiving device;
and the security chip of the collection device decrypts the first encrypted information by using the shared secret key to obtain the collection amount, and generates offline payment initialization information by using the collection amount.
4. A method of preventing tampering with an amount of a dual offline transaction as recited in claim 1, wherein a keyboard of said checkout device generates a set of a public key and a private key, said public key being sent to a security chip of said checkout device.
5. The method of preventing tampering with a dual offline transaction amount of claim 4, wherein the verifying the collect amount by the security chip of the collection device further comprises:
the keyboard uses the private key to sign the amount of collection to obtain a digital signature, generating second encryption information;
sending the second encrypted information to a security chip of the money receiving device, wherein the second encrypted information comprises the money receiving amount and the digital signature;
and the security chip of the collection device verifies the digital signature in the second encrypted information by using the public key, and generates off-line payment initialization information by using the collection amount after the verification is passed.
6. The method of claim 1, wherein a keyboard and a security chip of the checkout device share a set of shared keys, and wherein the keyboard of the checkout device generates a set of public and private keys, and sends the public key to the security chip of the checkout device.
7. The method of preventing tampering with a dual offline transaction amount of claim 6,
the keyboard signs the collection amount by using the private key to obtain a digital signature, and encrypts the collection amount and the digital signature by using the shared key to generate third encrypted information;
sending the third encrypted information to a security chip of the money receiving device;
the security chip of the collection device decrypts the third encrypted information by using the shared secret key to obtain the collection amount and the digital signature;
and the security chip of the collection device verifies the digital signature by using the public key, and generates offline payment initialization information by using the collection amount after the verification is passed.
8. A checkout device for preventing tampering with a dual offline transaction amount for a digital currency offline transaction, the checkout device comprising:
the keyboard is connected with the security chip, stores a shared key shared with the security chip, encrypts the collection amount input by a collection user by using the shared key to generate first encryption information, and sends the first encryption information to the security chip;
and the security chip is used for receiving the first encrypted information, decrypting the first encrypted information by using the shared secret key, acquiring the collection amount and generating payment initialization information according to the collection amount.
9. A checkout device for preventing tampering with a dual offline transaction amount for a digital currency offline transaction, the checkout device comprising:
the keyboard is connected with the security chip, a private key is stored, a collection amount input by a user is signed by using the private key to obtain a digital signature, second encryption information is generated according to the collection amount and the digital signature, and the second encryption information is sent to the security chip;
and the security chip stores a public key which is generated by the keyboard and corresponds to the private key, verifies the digital signature in the second encrypted information by using the public key, and generates payment initialization information according to the amount of money collected after verification is passed.
10. A checkout device for preventing tampering with a dual offline transaction amount for a digital currency offline transaction, the checkout device comprising:
the keyboard is connected with the security chip, a private key and a shared key are stored, the private key is used for signing the collection amount input by a user to obtain a digital signature, the shared key is used for encrypting the collection amount and the digital signature to generate third encryption information, and the third encryption information is sent to the security chip;
and the security chip stores a public key and a shared key which are generated by the keyboard and correspond to the private key, decrypts the third encrypted information by using the shared key to obtain the collection amount and the digital signature, verifies the digital signature by using the public key, and generates payment initialization information according to the collection amount after the verification is passed.
11. An apparatus for preventing tampering with a dual offline transaction amount for a digital currency offline transaction, the apparatus comprising:
the input module is suitable for a payee to input a collection amount by using a keyboard of the collection device;
the verification module is suitable for verifying the collection amount by the security chip of the collection device, and after the verification is passed, the security chip of the collection device generates offline payment initialization information according to the collection amount and sends the offline payment initialization information to the payment device;
and the payment execution module is suitable for the payment equipment to receive the payment initialization information and execute the double off-line transaction.
CN202210815567.9A 2022-07-11 2022-07-11 Method, collection equipment and device for preventing double off-line transaction amount from being tampered Pending CN115422558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210815567.9A CN115422558A (en) 2022-07-11 2022-07-11 Method, collection equipment and device for preventing double off-line transaction amount from being tampered

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210815567.9A CN115422558A (en) 2022-07-11 2022-07-11 Method, collection equipment and device for preventing double off-line transaction amount from being tampered

Publications (1)

Publication Number Publication Date
CN115422558A true CN115422558A (en) 2022-12-02

Family

ID=84196799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210815567.9A Pending CN115422558A (en) 2022-07-11 2022-07-11 Method, collection equipment and device for preventing double off-line transaction amount from being tampered

Country Status (1)

Country Link
CN (1) CN115422558A (en)

Similar Documents

Publication Publication Date Title
CN103716322B (en) Secret key download method, management method, download management method, secret key download device, secret key management device and secret key download management system
CN103714639B (en) A kind of method and system that realize the operation of POS terminal security
CA2545015C (en) Portable security transaction protocol
US7526652B2 (en) Secure PIN management
US20100153273A1 (en) Systems for performing transactions at a point-of-sale terminal using mutating identifiers
US8251286B2 (en) System and method for conducting secure PIN debit transactions
US20060123465A1 (en) Method and system of authentication on an open network
CN103942896B (en) System for realizing cardless withdrawal on ATM
KR102277060B1 (en) System and method for encryption
CN110290102A (en) Service security system and method based on application
EP2143028A2 (en) Secure pin management
KR20100016579A (en) System and method for distribution of credentials
CN105162607A (en) Authentication method and system of payment bill voucher
WO2007019368A2 (en) Secure online financial transactions
CN103095456A (en) Method and system for processing transaction messages
CN101739624A (en) Trusted payment network system
WO2015065249A1 (en) Method and system for protecting information against unauthorized use (variants)
CN110770774A (en) Authentication and encryption scheme in data storage
US20120095919A1 (en) Systems and methods for authenticating aspects of an online transaction using a secure peripheral device having a message display and/or user input
CN103326862A (en) Electronically signing method and system
US20170154329A1 (en) Secure transaction system and virtual wallet
CN112019326A (en) Vehicle charging safety management method and system
CN110601836B (en) Key acquisition method, device, server and medium
JP5489913B2 (en) Portable information device and encrypted communication program
JP2902087B2 (en) Electronic signature method using IC card

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240320

Address after: Building 3, No.1 Courtyard, Dongguantou, Fengtai District, Beijing, 100073, 2021-88

Applicant after: Beijing National Digital Financial Technology Testing Center Co.,Ltd.

Country or region after: Zhong Guo

Applicant after: Guangzhou Yuntong Shuda Technology Co.,Ltd.

Address before: 1st floor, Gongxin Zhichuang building, No. 10, Bowang Park, Haidian District, Beijing 100038

Applicant before: Guangzhou Yuntong Shuda Technology Co.,Ltd.

Country or region before: Zhong Guo