Method and system for secure and verifiable offline blockchain transactions
By using a trusted execution environment and time-limited credentials, the problem of offline processing of blockchain transactions is solved, enabling secure and verifiable offline transactions, preventing double-spending, and ensuring transaction accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MASTERCARD INT INC
- Filing Date
- 2020-06-10
- Publication Date
- 2026-07-14
AI Technical Summary
Existing blockchain transactions require an active connection to the blockchain network and cannot be conducted effectively offline, leading to the inability to prevent the currency from being used multiple times.
By using a trusted execution environment and timed credentials, gateway devices store and manage unspent transaction outputs and monetary amounts, generating timed credentials for offline transactions to ensure transaction security and verifiability.
It enables secure and verifiable blockchain transactions offline, preventing double-spending and ensuring the accuracy of transactions and the legitimate use of currency.
Smart Images

Figure CN114788222B_ABST
Abstract
Description
[0001] Cross-reference to related applications
[0002] This application claims the benefit and priority of U.S. Nonprovisional Application No. 16 / 509,765, filed July 12, 2019. The entire disclosure of the above application is incorporated herein by reference. Technical Field
[0003] This disclosure relates to secure and verifiable offline blockchain transactions, specifically involving the use of gateways and timed credentials, in addition to trusted execution environments in embedded systems such as mobile devices, to enable blockchain transactions between computing devices without an active connection to any node in the relevant blockchain network. Background Technology
[0004] Blockchain offers many clear advantages over traditional payment systems, particularly the anonymity it provides and the transparency most blockchains offer, where every transaction is publicly visible. However, compared to its traditional payment network counterparts, blockchain also suffers from several drawbacks. One such drawback is the need for an active communication channel with blockchain nodes.
[0005] In traditional payment transactions, messages are typically exchanged with payment networks and financial institutions as part of the processing. However, in situations where connectivity is unavailable to payment networks or financial institutions, offline payment transactions are sometimes permitted. In these cases, payment networks and / or issuing institutions can authorize points of sale, gateway processors, merchants, acquiring institutions, or other entities to perform proxy processing, where data available from the payment instrument itself can be used to authorize the payment transaction, and the information is later provided to the payment network for synchronization. Such approaches can be beneficial in situations where communication may be weak or in cases of large network congestion that could cause communication failures or significant delays.
[0006] However, there is currently no such method for blockchain. Processing blockchain transactions requires connecting to nodes in the blockchain network to verify proposed transactions (e.g., ensuring the payer has sufficient currency to pay the transaction amount and is entitled to use the proposed unspent transaction output). Such verification is often considered necessary because any offline exchange could allow the payer to use the unspent transaction output more than once before the blockchain is updated, thus enabling the payer to use a single unit of currency in multiple transactions, which would result in one or more recipients suffering losses when making their payments.
[0007] Therefore, a technological solution is needed to enable offline blockchain transactions in a way that provides accuracy while preventing currency from being used in multiple offline transactions. Summary of the Invention
[0008] This disclosure provides a description of systems and methods for performing secure, verifiable, offline blockchain transactions via a trusted execution environment and timed credentials. A novel type of blockchain node, referred to herein as a gateway, is used, wherein the gateway maintains a record of the amount of currency associated with each blockchain wallet registered to it and any unspent transaction outputs. When a user wishes to conduct a blockchain transaction offline, the blockchain wallet registers with the gateway and requests a timed credential. The credential is provided to the wallet and can be transmitted to the recipient along with other conventional blockchain transaction information during offline exchanges. In some embodiments, asset information is also stored in a device that maintains an account of the unspent transaction outputs available to the blockchain wallet, even offline, to ensure that no outputs are double-spent. This accounting, along with the timed credential, enables offline blockchain transactions while preventing double-spending and allows recipients to ensure they will receive the correct currency when an active connection to the blockchain network is available, and also allows recipients to immediately use the currency in subsequent offline transactions.
[0009] A method for secure, verifiable, offline blockchain transactions using a trusted execution environment and timed credentials includes: storing a cryptographic key pair including a public key and a private key in the trusted execution environment of a computing device; sending the public key to a gateway device in a blockchain network by a transmitter of the computing device; receiving a timed credential from the gateway device by a receiver of the computing device; generating a blockchain data value by a processing device of the computing device, wherein the blockchain data value includes at least the timed credential, the transaction amount, and the destination address; digitally signing the generated blockchain data value using the private key by the trusted execution environment of the computing device; and sending the signed blockchain data value to an external device by a transmitter of the computing device.
[0010] A system for executing secure, verifiable, offline blockchain transactions via a trusted execution environment and timed credentials includes: a gateway device for a blockchain network; a computing device including a trusted execution environment storing an encrypted key pair including a public key and a private key, a transmitter sending the public key to the gateway device, a receiver receiving timed credentials from the gateway device, and a processing device for generating blockchain data values, wherein the blockchain data values include at least the timed credentials, a transaction amount, and a destination address, wherein the trusted execution environment digitally signs the generated blockchain data values using the private key, and the transmitter sends the signed blockchain data values to an external device; and an external device receiving the signed blockchain data values. Attached Figure Description
[0011] The scope of this disclosure is best understood from the following detailed description of exemplary embodiments when read in conjunction with the accompanying drawings. The drawings include the following figures:
[0012] Figure 1This is a block diagram illustrating a high-level system architecture for executing offline blockchain transactions according to an exemplary embodiment.
[0013] Figure 2 This illustrates an exemplary embodiment for executing offline blockchain transactions via a trusted execution environment. Figure 1 A block diagram of the computing device of the system.
[0014] Figure 3 This illustrates an embodiment for use in Figure 1 The flowchart shows the process of executing offline blockchain transactions in the system.
[0015] Figure 4 This is a flowchart illustrating an exemplary method for executing secure, verifiable, offline blockchain transactions using a trusted execution environment and timed credentials, according to an exemplary embodiment.
[0016] Figure 5 This is a block diagram illustrating a computer system architecture according to an exemplary embodiment.
[0017] Other areas of application of this disclosure will become clear from the detailed description provided below. It should be understood that the detailed description of exemplary embodiments is for illustrative purposes only and is therefore not intended to necessarily limit the scope of this disclosure. Detailed Implementation
[0018] Glossary
[0019] A blockchain is a shared ledger of all transactions of digital assets. One or more computing devices can constitute a blockchain network, which can be configured to process and record transactions as part of blocks in the blockchain. Once a block is completed, it is added to the blockchain, thereby updating the transaction record. In many cases, a blockchain can be a ledger of transactions in chronological order, or it can be presented in any other order suitable for use by the blockchain network. In some configurations, transactions recorded in the blockchain may include a destination address and an asset amount, such that the blockchain records how much currency can be attributed to a particular address. In some cases, transactions are financial while others are not financial, or may include additional or different information, such as source address, timestamps, etc. In some embodiments, the blockchain may also include, or alternatively include, virtually any type of data as transactions placed or required to be placed in a distributed database, and may be confirmed and validated by the blockchain network through proof-of-work and / or any other suitable verification technology associated therewith, which maintains a growing list of data records to prevent (even by its operators) tampering and revision. In some cases, data about a given transaction may also include additional data appended to the transaction data that is not directly part of the transaction. In some cases, incorporating such data into a blockchain may constitute a transaction. In such cases, the blockchain may not be directly associated with a specific digital currency, fiat currency, or other type of currency.
[0020] Systems for executing offline blockchain transactions
[0021] Figure 1 A system 100 is shown for executing secure and verifiable blockchain transactions offline (e.g., without an active connection to a blockchain node) using a Trusted Execution Environment (TEE) and timed credentials.
[0022] System 100 may include computing device 102. Computing device 102, discussed in more detail below, may include a blockchain wallet. As discussed below, a blockchain wallet may include an encrypted key pair containing a public and a private key, which may be stored in a TEE within computing device 102. The TEE may prevent data stored therein from being accessed by any component outside the TEE within computing device 102. In other words, the private key stored in the TEE of computing device 102 may not be accessible to any component of computing device 102 other than the TEE itself and any programs stored therein. The blockchain wallet can be used to transfer digital assets as part of a blockchain network 106.
[0023] Blockchain network 106 may include multiple blockchain nodes. Each node may be, as discussed in more detail below, Figure 5The computing system shown is configured to perform functions related to blockchain processing and management, including generating blockchain data values, verifying proposed blockchain transactions, verifying digital signatures, generating new blocks, verifying new blocks, and maintaining copies of the blockchain. The blockchain can be a distributed ledger comprising at least multiple blocks. Each block can include at least a block header and one or more data values. Each block header can include at least a timestamp, a block reference value, and a data reference value. The timestamp can be the time the block header was generated and can be represented using any suitable method (e.g., UNIX timestamp, DateTime, etc.). The block reference value can be a value referencing an earlier block in the blockchain (e.g., based on a timestamp). In some embodiments, the block reference value in the block header can be a reference to the block header of the most recently added block preceding the corresponding block. In an exemplary embodiment, the block reference value can be a hash value generated by hashing the block header of that most recently added block. The data reference value can similarly be a reference to one or more data values stored in a block that includes a block header. In an exemplary embodiment, the data reference value may be a hash value generated by hashing one or more data values. For example, the data reference value may be the root of a Merkle tree generated using one or more data values.
[0024] Using a block reference value and a data reference value in each block header makes the blockchain immutable. Any attempt to modify a data value will require generating a new data reference value for that block, which in turn will require generating new block reference values for subsequent blocks, and further requiring the generation of new block reference values in each subsequent block. This will have to be performed and updated on every single node in the blockchain network 106 before a new block can be generated and added to the blockchain to make the changes permanent. Computational and communication limitations can make such modifications extremely difficult (if not impossible), thus making the blockchain immutable.
[0025] In some embodiments, the blockchain can be used to store information about blockchain transactions conducted between two different blockchain wallets. A blockchain wallet may include a private key for generating cryptographic key pairs that serve as authorization for a payer to a blockchain transaction, wherein the digital signature can be verified by the blockchain network 106 using the public key of the cryptographic key pair. In some cases, the term "blockchain wallet" may specifically refer to a private key. In other cases, the term "blockchain wallet" may refer to a computing device 102 that stores a private key for use in blockchain transactions. For example, each computing device 102 may each have its own private key for a corresponding cryptographic key pair and may each be a blockchain wallet for use in transactions on a blockchain associated with the blockchain network. The computing device 102 may be any type of device suitable for storing and utilizing blockchain wallets, such as a desktop computer, laptop computer, notebook computer, tablet computer, cellular phone, smartphone, smartwatch, smart TV, wearable computing device, implantable computing device, etc., also configured to perform the additional functions discussed herein. For example, any computing device that includes or otherwise accesses the TEE may be suitable as computing device 102, which may, for example, include a smart card having the TEE inserted into a card reader, which may operate as computing device 102. In this case, "computing device" may refer to the smart card and / or the card reader, if applicable.
[0026] Where applicable, each blockchain data value stored in the blockchain may correspond to a blockchain transaction or other data storage. A blockchain transaction may include at least: a digital signature of the sender of currency (e.g., computing device 102) generated using the sender's private key, a blockchain address of the receiver of currency (e.g., external device 104, which may be another computing device 102 including its own blockchain wallet, but may be the receiver of transactions involving said computing device 102) generated using the receiver's public key, and the amount of blockchain currency transferred or other data being stored. In some blockchain transactions, the transaction may also include one or more blockchain addresses where the sender currently stores blockchain currency (e.g., a digital signature proving its access to such currency), and an address generated using the sender's public key for any exchange that will be retained by the sender. Addresses to which digital assets have been sent that can be used in future transactions are called "output" addresses because each address was previously used to capture the output of a previous blockchain transaction, and are also called "unspent transactions" because currency was sent to an address in a previous transaction that remains unspent at that address. In some cases, a blockchain transaction may also include the sender's public key for entities to use when verifying the transaction. In the traditional processing of blockchain transactions, such data can be provided by the sender or receiver to nodes in the blockchain network 106. Nodes can verify the digital signature using the public key in the sender's wallet's cryptographic key pair, and can also verify the sender's access to funds (e.g., unspent transactions have not been spent and were sent to an address associated with the sender's wallet), and can then include the blockchain transaction in a new block. In traditional blockchain implementations, a new block can be verified by other nodes in the blockchain network 106 before being added to the blockchain and distributed to all nodes in the blockchain network 106. Where the blockchain data value may be unrelated to the blockchain transaction and is instead a storage of other types of data, the blockchain data value may still include or otherwise involve verification of the digital signature.
[0027] In system 100, in addition to the other nodes constituting blockchain network 106, blockchain network 106 may also include one or more gateway devices 108. Gateway device 108 may be a full-featured blockchain node also configured to perform the additional functions discussed herein. Gateway device 108 may be configured to store aggregated states of one or more asset classes. Asset classes may be a type of currency, such as digital assets or fiat currency. For example, in one example, gateway device 108 may store aggregated states of digital assets unique to blockchain network 106. In another example, gateway device 108 may store the state of digital assets as well as aggregated states of US dollars. The aggregated states stored in gateway device 108 may be ledgers of unspent transaction outputs and associated currency amounts for each asset class registered to it by computing device 102.
[0028] For example, a user of computing device 102 may wish to be able to conduct offline blockchain transactions using computing device 102. The user can register with gateway device 108a using computing device 102. As part of the registration process, computing device 102 can send (e.g., using any suitable communication network and method, such as an application programming interface, webpage, application, etc.) the public key of the computing device's cryptographic key pair to gateway device 108a. Gateway device 108a can store the public key of the computing device's blockchain wallet and the aggregated state of one or more asset classes for gateway device 108a, also referred to herein as asset state. If the blockchain wallet has not yet been used for transactions of that asset class, the asset state may simply mean that the blockchain wallet does not have that asset available. If the blockchain wallet has an existing transaction history, gateway device 108a can use the public key to identify all transactions in the blockchain involving the blockchain wallet to identify the aggregated asset state of computing device 102, including its unspent transaction outputs and associated monetary amounts.
[0029] Once the asset status of computing device 102 is identified and registered in gateway device 108a, gateway device 108a can identify the timed credentials of computing device 102. The timed credentials can be any data value that can be used as credentials for computing device 102 to prove its authorization to execute offline blockchain transactions. Credentials can be, for example, digital certificates, digital signatures generated by gateway device 108a, random or pseudo-random values, or any other suitable value. Credentials can be time-limited, meaning they must be used for offline blockchain transactions within a predetermined time period to make such transactions valid. In some cases, this time period can be a restriction on the recipient of the timed credentials for the offline blockchain transaction (e.g., external device 104). In other cases, the time period can be a restriction on when the recipient connects to its own gateway device 108b to successfully verify and process the transaction. The predetermined time period can be set by gateway device 108a or by computing device 102, such as in its request for credentials. For example, users of computing device 102 may have preferences regarding how long they want the credentials to last, such as if they know when they will want to execute offline blockchain transactions.
[0030] In the event that computing device 102 is requesting a new timed credential (e.g., if computing device 102 has previously registered with gateway device 108), computing device 102 may need to perform a verification as part of the timed credential request process. In this case, the TEE can generate verification data, which may include data about the application stored in and executed by the TEE, as well as data stored therein. For example, the verification data may include version information of the TEE and its application, and data indicating that the TEE has not been tampered with and remains authentic. The verification data may be sent to gateway device 108, which may need to successfully verify the verification data of the TEE before generating the timed credential and sending it back to computing device 102. Any suitable method for verifying the TEE that is clear to a person skilled in the art can be used to ensure that the TEE is authentic and has not been tampered with before providing the timed credential.
[0031] After registration, computing device 102 can receive timed credentials and their asset status from gateway device 108a. The timed credentials can be stored in the TEE of computing device 102. The asset status can be stored in the TEE or in a separate memory of computing device 102. When computing device 102 wants to participate in an offline blockchain transaction, it can receive at least the transaction amount of the blockchain transaction. This transaction amount can be received via any suitable method, such as from a transmission from external device 104, or input via an input device connected to the interface of computing device 102, such as from a user typing the transaction amount using the keyboard of computing device 102.
[0032] Once the transaction amount is received, computing device 102 can verify (e.g., via a blockchain wallet application, a separate application running in a TEE, etc.) that the blockchain wallet has sufficient currency to pay the transaction. Verification may include checking the asset status received by computing device 102 from gateway device 108a against the asset being used in the offline blockchain transaction. If the asset status indicates that computing device 102 does not have sufficient currency to pay the transaction, the user of computing device 102 can be notified and the transaction can be blocked. If there is sufficient currency to pay the transaction, computing device 102 can generate a new blockchain data value for the transaction. This blockchain data value may include the received transaction amount and sufficient unspent transaction outputs required to pay that amount. Where computing device 102 may have exchange capabilities, an address can be generated using the computing device's public key to receive excess currency as part of the offline blockchain transaction.
[0033] The blockchain data value may also include a timed credential, or may otherwise be attached to a timed credential (e.g., during transmission by computing device 102). Once the blockchain data value is generated, computing device 102 can digitally sign the blockchain data value using a private key stored in the TEE. The signed blockchain data value can then be sent to external device 104. In some embodiments, the blockchain data value may also include a destination address before signing offline blockchain transactions corresponding to the blockchain wallet of external device 104. In such embodiments, external device 104 may send the destination address to computing device 102, or may send the external device's public key to computing device 102 for thereby generating the destination address. In other embodiments, external device 104 may generate the destination address using its public key after receiving the signed blockchain data value, wherein external device 104 may include the destination address when submitting the blockchain transaction for verification once online.
[0034] Once external device 104 has the signed blockchain data value, it can send the signed blockchain data value to gateway device 108 (e.g., the same gateway device 108a or another gateway device 108b associated with the same asset class) once the active connection is available again (e.g., external device 104 is "online"). In some cases where the blockchain data value may include a timed credential, the timed credential may be removed by external device 104, but it can still be sent to gateway device 108 along with the blockchain data value (e.g., where the timed credential may therefore not be added to the blockchain). In some cases, external device 104 may not need to sign the blockchain data value and can simply forward the blockchain data value signed by computing device 102 to gateway device 108. Gateway device 108b can receive signed blockchain data values and can verify blockchain transactions using conventional methods (e.g., verifying unspent transaction outputs, digital signatures using public keys, etc.). It can also verify that timed credentials are used by the computing device 102 it provides within a predetermined time period (e.g., verifying digital signatures using the public key provided during the registration period of the timed credential included in the blockchain data value). If a transaction is successfully verified, it can be added to the blockchain using conventional methods and systems. In some cases, if applicable, timed credentials can be removed from the blockchain data value before being added to the blockchain. Each gateway device 108 can then update the asset state of both computing device 102 and external device 104. Updating the asset state can include updating unspent transaction outputs and associated monetary amounts, such as by removing unspent transaction outputs from the computing device's asset state and adding new unspent transaction outputs from the external device 104's asset state for new blockchain transactions.
[0035] In some embodiments, once the asset state has been updated, the gateway device 108 can send a notification with its updated asset state to the computing device 102 and the external device 104. Each device can receive the updated asset state and can update the asset state data stored locally therein. In some cases, the computing device 102 and the external device 104 can update their own asset states when a blockchain transaction is performed. For example, the computing device 102 can update its asset state once a signed blockchain data value is sent to the external device 104 for an offline blockchain transaction, or when an online blockchain transaction is submitted to a node for processing. In some cases, the computing device 102 can update its asset state, but can also receive a notification of the updated asset state from the gateway device 108, which can be used for synchronization, such as ensuring that the local asset state data of the computing device 102 stored in the blockchain is accurate. If the computing device 102 wants to perform a new offline blockchain transaction, it can request a new timed credential from the gateway device 108. In some cases, the original timed credential may be suitable for use by computing device 102 in multiple offline blockchain transactions, provided that subsequent offline transactions meet the requirements (e.g., time limits). In other cases, an updated asset state may only be provided to computing device 102 when a new timed credential is received, or when computing device 102 requests an updated asset state, such as by returning online to blockchain network 106.
[0036] In some embodiments, computing device 102 may be configured to execute multiple offline blockchain transactions during periods when it is offline to blockchain network 106. In such embodiments, computing device 102 can update its asset state once the signed blockchain data value has been sent to external device 104, while computing device 102 remains offline to blockchain network 106. In these embodiments, computing device 102 may be configured to execute additional offline blockchain transactions using the same timed credentials, or it may receive multiple timed credentials from gateway device 108 for each offline blockchain transaction. In this case, the timed credentials may be one-time use and may have a predetermined order of use, wherein gateway device 108 may consider such an order during processing once the signed blockchain data value is received from external device 104 (e.g., if a secondary timed credential is received before any other credential, gateway device 108 may wait for its processing before receiving the primary timed credential, such as due to different timings of external device 104 coming online). In these embodiments, asset state may be updated offline by computing device 102, such as to prevent computing device 102 from double-spending. For example, if computing device 102 uses all unspent transaction outputs for the first offline blockchain transaction, then any subsequent offline blockchain transactions will be prohibited until a new asset state without unspent transaction outputs is received from gateway device 108.
[0037] In some embodiments, gateway device 108 may implement asset aggregation functionality using smart contracts. For example, the blockchain may include one or more smart contracts configured to perform asset state aggregation when a new transaction is added to the blockchain, which includes blockchain wallets registered with gateway device 108. In some cases, asset aggregation functionality may be implemented via smart contracts through other devices such as computing device 102 (e.g., within its TEE). In other embodiments, the actions performed by gateway device 108 may be automated in a similar manner. In some cases, gateway device 108 may update the asset state whenever a new block is added to the blockchain. In other cases, gateway device 108 may update the asset state when a request for an updated asset state or a request for a new timed credential is received. In still other cases, gateway device 108 may update the asset state periodically (e.g., daily). In this case, the time period may be based on the time limit of the timed credential, such that the asset state is not updated in gateway device 108 while the timed credential is still available in offline transactions.
[0038] The methods and systems discussed in this paper enable computing device 102 to participate in blockchain transactions while both the sender and receiver are offline from blockchain network 106. The use of timed credentials and aggregated asset states from gateway device 108 ensures that computing device 102 can only conduct offline blockchain transactions when authorized, and prevents double-spending by using asset states and the requirement for timed credentials for any offline transaction. Gateway device 108, included in blockchain network 106, can facilitate this functionality through existing blockchain nodes, requiring minimal modifications to the existing blockchain network 106, thus resulting in significant improvements without substantial resource consumption.
[0039] computing devices
[0040] Figure 2 An embodiment of the computing device 102 in system 100 is shown. It will be clear to those skilled in the art that... Figure 2 The embodiments of computing device 102 shown are provided by way of illustration only and may not be exhaustive of all possible configurations of computing device 102 suitable for performing the functions discussed herein. For example, if a trusted execution environment is included in computing device 102, then in Figure 5 The computer system 500 shown and discussed in more detail below can be a suitable configuration for computing device 102. In some cases, each gateway device 108 and external device 104 in the blockchain network of system 100 can be connected to... Figure 2 The computing device 102 or Figure 5 The computer system 500 is similarly configured, including components such as those shown therein.
[0041] Computing device 102 may include receiving device 202. Receiving device 202 may be configured to receive data over one or more networks via one or more network protocols. In some cases, receiving device 202 may be configured to receive data from external device 104, gateway device 108, and other systems and entities via one or more communication methods (such as radio frequency, local area network, wireless local area network, cellular communication network, Bluetooth, Internet, etc.). In some embodiments, receiving device 202 may include multiple devices, such as different receiving devices for receiving data over different networks, such as a first receiving device for receiving data over a local area network and a second receiving device for receiving data over the Internet. Receiving device 202 may receive data signals transmitted electronically, wherein data may be superimposed on or otherwise encoded on the data signal and decoded, parsed, read, or otherwise obtained by receiving the data signal via receiving device 202. In some cases, receiving device 202 may include a parsing module for parsing the received data signal to obtain the data superimposed thereon. For example, receiving device 202 may include a parser program configured to receive data signals and transform the received data signals into usable inputs for functions performed by processing devices to execute the methods and systems described herein.
[0042] Receiving device 202 can be configured to receive data signals electronically transmitted by gateway device 108, which are superimposed on or otherwise encoded with asset status information and time-limited credentials. Receiving device 202 can also be configured to receive data signals electronically transmitted by external device 104, which are superimposed on or otherwise encoded with the destination address and / or public key of the blockchain wallet used to generate the blockchain address. Where computing device 102 is the recipient of an offline blockchain transaction, receiving device 202 can receive data signals electronically transmitted by external device 104, which are superimposed on or otherwise encoded with signed blockchain data values.
[0043] The computing device 102 may also include a communication module 204. The communication module 204 may be configured to transfer data between modules, engines, databases, memories, and other components of the computing device 102 for performing the functions discussed herein. The communication module 204 may include one or more communication types and utilize various communication methods for communication within the computing device. For example, the communication module 204 may include a bus, contact pin connectors, wires, etc. In some embodiments, the communication module 204 may also be configured to communicate between internal components of the computing device 102 and external components of the computing device 102 (such as externally connected databases, display devices, input devices, etc.). The computing device 102 may also include a processing device. As will be apparent to those skilled in the art, the processing device may be configured to perform the functions of the computing device 102 discussed herein. In some embodiments, the processing device may include multiple engines and / or modules (such as query module 218, generation module 220, verification module 222, etc.) specifically configured to perform one or more functions of the processing device and / or consist of multiple engines and / or modules specifically configured to perform one or more functions of the processing device. As used herein, the term "module" can be software or hardware specifically programmed to receive input, perform one or more processes using that input, and provide output. Based on this disclosure, the inputs, outputs, and processes performed by various modules will be apparent to those skilled in the art.
[0044] Computing device 102 may include a Trusted Execution Environment (TEE) 206. TEE 206 may be a secure storage area within computing device 102, protected in terms of confidentiality and integrity, and isolated from the rest of the components of computing device 102 such that only applications stored in or otherwise approved by TEE 206 can access the data stored therein. TEE 206 may be configured such that any attempt to tamper with or access TEE 206 could result in the destruction or other inoperability of TEE 206 to prevent compromise. TEE 206 may be configured to store at least the private key of the cryptographic key pair constituting the blockchain wallet of computing device 102, as well as any timed credentials received from gateway device 108. In some cases, the asset state of the computing device's blockchain wallet may be stored in TEE 206.
[0045] Computing device 102 may include a query module 218. Query module 218 may be configured to perform queries against a database to identify information. Query module 218 may receive one or more data values or query strings and may execute the query strings on a specified database (such as TEE 206 or memory 226 of computing device 102) to identify information stored therein. Query module 218 may then output the identified information to an appropriate engine or module of computing device 102 as needed. Query module 218 may, for example, perform a query on memory 226 of computing device 102 to identify the asset status of the computing device's blockchain wallet to determine whether an offline blockchain transaction can be performed to update the asset status of computing device 102, and so on.
[0046] The computing device 102 may also include a generation module 220. The generation module 220 may be configured to generate data for use by the computing device 102 in performing the functions discussed herein. The generation module 220 may receive instructions as input, generate data based on the instructions, and output the generated data to one or more modules of the computing device 102. For example, the generation module 220 may be configured to generate new blockchain data values, generate blockchain addresses, generate cryptographic key pairs, generate digital signatures, etc.
[0047] The computing device 102 may also include a verification module 222. Verification module 222 may be configured to perform verification and validation on the computing device 102 as part of the functionality discussed herein. Verification module 222 may receive instructions as input, which may include data to be verified and / or data to be used in the verification. Verification module 222 may perform verification or validation upon request and may output the results of the verification to another module or engine of the computing device 102. Verification module 222 may be configured, for example, to verify digital signatures, verify asset status, verify time-limited credentials, or perform any other verification of the computing device 102 as discussed herein.
[0048] The computing device 102 may also include a transmitting device 224. The transmitting device 224 may be configured to transmit data over one or more networks via one or more network protocols. In some cases, the transmitting device 224 may be configured to transmit data to external device 104, gateway device 108, and other entities via one or more communication methods, local area networks, wireless local area networks, cellular communications, Bluetooth, radio frequency, the Internet, etc. In some embodiments, the transmitting device 224 may include multiple devices, such as different transmitting devices for transmitting data over different networks, such as a first transmitting device for transmitting data over a local area network and a second transmitting device for transmitting data over the Internet. The transmitting device 224 may electronically transmit a data signal superimposed with data that can be parsed by a receiving computing device. In some cases, the transmitting device 224 may include one or more modules for superimposing, encoding, or otherwise formatting data into a data signal suitable for transmission.
[0049] Sending device 224 can be configured to electronically send data signals to external device 104, overlaid with or otherwise encoded with a signed blockchain data value. Sending device 224 can also be configured to electronically send data signals to gateway device 108, overlaid with or otherwise encoded with registration data, requests to update asset status, requests for new timed credentials, etc. Where computing device 102 is the recipient of offline blockchain transactions, sending device 224 can be configured to electronically send data signals to external device 104, overlaid with or otherwise encoded with the public key of the computing device's cryptographic key pair and / or the destination address of the offline blockchain transaction. In such embodiments, sending device 224 can also be configured to send signed blockchain data values received from external device 104 to gateway device 108.
[0050] The computing device 102 may also include a memory 226. The memory 226 may be configured to store data used by the computing device 102 in performing the functions discussed herein, such as public and private keys, symmetric keys, etc. The memory 226 may be configured to store data using suitable data formatting methods and patterns, and may be any suitable type of memory, such as read-only memory, random access memory, etc. As will be apparent to those skilled in the art, the memory 226 may, for example, include encryption keys and algorithms, communication protocols and standards, data formatting standards and protocols, program code for modules and applications of the processing device, and other data that may be suitable for the computing device 102 to use in performing the functions discussed herein. In some embodiments, the memory 226 may include or may otherwise include a relational database that uses Structured Query Language for storing, identifying, modifying, updating, accessing, etc., structured datasets stored therein. The memory 226 may be configured to store, for example, additional blockchain data, credentials for verification, usage rule templates, communication data of the gateway device 108, smart contracts, signature generation and verification algorithms, address generation algorithms, blockchain wallet application code, asset state data, etc.
[0051] Offline blockchain transaction process
[0052] Figure 3 This demonstrates a method for processing offline blockchain transactions using a trusted execution environment and timed credentials. Figure 1 Example procedure executed in system 100.
[0053] In step 302, the generation module 220 of computing device 102 can generate an encrypted key pair including a private key and a public key, wherein the private key can be stored in the TEE 206 of computing device 102. In some cases, the key pair can be generated within the TEE 206 itself, such as by the generation module 220 included within the TEE 206 or by a separate application stored in and executed within the TEE 206. In some cases, the public key can also be stored in the TEE 206, or it can be stored in a separate memory 226 of computing device 102. In step 304, the transmitting device 224 of computing device 102 can electronically transmit a data signal to gateway device 108 to register the computing device's blockchain wallet. This data signal can include at least the public key of computing device 102, and can also include a specified asset class and proof from the TEE 206 that it is authentic and has not been tampered with.
[0054] In step 306, gateway device 108 may receive a public key (e.g., and proof, if applicable) from computing device 102. In step 308, gateway device 108 may store the public key of the computing device's blockchain wallet and the aggregated asset state of computing device 102, which includes any unspent transaction outputs associated with it and the monetary amount available for outputs of that asset class. In step 310, gateway device 108 may generate a timed credential for computing device 102. If proof is included, gateway device 108 may generate only the timed credential if the proof is successfully verified. In some embodiments, the timed credential may be a digital certificate unique to computing device 102 and may be limited to use during a predetermined time period. In step 312, gateway device 108 may electronically send the timed credential to computing device 102. In some cases, the sending may also include the asset state of the computing device's blockchain wallet for the asset class determined by gateway device 108.
[0055] In step 314, the receiving device 202 of computing device 102 can receive the timed certificate and asset status. The timed certificate can be stored in the TEE 206 of computing device 102. In some cases, the asset status can also be stored in the TEE 206 or in a separate memory 226. When it is an offline blockchain transaction, in step 316, the external device 104, which will be the recipient of the offline blockchain transaction, can generate a destination blockchain address using its own public key. In step 318, the external device 104 can send its destination address to computing device 102 using a suitable communication network and method. In step 320, the receiving device 202 of computing device 102 can receive the destination address from the external device 104.
[0056] In step 322, the generation module 220 of computing device 102 can generate a blockchain data value for the offline blockchain transaction. This blockchain data value may include the transaction amount of the offline transaction, the destination address received from external device 104, and a timed credential received from gateway device 108 (e.g., as part of or separate from the blockchain data value, as discussed above). The generation module 220 of computing device 102 can also use the private key of computing device 102 to generate (e.g., within TEE 206) a digital signature for the blockchain data value. In step 324, the sending device 224 of computing device 102 can electronically send the signed blockchain data value to external device 104 using a suitable communication network and method. In step 326, external device 104 can receive the signed blockchain data value. External device 104 can then store the signed blockchain data value until a connection with gateway device 108 becomes available, at which point the blockchain data value can be submitted for blockchain verification and updates. In some embodiments, external device 104 can be configured to immediately verify the timed credential to update its own asset status.
[0057] Exemplary methods for executing offline blockchain transactions
[0058] Figure 4 A method 400 for executing secure, verifiable, and offline blockchain transactions via a trusted execution environment and timed credentials is shown.
[0059] In step 402, the encryption key pair, including a public key and a private key, can be stored in a trusted execution environment (e.g., trusted execution environment 206) of the computing device (e.g., computing device 102). In step 404, the public key can be sent by a transmitter (e.g., transmitter 224) of the computing device to a gateway device (e.g., gateway device 108) in the blockchain network (e.g., blockchain network 106). In step 406, a receiver (e.g., receiver 202) can receive a timed credential from the gateway device.
[0060] In step 408, a blockchain data value may be generated by the processing device of the computing device (e.g., generation module 220), wherein the blockchain data value includes at least the transaction amount and the destination address. In step 410, the trusted execution environment of the computing device may digitally sign the generated blockchain data value using a private key. In step 412, the signed blockchain data value and the timed credential may be sent by the transmitter of the computing device to an external device (e.g., external device 104).
[0061] In one embodiment, any component in the computing device other than the trusted execution environment may be unable to access the private key. In some embodiments, method 400 may also include receiving a destination address from an external device by a receiver of the computing device before generating the blockchain data value.
[0062] In one embodiment, method 400 may further include storing the asset state of the computing device in its memory (e.g., memory 226), wherein the asset state includes at least one or more unspent transaction outputs and associated monetary amounts. In a further embodiment, method 400 may even include updating the stored asset state by a processing device of the computing device based on generated blockchain data values. In another further embodiment, the memory may be separate from the trusted execution environment. In yet another further embodiment, method 400 may further include: receiving a notification message from a gateway device by a receiver of the computing device; and updating the stored asset state by a processing device of the computing device based on the notification message. In a further still embodiment, the notification message may include modified unspent transaction outputs and associated monetary amounts.
[0063] Computer System Architecture
[0064] Figure 5 A computer system 500 is illustrated, wherein embodiments of the present disclosure or portions thereof may be implemented as computer-readable code. For example, the computer system 500 may be implemented using hardware, software, firmware, a non-transitory computer-readable medium having instructions stored thereon, or a combination thereof. Figure 1 The computing device 102, external device 104, and gateway device 108 are included and can be implemented in one or more computer systems or other processing systems. Figure 1 The computing device 102, external device 104, and gateway device 108 are included. Hardware, software, or any combination thereof can be used to implement... Figure 3 and Figure 4 The modules and components of the method.
[0065] If programmable logic is used, this logic can be executed on a commercially available processing platform configured with executable software code to become a dedicated computer or dedicated device (e.g., a programmable logic array, an application-specific integrated circuit, etc.). Those skilled in the art will recognize that embodiments of the disclosed subject matter can be practiced using a variety of computer system configurations, including multi-core multiprocessor systems, minicomputers, mainframes, computers linked or clustered with distributed functions, and microcomputers that are ubiquitous or can be embedded in virtually any device. For example, the embodiments described above can be implemented using at least one processor device and memory.
[0066] The processor unit or processor device discussed herein may be a single processor, multiple processors, or a combination thereof. A processor device may have one or more processor "cores". The terms "computer program medium," "non-transitory computer-readable medium," and "computer-usable medium" discussed herein are generally used to refer to tangible media, such as removable storage unit 518, removable storage unit 522, and hard disks installed in hard disk drive 512.
[0067] Various embodiments of this disclosure are described with reference to the example computer system 500. After reading this specification, it will become clear to those skilled in the art how to implement this disclosure using other computer systems and / or computer architectures. Although operations may be described as sequential processes, some operations may actually be performed in parallel, concurrently, and / or in a distributed environment, and the program code may be stored locally or remotely for access by a single or multiple processor machines. Furthermore, in some embodiments, the order of operations may be rearranged without departing from the spirit of the disclosed subject matter.
[0068] Processor device 504 may be a dedicated processor device or a general-purpose processor device specifically configured to perform the functions discussed herein. Processor device 504 may be connected to communication infrastructure 506, such as a bus, message queue, network, multi-core messaging scheme, etc. The network may be any network suitable for performing the functions disclosed herein and may include a local area network (LAN), a wide area network (WAN), a wireless network (e.g., WiFi), a mobile communication network, a satellite network, the Internet, fiber optic cable, coaxial cable, infrared, radio frequency (RF), or any combination thereof. Other suitable network types and configurations will be apparent to those skilled in the art. Computer system 500 may also include main memory 508 (e.g., random access memory, read-only memory, etc.) and may also include secondary storage 510. Secondary storage 510 may include hard disk drives 512 and removable storage drives 514, such as floppy disk drives, tape drives, optical disk drives, flash memory, etc.
[0069] The removable storage drive 514 can read from and / or write to the removable storage unit 518 in a well-known manner. The removable storage unit 518 may include a removable storage medium that can be read from and written to by the removable storage drive 514. For example, if the removable storage drive 514 is a floppy disk drive or a Universal Serial Bus port, the removable storage unit 518 may be a floppy disk or a portable flash drive, respectively. In one embodiment, the removable storage unit 518 may be a non-transitory computer-readable recording medium.
[0070] In some embodiments, auxiliary memory 510 may include optional means for allowing computer programs or other instructions to be loaded into computer system 500, such as removable storage unit 522 and interface 520. As will be apparent to those skilled in the art, examples of such means may include program boxes and box interfaces (e.g., as found in video game systems), removable memory chips (e.g., EEPROM, PROM, etc.) and associated sockets, as well as other removable storage units 522 and interfaces 520.
[0071] Data stored in computer system 500 (e.g., in main memory 508 and / or auxiliary memory 510) can be stored on any type of suitable computer-readable medium, such as optical storage devices (e.g., compact discs, digital multifunction discs, Blu-ray discs, etc.) or magnetic tape storage devices (e.g., hard disk drives). Data can be configured with any type of suitable database configuration (e.g., relational databases, structured query language (SQL) databases, distributed databases, object databases, etc.). The appropriate configuration and storage type will be clear to those skilled in the art.
[0072] Computer system 500 may also include a communication interface 524. Communication interface 524 may be configured to allow the transfer of software and data between computer system 500 and external devices. Exemplary communication interface 524 may include a modem, network interface (e.g., an Ethernet card), communication port, PCMCIA slot, and card, etc. Software and data transferred via communication interface 524 may be in the form of signals, which may be electronic, electromagnetic, optical, or other signals that will be clear to those skilled in the art. Signals may travel via communication path 526, which may be configured to carry signals and may be implemented using wires, cables, optical fibers, telephone lines, cellular telephone links, radio frequency links, etc.
[0073] Computer system 500 may also include a display interface 502. Display interface 502 may be configured to allow data transfer between computer system 500 and external display 530. Exemplary display interface 502 may include a high-resolution multimedia interface (HDMI), a digital video interface (DVI), a video graphics array (VGA), etc. Display 530 may be any suitable type of display for displaying data transferred via display interface 502 of computer system 500, including cathode ray tube (CRT) displays, liquid crystal displays (LCDs), light-emitting diode (LED) displays, capacitive touch displays, thin-film transistor (TFT) displays, etc.
[0074] Computer program media and computer-usable media can refer to memory, such as main memory 508 and auxiliary memory 510, which can be memory semiconductors (e.g., DRAM, etc.). These computer program products can be means for providing software to computer system 500. Computer programs (e.g., computer control logic) can be stored in main memory 508 and / or auxiliary memory 510. Computer programs can also be received via communication interface 524. When executed, such computer programs enable computer system 500 to implement the present methods discussed herein. In particular, when executed, computer programs enable processor device 504 to implement the methods discussed herein. Figure 3 and Figure 4 The method is illustrated. Therefore, such a computer program can represent the controller of computer system 500. When implementing this disclosure using software, the software can be stored in a computer program product and loaded into computer system 500 using a removable storage drive 514, interface 520, and hard disk drive 512 or communication interface 524.
[0075] Processor device 504 may include one or more modules or engines configured to perform the functions of computer system 500. Each module or engine may be implemented using hardware, and in some cases may also utilize software such as program code and / or programs corresponding to those stored in main memory 508 or auxiliary memory 510. In such cases, the program code may be compiled by processor device 504 (e.g., by compiling a module or engine) before being executed by the hardware of computer system 500. For example, the program code may be source code written in a programming language, which is translated into a low-level language such as assembly language or machine code for execution by processor device 504 and / or any additional hardware components of computer system 500. The compilation process may include lexical analysis, preprocessing, parsing, semantic analysis, syntax-guided transformation, code generation, code optimization, and any other techniques that may be suitable for translating the program code into a low-level language suitable for controlling computer system 500 to perform the functions disclosed herein. It will be clear to those skilled in the art that such a process results in computer system 500 being a specially configured computer system 500 uniquely programmed to perform the functions discussed above.
[0076] Among other features, the technology consistent with this disclosure also provides systems and methods for executing secure, verifiable, offline blockchain transactions through trusted execution environments and time-limited credentials. While various exemplary embodiments of the disclosed systems and methods have been described above, it should be understood that they are presented merely for illustrative purposes and not for limitation. They are not exhaustive and do not limit the disclosure to the exact form disclosed. In light of the foregoing teachings, modifications and variations are possible, or can be obtained from practice with respect to the breadth or scope of this disclosure.
Claims
1. A method for executing secure, verifiable, offline blockchain transactions through a trusted execution environment and time-limited credentials, comprising: Storing cryptographic key pairs, including public and private keys, in the trusted execution environment of a computing device; The public key is sent from the transmitter of the computing device to the gateway device in the blockchain network; The transmitter of the computing device sends a request for a timed credential to the gateway device; In response to a request for a timed credential, the receiver of the computing device receives the timed credential from the gateway device, which authorizes offline blockchain transactions within a predetermined time period; The processing device of the computing device generates blockchain data values for offline blockchain transactions, wherein the blockchain data values include at least the transaction amount and the destination address; The trusted execution environment of the computing device uses the private key to digitally sign the generated blockchain data value; and The computing device's transmitter sends the signed blockchain data value and the timed credential to an external device, wherein the computing device and the external device are offline from the blockchain network.
2. The method as described in claim 1, wherein, The private key cannot be accessed by any component in the computing device other than the trusted execution environment.
3. The method of claim 1, further comprising: The computing device stores the asset status of the computing device in its memory, wherein the asset status includes at least one or more unspent transaction outputs and associated monetary amounts.
4. The method of claim 3, further comprising: The processing device of the computing device updates the stored asset status based on the generated blockchain data value.
5. The method of claim 3, further comprising: The receiver of the computing device receives the notification message from the gateway device; and The processing device of the computing device updates the stored asset status based on the notification message.
6. The method of claim 5, wherein, The notification message includes the updated stored asset status, which includes updated unspent transaction outputs and associated currency amounts.
7. The method of claim 3, wherein, The memory is separate from the trusted execution environment.
8. The method of claim 1, further comprising: Before generating the blockchain data value, the receiver of the computing device receives the destination address from the external device.
9. The method of claim 1, comprising: The transmitter of the computing device sends proof of the data stored in the trusted execution environment of the computing device to the gateway device; and The time-limited certificate is received after the gateway device verifies the certificate.
10. The method of claim 1, wherein, The gateway device stores records of currency amounts and unspent transaction outputs associated with each node in the blockchain network that includes the computing device.
11. A system for executing secure, verifiable, offline blockchain transactions through a trusted execution environment and time-limited credentials, comprising: Gateway devices for blockchain networks; Computing devices, including A trusted execution environment stores an encrypted key pair, including a public key and a private key. The transmitter sends the public key to the gateway device and sends a request for a timed credential to the gateway device. The receiver, in response to a request for a timed credential, receives the timed credential from the gateway device, the timed credential authorizing offline blockchain transactions within a predetermined time period, and The processing device generates blockchain data values for offline blockchain transactions, wherein the blockchain data values include at least the transaction amount and the destination address. The trusted execution environment uses the private key to digitally sign the generated blockchain data value, and The transmitter sends the signed blockchain data value and the timed credential to an external device, wherein the computing device and the external device are offline from the blockchain network; and An external device receives the signed blockchain data value.
12. The system of claim 11, wherein, The private key cannot be accessed by any component in the computing device other than the trusted execution environment.
13. The system of claim 11, further comprising: The memory of the computing device stores the asset status of the computing device, wherein the asset status includes at least one or more unspent transaction outputs and associated monetary amounts.
14. The system of claim 13, wherein, The processing unit of the computing device updates the stored asset status based on the generated blockchain data values.
15. The system of claim 13, wherein The receiver of the computing device receives a notification message from the gateway device, and The processing unit of the computing device updates the stored asset status based on the notification message.
16. The system of claim 15, wherein, The notification message includes the updated stored asset status, which includes updated unspent transaction outputs and associated currency amounts.
17. The system of claim 13, wherein, The memory is separate from the trusted execution environment.
18. The system of claim 11, wherein, Before generating the blockchain data value, the receiver of the computing device receives the destination address from the external device.
19. The system of claim 11, comprising: The transmitter of the computing device sends proof of the data stored in the trusted execution environment of the computing device to the gateway device; and The time-limited certificate is received after the gateway device verifies the certificate.
20. The system of claim 11, wherein, The gateway device stores records of currency amounts and unspent transaction outputs associated with each node in the blockchain network that includes the computing device.