REDACTABLE BLOCKCHAIN
20220407681 · 2022-12-22
Inventors
Cpc classification
H04L9/3239
ELECTRICITY
International classification
H04L9/06
ELECTRICITY
H04L9/00
ELECTRICITY
H04L9/32
ELECTRICITY
Abstract
A method for redacting a private blockchain comprises applying a hash function to a prefix and new content to compute a hash for a block of the blockchain; performing a modulo operation to convert the hash to an integer modulo; determining an inverse of the integer modulo; computing a redactable suffix from the prefix and the inverse of the integer modulo; replacing current content of the blockchain with the new content; and applying the redactable suffix to the block having the new content.
Claims
1. A method for redacting a private blockchain, comprising: applying a hash function to a prefix and new content to compute a hash for a block of the blockchain; performing a modulo operation to convert the hash to an integer modulo; determining an inverse of the integer modulo; computing a redactable suffix from the prefix and the inverse of the integer modulo; replacing current content of the blockchain with the new content; and applying the redactable suffix to the block having the new content.
2. The method of claim 1, wherein the integer is relatively prime to a Euler totient function.
3. The method of claim 2, further comprising performing a padding operation so that the integer is relatively prime to the Euler totient function.
4. The method of claim 1, wherein the hash function is a public hash function.
5. The method of claim 5, wherein the hash function complies with a secure cryptographic scheme certified by the National Institute of Standards and Technology (NIST).
6. The method of claim 1, wherein the block includes a one-way public function (F).
7. The method of claim 1, wherein a prefix of a previous block or a next block depends on the block.
8. The method of claim 1, wherein the new content is replaced by the current content by a central authority using a private key.
9. The method of claim 1, wherein an RSA private key is generated from the integer modulo.
10. The method of claim 8, wherein the block is linked to a first next block and a second next block, and wherein the method further comprises: providing an intermediate block between the block and second next block, the second next block having a prefix that is the same as a prefix of the first next block; and modifying by the central authority the content of the block.
11. A method of constructing a redactable blockchain according to a Rivest-Shamir-Adleman (RSA) cryptosystem, comprising: applying a public hash function to a prefix and new content to compute a hash for a block of the blockchain; performing a modulo operation to convert the hash to an integer modulo; determining an inverse of the integer modulo; computing a redactable suffix from the prefix and the inverse of the integer modulo; replacing current content of the blockchain with the new content; and applying the redactable suffix to the block having the new content.
12. The method of claim 11, further comprising performing a padding operation so that the integer is relatively prime to a Euler totient function.
13. The method of claim 11, wherein the new content is replaced by the current content by a central authority using a private key.
14. The method of claim 13, wherein the block is linked to a first next block and a second next block, and wherein the method further comprises: providing an intermediate block between the block and second next block, the second next block having a prefix that is the same as a prefix of the first next block; and modifying by the central authority the content of the block.
15. The method of claim 11, wherein a preimage-resistance of the hash function is provided by replacing a first integrity condition including a prefix of a next block of the blockchain with a second integrity condition.
16. The method of claim 11, wherein an RSA private key is generated from the integer modulo.
17. A computer program product for redacting a private blockchain, the computer program product comprising: one or more computer readable storage media having computer readable program code collectively stored on the one or more computer readable storage media, the computer readable program code being executed by one or more processors of a computer system to cause the computer system to perform a method comprising: applying a hash function to a prefix and new content to compute a hash for a block of the blockchain; performing a modulo operation to convert the hash to an integer modulo; determining an inverse of the integer modulo; computing a redactable suffix from the prefix and the inverse of the integer modulo; replacing current content of the blockchain with the new content; and applying the redactable suffix to the block having the new content.
18. The method of claim 17, further comprising performing a padding operation so that the integer is relatively prime to a Euler totient function.
19. The method of claim 17, wherein the hash function is a public hash function.
20. The method of claim 17, wherein the block is linked to a first next block and a second next block, and wherein the method further comprises: providing an intermediate block between the block and second next block, the second next block having a prefix that is the same as a prefix of the first next block; and modifying by a central authority the content of the block.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawing figures depict one or more implementations in accord with the present teachings, by way of example only, not by way of limitation. In the figures, like reference numerals refer to the same or similar elements.
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
DETAILED DESCRIPTION
[0016] In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant teachings. However, it should be apparent to those skilled in the art that the present teachings may be practiced without such details. In other instances, well known methods, procedures, components, and/or circuitry have been described at a relatively high-level, without detail, in order to avoid unnecessarily obscuring aspects of the present teachings.
[0017] With the proliferation of IoT devices, private networks have emerged that create new challenges. In particular, it is desirable that while preserving the tampering detection property, to permit a system administrator or other central authority with security privileges to modify, delete, or add data to a blockchain of the network.
[0018] In brief overview, embodiments of the present inventive concept include redactable a blockchain structure for a private network and a method for constructing the same. In some embodiments, the system, method, and/or computer program product can construct a universal redactable blockchain involving a central authority or other private key holder. The content can be changed, for example, current content of a block can be replaced by new content by a well-known Rivest-Shamir-Adleman (RSA) cryptosystem. Unlike conventional redactable blockchain techniques, embodiments of the present inventive concept do not require a proprietary trapdoor hash function, or consensus based voting or permissionless setting based on a proprietary cryptographic construction, or the like, and can instead operate in conjunction with any certified hash function, for example, a secure cryptographic scheme accepted by the National Institute of Standards and Technology (NIST); therefore, trapdoor hash functions are not required for redacting a blockchain. As is well known, a hash function ensures the integrity of a link between the blocks of a blockchain. Accordingly, embodiments of the redactable blockchain techniques can be integrated with any type of blockchain and regardless of network.
[0019]
[0020] The blockchain 100 maintains a list of blocks 101, 102, 103, or records. Additional blocks can be added to the blockchain. The blockchain 100 includes links 111, 112 between the blocks 101-103. For example, blockchain 102 may include a link 11 to the previous block 101 and/or a link 112 to the next block 103. Conventional blockchains are inherently resistant to modification of the data, or immutable, so that the data in one block cannot be modified without modifying the contents of the other blocks. Here, a system administrator or other central authority is incapable of modifying a block without consensus from the other nodes in the blockchain. Consensus-based techniques generally require a policy that dictates the requirements and constrains for performing a blockchain redaction operation. However, consensus-based voting or the like is not required, thereby permitting embodiments of a blockchain redaction operation to be performed on any type of blockchain managed by a central authority, including blockchains based on various cryptographic constructions.
[0021] The blockchain 100 illustrated in
[0022]
[0023] In some embodiments, block (B.sub.i) 202 includes a permanent prefix (P.sub.i), a source of content (C.sub.i), and a redactable suffix (X.sub.i). In some embodiments, the blockchain 200 includes a hash h.sub.i=H(P.sub.i, C.sub.i), where H is any public hash function, and a public one-way function F such that F(h.sub.i, X.sub.i)=P.sub.i+1. The hash function H and the one-way function F may be public to permit a user, e.g., via a hardware computer, to create or modify a blockchain as well as verify the integrity of the blockchain, for example, according to an equation described with respect to method step 312 below, where the suffix X.sub.i is replaced by X′.sub.i and integer d.sub.i is replaced by d′.sub.i. In some embodiments, the hash function is collision-free, i.e., two different sequences not generating the same hash value. In order for the blockchain 200 to be redactable and in order to verify the integrity, a central authority may be required to have a private key that would allow for replacing the blockchain content C.sub.i with an arbitrary C′.sub.i. When a new suffix X′.sub.i is selected, the equality F(h′.sub.i, X′.sub.i)=P.sub.i+1 may apply.
[0024] Unlike the content and the suffix, the prefix of a block of interest cannot be changed to ensure the blockchain's integrity, since the prefix of a block B.sub.i+1 depends on the previous block B.sub.i or the prefix of the block B.sub.i−1 depends on the next block B.sub.i of the blockchain. Some embodiments include the prefix being a one-way function of the fingerprint H(B.sub.i−1) of the previous block B.sub.i−1. The one-way function renders it infeasible to select an input value corresponding to a known output value. Embodiments can operate in blockchain configurations where the prefix of B.sub.i−1 depends on B.sub.i. Here, an integrity check may have the form F(h.sub.i, X.sub.i)=P.sub.i−1.
[0025]
[0026] A central authority in possession of a private key may wish to change the content of a block B.sub.i from C.sub.i to C′.sub.i. In order to allow for the requested redaction of block 302, for example, changing from content C.sub.i to C′.sub.i (302), the blockchain 200 is transitioned to the redactable blockchain 200′ by computing a hash h.sub.i′=H(P.sub.i, C.sub.i′), where H is a public hash function, P.sub.i is a permanent prefix, and C.sub.i′ is the new content or content changed from content C.sub.i. The hash h.sub.i′ is generated due to a change in content of the block B.sub.i. The hash function H is provided to ‘seal’ each block and can be used for a hashing operation to produce a transaction. The blocks can be connected in a chain by using another hash function and/or one-way function. The hash function H can comply with the secure hashing algorithm (SHA)-256 or other cryptographic hash function, e.g., a standard specifying secure one-way hash functions hash algorithms, SHA-1, SHA-224, SHA-256, SHA-384, SHA512, and so on. For example, a public hash function H (e.g., SHA-256) can be applied to a concatenation of P.sub.i and C.sub.i′ to produce h.sub.i′=H(P.sub.i, C.sub.i′). The generated hash h.sub.i′ may be stored in a ledger or the like associated with the blockchain.
[0027] At block 306, the hash h.sub.i′ can be converted to an integer, and more specifically an integer d′.sub.i modulo n. At decision diamond 308, a determination is made whether the integer d′.sub.i is relatively prime to the Euler totient function ϕ(n)=(p−1)(q−1), e.g., there are no factors in common with ϕ(n). Here, Euler's Theorem may apply where two primes (p, q) are determined and n=pq, and φ(n)=(p−1)(q−1), and applied to the RSA algorithm to compute a private key d. In other embodiments, functions other than a Euler totient function may apply. This requires a party who would like to change the content of a single block to essentially solve the RSA problem, namely, to recover X from in, X.sup.d (mod n), and d, where d is relatively prime to φ(n). This is considered computationally infeasible for an appropriate choice of n and a random d, 0<d<n. Public immutability of the blockchain 200 is based on the computational hardness of the RSA problem rather than properties of the underlying hash function.
[0028] If at decision diamond 308 a determination is made that the integer d′.sub.i is relatively prime to φ(n), then the method 300 proceeds to block 310 where the inverse e′.sub.i of d′.sub.i modulo φ(n) is computed.
[0029] If at decision diamond 308 a determination is made by the system that the integer d.sub.i′ is not relatively prime to φ(n), then the method proceeds to block 309, where a padding operation is performed so that integer d′.sub.i is relatively prime to φ(n). An exemplary padding operation is described with respect to
[0030] At block 312, the redactable suffix X′.sub.i is computed, for example, according to the equation: X′.sub.i=P.sup.e′i.sub.i+1 (mod n). The integrity of the data transactions based on the block chain 200, 200′ may be maintained notwithstanding a change of a block B.sub.i according to the integrity check equation: (X.sub.i).sup.d′.sup.
e′.sub.id′=1(mod ϕ(n)) and (P.sub.i+1).sup.ϕ(n)=1(mod n)
[0031] At block 314, the central authority having the generated private key has the authority to change the block 202, for example, redacting block 202, e.g., changing the content of the block from content C.sub.i to content C.sub.i′ and changing the suffix X.sub.i to X′.sub.i, or otherwise providing a new block 202′ including the same. The integrity of the blockchain is also preserved because the modified block B′.sub.i has the same prefix P.sub.i as the original block B.sub.i. The prefix P.sub.i+1 of the next block also does not change.
[0032]
[0033] For example, a randomized encryption function may include two large primes p and q, which can be generated by searching among a known arithmetic sequence. Primes are used for generating unique values for a hash function by multiplying the primes. As is well-known, prime numbers can reduce the probability of hash collisions. A public key can be generated from two large prime numbers. In accordance with Euler's theorem, n=pq, where p and q are safe prime integers, in the form of 2r+1 where r is another prime integer. If d.sub.i is not relatively prime to ϕ(n), this means that either (1) d.sub.i is even, or (2) d.sub.i is odd but is divisible by a large prime (recall that p and q are safe primes, i.e. (p−1)/2 and (q−1)/2 are primes.
[0034] Thus, at block 402, the blockchain processor adds a random number, for example, 0 bits, to the block C.sub.i. Since the hash function H is assumed to pass all standard statistical tests, with probability (e.g., ½), the result of the hashing operation will be a bit string that converts to an odd integer d.sub.i, and with very high probability this d.sub.i is also going not to be divisible by (p−1).sup.2 and (q−1)/2. Thus, at block 406, an integer d.sub.i relatively prime to φ(n) is generated. In some embodiments, steps 402 and/or 404 may be repeated to determine the integer d.sub.i relatively prime to φ(n).
[0035] As described above, a well-known RSA encryption scheme can be applied to embodiments of the blockchain structure. Public information may include a large integer n determined by a product of two large primes and a hash function, e.g. SHA-256. Also required is private information such as the two prime factors p and q.
[0036] As also described above, each block B.sub.i includes a prefix P.sub.i, the actual content C.sub.i (e.g. a transaction description), and a suffix X.sub.i, which is a nonzero integer modulo n. The suffix X.sub.i preferably does not have an order 2, i.e. X.sub.i.sup.2≠1 (mod n) to ensure that X.sub.i does not have a small order since p and q are safe primes. Therefore, if the order of an element of the multiplicative group is not 2, then it is large. Thus, an entity that forms a block B.sub.i may select the suffix X.sub.i at random on integers between 1 and n−1 and then checks if X.sub.i.sup.2≠1 (mod n). If X.sub.i.sup.2=1 (mod n), random selection of X.sub.i is repeated. Once a proper X.sub.i is selected, a public hash function H (e. g. SHA-256) is applied to concatenation of P.sub.i and C.sub.i to produce h.sub.i=H(P.sub.i, C.sub.i), and h.sub.i is then converted to an integer=d.sub.i (mod n). d.sub.i modulo n. The prefix P.sub.i+1 of the next block can be computed as P.sub.i+1(X.sub.i).sup.d.sub.i (mod n).
[0037] Accordingly, a malicious actor desiring to change the content C.sub.i of the block B.sub.i is required to solve the RSA problem to which no feasible method for solving is known. In particular, the actor must recover the suffix X from n, X.sup.d (mod n), and d relatively prime to ϕ(n). This is computationally infeasible for an appropriate choice of n and a random d, 0<d<n.
[0038] Embodiments of the present inventive concept can also address the risk of unauthorized modifications of a block in a blockchain, including attempts to corrupt or change the content of a block. An intruder may attempt to corrupt a blockchain block by initiating a random suffix X.sub.i and searching for a number d.sub.i such that (X.sub.i).sup.d.sup.
[0039] The hash function H includes particular properties including preimage resistance and corruption resistance. In the absence of a preimage-resistant hash function H according to some embodiments, a two-step corruption attack would be possible. In some embodiments, a preimage-resistance of the hash function is provided by replacing a first integrity condition including a prefix of a next block of the blockchain with a second integrity condition. In some embodiments, an integrity condition may comply with the equation: P.sub.i+1=(X.sub.i).sup.d.sub.i (mod n). A cyberattacker may determine that block B.sub.i was changed so that (X.sub.i).sup.d.sub.i=(X′.sub.i).sup.d′.sub.i; (mod n). Here, the attacker may be in possession of X.sub.i, X′.sub.i, d.sub.i, and d′.sub.i. The following omits the index i for brevity.
[0040] In this example, the attacker can corrupt the block B.sub.i, for example, change it to something meaningless. Generically, g.c.d.(d,d′)=1, so it may be assumed that there are a, bϵZ.sub.n such that da+d′b=1. Then X=((X′).sup.aX.sup.b).sup.d′. Now if X″=(X′).sup.aX.sup.b and d″=d′d, then (X″).sup.d″=((X′).sup.aX.sup.b).sup.d′d=(((X′).sup.aX.sup.b).sup.d′).sup.d=X.sup.d. Thus, if the attacker can find another suffix, X″, and d″ such that (X″).sup.d″=X.sup.d, the attacker can therefore corrupt the block B.sub.i.
[0041] However, the problem for the attacker when embodiments of the present inventive concept are deployed is that d″ should be the hash of something, i.e. the attacker will face an additional problem of finding a preimage of d″ under the hash function H. If the preimage resistance of the hash function H is a concern, then the integrity condition is Pi+1=(Xi).sup.d.sub.i (mod n) can be replaced by Pi+1=(Xi).sup.d(sq)2.sup.
[0042]
[0043] At block 502, a blockchain hash tree is provided. For example, three blocks B.sub.1, B.sub.2, B.sub.3 are connected in a chain. Block B2 is also connected to a second block B′. Therefore, the underlying graph the node corresponding to the second block B′ has a node of degree greater than 2, i.e., degree 3.
[0044] A central authority may modify content of the block B.sub.2. As described above with respect to the method 300, a suffix X.sub.i preferably does not have an order 2, i.e. X.sub.i.sup.2≠1 (mod n). Here, due to the degree 3 configuration the central authority would be required to find a suffix X.sub.2 for the block B.sub.2 such that (X′.sub.2).sup.d.sup.
[0045]
[0046] As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method, or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.), or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “service,” “circuit,” “circuitry,” “module,” and/or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
[0047] Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a non-transient computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0048] Program code and/or executable instructions embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0049] Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer (device), partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0050] Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
[0051] These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
[0052] The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
[0053] While the invention has been described with reference to certain embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof to adapt to particular situations without departing from the scope of the disclosure. Therefore, it is intended that the claims not be limited to the particular embodiments disclosed, but that the claims will include all embodiments falling within the scope and spirit of the appended claims.