A digital currency trading method and trading system

By presetting the same user gene password generation rules and encryption and decryption algorithms in mobile terminals and hardware wallets, and using QR codes to encrypt and decrypt operations, the risk of forgery APPs and man-in-the-middle attacks in hardware wallets is solved, and the risk of forgery APPs and man-in-the-middle attacks in hardware wallets is realized. The security and reliability of digital currency transactions.

CN114429344BActive Publication Date: 2025-02-11HUAZHONG UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111482948.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-02-11
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

There is a risk of forging APPs and man-in-the-middle attacks during the transaction process, resulting in loss of users' property.

Method used

The mobile terminal's real wallet APP and hardware wallet are preset with the same user gene password generation rules, encryption and decryption algorithms, and the QR code is used to perform encryption and decryption operations to ensure the authenticity of the user and the hardware wallet, thereby avoiding man-in-the-middle attacks.

Benefits of technology

It effectively prevents forged APPs and man-in-the-middle attacks, ensures the security and reliability of digital currency transactions, and protects users' property.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114429344B_ABST
    Figure CN114429344B_ABST
Patent Text Reader

Abstract

The present invention proposes a digital currency transaction method and transaction system, the transaction method includes: the real wallet APP of the mobile terminal obtains the current user information, and generates the user genetic password to be matched according to the preset first rule, if the generated user genetic password to be matched is consistent with the original user genetic password pre-saved in the real wallet APP, the user is judged to be a real user; the real wallet APP receives the second character string set by the real user, encrypts the second character string using the pre-saved original user genetic password and generates a third two-dimensional code; the hardware wallet to be used obtains and identifies the third two-dimensional code, decrypts the third two-dimensional code, outputs the first decryption result to judge the authenticity of the hardware wallet to be used, the first decryption result is the second character string or the decryption fails. The present invention ensures that the user and the hardware wallet are both true through the operation of encrypting and decrypting the two-dimensional code to avoid middleman attacks and other behaviors, and the entire digital currency transaction process is safe and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital currency, and in particular to a digital currency transaction method and transaction system. Background Art

[0002] Digital currency has been very popular since its emergence. It can be considered as a virtual currency based on node network and digital encryption algorithm. The core characteristics of digital currency are mainly reflected in three aspects: 1. Since it comes from some open algorithms, digital currency has no issuing entity, so no person or organization can control its issuance; 2. Since the number of algorithm solutions is determined, the total amount of digital currency is fixed, which fundamentally eliminates the possibility of inflation caused by the excessive issuance of virtual currency; 3. Since the transaction process requires the approval of each node in the network, the transaction process of digital currency is safe enough. In short, digital currency is a currency based on blockchain technology, decentralized and with a relatively safe transaction process.

[0003] Common digital currencies include Bitcoin, Litecoin, etc. If there is a currency, there must be a corresponding currency wallet. The digital currency wallet is a tool for keeping these digital currencies and responsible for their transfer, so its importance is self-evident. The principle of digital currency can be simply understood as follows: first create a digital wallet account (generally using a mobile phone APP). Because of its decentralized characteristics, it does not require too much personal information. After the wallet is generated, it will randomly generate a set of digital strings, that is, the private key. The private key generates the public key through a series of algorithms, and the public key generates the address. The so-called address can be likened to a bank card account, the public key is the username, and the private key is the password. The private key is the most important part of the digital currency wallet. Even the essence of the digital currency wallet is to store the private key. As long as the private key is not lost, the wallet can be restored.

[0004] However, since private keys are not easy to remember, general digital currency wallets will derive a unique mnemonic string from private keys based on a hash algorithm. As long as you remember the mnemonic string, you will remember the private key. Generally speaking, a safer approach is to store the mnemonic string offline on an item that is not easy to lose. Because if you save it online, or take a screenshot and save it on your phone, it is easy to be attacked by an attacker. Once he obtains your private key, he will have control of all the property in your wallet.

[0005] Hardware wallets came into being in this situation. Hardware wallets store digital asset private keys in a separate chip, which is isolated from the Internet and plug-and-play. When you need to transfer money, use the wallet APP that comes with the hardware wallet to connect to the hardware wallet via Bluetooth. All transfers that need to be made must be confirmed on the hardware wallet, which is the so-called private key digital signature, to confirm that the operation is performed by the operator himself. Summary of the invention

[0006] The inventor found that the private key of the hardware wallet is theoretically absolutely safe, but in reality there are still some flaws that will attract attackers and ultimately cause financial losses to users. The main attacks include:

[0007] 1. Forged wallet APP. The attacker uses some special means to make the user download the wrong wallet APP. Once the user downloads this type of wallet APP, all the user's information and data will be exposed to the attacker.

[0008] 2. Man-in-the-middle attack. The so-called man-in-the-middle attack on hardware wallets means that the attacker buys the wallet as the first buyer, then replaces the initial private key of the wallet through some special means, and then sells the so-called "unopened" wallet at a low price. In this case, the second buyer is basically bound to lose his digital property.

[0009] In view of the above problems, it is necessary to propose a digital currency transaction method and transaction system to solve or partially solve the above problems. The technical solutions proposed by the present invention are as follows:

[0010] The present invention proposes a digital currency transaction method, comprising the following steps:

[0011] The real wallet APP of the mobile terminal obtains the current user information and generates a genetic password of the user to be matched according to the preset first rule. If the generated genetic password of the user to be matched is consistent with the original genetic password of the user pre-stored in the real wallet APP, the user is judged to be a real user; otherwise, it is judged to be a fake user;

[0012] The real wallet APP receives the second character string set by the real user, encrypts the second character string using the pre-saved original user genetic password and generates a third QR code;

[0013] The hardware wallet to be used obtains and identifies the third QR code, decrypts the third QR code, and outputs a first decryption result to determine the authenticity of the hardware wallet to be used, wherein the first decryption result is the second character string or the decryption fails.

[0014] Furthermore, before the real wallet APP of the mobile terminal obtains the current user information, the digital currency transaction method further includes the following steps:

[0015] The mobile terminal obtains the first QR code at the preset location, parses the first QR code to obtain the download address of the wallet APP to be used, and completes the download and installation of the wallet APP to be used;

[0016] The real hardware wallet obtains the original user information and generates the original user genetic password according to the preset first rule, and also encrypts the user genetic password using the preset first character string and generates a second QR code;

[0017] The wallet APP to be used obtains the original user information, obtains and identifies the second QR code, decrypts the second QR code, and outputs a second decryption result to determine the authenticity of the wallet APP to be used. The second decryption result is a preset first character string or a decryption failure.

[0018] Furthermore, the hardware wallet to be used obtains and identifies the third QR code, decrypts the third QR code, and outputs a first decryption result to determine the authenticity of the hardware wallet to be used. When the hardware wallet to be used is a genuine hardware wallet, the following steps are also included:

[0019] The real hardware wallet is connected to the real wallet APP;

[0020] The real hardware wallet accepts the payment information sent by the real wallet APP and accepts the payment confirmation information entered by the user.

[0021] Furthermore, after the real wallet APP receives the second character string set by the real user, it first uses the pre-saved original user genetic password to encrypt the second character string to generate a first ciphertext, then uses the preset part of the preset first character string to encrypt the first ciphertext to generate a second ciphertext, and generates a third QR code from the second ciphertext.

[0022] Furthermore, the real wallet APP of the mobile terminal obtains the current user information and generates the genetic password of the user to be matched according to the preset first rule, specifically including:

[0023] The real wallet APP of the mobile terminal obtains one of the user's facial information, fingerprint information, iris information or voiceprint information, inputs the user information into a preset neural network model, and uses the user feature value output by the neural network model as the user's genetic password.

[0024] Furthermore, the preset neural network is an improved twin neural network, and the improved twin neural network includes a user information input layer, a neural network training layer, an output vector set layer, and a Gaussian distribution fitting layer, wherein the user information input layer includes two inputs, the neural network training layer includes two training networks, the output vector set layer includes two output vector sets, and the Gaussian distribution fitting layer includes two Gaussian distribution fitting processors. The loss function of the improved twin neural network is:

[0025]

[0026] Where D = |m1-m2|+|v1-v2|, t is the label of whether the two input samples of the user information input layer match, t = 1 means that the two samples are similar or matched, t = 0 means they do not match, ε is the set threshold, N is the number of samples in each channel, m1 and v1 are the mean and variance output by a Gaussian distribution fitting processor, and m2 and v2 are the mean and variance output by another Gaussian distribution fitting processor.

[0027] Furthermore, the following steps are included: after the real hardware wallet is connected to the real wallet APP, the real hardware wallet deletes the generated second QR code, and the real wallet APP deletes the generated third QR code.

[0028] On the other hand, the present invention also discloses a digital currency transaction system, including a mobile terminal and a hardware wallet, characterized in that:

[0029] A mobile terminal is used to obtain current user information using the real wallet APP after installing the real wallet APP, and generate a to-be-matched user genetic password according to a preset first rule. If the generated to-be-matched user genetic password is consistent with the original user genetic password pre-stored in the wallet APP, the user is judged to be a real user; otherwise, it is judged to be a fake user; when the user is judged to be a real user, the real wallet APP of the mobile terminal is also used to receive a second character string set by the real user, encrypt the second character string using the stored original user genetic password and generate a third QR code for;

[0030] The hardware wallet is used to obtain and identify the third QR code, decrypt the third QR code, and output a second character string to prove that it is a genuine hardware wallet.

[0031] Based on the above technical solution, the beneficial effects of the present invention compared with the prior art are as follows:

[0032] The real wallet APP of the mobile terminal obtains the current user information, and generates the genetic password of the user to be matched according to the preset first rule. If the generated genetic password of the user to be matched is consistent with the original user genetic password pre-stored in the real wallet APP, the user is judged to be a real user. On the premise of ensuring that the user is a real user, the real wallet APP receives the second string set by the real user, encrypts the second string using the pre-stored original user genetic password and generates a third QR code; the hardware wallet to be used obtains and identifies the third QR code, and decrypts the third QR code. When the first decryption result is the second string, it is determined that the hardware wallet to be used and the real wallet APP have the same first rule for generating the original user genetic password, the same encryption and decryption algorithm, and user information, and the hardware wallet to be used is a real hardware wallet.

[0033] The present invention is based on the idea that the real wallet APP and the real hardware wallet are preset with the same first rule for generating the original user's genetic password, the same encryption and decryption algorithm, and the unique user information of the real user. Through the operation of encrypting and decrypting the QR code, it is ensured that the user and the hardware wallet are both real. Since the user information of the real user is unique, the real wallet APP of the present invention is only available to one person, and multiple people are not allowed to use it, which can avoid man-in-the-middle attacks. Since the hardware wallet is also real, the entire digital currency transaction process can be guaranteed to be safe and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a flow chart of a digital currency transaction method in Embodiment 1 of the present invention;

[0035] Figure 2 It is a structural schematic diagram of an improved twin neural network model in the first embodiment of the present invention;

[0036] Figure 3 This is a flow chart of a digital currency transaction method in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0038] Embodiment 1

[0039] like Figure 1 As shown, a digital currency transaction method comprises the following steps:

[0040] S101, the real wallet APP of the mobile terminal obtains the current user information, and generates a genetic password of the user to be matched according to a preset first rule. If the generated genetic password of the user to be matched is consistent with the original user genetic password pre-saved in the real wallet APP, the user is judged to be a real user; otherwise, it is judged to be a fake user.

[0041] In order to prevent middleman attacks, the real wallet APP of the present invention is only available to one person and is not allowed to be used by multiple people. Therefore, each real wallet APP only stores the original user's genetic password. The real wallet APP obtains the current user information and generates the user's genetic password to be matched according to the preset first rule. If the generated user's genetic password to be matched is consistent with the original user's genetic password pre-stored in the real wallet APP, the user is judged to be a real user (i.e., the original user) and can continue to use the real wallet APP; otherwise, it is judged to be a fake user and the real wallet APP is refused.

[0042] The user information may be facial information, fingerprint information, iris information, voiceprint information, or other features that can represent the uniqueness of the user. The preset first rule is to input the user information into a preset neural network and use the user feature value output by the neural network as the user genetic password.

[0043] Specifically, in some embodiments, if the user information obtained is face information, it is possible to consider using an improved twin neural network model to process the user information to obtain the face gene code. The improved twin neural network includes a user information input layer, a neural network training layer, an output vector set layer, and a Gaussian distribution fitting layer, wherein the user information input layer includes two inputs, the neural network training layer includes two training networks, the output vector set layer includes two output vector sets, and the Gaussian distribution fitting layer includes two Gaussian distribution fitting processors. The loss function of the improved twin neural network is:

[0044]

[0045] Wherein, D=|m1-m2|+|v1-v2|, t is the label of whether the samples of the two inputs of the user information input layer match, t=1 represents that the two samples are similar or matched, t=0 represents mismatch, ε is the set threshold, N is the number of samples in each channel, m1 and v1 are the mean and variance output by a Gaussian distribution fitting processor, and m2 and v2 are the mean and variance output by another Gaussian distribution fitting processor.

[0046] The physical meaning of the loss function is that when t=1 (i.e., the samples are similar), the loss function only has the first half, i.e., the samples that were originally similar. If the Gaussian distance in the feature space is large, it means that the current model is not good, so the loss is increased. When t=0 (i.e., the samples are not similar), the loss function is the second half, i.e., when the samples are not similar, the Gaussian distance in the feature space is small, and the loss value will increase. The threshold ε is an empirical value determined based on the Gaussian distance in the feature space.

[0047] For example, a user's face is scanned and photographed to obtain a video, and a group of pictures (about 50-60 pictures, in different orientations, such as left face, front face, and side face) are extracted from the video as two inputs into two neural networks (Network1 and Network2). The neural network forms two output vector sets, and the two vector sets are fitted by Gaussian distribution to obtain the corresponding mean m and variance v. After the training is completed, half of the network is taken out of the model as a facial gene secret extractor, with the input being a facial video and the output being the corresponding mean and variance, which are the facial gene code. The traditional twin neural network contains two channels, each of which receives an input, maps it to a high-dimensional feature space, and outputs the corresponding representation. By calculating the distance between two representations, such as the Euclidean distance, the user can compare the similarity of the two inputs. The present invention creatively designs an improved twin neural network, which adds a Gaussian distribution fitting step compared to the traditional twin neural network, so that the face gene code can be represented by only two values, mean m and variance v. The feature extraction result of the traditional twin neural network is a vector set with high parameter dimension, which is not conducive to subsequent applications. For more detailed information about the traditional twin neural network, please refer to the prior art and will not be repeated here.

[0048] S102, the real wallet APP receives the second character string set by the real user, encrypts the second character string using the pre-saved original user genetic password and generates a third QR code.

[0049] After the real wallet APP determines that the user is a real user, it can receive a second character string (such as a string of text characters or voice) set by the real user, and encrypt the second character string with the original user's genetic password to generate a third QR code.

[0050] As in step S101, the user genetic password is generated by using an improved twin neural network, that is, the computational complexity of encrypting the second character string by using only two values, the mean m and the variance v, to represent the facial genetic password is much smaller than that of encrypting the second character string using the vector set output by the traditional twin neural network, and the encryption efficiency is high.

[0051] S103, the hardware wallet to be used obtains and identifies the third QR code, decrypts the third QR code, and outputs a first decryption result to determine the authenticity of the hardware wallet to be used, wherein the first decryption result is a second character string or the decryption fails.

[0052] The real wallet APP should have the same first string and the same encryption and decryption algorithm as the real hardware wallet. Therefore, if the hardware wallet to be used is a real hardware wallet, the third QR code should be decrypted to obtain the accurate second string. If the decryption fails, the hardware wallet to be used is judged to be fake. In this way, fake hardware wallets can be found and the transaction security of digital currency can be guaranteed.

[0053] The embodiment of the present invention is based on the idea that the real wallet APP and the real hardware wallet are preset with the same first rule for generating the original user's genetic password, the same encryption and decryption algorithm, and the user information of the real user is unique. Through the operation of encrypting and decrypting the QR code, it is ensured that the user and the hardware wallet are both authentic to avoid middleman attacks and other behaviors. The entire digital currency transaction process is safe and reliable, and the user can make a secure payment according to step S014.

[0054] S104, the real hardware wallet is connected to the real wallet APP, the real hardware wallet receives the payment information sent by the real wallet APP, and receives the payment confirmation information input by the user.

[0055] When the user, wallet APP, and hardware wallet are all true, the user can use the hardware wallet according to the following steps: 1. Enter the mnemonic on the hardware wallet and log in to the hardware wallet; 2. Connect the hardware wallet and the wallet APP software on the mobile terminal (for example, via Bluetooth); 3. Perform a transfer operation on the wallet APP, generate transfer information and send it to the hardware wallet; 4. After the hardware wallet receives the transfer information, the user confirms it on the hardware wallet with a digital signature, and the transaction is completed.

[0056] Embodiment 2

[0057] In the first embodiment, the mobile terminal has installed a real wallet APP, but in actual applications, there are often fake wallet APPs. In order to improve the transaction security of digital currency, it is also necessary to prevent the attack of fake wallet APPs. In view of this, the digital currency transaction method disclosed in this embodiment, such as Figure 3 As shown, the following steps are included:

[0058] S201, the mobile terminal obtains a first QR code at a preset location, parses the first QR code to obtain a download address of the wallet APP to be used, and completes downloading and installation of the wallet APP to be used.

[0059] When a user purchases a real hardware wallet from a hardware wallet supplier, the hardware wallet supplier will instruct the user to scan the first QR code at a preset location, which corresponds to the download address of the real wallet APP. However, sometimes the real first QR code may be replaced by an attacker, so subsequent steps are required to verify the authenticity of the wallet APP.

[0060] S202, the real hardware wallet obtains the original user information and generates the original user genetic password according to the preset first rule, and also encrypts the user genetic password using the preset first character string and generates a second QR code.

[0061] The user information may be facial information, fingerprint information, iris information, voiceprint information, or other features that can represent the uniqueness of the user. The preset first rule is to input the user information into a preset neural network and use the user feature value output by the neural network as the user genetic password.

[0062] Specifically, in some embodiments, if the user information obtained is face information, it is possible to consider using an improved twin neural network model to process the user information to obtain the face gene code. The improved twin neural network includes a user information input layer, a neural network training layer, an output vector set layer, and a Gaussian distribution fitting layer, wherein the user information input layer includes two inputs, the neural network training layer includes two training networks, the output vector set layer includes two output vector sets, and the Gaussian distribution fitting layer includes two Gaussian distribution fitting processors. The loss function of the improved twin neural network is:

[0063]

[0064] Wherein, D=|m1-m2|+|v1-v2|, t is the label of whether the samples of the two inputs of the user information input layer match, t=1 represents that the two samples are similar or matched, t=0 represents mismatch, ε is the set threshold, N is the number of samples in each channel, m1 and v1 are the mean and variance output by a Gaussian distribution fitting processor, and m2 and v2 are the mean and variance output by another Gaussian distribution fitting processor.

[0065] The physical meaning of the loss function is that when t=1 (i.e., the samples are similar), the loss function only has the first half, i.e., the samples that were originally similar. If the Gaussian distance in the feature space is large, it means that the current model is not good, so the loss is increased. When t=0 (i.e., the samples are not similar), the loss function is the second half, i.e., when the samples are not similar, the Gaussian distance in the feature space is small, and the loss value will increase. The threshold ε is an empirical value determined based on the Gaussian distance in the feature space.

[0066] For example, a user's face is scanned and photographed to obtain a video, and a group of pictures (about 50-60 pictures, in different orientations, such as left face, front face, and side face) are extracted from the video as two inputs into two neural networks (Network1 and Network2). The neural network forms two output vector sets, and the two vector sets are fitted by Gaussian distribution to obtain the corresponding mean m and variance v. After the training is completed, half of the network is taken out of the model as a facial gene secret extractor, with the input being a facial video and the output being the corresponding mean and variance, which are the facial gene code. The traditional twin neural network contains two channels, each of which receives an input, maps it to a high-dimensional feature space, and outputs the corresponding representation. By calculating the distance between two representations, such as the Euclidean distance, the user can compare the similarity of the two inputs. The present invention creatively designs an improved twin neural network, which adds a Gaussian distribution fitting step compared to the traditional twin neural network, so that the face gene code can be represented by only two values, mean m and variance v. The feature extraction result of the traditional twin neural network is a vector set with high parameter dimension, which is not conducive to subsequent applications. For more detailed information about the traditional twin neural network, please refer to the prior art and will not be repeated here.

[0067] The first string may be a user-defined string, or may include a hardware wallet serial number and a randomly generated verification code, wherein the hardware wallet serial number can be identified by the user. In this embodiment, the first string preferably includes a hardware wallet serial number (wallet ID) and a randomly generated verification code (denoted as Token), wherein the hardware wallet serial number can be identified by the user.

[0068] S203, the wallet APP to be used obtains the original user information, obtains and identifies the second QR code, decrypts the second QR code, and outputs a second decryption result to determine the authenticity of the wallet APP to be used. The second decryption result is a preset first character string or a decryption failure.

[0069] The real wallet APP should have the same first string and the same encryption and decryption algorithm as the real hardware wallet. Therefore, if the wallet APP to be used is real, it should be able to decrypt the second QR code and obtain the accurate first string. If the decryption fails, the wallet APP to be used is judged to be fake. In this way, the fake wallet APP can be found to ensure that the real wallet APP is installed on the mobile terminal.

[0070] Once the real wallet APP is installed on the mobile terminal, it will no longer be uninstalled or updated at will. In the future, it only needs to determine the authenticity of the user and the hardware wallet. Specifically, the digital currency transaction method also includes the following steps:

[0071] S204, the real wallet APP of the mobile terminal obtains the current user information, and generates a genetic password of the user to be matched according to the preset first rule. If the generated genetic password of the user to be matched is consistent with the original user genetic password pre-saved in the real wallet APP, the user is judged to be a real user; otherwise, it is judged to be a fake user.

[0072] In order to prevent middleman attacks, the real wallet APP of the present invention is only available to one person and is not allowed to be used by multiple people. Therefore, each real wallet APP only stores the original user's genetic password. The real wallet APP obtains the current user information and generates the user's genetic password to be matched according to the preset first rule. If the generated user's genetic password to be matched is consistent with the original user's genetic password pre-stored in the real wallet APP, the user is judged to be a real user (i.e., the original user) and can continue to use the real wallet APP; otherwise, it is judged to be a fake user and the real wallet APP is refused.

[0073] The user information may be facial information, fingerprint information, iris information, voiceprint information, or other features that can represent the uniqueness of the user. The preset first rule is to input the user information into a preset neural network and use the user feature value output by the neural network as the user genetic password.

[0074] S205, the real wallet APP receives the second character string set by the real user, encrypts the second character string using the pre-saved original user genetic password and generates a third QR code.

[0075] After the real wallet APP determines that the user is a real user, it can receive a second character string (such as a string of text characters or voice) set by the real user, and encrypt the second character string with the original user's genetic password to generate a third QR code.

[0076] As in step S101, the user genetic password is generated by using an improved twin neural network, that is, the computational complexity of encrypting the second character string by using only two values, the mean m and the variance v, to represent the facial genetic password is much smaller than that of encrypting the second character string using the vector set output by the traditional twin neural network, and the encryption efficiency is high.

[0077] Preferably, in order to improve the security of the third two-dimensional code, the second character string can be encrypted multiple times using the pre-saved original user genetic password and the preset part of the first character string to generate the third two-dimensional code. For example, the second character string is encrypted with the original user genetic password to generate the first ciphertext, and then the first ciphertext is encrypted with the preset part of the first character string to generate the second ciphertext, and the second ciphertext is generated into the third two-dimensional code. The preset part of the first character string can be the entire character string, or the hardware wallet serial number, or the randomly generated verification code. There is no special requirement for which part of the character string is used to encrypt the second character string and generate the third two-dimensional code in this embodiment.

[0078] S206, the hardware wallet to be used obtains and identifies the third QR code, decrypts the third QR code, and outputs a first decryption result to determine the authenticity of the hardware wallet to be used, wherein the first decryption result is a second character string or the decryption fails.

[0079] The real wallet APP should have the same encryption and decryption algorithms as the real hardware wallet. Therefore, if the hardware wallet to be used is a real hardware wallet, it should be able to decrypt the third QR code and obtain the accurate second string. If the decryption fails, the hardware wallet to be used is judged to be fake. In this way, fake hardware wallets can be found and the transaction security of digital currency can be guaranteed.

[0080] S207, the real hardware wallet is connected to the real wallet APP, the real hardware wallet receives the payment information sent by the real wallet APP, and receives the payment confirmation information input by the user.

[0081] When the user, wallet APP, and hardware wallet are all true, the user can use the hardware wallet according to the following steps: 1. Enter the mnemonic on the hardware wallet and log in to the hardware wallet; 2. Connect the hardware wallet and the wallet APP software on the mobile terminal (for example, via Bluetooth); 3. Perform a transfer operation on the wallet APP, generate transfer information and send it to the hardware wallet; 4. After the hardware wallet receives the transfer information, the user confirms it on the hardware wallet with a digital signature, and the transaction is completed.

[0082] Preferably, when the real hardware wallet is connected to the real wallet APP, the real hardware wallet deletes the generated second QR code, and the real wallet APP deletes the generated third QR code. This ensures that the second QR code and the third QR code are one-time, preventing them from being maliciously used or tampered with by attackers.

[0083] The embodiment of the present invention is based on the idea that the real wallet APP and the real hardware wallet are preset with the same first character string, the same first rule for generating the original user's genetic password, the same encryption and decryption algorithm, and the user information of the real user is unique. Through the three operations of encrypting and decrypting the QR code, it is ensured that the user, the wallet APP, and the hardware wallet are all authentic, so as to avoid middleman attacks, counterfeit wallet APPs, etc., and the entire digital currency transaction process is safe and reliable.

[0084] Embodiment 3

[0085] The present invention also discloses a digital currency transaction system, including a mobile terminal and a hardware wallet, wherein:

[0086] The mobile terminal is used to obtain current user information using the real wallet APP after installing the real wallet APP, and generate a to-be-matched user genetic password according to a preset first rule. If the generated to-be-matched user genetic password is consistent with the original user genetic password pre-stored in the wallet APP, the user is judged to be a real user; otherwise, it is judged to be a false user; when the user is judged to be a real user, the real wallet APP of the mobile terminal is also used to receive a second character string set by the real user, encrypt the second character string using the stored original user genetic password and generate a third QR code for.

[0087] The hardware wallet is used to obtain and identify the third QR code, decrypt the third QR code, and output a second character string to prove that it is a genuine hardware wallet.

[0088] In order to prevent middleman attacks, the real wallet APP of the present invention is only available to one person and is not allowed to be used by multiple people. Therefore, each real wallet APP only stores the original user's genetic password. The real wallet APP obtains the current user information and generates the user's genetic password to be matched according to the preset first rule. If the generated user's genetic password to be matched is consistent with the original user's genetic password pre-stored in the real wallet APP, the user is judged to be a real user (i.e., the original user) and can continue to use the real wallet APP; otherwise, it is judged to be a fake user and the real wallet APP is refused.

[0089] The user information may be facial information, fingerprint information, iris information, voiceprint information, or other features that can represent the uniqueness of the user. The preset first rule is to input the user information into a preset neural network and use the user feature value output by the neural network as the user genetic password.

[0090] The embodiment of the present invention is based on the idea that the real wallet APP and the real hardware wallet are preset with the same first rule for generating the original user's genetic password, the same encryption and decryption algorithm, and the user information of the real user is unique. Through the operation of encrypting and decrypting the QR code, it is ensured that the user and the hardware wallet are both authentic to avoid middleman attacks and other behaviors. The entire digital currency transaction process is safe and reliable.

[0091] In other embodiments, in order to prevent attacks by counterfeit wallet APPs, the mobile terminal is also used to pre-judge the authenticity of the wallet APP when installing it. Specifically, the first QR code at the preset position is obtained, the first QR code is parsed to obtain the download address of the wallet APP to be used, and the download and installation of the wallet APP to be used are completed; it is also used to use the wallet APP to be used to obtain the original user information, and obtain the second QR code generated by the hardware wallet, and the second QR code is decrypted, and the first character is output to prove that it is a real wallet APP.

[0092] The hardware wallet is also used to obtain original user information and generate an original user genetic password according to a preset first rule, and to encrypt the user genetic password using a preset first character string and generate a second QR code.

[0093] The first string may be a user-defined string, or may include a hardware wallet serial number and a randomly generated verification code, wherein the hardware wallet serial number can be identified by the user. In this embodiment, the first string preferably includes a hardware wallet serial number (wallet ID) and a randomly generated verification code (denoted as Token), wherein the hardware wallet serial number can be identified by the user.

[0094] Once a real wallet APP is installed on a mobile terminal, it no longer needs to be uninstalled or updated at will. In the future, when using it, you only need to determine the authenticity of the user and the hardware wallet.

[0095] In other embodiments, after the authenticity of the mobile terminal APP and the hardware wallet is verified, the user can conduct a secure digital currency transaction. At this time, the mobile terminal is also used to connect to the real hardware wallet using the real wallet APP and send payment information to the real hardware wallet. The hardware wallet is also used to connect to the real wallet APP of the mobile terminal and receive the payment information sent by the real wallet APP and the payment confirmation information entered by the user.

[0096] The specific method of using the digital currency trading system can refer to Examples 1 and 2, which will not be repeated here. The embodiment of the present invention is based on the idea that the real wallet APP and the real hardware wallet are preset with the same first string, the same first rule for generating the original user's genetic password, the same encryption and decryption algorithm, and the unique user information of the real user. Through the three operations of encrypting and decrypting the QR code, it is ensured that the user, the wallet APP, and the hardware wallet are all authentic, so as to avoid middleman attacks, counterfeit wallet APPs, etc., and the entire digital currency transaction process is safe and reliable.

[0097] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0098] The above description includes examples of one or more embodiments. Of course, it is not possible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is encompassed in a manner similar to the term "including", as explained by "including," used as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".

Claims

1. A digital currency transaction method, characterized in that: The following steps are involved: The mobile terminal obtains the first QR code at the preset location, parses the first QR code to obtain the download address of the wallet APP to be used, and completes the download and installation of the wallet APP to be used; The real hardware wallet obtains the original user information and generates the original user genetic password according to the preset first rule, and also encrypts the user genetic password using the preset first character string and generates a second QR code; The wallet APP to be used obtains the original user information, obtains and identifies the second QR code, decrypts the second QR code, and outputs a second decryption result to determine the authenticity of the wallet APP to be used, wherein the second decryption result is a preset first character string or the decryption fails; When the wallet APP to be used is a real wallet APP, the real wallet APP obtains the current user information and generates a genetic password of the user to be matched according to the preset first rule. If the generated genetic password of the user to be matched is consistent with the original user genetic password pre-stored in the real wallet APP, the user is judged to be a real user; otherwise, it is judged to be a fake user; The real wallet APP receives the second character string set by the real user, encrypts the second character string using the pre-saved original user genetic password and generates a third QR code; The hardware wallet to be used obtains and identifies the third QR code, decrypts the third QR code, and outputs a first decryption result to determine the authenticity of the hardware wallet to be used, wherein the first decryption result is the second character string or the decryption fails.

2. The digital currency transaction method according to claim 1, characterized in that: The hardware wallet to be used obtains and identifies the third QR code, decrypts the third QR code, and outputs a first decryption result to determine the authenticity of the hardware wallet to be used. When the hardware wallet to be used is a genuine hardware wallet, the following steps are also included: The real hardware wallet is connected to the real wallet APP; The real hardware wallet accepts the payment information sent by the real wallet APP and accepts the payment confirmation information entered by the user.

3. The digital currency transaction method according to claim 1, characterized in that: After the real wallet APP receives the second character string set by the real user, it first uses the pre-saved original user genetic password to encrypt the second character string to generate a first ciphertext, then uses the preset part of the first character string to encrypt the first ciphertext to generate a second ciphertext, and generates a third QR code from the second ciphertext.

4. The digital currency transaction method according to claim 1, characterized in that: The real wallet APP of the mobile terminal obtains the current user information and generates the genetic password of the user to be matched according to the preset first rule, which specifically includes: The real wallet APP of the mobile terminal obtains one of the user's facial information, fingerprint information, iris information or voiceprint information, inputs the user information into a preset neural network model, and uses the user feature value output by the neural network model as the user's genetic password.

5. The digital currency transaction method according to claim 4, characterized in that: The preset neural network is an improved twin neural network, which includes a user information input layer, a neural network training layer, an output vector set layer, and a Gaussian distribution fitting layer, wherein the user information input layer includes two inputs, the neural network training layer includes two training networks, the output vector set layer includes two output vector sets, and the Gaussian distribution fitting layer includes two Gaussian distribution fitting processors. The loss function of the improved twin neural network is: Where D = |m1-m2|+|v1-v2|, t is the label of whether the two input samples of the user information input layer match, t = 1 means that the two samples are similar or matched, t = 0 means they do not match, ε is the set threshold, N is the number of samples in each channel, m1 and v1 are the mean and variance output by a Gaussian distribution fitting processor, and m2 and v2 are the mean and variance output by another Gaussian distribution fitting processor.

6. The digital currency transaction method according to claim 2, characterized in that: The following steps are also included: After the real hardware wallet is connected to the real wallet app, the real hardware wallet deletes the generated second QR code, and the real wallet app deletes the generated third QR code.

7. A digital currency trading system, comprising a mobile terminal and a hardware wallet, characterized in that: A mobile terminal, used to obtain a first QR code at a preset location, parse the first QR code to obtain a download address of a wallet APP to be used, and complete the download and installation of the wallet APP to be used; also used to use the wallet APP to be used to obtain original user information, and obtain a second QR code generated by identifying a hardware wallet, and also decrypt the second QR code, and output a first character string to prove that it is a real wallet APP; also used to use the real wallet APP to obtain current user information after installing the real wallet APP, and generate a gene password of a user to be matched according to a preset first rule, if the generated gene password of the user to be matched is consistent with the original user gene password pre-stored in the wallet APP, then the user is judged to be a real user; otherwise, it is judged to be a false user; when the user is judged to be a real user, the real wallet APP of the mobile terminal is also used to receive a second character string set by the real user, encrypt the second character string using the saved original user gene password and generate a third QR code; The hardware wallet is used to obtain original user information and generate an original user genetic password according to a preset first rule, and also uses a preset first character string to encrypt the user genetic password and generate a second two-dimensional code; it is also used to obtain and identify a third two-dimensional code, decrypt the third two-dimensional code, and output a second character string to prove that it is a genuine hardware wallet.

8. The digital currency trading system as claimed in claim 7, characterized in that: After the real wallet APP is installed, the mobile terminal is also used to connect to the real hardware wallet using the real wallet APP and send payment information to the real hardware wallet; The hardware wallet is also used to connect to the real wallet APP of the mobile terminal after being judged as a real hardware wallet, and receive payment information sent by the real wallet APP and payment confirmation information input by the user.

Citation Information

Patent Citations

  • Portable voice-print coding lock ong-range transmitting system and method

    CN101030846A

  • Face feature and dynamic attribute authentication method based on WeChat applet platform

    CN111460416A

  • Secure hardware cryptographic key storage device with detachable battery and Anti-tamper security functionality

    WO2020051910A1