EP4494301A1 - Improved hill cipher encryption based on blockchain - Google Patents
Improved hill cipher encryption based on blockchainInfo
- Publication number
- EP4494301A1 EP4494301A1 EP23705543.9A EP23705543A EP4494301A1 EP 4494301 A1 EP4494301 A1 EP 4494301A1 EP 23705543 A EP23705543 A EP 23705543A EP 4494301 A1 EP4494301 A1 EP 4494301A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- data
- transaction
- blockchain
- block
- modified version
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Definitions
- the present disclosure relates generally to security methods and implementations which involve the secure transmission, processing and/or storage of data.
- Embodiments provide enhanced and cryptographically secure solutions for processing of sensitive or secret data, and provide a platform and/or underlying mechanism which a wide variety of technical implementations can utilise for advantage.
- the invention is particularly suited for, but not limited to, use with blockchain related technologies.
- Matrix encryption is well known, as is evidenced by, for example:
- Hill Cipher is a polygraphic block cipher wherein a (plain text) message is split into blocks of n components which is then converted into a vector which is multiplied by an invertible n x n key matrix, against a modulus.
- Modulus 26 is typically chosen because this is the length of the English language alphabet which is commonly used for the plaintext message, and the purpose of the modulo is to allow each possible output of the matrix multiplication to map to a character in the plaintext alphabet.
- the key matrix used for encryption is chosen randomly from the set of invertible n x n matrices (modulo 26).
- the block is multiplied by the inverse of the matrix used for encryption.
- the initial encryption steps are performed in reverse such that each encrypted block is multiplied by the inverse of the key matrix and using the same modulus that was used for the initial encryption.
- Hill Cipher can be used with modern computing systems to implement a fast and resource-efficient encryption technique.
- complexity and security of the cipher increases with the size of the key space, it is suited for use with modern processors which are capable of handling large volumes of calculations very rapidly. Therefore, there are technical advantages to using Hill Cipher to secure sensitive data that is being stored and/or transmitted on computer-implemented systems.
- Hill Cipher is not readily used or adopted by modern technologies, or even considered as a relevant or sufficiently secure technique in current computing communities because: 1) it is typically only considered for use with a 26- character alphabet; 2) it has traditionally been associated with known plaintext attacks and 3) is associated with replay attacks.
- Hill Cipher is widely known to be vulnerable to plain text attacks.
- the attacker knows both the plain text and its encrypted version (known as its ciphertext).
- the combination of the plaintext and the ciphertext can provide sufficient information for an attacker to derive the encryption key that was used to encode the plaintext.
- a message may be intercepted to obtain the ciphertext and the inverse of the key can be used to decode it.
- Blockchain implementations are vulnerable to such attacks because the hard fork of a blockchain protocol gives rise to a split in the original blockchain ledger. After the split, the two diverging chains share the same origin and, therefore, certain similarities but they implement different cryptocurrencies. Following the fork, actions taken on one chain can be duplicated on the other in a replay attack.
- Hill Cipher feeds into this replay concern in that if we take the character "A”, and use it as an input into Hill Cipher and then replay it though Hill Cipher, we arrive at the same value. Therefore, blockchain technologies and Hill cipher are not an intuitively natural combination.
- embodiments of the present disclosure provide techniques which alleviate or eliminate these technical challenges.
- a method and corresponding system for secure communication of data across an electronic, computer-based network may be described as providing at least one of: i) enhanced computer-implemented solutions for the security of data; ii) encryption and/or decryption of data.
- embodiments of the disclosure provide improvements for the security of storage, processing and or transmission of electronic data. Due to the enhanced efficiency resulting from use of the disclosure, electronic devices comprising fewer processing and/or storage resources are able to encrypt, store and/or send data securely. This means that such electronic devices can be used for a greater variety of purposes without comprising security of data, and those electronic devices are rendered more versatile and useful as a result.
- Preferred embodiments comprise a technique wherein a part of a blockchain transaction (Tx) is used as the basis for modification of a portion of data which is subsequently secured using an encryption technique. Additionally or alternatively a part of a blockchain transaction (Tx) is used an input or operand to/of the encryption technique.
- Tx a part of a blockchain transaction
- the portion of data may be a discrete and/or complete portion of data, or it may be derived from another, larger portion of data which may be referred to as the principal or primary portion of data.
- more than one portion of data may be derived from the primary portion of data, with each portion of data being a subset or smaller part of the primary portion of data.
- a primary portion of data may be decomposed or dissected to provide two or more sub-portions of the data. At least one, some or all of the sub-portions can then be secured (encrypted) using embodiments of the disclosure.
- Each sub-portion of data would, in traditional cryptography literature, be referred to as a "block”. However, we will use the term "portion" to avoid confusion with the term "block” as used in blockchain technologies to mean a data structure which comprises one or more blockchain transactions.
- the part of a blockchain transaction is used as an operand in the encryption process in such a way that the encryption process is enhanced.
- the one or more portions of data are modified in such a way that the portion of data is altered, obscured, masked or obfuscated relative to its original pre-modification form prior to further encryption.
- modification of the data is performed using a part of a blockchain transaction (Tx) that is stored in a distributed ledger.
- the portion of the transaction is a transaction ID (TxID) as is known in the art of blockchain technologies.
- the portion of data is modified based on a part of a blockchain transaction that is immutable and cannot, therefore, be altered.
- the data stored on the ledger can be accessed freely and is in public view.
- the use of the transaction therefore enables the presently disclosed technique to be tied to an immutable, accessible and verifiable data item.
- the part of the blockchain transaction can be used as an operand within an encryption process.
- the encryption process can be a block cipher, such as a Hill Cipher.
- Using the part of the blockchain as an operand along with the portion of data provides an encrypted version of the portion of data, so that the modified result is based on the original portion of data plus the transaction.
- the part of the blockchain transaction can be used as an input/operand to an operation, which can include using the part of the blockchain along with the portion of data, wherein the operation provides a modified version of the data, so that the modified result is based on the original portion of data plus the transaction.
- the operation is selected such that repeating or reapplying the operation to the modified version produces the original.
- the operation can be an XOR operation, although other suitable operators can be used to advantage based on the needs of a particular implementation.
- the modified version of the data is then subject to an encryption process, which can be a block cipher, such as a Hill Cipher.
- Embodiments of the disclosed methods may comprise of using the disclosed techniques to encrypt and/or decrypt a portion of data.
- the encrypted portion of data may be transmitted over an electronic network from a sender (which may be called a sending resource/source) to a receiver (which may be called a receiving resource/destination).
- the data may be encrypted by or on behalf of the sender.
- the data may be decrypted by, or on behalf of, the receiver.
- Figure 1 is a schematic block diagram of a system for implementing a blockchain
- Figure 2 schematically illustrates some examples of transactions which may be recorded in a blockchain
- Figure 3A is a schematic block diagram of a client application
- Figure 3B is a schematic mock-up of an example user interface that may be presented by the client application of Figure 3A,
- Figure 4 is a schematic block diagram of some node software for processing transactions
- Figure 5 is a schematic block diagram representing the use of data from a blockchain transaction for use in an encryption process
- Figure 6 is a schematic block diagram representing the use of data from a blockchain transaction for use in a decryption process
- Figure 7 shows the schematic block diagram showing blockchain data used to modify the input to a block cipher.
- Figure 8 shows the schematic block diagram showing a blockchain transaction identification used to modify the input to a block cipher.
- a blockchain refers to a form of distributed data structure, wherein a duplicate copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (referred to below as a "blockchain network") and widely publicised.
- the blockchain comprises a chain of blocks of data, wherein each block comprises one or more transactions.
- Each transaction other than so-called “coinbase transactions”, points back to a preceding transaction in a sequence which may span one or more blocks going back to one or more coinbase transactions.
- Coinbase transactions are discussed further below. Transactions that are submitted to the blockchain network are included in new blocks.
- New blocks are created by a process often referred to as "mining”, which involves each of a plurality of the nodes competing to perform "proof-of-work", i.e. solving a cryptographic puzzle based on a representation of a defined set of ordered and validated pending transactions waiting to be included in a new block of the blockchain.
- the blockchain may be pruned at some nodes, and the publication of blocks can be achieved through the publication of mere block headers.
- the transactions in the blockchain may be used for one or more of the following purposes: to convey a digital asset (i.e. a number of digital tokens), to order a set of entries in a virtualised ledger or registry, to receive and process timestamp entries, and/or to timeorder index pointers.
- a blockchain can also be exploited in order to layer additional functionality on top of the blockchain.
- blockchain protocols may allow for storage of additional user data or indexes to data in a transaction.
- Nodes of the blockchain network (which are often referred to as “miners") perform a distributed transaction registration and verification process, which will be described in more detail later.
- a node validates transactions and inserts them into a block template for which they attempt to identify a valid proof-of-work solution. Once a valid solution is found, a new block is propagated to other nodes of the network, thus enabling each node to record the new block on the blockchain.
- a user e.g. a blockchain client application
- Nodes which receive the transaction may race to find a proof-of-work solution incorporating the validated transaction into a new block.
- Each node is configured to enforce the same node protocol, which will include one or more conditions for a transaction to be valid. Invalid transactions will not be propagated nor incorporated into blocks. Assuming the transaction is validated and thereby accepted onto the blockchain, then the transaction (including any user data) will thus remain registered and indexed at each of the nodes in the blockchain network as an immutable public record.
- the node who successfully solved the proof-of-work puzzle to create the latest block is typically rewarded with a new transaction called the "coinbase transaction" which distributes an amount of the digital asset, i.e. a number of tokens.
- the detection and rejection of invalid transactions is enforced by the actions of competing nodes who act as agents of the network and are incentivised to report and block malfeasance.
- the widespread publication of information allows users to continuously audit the performance of nodes.
- the publication of the mere block headers allows participants to ensure the ongoing integrity of the blockchain.
- the data structure of a given transaction comprises one or more inputs and one or more outputs.
- Any spendable output comprises an element specifying an amount of the digital asset that is derivable from the proceeding sequence of transactions.
- the spendable output is sometimes referred to as a UTXO ("unspent transaction output").
- the output may further comprise a locking script specifying a condition for the future redemption of the output.
- a locking script is a predicate defining the conditions necessary to validate and transfer digital tokens or assets.
- Each input of a transaction (other than a coinbase transaction) comprises a pointer (i.e.
- a reference to such an output in a preceding transaction, and may further comprise an unlocking script for unlocking the locking script of the pointed-to output.
- the first transaction comprises at least one output specifying an amount of the digital asset, and comprising a locking script defining one or more conditions of unlocking the output.
- the second, target transaction comprises at least one input, comprising a pointer to the output of the first transaction, and an unlocking script for unlocking the output of the first transaction.
- one of the criteria for validity applied at each node will be that the unlocking script meets all of the one or more conditions defined in the locking script of the first transaction. Another will be that the output of the first transaction has not already been redeemed by another, earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate it (as a valid transaction, but possibly to register an invalid transaction) nor include it in a new block to be recorded in the blockchain.
- An alternative type of transaction model is an account-based model.
- each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance.
- the current state of all accounts is stored by the nodes separate to the blockchain and is updated constantly.
- FIG. 1 shows an example system 100 for implementing a blockchain 150.
- the system 100 may comprise a packet-switched network 101, typically a wide-area internetwork such as the Internet.
- the packet-switched network 101 comprises a plurality of blockchain nodes 104 that may be arranged to form a peer-to-peer (P2P) network 106 within the packet- switched network 101.
- P2P peer-to-peer
- the blockchain nodes 104 may be arranged as a near-complete graph. Each blockchain node 104 is therefore highly connected to other blockchain nodes 104.
- Each blockchain node 104 comprises computer equipment of a peer, with different ones of the nodes 104 belonging to different peers.
- Each blockchain node 104 comprises processing apparatus comprising one or more processors, e.g. one or more central processing units (CPUs), accelerator processors, application specific processors and/or field programmable gate arrays (FPGAs), and other equipment such as application specific integrated circuits (ASICs).
- Each node also comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media.
- the memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as a hard disk; an electronic medium such as a solid-state drive (SSD), flash memory or EEPROM; and/or an optical medium such as an optical disk drive.
- the blockchain 150 comprises a chain of blocks of data 151, wherein a respective copy of the blockchain 150 is maintained at each of a plurality of blockchain nodes 104 in the distributed or blockchain network 106.
- maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in full. Instead, the blockchain 150 may be pruned of data so long as each blockchain node 150 stores the block header (discussed below) of each block 151.
- Each block 151 in the chain comprises one or more transactions 152, wherein a transaction in this context refers to a kind of data structure. The nature of the data structure will depend on the type of transaction protocol used as part of a transaction model or scheme. A given blockchain will use one particular transaction protocol throughout.
- each transaction 152 comprises at least one input and at least one output.
- Each output specifies an amount representing a quantity of a digital asset as property, an example of which is a user 103 to whom the output is cryptographically locked (requiring a signature or other solution of that user in order to be unlocked and thereby redeemed or spent).
- Each input points back to the output of a preceding transaction 152, thereby linking the transactions.
- Each block 151 also comprises a block pointer 155 pointing back to the previously created block 151 in the chain so as to define a sequential order to the blocks 151.
- Each of the blockchain nodes 104 is configured to forward transactions 152 to other blockchain nodes 104, and thereby cause transactions 152 to be propagated throughout the network 106.
- Each blockchain node 104 is configured to create blocks 151 and to store a respective copy of the same blockchain 150 in their respective memory.
- Each blockchain node 104 also maintains an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into blocks 151.
- the ordered pool 154 is often referred to as a "mempool”. This term herein is not intended to limit to any particular blockchain, protocol or model. It refers to the ordered set of transactions which a node 104 has accepted as valid and for which the node 104 is obliged not to accept any other transactions attempting to spend the same output.
- the (or each) input comprises a pointer referencing the output of a preceding transaction 152i in the sequence of transactions, specifying that this output is to be redeemed or "spent" in the present transaction 152j.
- the preceding transaction can be any transaction in the ordered set 154 or any block 151.
- the preceding transaction 152i need not necessarily exist at the time the present transaction 152j is created or even sent to the network 106, though the preceding transaction 152i will need to exist and be validated in order for the present transaction to be valid.
- preceding refers to a predecessor in a logical sequence linked by pointers, not necessarily the time of creation or sending in a temporal sequence, and hence it does not necessarily exclude that the transactions 152i, 152j be created or sent out-of-order (see discussion below on orphan transactions).
- the preceding transaction 152i can equally be called the antecedent or predecessor transaction.
- the input of the present transaction 152j also comprises the input authorisation, for example the signature of the user 103a to whom the output of the preceding transaction 152i is locked.
- the output of the present transaction 152j can be cryptographically locked to a new user or entity 103b.
- the present transaction 152j can thus transfer the amount defined in the input of the preceding transaction 152i to the new user or entity 103b as defined in the output of the present transaction 152j .
- a transaction 152 may have multiple outputs to split the input amount between multiple users or entities (one of whom can be the original user or entity 103a in order to give change).
- a transaction can also have multiple inputs to gather together the amounts from multiple outputs of one or more preceding transactions, and redistribute to one or more outputs of the current transaction.
- an output-based transaction protocol such as bitcoin
- a party 103 such as an individual user or an organization
- wishes to enact a new transaction 152j (either manually or by an automated process employed by the party)
- the enacting party sends the new transaction from its computer terminal 102 to a recipient.
- the enacting party or the recipient will eventually send this transaction to one or more of the blockchain nodes 104 of the network 106 (which nowadays are typically servers or data centres, but can in principle be other user terminals).
- the party 103 enacting the new transaction 152j can send the transaction directly to one or more of the blockchain nodes 104 and, in some examples, not to the recipient.
- a blockchain node 104 that receives a transaction checks whether the transaction is valid according to a blockchain node protocol which is applied at each of the blockchain nodes 104.
- the blockchain node protocol typically requires the blockchain node 104 to check that a cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in an ordered sequence of transactions 152.
- this may comprise checking that the cryptographic signature or other authorisation of the party 103 included in the input of the new transaction 152j matches a condition defined in the output of the preceding transaction 152i which the new transaction assigns, wherein this condition typically comprises at least checking that the cryptographic signature or other authorisation in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction is linked to.
- the condition may be at least partially defined by a script included in the output of the preceding transaction 152i. Alternatively it can simply be fixed by the blockchain node protocol alone, or it can be due to a combination of these.
- the blockchain node 104 forwards it to one or more other blockchain nodes 104 in the blockchain network 106. These other blockchain nodes 104 apply the same test according to the same blockchain node protocol, and so forward the new transaction 152j on to one or more further nodes 104, and so forth. In this way the new transaction is propagated throughout the network of blockchain nodes 104.
- the definition of whether a given output is assigned (e.g. spent) is whether it has yet been validly redeemed by the input of another, onward transaction 152j according to the blockchain node protocol.
- Another condition for a transaction to be valid is that the output of the preceding transaction 152i which it attempts to redeem has not already been redeemed by another transaction. Again if not valid, the transaction 152j will not be propagated (unless flagged as invalid and propagated for alerting) or recorded in the blockchain 150. This guards against double-spending whereby the transactor tries to assign the output of the same transaction more than once.
- An account-based model on the other hand guards against double-spending by maintaining an account balance. Because again there is a defined order of transactions, the account balance has a single defined state at any one time.
- blockchain nodes 104 In addition to validating transactions, blockchain nodes 104 also race to be the first to create blocks of transactions in a process commonly referred to as mining, which is supported by "proof-of-work". At a blockchain node 104, new transactions are added to an ordered pool
- the blockchain nodes then race to assemble a new valid block 151 of transactions 152 from the ordered set of transactions 154 by attempting to solve a cryptographic puzzle.
- this comprises searching for a "nonce" value such that when the nonce is concatenated with a representation of the ordered pool of pending transactions 154 and hashed, then the output of the hash meets a predetermined condition.
- the predetermined condition may be that the output of the hash has a certain predefined number of leading zeros. Note that this is just one particular type of proof-of- work puzzle, and other types are not excluded.
- a property of a hash function is that it has an unpredictable output with respect to its input. Therefore this search can only be performed by brute force, thus consuming a substantive amount of processing resource at each blockchain node 104 that is trying to solve the puzzle.
- the first blockchain node 104 to solve the puzzle announces this to the network 106, providing the solution as proof which can then be easily checked by the other blockchain nodes 104 in the network (once given the solution to a hash it is straightforward to check that it causes the output of the hash to meet the condition).
- the first blockchain node 104 propagates a block to a threshold consensus of other nodes that accept the block and thus enforce the protocol rules.
- the ordered set of transactions 154 then becomes recorded as a new block 151 in the blockchain 150 by each of the blockchain nodes 104.
- the block pointer 155 is also assigned to the new block 151n pointing back to the previously created block 151n-l in the chain.
- the significant amount of effort, for example in the form of hash, required to create a proof-of-work solution signals the intent of the first node 104 to follow the rules of the blockchain protocol.
- Such rules include not accepting a transaction as valid if it assigns the same output as a previously validated transaction, otherwise known as double-spending.
- the block 151 cannot be modified since it is recognized and maintained at each of the blockchain nodes 104 in the blockchain network 106.
- the block pointer 155 also imposes a sequential order to the blocks 151.
- a protocol also exists for resolving any "fork” that may arise, which is where two blockchain nodesl04 solve their puzzle within a very short time of one another such that a conflicting view of the blockchain gets propagated between nodes 104. In short, whichever prong of the fork grows the longest becomes the definitive blockchain 150. Note this should not affect the users or agents of the network as the same transactions will appear in both forks.
- a node that successfully constructs a new block 104 is granted the ability to newly assign an additional, accepted amount of the digital asset in a new special kind of transaction which distributes an additional defined quantity of the digital asset (as opposed to an inter-agent, or inter-user transaction which transfers an amount of the digital asset from one agent or user to another).
- This special type of transaction is usually referred to as a "coinbase transaction", but may also be termed an "initiation transaction” or "generation transaction”. It typically forms the first transaction of the new block 151n.
- the proof-of-work signals the intent of the node that constructs the new block to follow the protocol rules allowing this special transaction to be redeemed later.
- the blockchain protocol rules may require a maturity period, for example 100 blocks, before this special transaction may be redeemed.
- a regular (non-generation) transaction 152 will also specify an additional transaction fee in one of its outputs, to further reward the blockchain node 104 that created the block 151n in which that transaction was published. This fee is normally referred to as the "transaction fee", and is discussed blow.
- each of the blockchain nodes 104 takes the form of a server comprising one or more physical server units, or even whole a data centre.
- any given blockchain node 104 can take the form of a user terminal or a group of user terminals networked together.
- each blockchain node 104 stores software configured to run on the processing apparatus of the blockchain node 104 in order to perform its respective role or roles and handle transactions 152 in accordance with the blockchain node protocol. It will be understood that any action attributed herein to a blockchain node 104 may be performed by the software run on the processing apparatus of the respective computer equipment.
- the node software may be implemented in one or more applications at the application layer, or a lower layer such as the operating system layer or a protocol layer, or any combination of these.
- Some or all of the parties 103 may be connected as part of a different network, e.g. a network overlaid on top of the blockchain network 106.
- Users of the blockchain network (often referred to as “clients") may be said to be part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 as they do not perform the roles required of the blockchain nodes. Instead, each party 103 may interact with the blockchain network 106 and thereby utilize the blockchain 150 by connecting to (i.e. communicating with) a blockchain node 106.
- Two parties 103 and their respective equipment 102 are shown for illustrative purposes: a first party 103a and his/her respective computer equipment 102a, and a second party 103b and his/her respective computer equipment 102b. It will be understood that many more such parties 103 and their respective computer equipment 102 may be present and participating in the system 100, Y1 but for convenience they are not illustrated.
- Each party 103 may be an individual or an organization. Purely by way of illustration the first party 103a is referred to herein as Alice and the second party 103b is referred to as Bob, but it will be appreciated that this is not limiting and any reference herein to Alice or Bob may be replaced with "first party" and "second "party” respectively.
- the computer equipment 102 of each party 103 comprises respective processing apparatus comprising one or more processors, e.g. one or more CPUs, GPUs, other accelerator processors, application specific processors, and/or FPGAs.
- the computer equipment 102 of each party 103 further comprises memory, i.e. computer-readable storage in the form of a non-transitory computer-readable medium or media.
- This memory may comprise one or more memory units employing one or more memory media, e.g. a magnetic medium such as hard disk; an electronic medium such as an SSD, flash memory or EEPROM; and/or an optical medium such as an optical disc drive.
- the memory on the computer equipment 102 of each party 103 stores software comprising a respective instance of at least one client application 105 arranged to run on the processing apparatus.
- any action attributed herein to a given party 103 may be performed using the software run on the processing apparatus of the respective computer equipment 102.
- the computer equipment 102 of each party 103 comprises at least one user terminal, e.g. a desktop or laptop computer, a tablet, a smartphone, or a wearable device such as a smartwatch.
- the computer equipment 102 of a given party 103 may also comprise one or more other networked resources, such as cloud computing resources accessed via the user terminal.
- the client application 105 may be initially provided to the computer equipment 102 of any given party 103 on suitable computer-readable storage medium or media, e.g. downloaded from a server, or provided on a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable magnetic disk drive, magnetic floppy disk or tape, optical disk such as a CD or DVD ROM, or a removable optical drive, etc.
- suitable computer-readable storage medium or media e.g. downloaded from a server, or provided on a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable magnetic disk drive, magnetic floppy disk or tape, optical disk such as a CD or DVD ROM, or a removable optical drive, etc.
- the client application 105 comprises at least a "wallet” function.
- This has two main functionalities. One of these is to enable the respective party 103 to create, authorise (for example sign) and send transactions 152 to one or more bitcoin nodes 104 to then be propagated throughout the network of blockchain nodes 104 and thereby included in the blockchain 150. The other is to report back to the respective party the amount of the digital asset that he or she currently owns.
- this second functionality comprises collating the amounts defined in the outputs of the various 152 transactions scattered throughout the blockchain 150 that belong to the party in question.
- client functionality may be described as being integrated into a given client application 105, this is not necessarily limiting and instead any client functionality described herein may instead be implemented in a suite of two or more distinct applications, e.g. interfacing via an API, or one being a plug-in to the other. More generally the client functionality can be implemented at the application layer or a lower layer such as the operating system, or any combination of these. The following will be described in terms of a client application 105 but it will be appreciated that this is not limiting.
- the instance of the client application or software 105 on each computer equipment 102 is operatively coupled to at least one of the blockchain nodes 104 of the network 106. This enables the wallet function of the client 105 to send transactions 152 to the network 106.
- the client 105 is also able to contact blockchain nodes 104 in order to query the blockchain 150 for any transactions of which the respective party 103 is the recipient (or indeed inspect other parties' transactions in the blockchain 150, since in embodiments the blockchain 150 is a public facility which provides trust in transactions in part through its public visibility).
- the wallet function on each computer equipment 102 is configured to formulate and send transactions 152 according to a transaction protocol.
- each blockchain node 104 runs software configured to validate transactions 152 according to the blockchain node protocol, and to forward transactions 152 in order to propagate them throughout the blockchain network 106.
- the transaction protocol and the node protocol correspond to one another, and a given transaction protocol goes with a given node protocol, together implementing a given transaction model.
- the same transaction protocol is used for all transactions 152 in the blockchain 150.
- the same node protocol is used by all the nodes 104 in the network 106.
- this can be the blockchain node 104 that is best connected to Alice's computer 102.
- any given blockchain node 104 receives a new transaction 152j it handles it in accordance with the blockchain node protocol and its respective role. This comprises first checking whether the newly received transaction 152j meets a certain condition for being "valid", examples of which will be discussed in more detail shortly.
- the condition for validation may be configurable on a per-transaction basis by scripts included in the transactions 152. Alternatively the condition can simply be a built-in feature of the node protocol, or be defined by a combination of the script and the node protocol.
- any blockchain node 104 that receives the transaction 152j will add the new validated transaction 152 to the ordered set of transactions 154 maintained at that blockchain node 104. Further, any blockchain node 104 that receives the transaction 152j will propagate the validated transaction 152 onward to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, then assuming the transaction 152j is valid, this means it will soon be propagated throughout the whole network 106.
- Different blockchain nodes 104 may receive different instances of a given transaction first and therefore have conflicting views of which instance is 'valid' before one instance is published in a new block 151, at which point all blockchain nodes 104 agree that the published instance is the only valid instance. If a blockchain node 104 accepts one instance as valid, and then discovers that a second instance has been recorded in the blockchain 150 then that blockchain node 104 must accept this and will discard (i.e. treat as invalid) the instance which it had initially accepted (i.e. the one that has not been published in a block 151).
- An alternative type of transaction protocol operated by some blockchain networks may be referred to as an "account-based" protocol, as part of an account-based transaction model.
- each transaction does not define the amount to be transferred by referring back to the UTXO of a preceding transaction in a sequence of past transactions, but rather by reference to an absolute account balance.
- the current state of all accounts is stored, by the nodes of that network, separate to the blockchain and is updated constantly.
- transactions are ordered using a running transaction tally of the account (also called the "position"). This value is signed by the sender as part of their cryptographic signature and is hashed as part of the transaction reference calculation.
- an optional data field may also be signed the transaction. This data field may point back to a previous transaction, for example if the previous transaction ID is included in the data field.
- FIG. 2 illustrates an example transaction protocol.
- This is an example of a UTXO-based protocol.
- a transaction 152 (abbreviated "Tx") is the fundamental data structure of the blockchain 150 (each block 151 comprising one or more transactions 152). The following will be described by reference to an output-based or "UTXO" based protocol. However, this is not limiting to all possible embodiments. Note that while the example UTXO-based protocol is described with reference to bitcoin, it may equally be implemented on other example blockchain networks.
- each transaction (“Tx") 152 comprises a data structure comprising one or more inputs 202, and one or more outputs 203.
- Each output 203 may comprise an unspent transaction output (UTXO), which can be used as the source for the input 202 of another new transaction (if the UTXO has not already been redeemed).
- the UTXO includes a value specifying an amount of a digital asset. This represents a set number of tokens on the distributed ledger.
- the UTXO may also contain the transaction ID of the transaction from which it came, amongst other information.
- the transaction data structure may also comprise a header 201, which may comprise an indicator of the size of the input field(s) 202 and output field(s) 203.
- the header 201 may also include an ID of the transaction. In embodiments the transaction ID is the hash of the transaction data (excluding the transaction ID itself) and stored in the header 201 of the raw transaction 152 submitted to the nodes 104.
- Alice 103a wishes to create a transaction 152j transferring an amount of the digital asset in question to Bob 103b.
- Alice's new transaction 152j is labelled “Txi” . It takes an amount of the digital asset that is locked to Alice in the output 203 of a preceding transaction 152i in the sequence, and transfers at least some of this to Bob.
- the preceding transaction 152i is labelled “Txo” in Figure 2.
- Z and Txi are just arbitrary labels. They do not necessarily mean that TAT? is the first transaction in the blockchain 151, nor that Txi is the immediate next transaction in the pool 154. Txi can point back to any preceding (i.e. antecedent) transaction that still has an unspent output 203 locked to Alice.
- the preceding transaction Txo may already have been validated and included in a block 151 of the blockchain 150 at the time when Alice creates her new transaction Tx], or at least by the time she sends it to the network 106. It may already have been included in one of the blocks 151 at that time, or it may be still waiting in the ordered set 154 in which case it will soon be included in a new block 151.
- Txo and Txi can be created and sent to the network 106 together, or Txo can even be sent after Txi if the node protocol allows for buffering "orphan" transactions.
- preceding and “subsequent” as used herein in the context of the sequence of transactions refer to the order of the transactions in the sequence as defined by the transaction pointers specified in the transactions (which transaction points back to which other transaction, and so forth). They can equally be replaced with “predecessor” and “successor”, or “antecedent” and “descendant”, “parent” and “child”, or such like. It does not necessarily imply an order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. Nevertheless, a subsequent transaction (the descendent transaction or "child”) which points to a preceding transaction (the antecedent transaction or "parent”) will not be validated until and unless the parent transaction is validated. A child that arrives at a blockchain node 104 before its parent is considered an orphan. It may be discarded or buffered for a certain time to wait for the parent, depending on the node protocol and/or node behaviour.
- One of the one or more outputs 203 of the preceding transaction T T? comprises a particular UTXO, labelled here UTXOo.
- Each UTXO comprises a value specifying an amount of the digital asset represented by the UTXO, and a locking script which defines a condition which must be met by an unlocking script in the input 202 of a subsequent transaction in order for the subsequent transaction to be validated, and therefore for the UTXO to be successfully redeemed.
- the locking script locks the amount to a particular party (the beneficiary of the transaction in which it is included).
- the locking script defines an unlocking condition, typically comprising a condition that the unlocking script in the input of the subsequent transaction comprises the cryptographic signature of the party to whom the preceding transaction is locked.
- the locking script (aka scriptPubKey) is a piece of code written in the domain specific language recognized by the node protocol. A particular example of such a language is called "Script" (capital S) which is used by the blockchain network.
- the locking script specifies what information is required to spend a transaction output 203, for example the requirement of Alice's signature. Unlocking scripts appear in the outputs of transactions.
- the unlocking script (aka scriptSig) is a piece of code written the domain specific language that provides the information required to satisfy the locking script criteria. For example, it may contain Bob's signature. Unlocking scripts appear in the input 202 of transactions. So in the example illustrated, UTXOo 'm the output 203 of T T?
- Txi comprises a locking script [Checksig T ⁇ ] which requires a signature Sig PA of Alice in order for UTXOo to be redeemed (strictly, in order for a subsequent transaction attempting to redeem UTXOo to be valid).
- [Checksig PA] contains a representation (i.e. a hash) of the public key PA from a publicprivate key pair of Alice.
- the input 202 of Txi comprises a pointer pointing back to Txi (e.g. by means of its transaction ID, TxIDo, which in embodiments is the hash of the whole transaction Txo ⁇
- TxIDo transaction ID
- the input 202 of Txi comprises an index identifying UTXOo within Txo, to identify it amongst any other possible outputs of Txo.
- the input 202 of Txi further comprises an unlocking script ⁇ Sig PA> which comprises a cryptographic signature of Alice, created by Alice applying her private key from the key pair to a predefined portion of data (sometimes called the "message" in cryptography).
- the data (or “message") that needs to be signed by Alice to provide a valid signature may be defined by the locking script, or by the node protocol, or by a combination of these.
- the node applies the node protocol. This comprises running the locking script and unlocking script together to check whether the unlocking script meets the condition defined in the locking script (where this condition may comprise one or more criteria). In embodiments this involves concatenating the two scripts:
- the signed data comprises the whole of Txi (so a separate element does not need to be included specifying the signed portion of data in the clear, as it is already inherently present).
- the details of authentication by public-private cryptography will be familiar to a person skilled in the art. Basically, if Alice has signed a message using her private key, then given Alice's public key and the message in the clear, another entity such as a node 104 is able to authenticate that the message must have been signed by Alice.
- Signing typically comprises hashing the message, signing the hash, and tagging this onto the message as a signature, thus enabling any holder of the public key to authenticate the signature.
- any reference herein to signing a particular piece of data or part of a transaction, or such like can in embodiments mean signing a hash of that piece of data or part of the transaction.
- the blockchain node 104 deems Txi valid. This means that the blockchain node 104 will add Txi to the ordered pool of pending transactions 154. The blockchain node 104 will also forward the transaction Txi to one or more other blockchain nodes 104 in the network 106, so that it will be propagated throughout the network 106. Once Txi has been validated and included in the blockchain 150, this defines UTXOo om Txo as spent. Note that Txi can only be valid if it spends an unspent transaction output 203.
- Txi will be invalid even if all the other conditions are met.
- the blockchain node 104 also needs to check whether the referenced UTXO in the preceding transaction Txo is already spent (i.e. whether it has already formed a valid input to another valid transaction). This is one reason why it is important for the blockchain 150 to impose a defined order on the transactions 152.
- a given blockchain node 104 may maintain a separate database marking which UTXOs 203 in which transactions 152 have been spent, but ultimately what defines whether a UTXO has been spent is whether it has already formed a valid input to another valid transaction in the blockchain 150.
- UTXO-based transaction models a given UTXO needs to be spent as a whole. It cannot "leave behind" a fraction of the amount defined in the UTXO as spent while another fraction is spent.
- the amount from the UTXO can be split between multiple outputs of the next transaction.
- the amount defined in UTXOo 'm Txo be split between multiple UTXOs in Txi.
- Alice does not want to give Bob all of the amount defined in UTXOo, she can use the remainder to give herself change in a second output of Txi, or pay another party.
- the transaction fee does not require its own separate output 203 (i.e. does not need a separate UTXO). Instead, any difference between the total amount pointed to by the input(s) 202 and the total amount of specified in the output(s) 203 of a given transaction 152 is automatically given to the blockchain node 104 publishing the transaction.
- a pointer to UTXOo is the only input to Txi, and Txi has only one output UTXOi. If the amount of the digital asset specified in UTXOo is greater than the amount specified in UTXOi, then the difference may be assigned by the node 104 that wins the proof-of-work race to create the block containing UTXOi. Alternatively, or additionally however, it is not necessarily excluded that a transaction fee can be specified explicitly in its own one of the UTXOs 203 of the transaction 152.
- Alice and Bob's digital assets consist of the UTXOs locked to them in any transactions 152 anywhere in the blockchain 150.
- the assets of a given party 103 are scattered throughout the UTXOs of various transactions 152 throughout the blockchain 150.
- script code is often represented schematically (i.e. not using the exact language).
- operation codes opcodes
- "OP_" refers to a particular opcode of the Script language.
- OP RETURN is an opcode of the Script language that when preceded by OP FALSE at the beginning of a locking script creates an unspendable output of a transaction that can store data within the transaction, and thereby record the data immutably in the blockchain 150.
- the data can comprise a document which it is desired to store in the blockchain.
- an input of a transaction contains a digital signature corresponding to a public key PA. In embodiments this is based on the ECDSA using the elliptic curve secp256kl.
- a digital signature signs a particular piece of data. In some embodiments, for a given transaction the signature will sign part of the transaction input, and some or all of the transaction outputs. The particular parts of the outputs it signs depends on the SIGHASH flag.
- the SIGHASH flag is usually a 4-byte code included at the end of a signature to select which outputs are signed (and thus fixed at the time of signing).
- the locking script is sometimes called "scriptPubKey” referring to the fact that it typically comprises the public key of the party to whom the respective transaction is locked.
- the unlocking script is sometimes called “scriptSig” referring to the fact that it typically supplies the corresponding signature.
- the scripting language can be used to define any one or more conditions. Hence the more general terms “locking script” and “unlocking script” may be preferred.
- the side channel 107 may comprise additional communication functionality.
- This additional functionality enables Alice 103a to establish a separate side channel 107 with Bob 103b (at the instigation of either party or a third party).
- the side channel 107 enables exchange of data separately from the blockchain network.
- Such communication is sometimes referred to as "off-chain" communication.
- this may be used to exchange a transaction 152 between Alice and Bob without the transaction (yet) being registered onto the blockchain network 106 or making its way onto the chain 150, until one of the parties chooses to broadcast it to the network 106.
- Sharing a transaction in this way is sometimes referred to as sharing a "transaction template".
- a transaction template may lack one or more inputs and/or outputs that are required in order to form a complete transaction.
- the side channel 107 may be used to exchange any other transaction related data, such as keys, negotiated amounts or terms, data content, etc.
- the side channel 107 may be established via the same packet-switched network 101 as the blockchain network 106.
- the side channel 301 may be established via a different network such as a mobile cellular network, or a local area network such as a local wireless network, or even a direct wired or wireless link between Alice and Bob's devices 102a, 102b.
- the side channel 107 as referred to anywhere herein may comprise any one or more links via one or more networking technologies or communication media for exchanging data "off-chain", i.e. separately from the blockchain network 106. Where more than one link is used, then the bundle or collection of off-chain links as a whole may be referred to as the side channel 107. Note therefore that if it is said that Alice and Bob exchange certain pieces of information or data, or such like, over the side channel 107, then this does not necessarily imply all these pieces of data have to be send over exactly the same link or even the same type of network.
- FIG 3A illustrates an example implementation of the client application 105 for implementing embodiments of the presently disclosed scheme.
- the client application 105 comprises a transaction engine 401 and a user interface (Ul) layer 402.
- the transaction engine 401 is configured to implement the underlying transaction-related functionality of the client 105, such as to formulate transactions 152, receive and/or send transactions and/or other data over the side channel 301, and/or send transactions to one or more nodes 104 to be propagated through the blockchain network 106, in accordance with the schemes discussed above and as discussed in further detail shortly.
- the transaction engine 401 of each client 105 comprises a function 403.
- the Ul layer 402 is configured to render a user interface via a user input/output (I/O) means of the respective user's computer equipment 102, including outputting information to the respective user 103 via a user output means of the equipment 102, and receiving inputs back from the respective user 103 via a user input means of the equipment 102.
- the user output means can comprise one or more display screens (touch or nontouch screen) for providing a visual output, one or more speakers for providing an audio output, and/or one or more haptic output devices for providing a tactile output, etc.
- the user input means can comprise for example the input array of one or more touch screens (the same or different as that/those used for the output means); one or more cursor-based devices such as mouse, trackpad or trackball; one or more microphones and speech or voice recognition algorithms for receiving a speech or vocal input; one or more gesture-based input devices for receiving the input in the form of manual or bodily gestures; or one or more mechanical buttons, switches or joysticks, etc.
- the various functionality herein may be described as being integrated into the same client application 105, this is not necessarily limiting and instead they can be implemented in a suite of two or more distinct applications, e.g. one being a plug-in to the other or interfacing via an API (application programming interface).
- the functionality of the transaction engine 401 may be implemented in a separate application than the Ul layer 402, or the functionality of a given module such as the transaction engine 401 can be split between more than one application.
- some or all of the described functionality can be implemented at, say, the operating system layer.
- FIG. 3B gives a mock-up of an example of the user interface (U I ) 500 which may be rendered by the Ul layer 402 of the client application 105a on Alice's equipment 102a. It will be appreciated that a similar Ul may be rendered by the client 105b on Bob's equipment 102b, or that of any other party.
- U I user interface
- FIG. 3B shows the Ul 500 from Alice's perspective.
- the Ul 500 may comprise one or more Ul elements 501, 502, 502 rendered as distinct Ul elements via the user output means.
- the Ul elements may comprise one or more user-selectable elements 501 which may be, such as different on-screen buttons, or different options in a menu, or such like.
- the user input means is arranged to enable the user 103 (in this case Alice 103a) to select or otherwise operate one of the options, such as by clicking or touching the Ul element on-screen, or speaking a name of the desired option (N.B. the term "manual" as used herein is meant only to contrast against automatic, and does not necessarily limit to the use of the hand or hands).
- the options enable the user (Alice) to ...
- the Ul elements may comprise one or more data entry fields 502, through which the user can ... These data entry fields are rendered via the user output means, e.g. on-screen, and the data can be entered into the fields through the user input means, e.g. a keyboard or touchscreen. Alternatively, the data can be received orally for example based on speech recognition.
- the Ul elements may comprise one or more information elements 503 output to output information to the user. E.g. this/these can be rendered on screen or audibly.
- Figure 4 illustrates an example of the node software 450 that is run on each blockchain node 104 of the network 106, in the example of a UTXO- or output-based model. Note that another entity may run node software 450 without being classed as a node 104 on the network 106, i.e. without performing the actions required of a node 104.
- the node software 450 may contain, but is not limited to, a protocol engine 451, a script engine 452, a stack 453, an application-level decision engine 454, and a set of one or more blockchain-related functional modules 455.
- Each node 104 may run node software that contains, but is not limited to, all three of: a consensus module 455C (for example, proof-of-work), a propagation module 455P and a storage module 455S (for example, a database).
- the protocol engine 401 is typically configured to recognize the different fields of a transaction 152 and process them in accordance with the node protocol.
- a transaction 152j (Txj) is received having an input pointing to an output (e.g. UTXO) of another, preceding transaction 152i (Tx ⁇ , then the protocol engine 451 identifies the unlocking script in Txj and passes it to the script engine 452.
- the protocol engine 451 also identifies and retrieves Tx t based on the pointer in the input of Txj.
- Tx t may be published on the blockchain 150, in which case the protocol engine may retrieve Tx L from a copy of a block 151 of the blockchain 150 stored at the node 104.
- Tx t may yet to have been published on the blockchain 150.
- the protocol engine 451 may retrieve Tx t from the ordered set 154 of unpublished transactions maintained by the nodel04. Either way, the script engine 451 identifies the locking script in the referenced output of Tx t and passes this to the script engine 452.
- the script engine 452 thus has the locking script of Tx t and the unlocking script from the corresponding input of Txj. For example, transactions labelled Tx 0 and Tx ⁇ are illustrated in Figure 2, but the same can apply for any pair of transactions.
- the script engine 452 runs the two scripts together as discussed previously, which will include placing data onto and retrieving data from the stack 453 in accordance with the stack-based scripting language being used (e.g. Script). By running the scripts together, the script engine 452 determines whether or not the unlocking script meets the one or more criteria defined in the locking script - i.e. does it "unlock" the output in which the locking script is included? The script engine 452 returns a result of this determination to the protocol engine 451. If the script engine 452 determines that the unlocking script does meet the one or more criteria specified in the corresponding locking script, then it returns the result "true”. Otherwise, it returns the result "false”.
- the result "true” from the script engine 452 is one of the conditions for validity of the transaction.
- protocol-level conditions evaluated by the protocol engine 451 that must be met as well; such as that the total amount of digital asset specified in the output(s) of Txj does not exceed the total amount pointed to by its inputs, and that the pointed-to output of Tx t has not already been spent by another valid transaction.
- the protocol engine 451 evaluates the result from the script engine 452 together with the one or more protocol-level conditions, and only if they are all true does it validate the transaction Txj.
- the protocol engine 451 outputs an indication of whether the transaction is valid to the application-level decision engine 454.
- the decision engine 454 may select to control both of the consensus module 455C and the propagation module 455P to perform their respective blockchain-related function in respect of Txj. This comprises the consensus module 455C adding Txj to the node's respective ordered set of transactions 154 for incorporating in a block 151, and the propagation module 455P forwarding TXj to another blockchain node 104 in the network 106.
- the application-level decision engine 454 may apply one or more additional conditions before triggering either or both of these functions. E.g. the decision engine may only select to publish the transaction on condition that the transaction is both valid and leaves enough of a transaction fee.
- true and “false” herein do not necessarily limit to returning a result represented in the form of only a single binary digit (bit), though that is certainly one possible implementation. More generally, “true” can refer to any state indicative of a successful or affirmative outcome, and “false” can refer to any state indicative of an unsuccessful or non-affirmative outcome. For instance in an account-based model, a result of "true” can be indicated by a combination of an implicit, protocol-level validation of a signature and an additional affirmative output of a smart contract (the overall result being deemed to signal true if both individual outcomes are true).
- a portion (P) of data to be encrypted e.g. plaintext (P) is processed in an operation together with a key (K), in the form of a block matrix, and an operand.
- the encryption can be improved by enhancing the portion of data (P) to be encrypted e.g. modifying said portion of data prior to encryption. Additionally or alternatively, encryption can be improved by enhancing the operand.
- a block 151 is selected from the blockchain 150.
- the block selected can be the latest block on the chain e.g. the preceding block at the time of encryption.
- a part of data (A) from the block 151 can be selected.
- the part of data (A) can be one or a combination of data derived from the block including, but not limited to, at least one of: the block header; the Merkle Root; the TXID of the coinbase transaction; and any one of the TXIDs within said block.
- information to be encrypted can use part of the data (A) obtained from the previous transaction e.g. the transaction identification (TXID) of the UTXO in which an encrypted portion of data is to be recorded on chain.
- TXID transaction identification
- the part of data (A), or a derivate therefrom, e.g. modified version (A') of the part of data (A) is used to enhance encryption using the operand.
- Certain embodiments may use a unique portion of a block or a transaction e.g. the transaction identification. This means that the operand used in the modification of the plaintext and/or the use of the operand is dynamic, such that it changes with each encryption process.
- the properties of the part of data (A) are selected to be at least one of i) deterministically derivable from publicly known information on the block chain e.g. a hash of the Merkle Root and/or ii) representative of a pre-set piece of data.
- the part of data (A) can include at least one of a transaction ID (TXID), a hash of at least a portion of the transaction, signature data and a portion of a transaction script.
- TXID transaction ID
- the subsequent encryption therefore, can be based upon a standardised element or portion of data. wherein the element is common to each block the data is unique.
- Deriving data from publicly available blocks 151 on the blockchain ledger supports pseudonymity. Parts of data residing in blocks 151 e.g. the TxID can be formed in accordance with a blockchain protocol.
- the parts of data can be derived from a primary part of data, wherein the part of data is a subset or component of the primary part of data.
- the part of data can be one of a plurality of parts of data that are derived from the primary part of data, wherein each of the plurality is a subset or component of the primary part of data.
- the primary part of data can be the block header, and the part of data (A) can be derived therefrom.
- the examples herein describe optional modification of the part of the data (A) obtained from a block, which can be data obtained from the previous transaction of the UTXO. Modification of the part of the data (A) can be optional such that the part of the data (A) can be used directly e.g. unmodified in the encryption or enhancement processes taught herein.
- the part of data (A) is subject to an optional modify 600 process to create a modified version (A') of the part of data (A) derived from a block.
- the modify 600 process functions to further enhance the subsequent encryption process.
- the modify operation can include at least one of a mod operation, logic-gate operation e.g. XOR operation, a bitwise operation and a masking operation.
- the modify operation can be applied to the part of data (A) in combination with at least one of the portion of data (P) to be encrypted or the operand.
- the modified version (A') of the part of data (A) can be passed through an optional preparation process 602 in which the data is prepared for input to a subsequent encryption step.
- Preparation 602 can include operations including further integers, nominally labelled 'x' and y, which can be co-ordinates or further operands.
- the preparation process 602 can further obscure the part of data (A) and/or the modification (A') of the part of data.
- the subsequent encryption process can be a block cipher and the preparation process 602 can include steps required to support use of the part of data (A) from a block 151 in known cryptography techniques, such as the Advanced Encryption Standard (AES) or the Data Encryption Standard (DES).
- the preparation 602 can include, by way of example, operations including add round key, substation, row-shifting, column mixing, expansion and inverse operations.
- Figure 5 illustrates that the data derived from the block 151 is fed into an encryption process (E) that is applied to data to be encrypted.
- the data to be encrypted can, for example, be plaintext, and is hereinafter referred to as 'plaintext' (P) for simplicity although the invention is not limited to the encryption of plaintext.
- the plaintext (P) can be encrypted to produce a cipher (C), hereinafter referred to as ciphertext (C).
- the modified version (A') of the part of data (A) can be fed directly as an input to the encryption process (E). Additionally or alternatively, the modified version (A') of the part of data (A) can be fed as an input to the encryption process (E) following preparation 602.
- the part of data (A) is fed directly into the encryption process (E) e.g. for direct application to the portion of data (P) to be encrypted and/or the operand.
- the encryption process can use a part of a blockchain transaction (TX) to provide a modified version (A') of a part of data (A). Then, the modified version (A') of the part of data (A) functions as an input to an encryption process (E) to provide an encrypted version of data e.g. plaintext to be encrypted.
- the modified version (A') functions as an operand.
- Another operand includes at least one of the data e.g. plaintext and a key, matrix, or element thereof.
- the modify process 600 and/or the preparation 602 process operate to deterministically derive an input i.e. the modified version (A') for the encryption process.
- Said input can be encrypted.
- the part of data (A) can be fed directly and/or indirectly following preparation 602 as an input to the encryption process (E).
- Using part of data (A) can increase the size of the key space.
- by creating a modified version (A') of the part of data (A) encryption can further increase the size of the key space.
- Figure 6 illustrates the same components as Figure 5 and operates as described above in relation to Figure 5, except that the part of data (A) is processed for input to a decryption process (D), which processes ciphertext (C) to produce decrypted data e.g. plaintext (P).
- D decryption process
- C ciphertext
- P decrypted data
- the teaching herein can be applied to an encryption process using and/or comprising a block cipher function.
- the encryption process uses or comprises Hill Cipher.
- the Hill algorithm can be expressed as:
- C is an element of a ciphertext
- P is an element of a plaintext
- K is a key in the form of a block matrix
- 26 is the modulo in a modulus operation performed upon the key
- the part of data (A), or a derivate therefrom, e.g. modified version (A') of the part of data (A) can be used to enhance the encryption of a portion (P) of data to be encrypted e.g. plaintext (P).
- the encryption can be improved, therefore, by enhancing the operand and/or by enhancing the portion of data (P) to be encrypted.
- Figures 7 and 8 include an additional and optional processes in which part of data (A), or a derivate (A') is used to enhance the operand within the encryption process.
- the Hill algorithm is used, again, by way of example although the invention is not limited thereto.
- a part (A) of a block from a blockchain or a blockchain transaction (TX) is used - directly or indirectly through a modified version (A') - to alter the plaintext (Pi....P n ) in an alteration process 606 to produce a modified version (pi....p n ) of a portion of data (Pi....P n ) e.g. modified plaintext (p).
- the part (A) or modified version (A') are used as an operand with the plaintext (P).
- the operation includes processes and/or functions that include at least one of a mod operation, logic-gate operation e.g. XOR operation, a bitwise operation and a masking operation.
- An output from the alteration process 606 is the modified version (pi....p n ) of the plaintext that feeds into the encryption process (E, HC).
- the part of data (A), or a derivate therefrom, e.g. modified version (A') of the part of data (A) is used to alter, obscure, mask or obfuscate the portion (P) of data to be encrypted e.g. plaintext (P), relative to its original pre-modification form, to produce a modified version (pi....p n ) of the plaintext. Thereafter, the modified version (pi....p n ) is used in the encryption process to provide an encrypted version (C) of the modified version (p) of the portion of data (P).
- the part of data (A) derived from the block 151 is fed into an encryption process (E) that is applied to data to be encrypted.
- the part (A) is used to enhance the plaintext (P) such that a modified version (p) of plaintext is encrypted to produce a cipher (C) e.g. ciphertext.
- the part (A) is optionally used to enhance the operand, thus further enhancing the encryption process.
- the part of data (A) is modified to provide a modified version (A') that determines the operation of encryption by producing a modified version (pi....p n ) of a portion of data (Pi....P n ) e.g. wherein Ci is the first character of the ciphertext piKi through to p n K n n are the Hill algorithm application of the Key to the modified version of the plaintext mod A' is the operand applied to piKi through to p n K nn
- the teaching herein improves upon known block cipher techniques by using a unique part of data (A) derived from an immutable source, thus making the ciphertext an accessible and verifiable data item. Further, the part of data (A) can be processed so as to alter, obscure, mask or obfuscate said part of data relative to its original pre-modification form.
- the part of data (A) is processed to alter 606 the plaintext (P) such that a modified version (p) of plaintext is produced thus adding a further dimension to the key space size, at least.
- the key space size is further increased.
- Figure 8 shows the plaintext enhancement in addition to the optional operand enhancement.
- the plaintext to be encrypted is representable as a 256 character string.
- the modified version (A') of the part of data is derived from a block or transaction, and in this example uses a TXID having a length of 256 characters.
- the TXID is shown, optionally, providing the modulo for the operand 604 in addition to the TXID being used to alter the plaintext (P) to produce a modified version (p) of plaintext.
- the modification and alteration is a 'mod' i.e. modulus operation, although an XOR operation is an example of a suitable alternative.
- the matrix key size is 256 x 256.
- the 256-character input, in this example a modified version (p) of plaintext results in a 256-character output e.g. ciphertext (C).
- the portion of data (P) is presented as whole.
- the portion of data can be derived from a larger primary portion of data, wherein the portion of data (P) is a subset or part of the primary portion of data.
- the portion of data (P) can be one of a plurality of portions of data. This can occur when, for example, a data file is to be encrypted, and the data file is to be broken down e.g. into smaller sized chunks of data.
- the chunk size of the portion of data can be 256 characters.
- Figures 7 and 8 illustrates that both the plaintext (P) is altered 606 and the operand 604 are enhanced using the same part of data (A). However, the plaintext (P) and the operand 604 can be enhanced using different parts of data (A).
- a part (A) of a block from a blockchain or a blockchain transaction (TX) is optionally used to enhance the operand 604, as introduced above.
- the part (A) can be selected and processed as described elsewhere herein to arrive at the modified version (A') of the part of data (A) is used to enhance the operand 604, which further enhances (i) the encryption of the portion (P) of data to be encrypted can, for example, be plaintext, and once again referred to hereinafter as 'plaintext' (P) for simplicity although the invention is not limited to the encryption of plaintext or (ii) a modified version (p) of plaintext.
- encryption can be improved by enhancing the operand, as illustrated by the hashed line in Figures 7 and 8, which illustrate the use of a part of data (A) from a block 151 in a block cipher application.
- the Hill algorithm is used by way of example and the invention is not limited thereto.
- An optional modify 600 operation provides a modified version (A') of the part of data (A) for use in the block cipher. No optional preparation 602 is shown in these examples.
- the modified version (A') of the part of data (A) is illustrated as the operand 604.
- the part of data (A) is modified to provide a modified version (A') that determines the operation of the encryption.
- the 'plaintext' (P) is encrypted directly and the modified version (p) of plaintext is not used, wherein the ciphertext (C) is derived from .
- Ci to C is the first character of the ciphertext
- PiKi through to P n K n n are the Hill algorithm application of the Key to the plaintext mod A' is the operand applied to PiKi through to P n K nn
- Processing data derived from a block 151 results in a modified version (A') being used in conjunction with an operation e.g. a modulus operation.
- the operation can be ‘XOR A’.
- the modified version (A') functions as an operand that increases the key space size beyond conventional teaching while using a part of data (A) that is publicly derivable.
- the modified version (A') of the part of data (A) can be described as becoming encrypted during the derivation of the ciphertext. Referring to Figure 7, the modified version (A') together with the dimension of the matrix determines the size of the key space.
- n matrices of dimension n x n in the known Hill Cipher wherein n is a dimension of the n x n matrix.
- An upper bound on the key space size can be computed based on the number of invertible matrices and/or avoiding too many zeros in the key matrix to reduce diffusion.
- the teaching herein improves upon known block cipher techniques by using a unique part of data (A) derived from an immutable source, thus making the ciphertext an accessible and verifiable data item. Further, the part of data (A) is processed to at least one of alter, obscure, mask or obfuscate said part of data relative to its original pre-modification form. If the part of data (A) is used directly and at scale it can significantly increase the key space size, at least. With further modification to produce a modified version (A') the key space size is further increased. Utilisation of the modified version (p) of plaintext enhances the encryption yet further.
- the length of the part of data (A) or modified version (A') of the part of data can be selected to be the same length as the data to be encrypted.
- the dimension of the matrix key can be selected to be the same size as the part of the data (A) or modified version (A').
- plaintext having 10 characters is to be encrypted i.e. Pw the modified version (A') of the part of data is configured to have a bit-length of 10 characters; and the matrix key size is 10 x 10.
- a 10-character input e.g. plaintext results in a 10-character output e.g. ciphertext.
- Figure 8 corresponds to an example of the invention, wherein: the data to be encrypted is representable as a 256 character string; the modified version (A') of the part of data is configured to have a length of 256 characters, and is derived from a transaction ID (TxID) e.g. by using an XOR operation; and the matrix key size is 256 x 256.
- TxID transaction ID
- the 256-character input e.g. plaintext results in a 256-character output e.g. ciphertext.
- the modified version (A') of the part of data is "mod TXID", although the operation performed on the TXID can additionally or alternatively be an XOR operation.
- This improved block cipher technique supports the encryption of data in a transaction that can be based, for example, on a part of data from a preceding block, which can be the previous block or a specified block.
- the part of data can be derived from one or more transactions within a block.
- encrypted data is tied to transactions on the blockchain.
- the use of parts of data from a preceding block means that said data itself has already been processed and/or encrypted.
- encryption is enhanced by modifying or otherwise altering, within a block cipher technique, at least one of (i) a portion (P) of data to be encrypted e.g. plaintext (P), which is processed in a modified version (p), and (ii) scaling up the operand and/or using an operand derived from a block 151 e.g. a transaction or transaction identification.
- the blockchain network 106 is the bitcoin network and bitcoin nodes 104 perform at least all of the described functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that only perform one or some but not all of these functions. That is, a network entity may perform the function of propagating and/or storing blocks without creating and publishing blocks (recall that these entities are not considered nodes of the preferred Bitcoin network 106).
- the blockchain network 106 may not be the bitcoin network.
- a node may perform at least one or some but not all of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150.
- a "node" may be used to refer to a network entity that is configured to create and publish blocks 151 but not store and/or propagate those blocks 151 to other nodes.
- any reference to the term "bitcoin node” 104 above may be replaced with the term “network entity” or “network element”, wherein such an entity/element is configured to perform some or all of the roles of creating, publishing, propagating and storing blocks.
- the functions of such a network entity/element may be implemented in hardware in the same way described above with reference to a blockchain node 104. It will be appreciated that the above embodiments have been described by way of example only. More generally there may be provided a method, apparatus or program in accordance with any one or more of the following Statements.
- the invention may generally reside in a (computer-implemented method) that uses blockchain-derived or related content to encrypt or decrypt data, or a part thereof.
- the content can be bespoke i.e. be or serve as a unique parameter or reference.
- the blockchain content can be used as an input to an encryption or decryption process.
- the content may be derived from or related to a blockchain block or transaction or part thereof that has been at least partially formed I accordance with a blockchain protocol.
- the block, transaction or part thereof may, or may not have been: validated by a node, submitted to the blockchain network; written to the blockchain ledger that is implemented in accordance with said blockchain protocol.
- a method and corresponding system and computer program may be described as one or more of: a computer-implemented method, a security method, a data encryption/security method, a data transfer or communication method and/or a method for secure communication across an electronic network; computer-based methods and systems for implementation of a block cipher e.g. Hill Cipher; computer-implemented methods and systems for securing and/or encrypting data using a block Cipher e.g. Hill Cipher.
- the method may comprise the actions of: using a part (A) of a block from a blockchain to provide a modified version (p) of a portion of data (P); and using the modified version (p) of the portion of data (P) as an input to an encryption process (E) to provide an encrypted version (C) of the modified version (p) of the portion of data (P).
- the part (A) of the blockchain block may comprise the whole or a subportion of the blockchain block.
- the portion of data (P) may comprise part of, or a whole, data entity e.g. a (blockchain) transaction, a file, a document, an image, an executable etc.
- the modified version (p) of the portion of data (P) may have been modified (i.e. changed, processed or altered) from its original state. Therefore, the portion of the blockchain block may be used in at least one operation that processes the portion of data (P) to provide the modified version (p) as an output of the operation(s).
- part (A) of a block from a blockchain means “part of a blockchain block” including part or the whole of the block, and irrespective of whether the block has been mined or written to the blockchain ledger by a node in the blockchain network.
- the part (A) of the block from a blockchain can be or can comprise: a transaction ID (TxID); and/or a hash of at least a portion of the transaction or the block; and/or signature data; and/or a portion of a transaction script.
- TxID transaction ID
- the part (A) of a block from a blockchain and/or transaction ID (TxID) can be formed in accordance with a blockchain protocol.
- Using the part (A) of the block to provide the modified version of the portion of data (p) can comprise: using the part (A) of the block and/or the portion of data (P) as inputs to at least one operation.
- the at least one operation may produce the modified version.
- the operations may be used sequentially or in parallel.
- the modified version and/or portion of blockchain block may be used as input(s) to one or more subsequent operations.
- the at least one operation can be at least one of: an arithmetic operation, a Boolean operation, a mod operation; an XOR operation; a bitwise operation; or a masking operation.
- the encryption process can be, can use or can comprise a block cipher.
- the encryption process can be, can use or can comprise a Hill Cipher.
- the portion of data (P) can be derived from a primary portion of data.
- the portion of data (P) can be, may comprise, or may be derived from a subset or part of the primary portion of data.
- the portion of data (P) can be one of a plurality of portions of data that are derived from the primary portion of data. Each of the plurality can be a subset or part of the primary portion of data (P).
- the method can further comprise: transmitting the encrypted version (C) of the portion of data (P) across a computer-implemented network from a sender to a receiver; or receiving, by a receiver from a sender across a computer-implemented network, the encrypted version (C) of the portion of data (P).
- the encryption process can include a matrix having an n x n dimension.
- the part of data (A) can be a parameter unique to each transaction or block.
- the encryption process (E) can be used to encrypt at least one of a plaintext word (P) or data-element, wherein said plaintext or data-element has a length of n bits.
- a computer- implemented method of encrypting data using a block cipher comprising: using a transaction identification (TXID) of a blockchain transaction (TX) to provide a modified version (p) of a portion of data (P); and using the modified version (p) of the portion of data (P) as an input to a Hill Cipher (HC) encryption process (E) to provide an encrypted version (C) of the modified version (p) of the portion of data (P).
- TXID transaction identification
- TX blockchain transaction
- E Hill Cipher
- a computer- implemented method of decrypting data using a block cipher comprising: using a Hill Cipher (HC) encryption process (E) to decrypt a cipher (C) to derive a modified version (p) of a portion of data (P); and using a transaction identification (TXID) of a blockchain transaction (TX) to derive a portion of data (P) from the modified version (p) of a portion of data (P).
- HC Hill Cipher
- E Hill Cipher
- TXID transaction identification
- TX blockchain transaction
- the part (A) of a blockchain transaction (TX) and/or another part of a blockchain transaction (TX) can additionally be used to provide: an encrypted version (C) of a portion of data (P); or a portion of data (P) decrypted from an encrypted version (C) of the portion of data (P); wherein the part (A) of the block from a blockchain or the blockchain transaction (TX) and one of the portion of data (P) or the encrypted version (C) of the portion of data (P), are used as inputs or operands of an encryption process (E) or a decryption process (D), respectively.
- E encryption process
- D decryption process
- the transaction identification (TXID) of a blockchain transaction (TX), or a derivative thereof, can be the modulo of the Hill Cipher encryption process (E) or decryption process (D).
- the method may comprise: i) sending, from a sender to a receiver, a portion of data (P) that has been encrypted using a method as described above (or as claimed herein) ; and/or ii) receiving, by a receiver from a sender, portion of data (P) that has been encrypted using a method as described above (or as claimed herein).
- Such an embodiment may further comprise one or more of: i) encrypting the portion of data by, or on behalf of, the sender; this may provide an encrypted version of the portion of data; ii) decrypting the portion of data by, or on behalf of, the receiver; this may provide an unencrypted version of the portion of data; iii) storing the encrypted and/or unencrypted version of the portion of data by, or on behalf of, the receiver.
- computer equipment which may be called a 'system'
- memory comprising one or more memory units
- processing apparatus comprising one or more processing units
- the memory stores code arranged to run on the processing apparatus, the code being configured so as when executing on the processing apparatus to perform any method of any embodiment disclosed or claimed herein.
- the system may comprise code which functions as a digital wallet.
- the digital wallet may be configured to interact with a blockchain network.
- a computer program embodied on computer-readable storage and configured so as, when run (executed) on one or more processors, to perform any method disclosed or claimed herein.
- a computer program embodied on computer- readable storage and arranged or configured so as, when run on one or more processors, to: i) implement some or all of the functionality of a system and/or method claimed herein; and/or ii) implement, facilitate, enable or provide one or more of the features of any of preceding claim.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Storage Device Security (AREA)
Abstract
Description
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| GB2203545.5A GB2616622A (en) | 2022-03-15 | 2022-03-15 | Computer implemented methods & systems |
| PCT/EP2023/053862 WO2023174629A1 (en) | 2022-03-15 | 2023-02-16 | Improved hill cipher encryption based on blockchain |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| EP4494301A1 true EP4494301A1 (en) | 2025-01-22 |
Family
ID=81254930
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP23705543.9A Withdrawn EP4494301A1 (en) | 2022-03-15 | 2023-02-16 | Improved hill cipher encryption based on blockchain |
Country Status (3)
| Country | Link |
|---|---|
| EP (1) | EP4494301A1 (en) |
| GB (1) | GB2616622A (en) |
| WO (1) | WO2023174629A1 (en) |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020044651A1 (en) * | 2000-05-16 | 2002-04-18 | Tuvell Walter E. | Method and apparatus for improving the security of cryptographic ciphers |
| GB2522445A (en) * | 2014-01-24 | 2015-07-29 | Raymond Breen | Secure mobile wireless communications platform |
| CN111741028B (en) * | 2020-08-24 | 2020-11-24 | 支付宝(杭州)信息技术有限公司 | Business processing method, apparatus, equipment and system |
-
2022
- 2022-03-15 GB GB2203545.5A patent/GB2616622A/en active Pending
-
2023
- 2023-02-16 EP EP23705543.9A patent/EP4494301A1/en not_active Withdrawn
- 2023-02-16 WO PCT/EP2023/053862 patent/WO2023174629A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| GB2616622A (en) | 2023-09-20 |
| GB202203545D0 (en) | 2022-04-27 |
| WO2023174629A1 (en) | 2023-09-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20240064020A1 (en) | Blocking sensitive data | |
| US20240281806A1 (en) | Multi-party blockchain address scheme | |
| US12537671B2 (en) | Key generation method | |
| US20230291585A1 (en) | Method of generating a public key | |
| WO2023036548A1 (en) | Signature verification | |
| US20250053965A1 (en) | Signature-based atomic swap | |
| US20240214179A1 (en) | Blockchain-implemented hash function | |
| US20230134619A1 (en) | Method of generating a hash-based message authentication code | |
| EP4360246A1 (en) | Tiered consensus | |
| WO2023156105A1 (en) | Blockchain transaction | |
| EP4494301A1 (en) | Improved hill cipher encryption based on blockchain | |
| EP4494302A1 (en) | Computer implemented methods & systems for improved security, encryption and communication of data | |
| US20240291669A1 (en) | Multi-party blockchain address scheme | |
| US20240235848A1 (en) | Multi-party blockchain address scheme | |
| WO2023156099A1 (en) | Identity-linked blockchain addresses |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: UNKNOWN |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE |
|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20240815 |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC ME MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| DAV | Request for validation of the european patent (deleted) | ||
| DAX | Request for extension of the european patent (deleted) | ||
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
| 18D | Application deemed to be withdrawn |
Effective date: 20250423 |