A payment system and method based on TEE and bluetooth type digital currency hardware wallet
By utilizing a payment system based on TEE and Bluetooth-enabled digital currency hardware wallets, and leveraging the TEE's TUI and line protection key, the system addresses the issues of poor security and compatibility in existing technologies, enabling low-cost, high-security digital currency payments that are compatible with various mobile phone models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WATCH DATA SYSTEM CO LTD
- Filing Date
- 2020-12-15
- Publication Date
- 2026-07-03
AI Technical Summary
Existing digital currency wallets are inadequate in terms of security, convenience, and compatibility. They are particularly vulnerable to poor security, high cost, and poor compatibility in situations without a display screen or with a small screen, and they also rely on mobile phone hardware configurations.
The payment system adopts TEE and Bluetooth-based digital currency hardware wallet. It utilizes the TEE function of mobile smart terminals to achieve trusted human-computer interaction, combines the physical security features of Bluetooth hardware wallets, provides a display and input interface through the TUI of TEE, uses line protection keys to ensure communication security, and physical buttons to confirm user intent.
It enables low-cost, highly secure, and convenient digital currency payments, is compatible with various mobile phone models, has a good display effect, a superior keyboard input experience, and a smaller hardware size, making it easy to carry.
Smart Images

Figure CN112633864B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital currency technology, specifically to a payment system and method based on a TEE and a Bluetooth-enabled digital currency hardware wallet. Background Technology
[0002] Currently, cryptocurrency wallets are mainly divided into two types: software wallets in the form of apps and hardware wallets based on a security chip (SE). Hardware wallets store cryptocurrency assets (value, keys, transaction vouchers, transaction records) in the SE, and perform cryptocurrency calculations, payments, synchronization, and other operations within the SE.
[0003] Existing technology provides a dedicated embedded device with an SE (Security Entity) that stores digital currency assets. It works with a smartphone, featuring communication interfaces such as Bluetooth and USB, allowing connection to a smartphone app and offline transactions with other hardware wallets via NFC. However, this solution requires a smartphone; during payment, the wallet password and transaction parameters are entered into the mobile app, making security reliant on the app's security features. Without a display screen, transaction information must be confirmed in the app, leading to security vulnerabilities. With a display screen, a small screen makes reading difficult, while a large screen makes portability inconvenient. Furthermore, configuring a keypad and display screen increases the cost of the hardware wallet.
[0004] Existing technology also provides a software wallet in the form of an app, running on a smartphone. Digital currency assets are stored on the phone under software protection or managed by a digital currency backend system. However, entering wallet passwords, transaction parameters, and confirming transaction information on a smartphone leads to poor security. If digital currency assets are stored on the phone, the security level of software protection is low and cannot provide physical security. If digital currency assets are managed by a backend system, offline transactions are not supported, resulting in poor convenience.
[0005] Existing technology also provides a method for building a digital currency hardware wallet on a smartphone based on TEE+SE (with the phone's built-in SE), which balances convenience and high security, and supports offline transactions. However, this solution is highly dependent on the phone's hardware configuration and has poor compatibility. Phones without SE and NFC functions, or those that do not have these functions enabled, cannot use this solution. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a payment system and method based on TEE and Bluetooth-enabled digital currency hardware wallets. This system utilizes TEE in conjunction with a Bluetooth-enabled hardware wallet to achieve digital currency payment operations, resulting in better display quality, reduced product size of the Bluetooth hardware wallet, lower costs, and higher payment security.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A payment system based on TEE and Bluetooth digital currency hardware wallet, comprising: a mobile smart terminal and a Bluetooth digital currency hardware wallet;
[0009] The mobile smart terminal includes a Rich OS operating system and a Trusted Execution Environment (TEE OS) running in parallel. The Rich OS runs a digital currency wallet management app, which integrates a digital currency wallet SDK. The TEE OS runs a digital currency wallet TA. The digital currency wallet management app is used to query balances, deposit funds, withdraw cash, make payments, and receive payments by calling the API interface of the digital currency wallet SDK. The digital currency wallet SDK is used to access the digital currency wallet TA and establish a Bluetooth connection with the Bluetooth-enabled digital currency hardware wallet. The digital currency wallet TA is used to implement the digital currency payment function of the Bluetooth-enabled digital currency hardware wallet and communicates with the Bluetooth-enabled digital currency hardware wallet through the digital currency wallet SDK.
[0010] The Bluetooth-enabled digital currency hardware wallet includes: a security chip control module, a communication interface and a power control module connected to the security chip control module, the communication interface including an NFC module and a Bluetooth module, the NFC module being used to communicate with other hardware wallets, and the Bluetooth module being used to communicate with the mobile smart terminal; wherein, a pre-installed line protection key is provided between the Bluetooth-enabled digital currency hardware wallet and the digital currency wallet TA for end-to-end encryption.
[0011] Furthermore, in the payment system described above, the digital currency wallet TA is also used to: verify the authenticity of the digital currency wallet management APP before operation, and the digital currency wallet TA only responds to access requests from the digital currency wallet management APP.
[0012] Furthermore, in the payment system described above, the TEE OS's TUI is used to provide a reliable human-computer interaction interface, including providing multiple virtual keyboard configurations, receiving user-inputted wallet passwords and transaction parameters, and displaying the transaction parameters, a confirmation button, and a cancellation button.
[0013] Furthermore, in the payment system described above, the Bluetooth-enabled digital currency hardware wallet is also equipped with a physical button. The physical button is connected to the security chip control module and is used to confirm the user's pairing intention during the Bluetooth pairing process between the Bluetooth-enabled digital currency hardware wallet and the mobile smart terminal, as well as to confirm the user's transaction intention during the digital currency transaction process.
[0014] A payment method based on TEE and Bluetooth-enabled digital currency hardware wallet includes the following steps:
[0015] S100 establishes a Bluetooth connection between the Bluetooth-enabled digital currency hardware wallet and the digital currency wallet SDK, and pre-sets a line protection key for communication with the digital currency wallet TA.
[0016] S200, Based on the API call request for digital currency transactions sent by the digital currency wallet management APP, the digital currency wallet SDK sends a digital currency payment request to the digital currency wallet TA;
[0017] S300. Based on the digital currency payment request, the Bluetooth connection, and the line protection key, the digital currency wallet TA generates an APDU command and forwards the APDU command to the Bluetooth-enabled digital currency hardware wallet through the digital currency wallet SDK.
[0018] S400. Based on the APDU command, the Bluetooth connection, and the line protection key, the Bluetooth-based digital currency hardware wallet performs a digital currency payment operation, generates an APDU response, and returns the APDU response to the digital currency wallet TA through the digital currency wallet SDK.
[0019] S500. Based on the APDU response and the line protection key, the digital currency wallet TA returns the transaction result to the digital currency wallet SDK;
[0020] S600. Based on the transaction result, the digital currency wallet SDK returns the API call result to the digital currency wallet management APP.
[0021] Furthermore, in the payment method described above, in S100, the Bluetooth-enabled digital currency hardware wallet establishes a Bluetooth connection with the digital currency wallet SDK based on a confirmation connection command input by the user via a physical button.
[0022] In S300, the digital currency wallet TA displays the transaction information contained in the digital currency payment request through the TUI, and generates an APDU command based on the payment password and confirmation instruction entered by the user through the TUI;
[0023] In S400, the Bluetooth-enabled digital currency hardware wallet executes digital currency payment operations based on the confirmation transaction command input by the user via the physical button.
[0024] Furthermore, in the payment method described above, the line protection key includes an ENC-KEY and a MAC-KEY.
[0025] Furthermore, regarding the payment method described above, S300 includes:
[0026] S301, The digital currency wallet TA generates an APDU command;
[0027] S302. The digital currency wallet TA encrypts the APDU command using the ENC-KEY to obtain ciphertext D1;
[0028] S303. The digital currency wallet TA uses the MAC-KEY to calculate the MAC of the ciphertext D1 to obtain the message authentication code D2.
[0029] S304. The digital currency wallet TA sends the ciphertext D1 and the message authentication code D2 to the digital currency wallet SDK;
[0030] S305. Based on the Bluetooth connection, the digital currency wallet SDK sends the ciphertext D1 and the message authentication code D2 to the Bluetooth-enabled digital currency hardware wallet.
[0031] Furthermore, regarding the payment method described above, S400 includes:
[0032] S401. The Bluetooth-type digital currency hardware wallet uses the MAC-KEY to verify the message authentication code D2. If the verification fails, the process ends.
[0033] S402. The Bluetooth-based digital currency hardware wallet uses the ENC-KEY to decrypt the ciphertext D1 to obtain the APDU command;
[0034] S403. The Bluetooth-enabled digital currency hardware wallet executes the APDU command and generates an APDU response;
[0035] S404. The Bluetooth-based digital currency hardware wallet encrypts the APDU response using the ENC-KEY to obtain ciphertext D3.
[0036] S405. The Bluetooth-type digital currency hardware wallet uses the MAC-KEY to calculate the MAC of the ciphertext D3 to obtain the message authentication code D4.
[0037] S406. Based on the Bluetooth connection, the Bluetooth-enabled digital currency hardware wallet sends the ciphertext D3 and the message authentication code D4 to the digital currency wallet SDK.
[0038] S407, The digital currency wallet SDK sends the ciphertext D3 and the message authentication code D4 to the digital currency wallet TA;
[0039] Furthermore, regarding the payment method described above, S500 includes:
[0040] S501. The digital currency wallet TA uses the MAC-KEY to verify the message authentication code D4. If the verification fails, the process ends.
[0041] S502, The digital currency wallet TA uses the ENC-KEY to decrypt the ciphertext D3 and obtain the APDU response.
[0042] The beneficial effects of this invention are as follows: The system and method provided by this invention utilize the TEE function of mobile smart terminals to achieve trusted human-computer interaction, and combine the physical security characteristics of Bluetooth-based digital currency hardware wallets to realize a low-cost, high-security digital currency payment system and method that supports more mobile phones; it is equivalent to equipping the Bluetooth hardware wallet with a remotely connected display screen and PIN pad (provided by the mobile phone TEE), resulting in good display effects, rich display content, and a good keyboard input experience; it reduces the product size of the Bluetooth hardware wallet, making it more portable and reducing costs; it provides high payment security, balancing ease of use, convenience, and security; it is applicable to a wide range of mobile phone models and does not require a built-in SE in the phone. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the structure of a mobile smart terminal in a payment system based on a TEE and Bluetooth-enabled digital currency hardware wallet, provided in an embodiment of the present invention.
[0044] Figure 2 This is a schematic diagram of the structure of a Bluetooth digital currency hardware wallet in a payment system based on TEE and Bluetooth digital currency hardware wallet provided in an embodiment of the present invention;
[0045] Figure 3 This is a flowchart illustrating a payment method based on a TEE and a Bluetooth-enabled digital currency hardware wallet provided in an embodiment of the present invention.
[0046] Figure 4 This is a timing diagram of a payment method based on a TEE and Bluetooth-enabled digital currency hardware wallet provided in an embodiment of the present invention. Detailed Implementation
[0047] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0048] like Figure 1-2 As shown, this embodiment of the invention provides a payment system based on TEE and Bluetooth digital currency hardware wallet, including: a mobile smart terminal and a Bluetooth digital currency hardware wallet.
[0049] from Figure 1As can be seen, the mobile smart terminal includes a Rich OS (operating system) and a Trusted Execution Environment (TEE OS) running in parallel. The Rich OS runs a digital currency wallet management app, which integrates a digital currency wallet SDK. The TEE OS runs a digital currency wallet TA (Trusted Execution Environment). Specifically, the mobile smart terminal is a mobile smart terminal with TEE and TUI functions, such as smartphones, tablets, and other terminal devices with a smart operating system. The Rich OS can be the Android system.
[0050] The digital currency wallet management app is an application that runs on Rich OS. It enables functions such as checking balance, depositing, withdrawing, making payments, and receiving payments by calling the API interface of the digital currency wallet SDK.
[0051] The cryptocurrency wallet SDK provides APIs for cryptocurrency wallet functionality. The SDK is integrated into the cryptocurrency wallet management app and is part of the app. It can access the cryptocurrency wallet TA (Transaction Provider) and establish a Bluetooth connection with Bluetooth-enabled cryptocurrency hardware wallets, acting as an intermediary for communication data between the TA and the hardware wallet. When the cryptocurrency wallet management app calls the SDK's API, the SDK sends a cryptocurrency payment request to the TA, enabling the Bluetooth-enabled cryptocurrency hardware wallet to perform the payment. After receiving the operation result from the TA, the SDK returns the API call result to the cryptocurrency wallet management app.
[0052] The Digital Currency Wallet TA is a trusted application running on the TEE OS. TA enables digital currency payment functionality with Bluetooth-enabled digital currency hardware wallets and stores the protection key for communication with these wallets. Communication with the Bluetooth hardware wallet is achieved through the digital currency wallet SDK. TA includes a module for operating the Bluetooth hardware wallet to implement digital currency payment functions. TA stores the protection key required for communication with the Bluetooth hardware wallet, used to encrypt APDU commands. Since the TEE does not have Bluetooth communication capabilities, the encrypted APDU commands used by TA to communicate with the Bluetooth hardware wallet are forwarded by the SDK. Before running, TA needs to verify the authenticity of the digital currency wallet management app in Rich OS: TA only responds to access requests from the wallet management app (with a specific package name and app certificate).
[0053] TEE OS is an independent trusted execution environment that runs in parallel with Rich OS, providing security services for the Rich OS environment. TEE's TUI function provides a trusted human-computer interaction interface. Traditionally, allowing users to enter their wallet passwords or passcodes in Rich OS is insecure and vulnerable to various software and hardware attacks. However, TUI runs within the TEE trusted execution environment, allowing users to enter their passwords directly within TUI, preventing malware in Rich OS from sniffing or intercepting the password content. TUI also offers various virtual keyboard configurations, such as numeric, alphabetic, and symbol keyboards, providing a consistent input experience with Rich OS. In addition to entering wallet passwords in TUI, TEE also supports users entering transaction parameters such as amount and account information. TEE also supports displaying transaction parameters (amount, account, etc.), confirmation buttons, and cancellation buttons within the TUI environment. TUI protects the displayed transaction information from tampering, hijacking, and leakage, and protects user confirmation and cancellation operations from being hijacked or impersonated. Users can confirm the transaction information is correct by clicking the confirmation button to complete the transaction or cancel it. If the user remains inactive for an extended period, TUI will automatically time out and the transaction will be cancelled. The user's verification of the transaction information displayed in TUI and clicking the "Confirm" button within TUI demonstrates their genuine intention to trade.
[0054] A Bluetooth-enabled digital currency hardware wallet is a digital currency hardware wallet with Bluetooth connectivity. It consists of three main parts: a security chip control module, a communication interface, and a power control module. Notably, this hardware wallet does not require a display screen or PIN pad (these are replaced by the TEE TUI function of a smart terminal). Figure 1 As can be seen, the Bluetooth-based digital currency hardware wallet includes: a security chip control module, a communication interface connected to the security chip control module, and a power control module. The communication interface includes an NFC module and a Bluetooth module. The NFC module is used to communicate with other hardware wallets, and the Bluetooth module is used to communicate with mobile smart terminals. The Bluetooth-based digital currency hardware wallet also has a physical button, which is connected to the security chip control module. This physical button is used to confirm the user's pairing intention during Bluetooth pairing with the mobile smart terminal, and to confirm the user's transaction intention during digital currency transactions. The Bluetooth-based digital currency hardware wallet stores the user's digital currency assets (such as keys, certificates, currency values, vouchers, etc.) and has physical security features. The Bluetooth-based digital currency hardware wallet executes APDU commands generated by the TA and forwarded by the SDK via Bluetooth. After executing a digital currency payment operation, it returns an APDU response via the Bluetooth module.
[0055] like Figure 3-4 As shown, this embodiment of the invention also provides a payment method based on a TEE and a Bluetooth-enabled digital currency hardware wallet, including the following steps:
[0056] The S100 Bluetooth-enabled digital currency hardware wallet establishes a Bluetooth connection with the digital currency wallet SDK and has a pre-installed line protection key for communication with the digital currency wallet TA.
[0057] Specifically, to enhance wallet security, Bluetooth-enabled digital currency hardware wallets establish a Bluetooth connection with the digital currency wallet SDK based on a confirmation connection command entered by the user via a physical button. A Bluetooth connection is only established when the user presses the physical button; otherwise, the connection is rejected.
[0058] S200: Based on the API call request for digital currency transactions sent by the digital currency wallet management APP, the digital currency wallet SDK sends a digital currency payment request to the digital currency wallet TA;
[0059] S300: Based on digital currency payment requests, Bluetooth connection and line protection key, digital currency wallet TA generates APDU commands, and forwards the APDU commands to Bluetooth digital currency hardware wallet through digital currency wallet SDK;
[0060] Specifically, to enhance payment security, the digital currency wallet TA displays transaction information included in the digital currency payment request through its TUI (Transaction User Interface). It generates an APDU (Action Processing Unit) command based on the user's input payment password and confirmation instruction. The payment instruction is only issued after the user confirms the payment. If the user does not press the confirmation button displayed on the TUI or presses the cancel button within the predetermined time, it indicates that the user does not wish to pay, and the payment is canceled, greatly improving payment security.
[0061] S400, based on APDU commands, Bluetooth connection and line protection key, Bluetooth digital currency hardware wallet performs digital currency payment operations, generates APDU response, and returns the APDU response to digital currency wallet TA through digital currency wallet SDK;
[0062] Specifically, based on the APDU command and the user's confirmation instruction input via a physical button, the Bluetooth-enabled digital currency hardware wallet executes the digital currency payment operation and generates an APDU response. The payment operation is only executed after the user presses the physical button to confirm their payment intention, thus improving payment security. If the user does not press the physical button within a certain time, the payment transaction is canceled, and the payment command becomes invalid.
[0063] S500, based on APDU response and line protection key, digital currency wallet TA returns the transaction result to digital currency wallet SDK;
[0064] S600: Based on the transaction results, the digital currency wallet SDK returns the API call results to the digital currency wallet management APP.
[0065] Preferably, the line protection key includes an ENC-KEY and a MAC-KEY. The process of communication between the digital currency wallet TA and the Bluetooth-based digital currency hardware wallet is as follows.
[0066] The S300 includes:
[0067] S301, Digital Currency Wallet TA generates APDU command;
[0068] S302. The digital currency wallet TA uses ENC-KEY to encrypt the APDU command, obtaining ciphertext D1; that is, Enc(APDU).
[0069] S303. The digital currency wallet TA uses the MAC-KEY to calculate the MAC of the ciphertext D1 to obtain the message authentication code D2; that is, Mac(Enc(APDU)).
[0070] S304, the digital currency wallet TA sends the ciphertext D1 and message authentication code D2 to the digital currency wallet SDK; the final instruction from TA to SDK is Enc(APDU)||Mac(Enc(APDU)), where || is the connection.
[0071] S305. Based on Bluetooth connection, the digital currency wallet SDK sends the ciphertext D1 and message authentication code D2 to the Bluetooth-enabled digital currency hardware wallet.
[0072] The S400 includes:
[0073] S401, Bluetooth-enabled digital currency hardware wallets use MAC-KEY to verify message authentication code D2. If verification fails, the process ends.
[0074] The S402 Bluetooth-based digital currency hardware wallet uses the ENC-KEY to decrypt ciphertext D1 and obtain the APDU command.
[0075] The S403 Bluetooth-enabled digital currency hardware wallet executes APDU commands and generates APDU responses.
[0076] S404, Bluetooth-based digital currency hardware wallets use ENC-KEY to encrypt APDU responses, obtaining ciphertext D3;
[0077] The S405 Bluetooth-based digital currency hardware wallet uses the MAC-KEY to calculate the MAC of the ciphertext D3, and obtains the message authentication code D4.
[0078] S406. Based on Bluetooth connection, the Bluetooth-enabled digital currency hardware wallet sends the ciphertext D3 and message authentication code D4 to the digital currency wallet SDK.
[0079] S407, the digital currency wallet SDK sends the ciphertext D3 and message authentication code D4 to the digital currency wallet TA;
[0080] The S500 includes:
[0081] S501. The digital currency wallet TA uses the MAC-KEY to verify the message authentication code D4. If the verification fails, the process ends.
[0082] S502, the digital currency wallet TA uses ENC-KEY to decrypt ciphertext D3 and obtains an APDU response.
[0083] The key to the technical solution of this invention lies in utilizing a TEE (Transmission Equipment) in conjunction with a Bluetooth hardware wallet to implement a digital currency payment system; only the digital currency wallet management APP is allowed to access the digital currency wallet TA (Transmission Transaction Parameter) within the mobile phone TEE; the TUI (Transmission User Interface) function of the mobile phone TEE is used to input the digital currency wallet password and digital currency transaction parameters; the TUI function of the mobile phone TEE is used to display digital currency transaction information and confirm the user's transaction intention; the digital currency wallet TA and the Bluetooth hardware wallet communicate based on a line protection key to protect the confidentiality and integrity of communication data; during the Bluetooth pairing process between the Bluetooth hardware wallet and the mobile phone, the physical button on the hardware wallet is used to confirm the user's pairing intention; during the digital currency transaction process, the method for confirming the user's transaction intention is: the user clicks the TUI "Confirm" button to confirm the transaction, or the user first clicks the TUI "Confirm" button and then uses the physical button on the hardware wallet for double confirmation.
[0084] Based on the above technical solutions and key technical points, the beneficial effects brought about by the technical solutions of the present invention include at least the following:
[0085] 1) It is equivalent to equipping a Bluetooth hardware wallet with a remotely connected display screen and keypad (provided by the phone's TEE), with good display effect, rich display content, and good keyboard input experience;
[0086] 2) Reduce the size of the Bluetooth hardware wallet, making it easier to carry and lowering costs;
[0087] 3) High payment security, balancing ease of use, convenience, and security;
[0088] 4) It is applicable to a wide range of mobile phone models and does not require the phone to have a built-in SE.
[0089] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention is also intended to include these modifications and variations.
Claims
1. A payment system based on a TEE and a Bluetooth-enabled digital currency hardware wallet, characterized in that, include: Mobile smart terminals and Bluetooth-enabled digital currency hardware wallets; The mobile smart terminal includes a Rich OS operating system and a Trusted Execution Environment (TEE OS) running in parallel. The Rich OS runs a digital currency wallet management app, which integrates a digital currency wallet SDK. The TEE OS runs a digital currency wallet TA. The digital currency wallet management app is used to query balances, deposit funds, withdraw cash, make payments, and receive payments by calling the API interface of the digital currency wallet SDK. The digital currency wallet SDK is used to access the digital currency wallet TA and establish a Bluetooth connection with the Bluetooth-enabled digital currency hardware wallet. The digital currency wallet TA is used to implement the digital currency payment function of the Bluetooth-enabled digital currency hardware wallet and communicates with the Bluetooth-enabled digital currency hardware wallet through the digital currency wallet SDK. The Bluetooth-enabled digital currency hardware wallet includes: a security chip control module, a communication interface and a power control module connected to the security chip control module, the communication interface including an NFC module and a Bluetooth module, the NFC module being used to communicate with other hardware wallets, and the Bluetooth module being used to communicate with the mobile smart terminal; wherein, a pre-installed line protection key is provided between the Bluetooth-enabled digital currency hardware wallet and the digital currency wallet TA for end-to-end encryption.
2. The payment system according to claim 1, characterized in that, The digital currency wallet TA is also used to: verify the authenticity of the digital currency wallet management APP before operation, and the digital currency wallet TA only responds to access requests from the digital currency wallet management APP.
3. The payment system according to claim 1, characterized in that, The TEE OS's TUI is used to provide a reliable human-computer interaction interface, including providing multiple virtual keyboard configurations, receiving user-input wallet passwords and transaction parameters, and displaying the transaction parameters, a confirmation button, and a cancel button.
4. The payment system according to any one of claims 1-3, characterized in that, The Bluetooth-enabled digital currency hardware wallet also has a physical button, which is connected to the security chip control module. The physical button is used to confirm the user's pairing intention during the Bluetooth pairing process between the Bluetooth-enabled digital currency hardware wallet and the mobile smart terminal, and to confirm the user's transaction intention during the digital currency transaction process.
5. A payment method based on a TEE and a Bluetooth-enabled digital currency hardware wallet, characterized in that, Includes the following steps: S100 establishes a Bluetooth connection between the Bluetooth-enabled digital currency hardware wallet and the digital currency wallet SDK, and pre-sets a line protection key for communication with the digital currency wallet TA. S200, Based on the API call request for digital currency transactions sent by the digital currency wallet management APP, the digital currency wallet SDK sends a digital currency payment request to the digital currency wallet TA; S300. Based on the digital currency payment request, the Bluetooth connection, and the line protection key, the digital currency wallet TA generates an APDU command and forwards the APDU command to the Bluetooth-enabled digital currency hardware wallet through the digital currency wallet SDK. S400. Based on the APDU command, the Bluetooth connection, and the line protection key, the Bluetooth-based digital currency hardware wallet performs a digital currency payment operation, generates an APDU response, and returns the APDU response to the digital currency wallet TA through the digital currency wallet SDK. S500. Based on the APDU response and the line protection key, the digital currency wallet TA returns the transaction result to the digital currency wallet SDK; S600. Based on the transaction result, the digital currency wallet SDK returns the API call result to the digital currency wallet management APP.
6. The payment method according to claim 5, characterized in that, In S100, the Bluetooth-enabled digital currency hardware wallet establishes a Bluetooth connection with the digital currency wallet SDK based on a confirmation connection command input by the user via a physical button. In S300, the digital currency wallet TA displays the transaction information contained in the digital currency payment request through the TUI, and generates an APDU command based on the payment password and confirmation instruction entered by the user through the TUI; In S400, the Bluetooth-enabled digital currency hardware wallet executes digital currency payment operations based on the confirmation transaction command input by the user via the physical button.
7. The payment method according to claim 5, characterized in that, The line protection keys include ENC-KEY and MAC-KEY.
8. The payment method according to claim 7, characterized in that, The S300 includes: S301, The digital currency wallet TA generates an APDU command; S302. The digital currency wallet TA encrypts the APDU command using the ENC-KEY to obtain ciphertext D1; S303. The digital currency wallet TA uses the MAC-KEY to calculate the MAC of the ciphertext D1 to obtain the message authentication code D2. S304. The digital currency wallet TA sends the ciphertext D1 and the message authentication code D2 to the digital currency wallet SDK; S305. Based on the Bluetooth connection, the digital currency wallet SDK sends the ciphertext D1 and the message authentication code D2 to the Bluetooth-enabled digital currency hardware wallet.
9. The payment method according to claim 8, characterized in that, The S400 includes: S401. The Bluetooth-type digital currency hardware wallet uses the MAC-KEY to verify the message authentication code D2. If the verification fails, the process ends. S402. The Bluetooth-based digital currency hardware wallet uses the ENC-KEY to decrypt the ciphertext D1 to obtain the APDU command; S403. The Bluetooth-enabled digital currency hardware wallet executes the APDU command and generates an APDU response; S404. The Bluetooth-based digital currency hardware wallet encrypts the APDU response using the ENC-KEY to obtain ciphertext D3. S405. The Bluetooth-type digital currency hardware wallet uses the MAC-KEY to calculate the MAC of the ciphertext D3 to obtain the message authentication code D4. S406. Based on the Bluetooth connection, the Bluetooth-enabled digital currency hardware wallet sends the ciphertext D3 and the message authentication code D4 to the digital currency wallet SDK. S407, The digital currency wallet SDK sends the ciphertext D3 and the message authentication code D4 to the digital currency wallet TA.
10. The payment method according to claim 9, characterized in that, The S500 includes: S501. The digital currency wallet TA uses the MAC-KEY to verify the message authentication code D4. If the verification fails, the process ends. S502, The digital currency wallet TA uses the ENC-KEY to decrypt the ciphertext D3 and obtain the APDU response.