Cryptographic method and system for secure extraction of data from a blockchain
11727501 · 2023-08-15
Assignee
Inventors
Cpc classification
G06F16/27
PHYSICS
H04L9/0838
ELECTRICITY
H04L9/0844
ELECTRICITY
H04L2209/56
ELECTRICITY
H04L9/0861
ELECTRICITY
H04L9/3239
ELECTRICITY
G06Q20/389
PHYSICS
H04L9/3066
ELECTRICITY
H04L9/0825
ELECTRICITY
G06F16/1834
PHYSICS
International classification
G06F16/27
PHYSICS
H04L9/08
ELECTRICITY
Abstract
The invention relates generally to cryptographic techniques for secure processing, transmission and exchange of data. It also relates to peer-to-peer distributed ledgers such as (but not limited to) the Bitcoin blockchain. In particular, it relates to control solutions for identifying, protecting, extracting, transmitting and updating data in a cryptographically controlled and secure manner. It also relates to system inter-operability and the ability to communicate data between different and distinct computing systems. The invention provides a computer implemented method (and corresponding systems) comprising the steps of identifying a set of first structure public keys comprising at least one public root key associated with a first structure of interest of an entity and one or more associated public sub-keys; deriving a deterministic association between the at least one public root key and the one or more associated public sub-keys; and extracting data from a plurality of transactions (TXs) from a blockchain. The data comprises data indicative of a blockchain transaction (Tx) between the first structure and at least one further structure; and a first structure public key associated with the first structure. The first structure public key is part of a cryptographic public/private key. The method includes the step of generating an output for the first structure of interest by matching at least part of the set of first structure public keys to the extracted transaction data using the deterministic association. The one or more public sub-keys is generated or determined using Elliptic Curve Cryptography (ECC) and a deterministic key (DK) that is based on a cryptographic hash of a message (M). The one or more public sub-keys is determined based on a scalar addition of an associated public parent key and the scalar multiplication of a deterministic key (DK) and a generator (G).
Claims
1. A computer implemented method comprising: storing, by a processor, an accounting configuration data of an entity, wherein the accounting configuration data comprises information of public root keys associated with structures of interest of the entity, a chart of accounts including information of the accounts, wherein the accounts are associated with the entity; generating, by the processor, a deterministic key (DK) by hashing a message (M), wherein the message (M) is associated with a first structure of interest of the entity; generating, by the processor, public sub-keys using Elliptic Curve Cryptography (ECC), wherein generating the public sub-keys further comprises generating the public sub-keys based on at least one public root key of the first structure of the entity and the generated deterministic key (DK), wherein the accounts are associated with the public sub-keys; receiving, by the processor, a request to generate financial accounting records from transactions in a blockchain for the first structure of interest of the entity; based on the received request, identifying, by the processor, a set of first structure public keys comprising the at least one public root key associated with the first structure of interest of the entity and one or more public sub-keys, wherein the identifying the set of first structure public keys further comprises: identifying the at least one public root key associated with the first structure of interest of the entity by accessing the accounting configuration data; and determining the one or more of the public sub-keys based on the at least one public root key associated with the first structure of interest of the entity; deriving, by the processor, a deterministic association between the at least one public root key and the one or more public sub-keys; scanning, by the processor, blocks in the blockchain to identify a plurality of transaction records associated with the first structure of interest of the entity; based on the scanning, extracting, by the processor, data from the plurality of transaction records from the blockchain, each of the extracted data of the plurality of transaction records comprising: data indicative of a transaction (Tx) between the first structure of interest of the entity and at least one further structure; and a first structure public key associated with the first structure of interest of the entity, wherein the first structure public key is part of a cryptographic public/private key, wherein the first structure public key is associated with one of the one or more public sub-keys; and based on the extracted data, generating, by the processor, an output for the request to generate the financial accounting records for the first structure of interest of the entity by matching at least part of the set of first structure public keys to the extracted data using the deterministic association, wherein the generated output comprises the extracted data associated with the first structure of interest of the entity and the at least one further structure, and information of an account associated with the one or more public sub-keys; posting, by the processor and over a communication network, the generated output to a computer based resource; and storing, by the processor, the generated output on the blockchain by hashing the generated output, wherein storing the generated output further comprises storing the hashed output in a form of metadata of a blockchain transaction.
2. A method according to claim 1, wherein: the one or more public sub-keys is generated based on a scalar addition of an associated public parent key and the scalar multiplication of a deterministic key (DK) and a generator (G).
3. The method of claim 1, wherein the step of deriving the deterministic association between the at least one public root key and the one or more associated public sub-keys comprises determining the one or more public sub-keys based on a rule.
4. The method of claim 1, wherein the deterministic association between the at least one public root key and the one or more associated public sub-keys is, or is based on, a tree hierarchy.
5. The method of claim 1, wherein the step of extracting the transaction data from the plurality of transactions records from the blockchain further comprises extracting one or more of the following data from the plurality of transaction records: a transaction (TxI) input value; a transaction output (TXO) value; a rule for deriving the transaction input or output value based on the data indicative of the transaction; and a time stamp for the transaction (Tx).
6. The method of claim 1, wherein the transaction between the first structure and the further structure relates to or comprises an exchange or transfer of cryptocurrency.
7. The method of claim 1, wherein the transaction between the first structure and the further structure relates to an exchange of a contract, a goods or services transaction, or a transfer of a tokenised asset.
8. The method of claim 7, wherein the transaction between the first structure and the further structure relates to an exchange of a contract, and wherein the contract confers specified rights upon the holder to be redeemed for fiat currency.
9. The method of claim 1, wherein the step of posting the generated output comprises writing the generated output to one or more posting files and signing the one or more posting files using a first structure private key, wherein the first structure private key is part of an asymmetric cryptography pair comprising the first structure private key and an associated first structure public key.
10. The method of claim 1, further comprising: storing, by the processor, the generated output on an internal database or computer-based storage facility of the entity.
11. The method of claim 1, further comprising: Hashing and/or signing, by the processor, the generated output for storing the generated output on a database or blockchain.
12. A computer system, comprising: a processor; and memory coupled with the processor and storing a set of instructions that, when executed by the processor, causes the processor to: store an accounting configuration data of an entity, wherein the accounting configuration data comprises information of public root keys associated with structures of interest of the entity, a chart of accounts including information of the accounts, wherein the accounts are associated with the entity; generate a deterministic key (DK) by hashing a message (M), wherein the message (M) is associated with a first structure of interest of the entity; generate public sub-keys using Elliptic Curve Cryptography (ECC), wherein generating the public sub-keys further comprises generating the public sub-keys based on at least one public root key of the first structure of the entity and the generated deterministic key (DK), wherein the accounts are associated with the public sub-keys; receive a request to generate financial accounting records from transactions in the blockchain for the first structure of interest of the entity; based on the received request, identify a set of first structure public keys comprising the at least one public root key associated with the first structure of interest of the entity and the one or more public sub-keys, wherein the identifying the set of first structure public keys further comprises: identifying the at least one public root key associated with the first structure of interest of the entity by accessing the accounting configuration data; and determining the one or more of the public sub-keys based on the at least one public root key associated with the first structure of interest of the entity; derive a deterministic association between the at least one public root key and the one or more public sub-keys; scan blocks in the blockchain to identify a plurality of transaction records associated with the first structure of interest of the entity; based on the scanning, extract data from the plurality of transaction records from the blockchain, each of the extracted data of the plurality of transaction records comprising: data indicative of a transaction (Tx) between the first structure of interest of the entity and at least one further structure; and a first structure public key associated with the first structure of interest of the entity, wherein the first structure public key is part of a cryptographic public/private key, wherein the first structure public key is associated with one of the one or more public sub-keys; and based on the extracted data, generate an output for the request to generate the financial accounting records for the first structure of interest of the entity by matching at least part of the set of first structure public keys to the extracted data using the deterministic association, wherein the generated output comprises the extracted data associated with the first structure of interest of the entity and the at least one further structure, and information of an account associated with the one or more public sub-keys; post over a communication network the generated output to a computer based resource; and store the generated output on the blockchain by hashing the generated output, wherein storing the generated output further comprises storing the hashed output in a form of metadata of a blockchain transaction.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1) Embodiments of the present disclosure will now be described, by non-limiting example only, with reference to the accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DESCRIPTION OF EMBODIMENTS
Overview
(9) The present disclosure generally relates to a method and a system which uses a peer-to-peer (P2P) distributed ledger (hereafter “blockchain”), such as the Bitcoin Blockchain, in the identification, extraction, transmission, processing and/or update of data. The invention provides a secure, cryptographically enforced solution for using blockchain-posted data to augment, add to or integrate with data in a computer-based resource provided within an organisation (entity). The computer-based resource may be a data base, an accounting system or any other type of computer-based facility for the storage and/or processing of data. This system may be referred to as an “internal” system as it is internal to the organisation rather than part of the blockchain.
(10) The invention provides a data control and security solution by assigning cryptographic keys to elements associated with an entity or sub-entity. The elements are organised into a (linear or tree) structure which is defined or specified by the relationships between the elements. Each element within the structure is associated with a cryptographic public/private key pair, with a root key pair at the top of the structure. Elements which are lower in the structure are associated with key pairs which are deterministically derived from a previous key-pair. This deterministic derivation may, preferably, be performed in accordance with a method substantially as described in the section below entitled “Method of sub-key generation”. Thus a hierarchy of cryptographic key-pairs is generated to reflect the hierarchical relationship between elements within the entity. In the following illustration, the term “accounts” may be used instead of “element”.
(11) Purely for the sake of illustration, and without any intention to limit the nature of the invention to this use or application area, an example is now provided in which the invention is used to generate financial accounting records for a structure of interest of an entity. It is important to note that this financially-oriented aspect is not essential to the invention, and that the invention can be used in conjunction with any type of internal computer-based system, and for the control, transmission and security of any type of data.
(12) In our example, the structure of interest may for example be a business unit, such as a department or sub-entity within the entity, or may represent the complete entity for which the output (e.g. accounting records) are to be generated. Alternatively, the structure of interest may relate to a product or service of interest or any suitable structure of the entity for which financial accounting records are to be generated and optionally posted to, for example, the general ledger of the entity.
(13) Embodiments of the present disclosure provide significant advantages. For example, it is an advantage to utilise a public blockchain, such as the Bitcoin Blockchain, to generate the record of financial transactions as the Bitcoin Blockchain is inherently decentralised. This means that the transaction records on the Bitcoin Blockchain are stored synchronously across the network which ensures that all information is distributed and publicised.
(14) Furthermore, the generated financial accounting records for the structure of interest may be recorded on the same blockchain, for example in the form of metadata in a transaction record. This will provide the advantage that a permanent, immutable and public record is formed which is a true and accurate reflection of the activities of an entity. This may ultimately remove the requirement of the assistance of external parties, such as auditors.
(15) Referring now to
(16) In the present example, the computer system includes a processor 12 arranged to control and coordinate operations, a memory 14, and a network interface 16 that communicate with each other via a bus 18. The network interface 16 facilitates wireless communication between the computer system 10 and a P2P distributed ledger, such as the Bitcoin Blockchain 20, through a communications network, which in this example is the Internet 22.
(17) The memory 14 stores instructions 24 and data 26 for the processes as described in the following, and the processor 12 performs the instructions 24 from the memory 14 to implement the processes. It should be noted that although the computer system 10 is shown as an independent network element, the computer system 10 may alternatively be part of another network element and functions performed by the computer system 10 may be distributed between multiple network elements. The computer system 10 may represent a computer system of a first entity.
(18)
(19) Financial Accounting Ledger for an Entity/General Ledger
(20) As mentioned above, a general ledger is a set of accounts that summarises all financial transactions occurring within an entity. It is typically used as the main financial record of an entity and incorporates all financial transactions (accounts) relating to an entity. These may include the asset accounts (for example, cash and cash equivalents, securities, accounts receivable, inventory and intellectual property) and liability accounts (for example, notes payable, accounts payable, expense accounts, loans). The above examples of accounts are merely exemplary and not to be taken as restrictive. Each account in the general ledger traditionally maintains a balance of the financial position of the entity based on monetary exchange for each account.
(21) While both small and large entities need to maintain a record of the accounts by way of the general ledger, larger entities may need to track thousands or even hundreds of thousands of accounts. Such tracking may become a great and potentially complex task. There are several difficulties that come with maintaining a very large general ledger with such ledgers possibly taking days to audit or balance.
(22) Further to this, some organisations may consider introducing sub-ledgers within the general ledger to simplify the complexity of the general ledger.
(23) General ledgers may be the subject to internal and external audits of an entity. Auditing is often a tedious and time-consuming task that is performed by specially designated auditors. However, by recording the general ledger or one or more of the sub-ledgers on a publicly viewable blockchain, this potentially facilitates and alleviates the tasks of auditors.
(24) In the following, the term “financial accounting ledger” may refer to the general ledger of an entity or to one or more of the sub-ledgers within the general ledger. However, the invention is not limited to use only with financial or accounting systems, and any other type of computer-based system may be used.
(25) The Bitcoin Blockchain
(26) Whilst embodiments described below may refer specifically to transaction records on the Bitcoin Blockchain (or simply the Blockchain), it will be appreciated that the present disclosure may be implemented using any blockchain. The Bitcoin Blockchain is used below to describe aspects of the present disclosure for simplicity only due to its high level of standardisation and large quantity of associated public documentation.
(27) The Blockchain is a public transaction ledger which is distributed across networked nodes participating in a system based on the Bitcoin protocol. Each Bitcoin transaction is broadcast to the network, the transactions are confirmed and then aggregated into blocks. These blocks are then included on the Blockchain.
(28) A full copy of a blockchain contains every transaction (Tx) posted to the ledger since its inception. Thus, a continuously growing list of transaction records is provided. Since each transaction entered onto the Blockchain is cryptographically enforced, the Blockchain is hardened against tampering and revision, even by operators of the data store nodes.
(29) Due to the transparency of the Bitcoin Blockchain, transaction histories are publicly available for each transaction. It is a further advantage of the Blockchain that the transaction and the record of the transaction are the same, i.e. the record of the transaction is embedded within the transaction.
(30) In this way, the information relating to the data exchange is captured in the actual transaction (Tx). This record is permanent and immutable, and each transaction that is conducted using Bitcoin is therefore not only facilitated by the Blockchain, but also immutably recorded in the Blockchain. This therefore removes the requirement for a third party to keep the transaction record on a separate database.
(31) In embodiments of the present disclosure, instead of or in addition to being used in its designed function of storing transaction records representing payments of Bitcoins from one party to another, the Blockchain is used in a novel manner to generate data for a structure of interest of an entity or organisation, such as a business unit or a product of interest. The data can be used in any foreseeable manner such as, for example, the generation of accounting records. For the sake of simplicity, but without limitation, the following illustration will refer to “accounting records”. In this example, the generated accounting records are suitable for posting to the general ledger of an entity, or feeding to a dedicated accounting system of the entity.
(32) While the exemplary embodiments below refer to the Bitcoin Blockchain as the public ledger, it is to be understood the disclosure also applies to any blockchain platform or protocol.
(33) Functional Components of the Computer System
(34) A representation of an example implementation of a computer system 40 is shown in
(35) In this example, the computer system 40 comprises a control unit 42 for controlling and coordinating operations of the components of the computer system 40. This control unit 42 may for example be implemented by the processor 12 shown in
(36) Further, the computer system 40 has a network interface 44 for facilitating access to information stored on the Bitcoin Blockchain 20 through the Internet 22.
(37) The computer system 40 further comprises a data base management system (“DBMS”) 50 that stores data that is received and/or generated in the computer system 40 in a data storage 52. It will be understood that the data may alternatively be stored in a remote database, such as in a cloud storage and can be received at the computer system 40 through the Internet 22 via the network interface 44.
(38) The data storage 52 comprises a memory for storing accounting configuration data 54 of the first entity. For example, the accounting configuration data 54 may comprise a chart of accounts which collects account names and identifiers for each account. This may further include information on the public root keys as will be described in further detail with reference to
(39) The stored accounting configuration data 54 may be accessed by an account configuration determiner 56 of the computer system 40.
(40) The data storage 52 further comprises a memory for storing posting files 58 that are created by a posting component 60 of the computer system 40. For example, generated financial accounting records may be written to one or more posting files that can be stored in the data storage 52.
(41) The computer system 40 further comprises a transaction information collector 62 that is in communication with the network interface 44 to obtain transaction information from transaction records on the Bitcoin Blockchain 20 via the Internet 22.
(42) A matching component 64 of the computer system 40 is in communication with the account configuration determiner 56 and the transaction information collector 62. The matching component 64 is configured to match extracted transaction information from the Blockchain to identified public keys associated with respective accounts of the entity to generate financial accounting records.
(43) As mentioned above, these generated financial accounting records may then be written to one or more posting files and can be posted to the general ledger 66 of the entity in the data storage 52.
(44) Overview of Illustrative Method to Generate Financial Accounting Records
(45) In the following, the method of generating financial accounting records is divided into four main method steps, i.e. determining 100 accounting configuration, extracting 200 transaction information from transaction records on the Blockchain, generating the financial accounting records and creating 300 one or more posting files, and posting 400 the one or more posting files to the general ledger of the entity.
(46) The first structure of interest may be any suitable structure of the first entity for which accounting records are to be generated. For example, the first structure may relate to the first entity in its entirety and generated accounting records will be posted to the general ledger of the first entity. In another example, the first structure of interest may represent a business unit, such as a department, a team or a specified group of employees. Alternatively, the first structure of interest may relate to a first product or service which may span across a plurality of business units. In this way, the generated accounting records can be created to analyse the accounts associated with a desired product or service.
(47) Account Configuration
(48) Referring now to
(49) In particular, the method 100 may include a step of identifying a set of first entity public keys comprising at least one public root key associated with the first entity and one or more associated public sub-keys. Each of the sub-keys may represent an account within the first entity. In this regard, the set of first entity public keys may initially be identified by identifying 100.10 one or more accounts for which financial accounting records are to be generated.
(50) In a further step, at least one public root key associated with the identified one or more accounts is identified 100.20. This may be done by accessing data stored on an internal data storage of the first entity, such as data storage 54 shown in
(51) The method 100 further comprises a step of determining 100.30 a deterministic association between the identified public root keys and one or more public sub-keys. In other words, a rule is determined to derive one or more public sub-keys that are dependent on the public root keys. In this particular example as shown in
(52) Following the determination of the deterministic association in step 100.30, one or more public sub-keys associated with the at least one root key are determined and some are selected using the information from the chart of accounts in step 100.10. It will be appreciated that depending on the identification of the accounts for which the accounting records are to be generated, all or only part of the sub-keys that are dependent on the public root key are determined.
(53) In this particular example as shown in
(54) In one specific example, a series of successive deterministic public keys may be determined where each successive public key may be determined based on the preceding public key. For example, Elliptic Curve Cryptography (ECC) may be used. In this regard, a sub-key may be determined by initially determining a deterministic key (DK) that is based on a cryptographic hash of a message (M) which may be random, pseudo random, or pre-defined. A sub-key may then be determined based on a scalar addition of the associated public parent key and the scalar multiplication of the deterministic key (DK) and a generator (G). In order to re-determine the deterministic key (DK) and thereby the sub-keys, only the message (M) and the generator (G) are necessary. In this regard, the message (M) may be stored in the form of metadata of a transaction record on the Blockchain, for example in the form of an invoice number.
(55) In a further example, the message may be rehashed for determining the next generation public sub-key.
(56) The steps for determining successive public keys as briefly described above are described and illustrated in further detail below in the section entitled “method of sub-key generation”.
(57) In a further step 100.40, one or more rules are determined for obtaining information to be included in the financial accounting records for the selected public keys. In other words, method step 100.40 determines what information will be required for the accounting records to be generated for the general ledger and how this information will be obtained.
(58) In particular, the information may include:
(59) Transaction input/output;
(60) The General Ledger account to post to
(61) The General Ledger account to counter-post to
(62) A rule for calculating the value for the transaction
(63) A rule for deriving the narrative for the transaction
(64) Extracting Information from the Blockchain
(65) Referring now to
(66) Initially, the method 200 comprises a step of identifying 200.10 one or more blocks of the Blockchain for extracting transaction information from a plurality of transactions that are recorded on the Blockchain. For example, the step of identifying 200.10 the one or more blocks may comprise identifying a first block number associated with a block that contains transaction records that have not previously been used for generating financial accounting records. This may be done by identifying the relevant block number of the block which is part of each transaction record on the Blockchain. Alternatively, the one or more blocks may be identified based on a transaction date or time. As described above, the blocks on the Bitcoin Blockchain have a defined order and each block includes a hash of the previous block.
(67) Once the one or more blocks have been identified, a plurality of transaction records associated with the first structure of the entity is scanned 200.20 on the Blockchain to match against the sub-keys identified in step 100.30.
(68) In a further step 200.30, the rules determined in step 100.40 are run to extract transaction information from each of the matched transaction records on the Blockchain. Thus, it will be determined what information needs to be extracted, how to derive certain information from the extracted information and where/how to post the information to the general ledger.
(69) For example, one or more of the following information from the plurality of transaction records are extracted:
(70) a transaction input value;
(71) a transaction output value;
(72) public keys;
(73) metadata;
(74) a rule for deriving the transaction input or output value based on the information indicative of the transaction;
(75) a time stamp for the transaction; and
(76) a block number of a block of the P2P distributed ledger.
(77) Once the transaction records within one block have been scanned and processed, the next block in the Blockchain will be scanned for transaction records associated with the first entity.
(78) The extracted information from step 200.30 is then used to generate 200.40 the financial accounting records.
(79) Transaction Records
(80) In the following, a transaction record stored on the Bitcoin Blockchain will be considered in further detail.
(81) Each transaction record on the Bitcoin Blockchain comprises at least a first structure public key associated with the first structure. This identifies that the first structure of the entity is involved in the transaction that is stored on the Bitcoin Blockchain.
(82) Further, each transaction (Tx) on the Bitcoin Blockchain comprises at least information indicative of a transaction between the first entity and a further entity. It should be noted that any type of entity may be exchangeable between the first entity and the further entity and stored in a transaction.
(83) Examples of transaction may include cryptocurrency exchanges, such as Bitcoin transactions, fiat transactions, tokens (representing any type of transferrable contract or asset), contracts, and goods and services of any type.
(84) Tokens
(85) Tokens may represent an asset, or a contract conferring specified rights upon the holder to be redeemed for fiat currency (virtual banknotes), to denote ownership of property (e.g., title deeds), or grant access to an event (tickets), to name a few of many examples. Goods and services may include new or second hand products, labour (e.g., charged by the hour), complete jobs (e.g., mowing the lawn), to name a few of many examples.
(86) A token is an exchangeable entity represented by/representative of a contract. The contract may take one of several forms. For example, the contract may confer a right upon the holder or denote ownership of property. The value of the token may be contractually specified and is linked to the underlying BTC amount via a ‘pegging rate’. The token is exchangeable via novel type of transaction using a cryptocurrency protocol such as the bitcoin protocol. The bitcoin value on the transaction acts as a token representing a rights contract in digital form. The contract itself may be stored on the transaction or may be kept in a publicly accessible location, or may be held privately by the parties to the contract depending on the particular embodiment. Where the contract is not stored on the transaction, the transaction may store a unique pointer to the contract.
(87) Tokens may be divisible. A divisible token is one in which the value on the transaction output can be subdivided into smaller amounts which can be allocated across multiple new tokens. Examples of divisible tokens include tokens for fiat currency or for shares in a race horse. Divisible contracts may be defined as those that specify a non-zero pegging rate. In other words, the token value is tied to the underlying bitcoin value. Alternatively, tokens may be non-divisible. A non-divisible token is a contract that specifies the holder's rights in terms of a fixed value, e.g. a contract to redeem a house or AU$1000. Non-divisible tokens are therefore not linked to the value of the underlying bitcoin.
(88) Tokens must be digitally signed by a token issuer to be valid. The issuer may, for example be an authority such as a Registrar of Title deeds. The issuer may issue a token to a user in return for payment. That token may then give the user the right to exercise the contract linked to the token, whether the contract represents the right to redeem fiat currency or for a service to performed.
(89) Examples of tokens in accordance with the above, include the following: A fiat currency token that is pegged to the BTC value of the transaction output by the issuer of the contract. For example “the spender of this token (bitcoin transaction) is entitled to redeem any fraction of this token for Canadian dollars (CAD) at a rate of 1 share (10 cents) for every 1000 satoshis”. A race horse owned by several members of a syndicate Any item where the ownership is by a title deed, e.g., a house or other property could be treated in this way. An electronic contract representing a concert ticket. This is inherently non-divisible. A bearer bond (non-divisible) A unique identifier attached to a Goods/service (such as a bar code or RFID). If used, this identifier is still preferably validated by a signature of an authorised entity; without a signature it will fall into the less secure ‘goods/service’ category (described below). A contract for the right to a service to be performed. It is noted that this is not the same as the actual service itself, but only the right to have the service performed for them. This right can be traded. For example, a voucher from Michael's Mowing for up to 3 hours lawn mowing within the Sydney metropolitan area. The holder of this voucher (contract) can redeem it for the actual service.
(90) Tokens must specify the value of a share, e.g., 1 share=10 cents CAD, 1 share=1 rupiah, or 1 share=1% ownership of an item or property (race horse, house, etc.).
(91) Posting Files
(92) Referring now to
(93) The method 300 comprises a step of writing 300.10 the generated accounting records from step 200.40 into one or more posting files. This may including consolidating specified information for posting purposes to the general ledger. For example, the generated accounting records may be consolidated by date, or each accounting record may represent an individual file.
(94) The one or more posting files may have any suitable format, such as but not limited to JSON, XML or XBRL. The format may be predefined by the general ledger.
(95) The method 300 may further comprise hashing 300.20 the one or more posting files. For example, a cryptographic hash algorithm may include SHA-256 to create a 256-bit posting file hash.
(96) The method 300 may further comprise a step of signing 300.30 the hash of the posting file. The hash of the posting file may, for example, be signed with a private key that is part of an asymmetric cryptography pair having the private key and an associated public key. In this way, the signed hash of the posting file can be validated using the associated public key.
(97) Following the step of hashing 300.20 the one or more posting files, the hash is stored 300.40 on the Blockchain for permanent and unchangeable proof. For example, the hash of the posting file may be stored in the form of metadata of a transaction record. As described above with reference to the P2SH, the posting file may be stored in the form of a “false” public key within the script.
(98) In a specific example, the agent application may be used to record the hash of the posting file and the block number range on the Blockchain as the contract transaction.
(99) Posting to General Ledger
(100) In the following, method steps of method 400 are described of posting the one or more posting files to the general ledger of the first entity.
(101) As described above, the general ledger is a set of accounts that summarises all transactions that occur within the entity. The method 400 of posting the one or more posting files to the general ledger may comprise accessing the one or more posting files in a secure manner and validating that the one or more posting files come from a recognised source. In this regard, the method 400 may comprise obtaining the public key that is associated with the private signing key used in step 300.30 to validate the signature.
(102) Once the one or more posting files have been successfully validated, the one or more posting files are applied to the general ledger.
(103) Dedicated Accounting System
(104) In one example, the financial accounting records are generated so that the accounting records can be fed into a dedicated accounting system of the entity. For example, the accounting system of the entity may be configured to execute a dedicated accounting software for the entity.
(105) It will be appreciated that Bitcoin transactions may only form part of an entity's trading position. In such a case, the generated financial accounting records utilising the transaction records on the Bitcoin Blockchain may be incorporated into an existing accounting model.
(106) Method of Sub-Key Generation
(107) In accordance with the present invention there is a need to generate a sub-key from an original (master) key. A method for achieving this is now provided for illustration of one way in which this could be performed. The following provides an illustrative use of a technique which can be used in accordance with, or adapted for use with, the present invention. The following description is provided with reference to
(108)
(109) The first node 3 is associated with a first asymmetric cryptography pair having a first node master private key (V.sub.1C) and a first node master public key (P.sub.1C). The second node (7) is associated with a second asymmetric cryptography pair having a second node master private key (V.sub.1S) and a second node master public key (P.sub.1S). In other words, the first and second nodes are each in possession of respective public-private key pairs.
(110) The first and second asymmetric cryptography pairs for the respective first and second nodes 3, 7 may be generated during a registration process, such as registration for a wallet. The public key for each node may be shared publicly, such as over communications network 5.
(111) To determine a common secret (CS) at both the first node 3 and second node 7, the nodes 3, 7 perform steps of respective methods 300, 400 without communicating private keys over the communications network 5.
(112) The method 300 performed by the first node 3 includes determining 330 a first node second private key (V.sub.2C) based on at least the first node master private key (V.sub.1C) and a Generator Value (GV). The Generator Value may be based on a message (M) that is a shared between the first and second nodes, which may include sharing the message over the communications network 5 as described in further detail below. The method 300 also includes determining 370 a second node second public key (P.sub.2S) based on at least the second node master public key (P.sub.1S) and the Generator Value (GV). The method 300 includes determining 380 the common secret (CS) based on the first node second private key (V.sub.2C) and the second node second public key (P.sub.2S).
(113) Importantly, the same common secret (CS) can also be determined at the second node 7 by method 400. The method 400 includes determining 430 a first node second public key (P.sub.2C) based on the first node master public key (P.sub.1C) and the Generator Value (GV). The method 400 further include determining 470 a second node second private key (V.sub.2S) based on the second node master private key (V.sub.1S) and the Generator Value (GV). The method 400 includes determining 480 the common secret (CS) based on the second node second private key (V.sub.2S) and the first node second public key (P.sub.2C).
(114) The communications network 5 may include a local area network, a wide area network, cellular networks, radio communication network, the internet, etc. These networks, where data may be transmitted via communications medium such as electrical wire, fibre optic, or wirelessly may be susceptible to eavesdropping, such as by an eavesdropper 11. The method 300, 400 may allow the first node 3 and second node 7 to both independently determine a common secret without transmitting the common secret over the communications network 5.
(115) Thus one advantage is that the common secret (CS) may be determined securely and independently by each node without having to transmit a private key over a potentially unsecure communications network 5. In turn, the common secret may be used as a secret key (or as the basis of a secret key).
(116) The methods 300, 400 may include additional steps. See
(117) Sharing the message (M) between the first and second nodes may be achieved in a variety of ways. In one example, the message may be generated at the first node 3 which is then sent, over the communications network 5, the second node 7. Alternatively, the message may be generated at the second node 7 and then sent, over the communications network 5, to the second node 7. In some examples, the message (M) may be public and therefore may be transmitted over an unsecure network 5. One or more messages (M) may be stored in a data store 13, 17, 19. The skilled person will realise that sharing of the message can be achieved in a variety of ways.
(118) Advantageously, a record to allow recreation of the common secret (CS) may be kept without the record by itself having to be stored privately or transmitted securely.
(119) Method of Registration 100, 200
(120) An example of a method of registration 100, 200 will be described with reference to
(121) The asymmetric cryptography pairs include associated private and public keys, such as those used in public-key encryption. In this example, the asymmetric cryptography pairs are generated using Elliptic Curve Cryptography (ECC) and properties of elliptic curve operations.
(122) In the method 100, 200, this includes the first and second nodes agreeing 110, 210 on a common ECC system and using a base point (G). (Note: the base point could be referred to as a Common Generator, but the term ‘base point’ is used to avoid confusion with the Generator Value GV). In one example, the common ECC system may be based on secp256K1 which is an ECC system used by Bitcoin. The base point (G) may be selected, randomly generated, or assigned.
(123) Turning now to the first node 3, the method 100 includes settling 110 on the common ECC system and base point (G). This may include receiving the common ECC system and base point from the second node 7, or a third node 9. Alternatively, a user interface 15 may be associated with the first node 3, whereby a user may selectively provide the common ECC system and/or base point (G). In yet another alternative one or both of the common ECC system and/or base point (G) may be randomly selected by the first node 3. The first node 3 may send, over the communications network 5, a notice indicative of using the common ECC system with a base point (G) to the second node 7. In turn, the second node 7 may settle 210 by sending a notice indicative of an acknowledgment to using the common ECC system and base point (G).
(124) The method 100 also includes the first node 3 generating 120 a first asymmetric cryptography pair that includes the first node master private key (V.sub.1C) and the first node master public key (P.sub.1C). This includes generating the first master private key (V.sub.1C) based, at least in part, on a random integer in an allowable range specified in the common ECC system. This also includes determining the first node master public key (P.sub.1C) based on elliptic curve point multiplication of the first node master private key (P.sub.1C) and the base point (G) according to the formula:
P.sub.1C=V.sub.1C×G (Equation 1)
(125) Thus the first asymmetric cryptography pair includes: V.sub.1C: The first node master private key that is kept secret by the first node. P.sub.1C: The first node master public key that is made publicly known.
(126) The first node 3 may store the first node master private key (V.sub.1C) and the first node master public key (P.sub.1C) in a first data store 13 associated with the first node 3. For security, the first node master private key (V.sub.1C) may be stored in a secure portion of the first data store 13 to ensure the key remains private.
(127) The method 100 further includes sending 130 the first node master public key (P.sub.1C), over the communications network 5, to the second node 7, as shown in
(128) Similar to the first node 3, the method 200 of the second 7 includes generating 240 a second asymmetric cryptography pair that includes the second node master private key (V is) and the second node master public key (P.sub.1S). The second node master private key (V.sub.1S) is also a random integer within the allowable range. In turn, the second node master public key (P.sub.1S) is determined by the following formula:
P.sub.1S=V.sub.1S×G (Equation 2)
(129) Thus the second asymmetric cryptography pair includes: V.sub.1S: The second node master private key that is kept secret by the second node. P.sub.1S: The second node master public key that is made publicly known.
(130) The second node 7 may store the second asymmetric cryptography pair in the second data store 17. The method 200 further includes sending 250 the second node master public key (P.sub.1S) to the first node 3. In turn, the first node 3 may receive 140 and stores 150 the second node master public key (P.sub.1S).
(131) It is to be appreciated that in some alternatives, the respective public master keys may be received and stored at a third data store 19 associated with the third node 9 (such as a trusted third party). This may include a third party that acts as a public directory, such as a certification authority. Thus in some examples, the first node master public key (P.sub.1C) may requested and received by the second node 7 only when determining the common secret (CS) is required (and vice versa).
(132) The registration steps may only need to occur once as an initial setup.
(133) Session Initiation and Determining the Common Secret by the First Node 3
(134) An example of determining a common secret (CS) will now be described with reference to
(135) The following is provided for illustration of the secure transmission technique which has been described above.
(136) Generating a Message (M) 310
(137) In this example, the method 300 performed by the first node 3 includes generating 310 a message (M). The message (M) may be random, pseudo random, or user defined. In one example, the message (M) is based on Unix time and a nonce (and arbitrary value). For example, the message (M) may be provided as:
Message (M)=UnixTime+nonce (Equation 3)
(138) In some examples, the message (M) is arbitrary. However it is to be appreciated that the message (M) may have selective values (such as account number, Unix Time, etc) that may be useful in some applications.
(139) The method 300 includes sending 315 the message (M), over the communications network 3, to the second node 7. The message (M) may be sent over an unsecure network as the message (M) does not include information on the private keys.
(140) Determining a Generator Value (GV) 320
(141) The method 300 further includes the step of determining 320 a Generator Value (GV) based on the message (M). In this example, this includes determining a cryptographic hash of the message. An example of a cryptographic hash algorithm includes SHA-256 to create a 256-bit Generator Value (GV). That is:
GV=SHA-256(SM) (Equation 4)
(142) It is to be appreciated that other hash algorithms may be used. This may include other has algorithms in the Secure Hash Algorithm (SHA) family. Some particular examples include instances in the SHA-3 subset, including SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256. Other hash algorithms may include those in the RACE Integrity Primitives Evaluation Message Digest (RIPEMD) family. A particular example may include RIPEMD-160. Other hash functions may include families based on Zémor-Tillich hash function and knapsack-based hash functions.
(143) Determining a First Node Second Private Key 330
(144) The method 300 then includes the step 330 of determining 330 the first node second private key (V.sub.2C) based on the second node master private key (V.sub.1C) and the Generator Value (GV). This can be based on a scalar addition of the first node master private key (V.sub.1C) and the Generator Value (GV) according to the following formula:
V.sub.2C=V.sub.1C+GV (Equation 5)
(145) Thus the first node second private key (V.sub.2C) is not a random value but is instead deterministically derived from the first node master private key. The corresponding public key in the cryptographic pair, namely the first node second public key (P.sub.2C), has the following relationship:
P.sub.2C=V.sub.2C×G (Equation 6)
(146) Substitution of V.sub.2C from Equation 5 into Equation 6 provides:
P.sub.2C=(V.sub.1C+GV)×G (Equation 7)
where the ‘+’ operator refers to elliptic curve point addition. Noting that elliptic curve cryptography algebra is distributive, Equation 7 may be expressed as:
P.sub.2C=V.sub.1C×G+GV×G (Equation 8)
(147) Finally, Equation 1 may be substituted into Equation 7 to provide:
P.sub.2C=P.sub.1C+GV×G (Equation 9.1)
P.sub.2C=P.sub.1C+SHA-256(M)×G (Equation 9.2)
(148) Thus the corresponding first node second public key (P.sub.2C) can be derivable given knowledge of the first node master public key (P.sub.1C) and the message (M). The second node 7 may have such knowledge to independently determine the first node second public key (P.sub.2C) as will be discussed in further detail below with respect to the method 400.
(149) Generate a First Signed Message (SM1) Based on the Message and the First Node Second Private Key 350
(150) The method 300 further includes generating 350 a first signed message (SM1) based on the message (M) and the determined first node second private key (V.sub.2C). Generating a signed message includes applying a digital signature algorithm to digitally sign the message (M). In one example, this includes applying the first node second private key (V.sub.2C) to the message in an Elliptic Curve Digital Signature Algorithm (ECDSA) to obtain the first signed message (SM1). Examples of ECDSA include those based on ECC systems with secp256k1, secp256r1, secp384r1, se3cp521r1.
(151) The first signed message (SM1) can be verified with the corresponding first node second public key (P.sub.2C) at the second node 7. This verification of the first signed message (SM1) may be used by the second node 7 to authenticate the first node 3, which will be discussed in the method 400 below.
(152) Determine a second node second public key 370′ The first node 3 may then determine 370 a second node second public key (P.sub.2S). As discussed above, the second node second public key (P.sub.2S) may be based at least on the second node master public key (P.sub.1S) and the Generator Value (GV). In this example, since the public key is determined 370′ as the private key with elliptic curve point multiplication with the base point (G), the second node second public key (P.sub.2S) can be expressed, in a fashion similar to Equation 6, as:
P.sub.2S=V.sub.2S×G (Equation 10.1)
P.sub.2S=P.sub.1S+GV×G (Equation 10.2)
(153) The mathematical proof for Equation 10.2 is the same as described above for deriving Equation 9.1 for the first node second public key (P.sub.2C). It is to be appreciated that the first node 3 can determine 370 the second node second public key independently of the second node 7.
(154) Determine the Common Secret 380 at the First Node 3
(155) The first node 3 may then determine 380 the common secret (CS) based on the determined first node second private key (V.sub.2C) and the determined second node second public key (P.sub.2S). The common secret (CS) may be determined by the first node 3 by the following formula:
S=V.sub.2C×P.sub.2S (Equation 11)
(156) Method 400 Performed at the Second Node 7
(157) The corresponding method 400 performed at the second node 7 will now be described. It is to be appreciated that some of these steps are similar to those discussed above that were performed by the first node 3.
(158) The method 400 includes receiving 410 the message (M), over the communications network 5, from the first node 3. This may include the message (M) sent by the first node 3 at step 315. The second node 7 then determines 420 a Generator Value (GV) based on the message (M). The step of determining 420 the Generator Value (GV) by the second node 7 is similar to the step 320 performed by the first node described above. In this example, the second node 7 performs this determining step 420 independent of the first node 3.
(159) The next step includes determining 430 a first node second public key (P.sub.2C) based on the first node master public key (P.sub.1C) and the Generator Value (GV). In this example, since the public key is determined 430′ as the private key with elliptic curve point multiplication with the base point (G), the first node second public key (P.sub.2C) can be expressed, in a fashion similar to Equation 9, as:
P.sub.2C=V.sub.2C×G (Equation 12.1)
P.sub.2C=P.sub.1C+GV×G (Equation 12.2)
(160) The mathematical proof for Equations 12.1 and 12.2 is the same as those discussed above for Equations 10.1 and 10.2.
(161) The Second Node 7 Authenticating the First Node 3
(162) The method 400 may include steps performed by the second node 7 to authenticate that the alleged first node 3, is the first node 3. As discussed previously, this includes receiving 440 the first signed message (SM1) from the first node 3. The second node 7 may then validate 450 the signature on the first signed message (SM1) with the first node second public key (P.sub.2C) that was determined at step 430.
(163) Verifying the digital signature may be done in accordance with an Elliptic Curve Digital Signature Algorithm (ECDSA) as discussed above. Importantly, the first signed message (SM1) that was signed with the first node second private key (V.sub.2C) should only be correctly verified with the corresponding first node second public key (P.sub.2C), since V.sub.2C and P.sub.2C form a cryptographic pair. Since these keys are deterministic on the first node master private key (V.sub.1C) and the first node master public key (P.sub.1C) that were generated at registration of the first node 3, verifying first signed message (SM1) can be used as a basis of authenticating that an alleged first node sending the first signed message (SM1) is the same first node 3 during registration. Thus the second node 7 may further perform the step of authenticating (460) the first node 3 based on the result of validating (450) the first signed message—see
(164) The Second Node 7 Determining the Common Secret
(165) The method 400 may further include the second node 7 determining 470 a second node second private key (V.sub.2S) based on the second node master private key (V.sub.1S) and the Generator Value (GV). Similar to step 330 performed by the first node 3, the second node second private key (V.sub.2S) can be based on a scalar addition of the second node master private key (V.sub.1S) and the Generator Value (GV) according to the following formulas:
V.sub.2S=V.sub.1S+GV (Equation 13.1)
V.sub.2S=V.sub.1S+SHA-256(M) (Equation 13.2)
(166) The second node 7 may then, independent of the first node 3, determine 480 the common secret (CS) based on the second node second private key (V.sub.2S) and the first node second public key (P.sub.2C) based on the following formula:
S=V.sub.2S×P.sub.2C (Equation 14)
(167) Proof of the common secret (CS) determined by the first node 3 and second node 7
(168) The common secret (CS) determined by the first node 3 is the same as the common secret (CS) determined at the second node 7. Mathematical proof that Equation 11 and Equation 14 provide the same common secret (CS) will now be described.
(169) Turning to the common secret (CS) determined by the first node 3, Equation 10.1 can be substituted into Equation 11 as follows:
S=V.sub.2C×P.sub.2S (Equation 11)
S=V.sub.2C×(V.sub.2S×G)
S=(V.sub.2C×V.sub.2S)×G (Equation 15)
(170) Turning to the common secret (CS) determined by the second node 7, Equation 12.1 can be substituted into Equation 14 as follows:
S=V.sub.2S×P.sub.2C (Equation 14)
S=V.sub.2S×(V.sub.2C×G)
S=(V.sub.2S×V.sub.2C)×G (Equation 16)
(171) Since ECC algebra is commutative, Equation 15 and Equation 16 are equivalent, since:
S=(V.sub.2C×V.sub.2S)×G=(V.sub.2S×V.sub.2C)×G (Equation 17)
(172) The Common Secret (CS) and Secret Key
(173) The common secret (CS) may now be used as a secret key, or as the basis of a secret key in a symmetric-key algorithm for secure communication between the first node 3 and second node 7.
(174) The common secret (CS) may be in the form of an elliptic curve point (xs, ys). This may be converted into a standard key format using standard publicly known operations agreed by the nodes 3, 7. For example, the xs value may be a 256-bit integer that could be used as a key for AES256 encryption. It could also be converted into a 160-bit integer using RIPEMD160 for any applications requiring this length key.
(175) The common secret (CS) may be determined as required. Importantly, the first node 3 does not need to store the common secret (CS) as this can be re-determined based on the message (M). In some examples, the message(s) (M) used may be stored in data store 13, 17, 19 (or other data store) without the same level of security as required for the master private keys. In some examples, the message (M) may be publicly available.
(176) However depending on some application, the common secret (CS) could be stored in the first data store (X) associated with the first node provided the common secret (CS) is kept as secure as the first node master private key (V.sub.1C).
(177) Advantageously, this technique can be used to determine multiple common secrets that may correspond to multiple secure secret keys based on a single master key cryptography pair.
(178) Hierarchy of Generator Values (Keys)
(179) For example, a series of successive Generator Values (GVs) may be determined, where each successive GV may be determined based on the preceding Generator Value (GV). For example, instead of repeating steps 310 to 370 and 410 to 470 to generate successive single-purpose keys, by prior agreement between the nodes, the previously used Generator Value (GV) can be rehashed repeatedly by both parties to establish a hierarchy of Generator Values. In effect, the Generator Value, based on the hash of a message (M), can be a next generation message (M′) for the next generation of Generator Value (GV′). Doing this allows successive generations of shared secrets to be calculated without the need for further protocol-establishment transmissions, in particular transmission of multiple messages for each generation of common secrets. The next generation common secret (CS′) can be computed as follows.
(180) Firstly, both the first node 3 and the second node 7 independently determine the next generation of the Generator Value (GV′). This is similar to steps 320 and 420 but adapted with the following formulas:
M′=SHA-256(M) (Equation 18)
GV′=SHA-256(M′) (Equation 19.1)
GV′=SHA-256(SHA-256(M)) (Equation 19.2)
(181) The first node 3 may then determine the next generation of the second node second public key (P.sub.2S′) and the first node second private key (V.sub.2C′) similar to steps 370 and 330 described above, but adapted with the following formulas:
P.sub.2S′=P.sub.1S+GV′×G (Equation 20.1)
V.sub.2C′=V.sub.1C+GV′ (Equation 20.2)
(182) The second node 7 may then determine the next generation of the first node second public key (P.sub.2C′) and the second node second private key (V.sub.2S′) similar to steps 430 and 470 described above, but adapted with the following formulas:
P.sub.2C′=P.sub.1C+GV′×G (Equation 21.1)
V.sub.2S′=V.sub.1S+GV′ (Equation 21.2)
(183) The first node 3 and the second node 7 may then each determine the next generation common secret (CS′). In particular, the first node 3 determines the next generation common secret (CS′) with the formula:
CS'=V.sub.2C′×P.sub.2S′ (Equation 22)
(184) The second node 7 determines the next generation common secret (CS′) with the formula:
CS'=V.sub.2S′×P.sub.2C′ (Equation 23)
(185) Further generations (CS″, CS′″, etc.) can be calculated in the same way to create a chain hierarchy. This technique requires that both the first node 3 and the second node 7 keep track of the original Message (M) or the originally calculated Generator Value (GV), and to which node it relates. As this is publicly known information there are no security issues regarding the retention of this information. Accordingly, this information might be kept on ‘hash tables’ (linking hash values to public keys) and distributed freely across the network 5 (for example using Torrent). Furthermore, if any individual common secret (CS) in the hierarchy is ever compromised, this does not affect the security of any other common secrets in the hierarchy provided the private keys V.sub.1C, V.sub.1S remain secure.
(186) Tree Structure of Keys
(187) As well as a chain (linear) hierarchy as described above, a hierarchy in the form of a tree structure can be created. With a tree structure, a variety of keys for different purposes such as authentication keys, encryption keys, signing keys, payment keys, etc. may be determined whereby these keys are all linked to a single securely maintained master key. This is best illustrated in
(188) (i) Master Key Spawning
(189) In the chain hierarchy, each new ‘link’ (Public/Private key pair) is created by adding a multiply rehashed Message to the original master key. For example, (showing only the private key of the first node 3 for clarity):
V.sub.2C=V.sub.1C+SHA-256(M) (Equation 24)
V.sub.2C′=V.sub.1C+SHA-256(SHA-256(M)) (Equation 25)
V.sub.2C″=V.sub.1C+SHA-256(SHA-256(SHA-256(M))) (Equation 26)
(190) . . . and so on.
(191) To create a branch, any key can be used as a sub-master key. For example V.sub.2C′ can be used as a sub-master key (V.sub.3C) by adding the hash to it as is done for the regular master key:
V.sub.3C=V.sub.2C′+SHA-256(M) (Equation 27)
(192) The sub-master key (V.sub.3C) may itself have a next generation key (V.sub.3C′), for example:
V.sub.3C′=V.sub.2C′+SHA-256(SHA-256(M)) (Equation 28)
(193) This provides a tree structure 903 using the master key spawning method as shown in
(194) (ii) Logical Association
(195) In this method all the nodes in the tree (public/private key pairs) are generated as a chain (or in any other way) and the logical relationships between the nodes in the tree is maintained by a table in which each node in the tree is simply associated with its parent node in the tree using a pointer. Thus the pointer may be used to determine the relevant public/private key pairs for determining the common secret key (CS) for the session.
(196) (iii) Message Multiplicity
(197) New private/public key pairs can be generated by introducing a new message at any point in the chain or tree. The message itself may be arbitrary or may carry some meaning or function (e.g. it might be related to a ‘real’ bank account number, etc). It may be desirable that such new messages for forming the new private/public key pairs are securely retained.