HK40011077B - System and method for information protection - Google Patents
System and method for information protection Download PDFInfo
- Publication number
- HK40011077B HK40011077B HK62019000192.0A HK62019000192A HK40011077B HK 40011077 B HK40011077 B HK 40011077B HK 62019000192 A HK62019000192 A HK 62019000192A HK 40011077 B HK40011077 B HK 40011077B
- Authority
- HK
- Hong Kong
- Prior art keywords
- transaction
- key
- commitment
- sender
- value
- Prior art date
Links
Description
技术领域Technical Field
本公开总体上涉及用于信息保护的方法和设备。The present disclosure generally relates to methods and apparatus for information protection.
背景技术Background Art
隐私对于各种用户之间的通信和数据传输是重要的。在没有保护的情况下,用户暴露于身份盗窃、非法转移或其它潜在损失的风险中。当在线实现通信和传送时,由于对在线信息的自由访问,风险甚至变得更大。Privacy is important for communications and data transfers between various users. Without protection, users are exposed to the risk of identity theft, illegal transfers, or other potential losses. When communications and transfers are carried out online, the risks become even greater due to the unfettered access to online information.
发明内容Summary of the Invention
本发明的各种实施例包括用于信息保护的系统、方法和非暂时性计算机可读介质。Various embodiments of the present invention include systems, methods, and non-transitory computer-readable media for information protection.
根据一个方面,用于信息保护的计算机实现方法包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便接收方节点验证交易。According to one aspect, a computer-implemented method for information protection includes: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, wherein the commitment scheme includes at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a recipient node associated with a recipient of the transaction so that the recipient node verifies the transaction.
在一些实施例中,生成第一密钥包括:根据Diffie-Hellman(DH)密钥交换协议,基于交易的发送方的私钥SK_A和交易的接收方的公钥PK_B,生成第一密钥。In some embodiments, generating the first key includes generating the first key based on a private key SK_A of a sender of the transaction and a public key PK_B of a receiver of the transaction according to a Diffie-Hellman (DH) key exchange protocol.
在一些实施例中,承诺方案包括佩德森(Pedersen)承诺,所述Pedersen承诺至少基于交易盲因子r_t并且具有作为被承诺值的交易金额t。In some embodiments, the commitment scheme comprises a Pedersen commitment based on at least a transaction blinding factor r_t and having a transaction amount t as the committed value.
在一些实施例中,交易盲因子r_t和交易金额t的组合包括交易盲因子r_t和交易金额t的级联。In some embodiments, the combination of the transaction blinding factor r_t and the transaction amount t comprises a concatenation of the transaction blinding factor r_t and the transaction amount t.
在一些实施例中,向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合以便接收方节点验证所述交易包括向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,使得接收方节点:基于交易的接收方的私钥SK_B和交易的发送方的公钥PK_A生成对称密钥对的第二密钥;用由接收节点生成的第二密钥解密加密的组合,获得交易盲因子r_t和交易金额t;以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。In some embodiments, sending a transaction commitment value T and an encrypted combination to a recipient node associated with a recipient of a transaction so that the recipient node verifies the transaction includes sending a transaction commitment value T and an encrypted combination to a recipient node associated with the recipient of the transaction, so that the recipient node: generates a second key of a symmetric key pair based on a private key SK_B of the recipient of the transaction and a public key PK_A of the sender of the transaction; decrypts the encrypted combination with the second key generated by the receiving node to obtain a transaction blinding factor r_t and a transaction amount t; and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
在一些实施例中,使接收方节点至少基于交易承诺值T、交易盲因子r_t和交易金额t验证交易包括使接收方节点:响应于基于交易盲因子r_t确定交易承诺值T与交易金额t的承诺方案不匹配,拒绝所述交易;以及响应于基于交易盲因子r_t确定交易承诺值T与交易金额t的承诺方案匹配,通过对交易签名生成待返回至与发送方相关联的发送方节点的接收方签名SIGB以批准所述交易。In some embodiments, causing the receiving node to verify the transaction based on at least the transaction commitment value T, the transaction blinding factor r_t, and the transaction amount t includes causing the receiving node to: reject the transaction in response to determining that the transaction commitment value T does not match the commitment scheme for the transaction amount t based on the transaction blinding factor r_t; and approve the transaction by signing the transaction to generate a receiving signature SIGB to be returned to the sending node associated with the sender in response to determining that the transaction commitment value T matches the commitment scheme for the transaction amount t based on the transaction blinding factor r_t.
在一些实施例中,在向与接收方相关联的接收方节点发送加密的组合之前,所述方法还包括:用承诺方案承诺交易的找零y以获得找零承诺值Y,所述承诺方案至少包括找零盲因子r_y,其中找零y是交易动用的发送方的一个或多个资产减去交易金额t;基于发送方的私钥SK_A和发送方的公钥PK_A生成另一密钥;以及用另一密钥加密找零盲因子r_y和找零y的另一组合。In some embodiments, before sending the encrypted combination to a recipient node associated with the recipient, the method further includes: committing the change y of the transaction using a commitment scheme to obtain a change commitment value Y, the commitment scheme including at least a change blinding factor r_y, where the change y is one or more assets of the sender mobilized in the transaction minus the transaction amount t; generating another key based on the sender's private key SK_A and the sender's public key PK_A; and encrypting another combination of the change blinding factor r_y and the change y using the other key.
在一些实施例中,所述方法还包括:响应于接收到接收方签名SIGB,通过对交易签名生成发送方签名SIGA以批准所述交易;以及向区块链网络中的一个或多个节点提交包括加密的组合、加密的另一组合、交易承诺值T、找零承诺值Y、发送方签名SIGA和接收方签名SIGB的交易,以便一个或多个节点验证所述交易。In some embodiments, the method further includes: in response to receiving the recipient signature SIGB, generating a sender signature SIGA by signing the transaction to approve the transaction; and submitting the transaction including the encrypted combination, the other encrypted combination, the transaction commitment value T, the change commitment value Y, the sender signature SIGA and the recipient signature SIGB to one or more nodes in the blockchain network so that the one or more nodes verify the transaction.
在一些实施例中,向区块链网络中的一个或多个节点提交包括加密的组合、加密的另一组合、交易承诺值T、找零承诺值Y、发送方签名SIGA和接收方签名SIGB的交易,以便一个或多个节点验证所述交易,包括:向所述区块链网络中的一个或多个节点提交包括加密的组合、加密的另一组合、交易承诺值T、找零承诺值Y、发送方签名SIGA和接收方签名SIGB的交易,使得所述一个或多个节点响应于成功验证所述交易,向接收方发布交易金额t,消除为所述交易动用的一个或多个资产,以及向所述发送方发布找零y。In some embodiments, submitting a transaction including an encrypted combination, another encrypted combination, a transaction commitment value T, a change commitment value Y, a sender signature SIGA, and a receiver signature SIGB to one or more nodes in a blockchain network so that one or more nodes verify the transaction includes: submitting a transaction including an encrypted combination, another encrypted combination, a transaction commitment value T, a change commitment value Y, a sender signature SIGA, and a receiver signature SIGB to one or more nodes in the blockchain network, so that the one or more nodes, in response to successfully verifying the transaction, release the transaction amount t to the receiver, eliminate one or more assets mobilized for the transaction, and release the change y to the sender.
根据另一方面,非暂时性计算机可读存储介质存储待由处理器执行以使所述处理器执行操作的指令,所述操作包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便接收方节点验证所述交易。According to another aspect, a non-transitory computer-readable storage medium stores instructions to be executed by a processor to cause the processor to perform operations, the operations including: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, the commitment scheme including at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a recipient node associated with a recipient of the transaction so that the recipient node verifies the transaction.
根据另一方面,用于信息保护的系统包括处理器和耦合至所述处理器的非暂时性计算机可读存储介质,所述存储介质存储待由所述处理器执行以使所述系统执行操作的指令,所述操作包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便接收方节点验证所述交易。According to another aspect, a system for information protection includes a processor and a non-transitory computer-readable storage medium coupled to the processor, the storage medium storing instructions to be executed by the processor to cause the system to perform operations, the operations including: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, the commitment scheme including at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a recipient node associated with a recipient of the transaction so that the recipient node verifies the transaction.
根据另一方面,用于信息保护的计算机实现方法包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便所述接收方节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥,用由接收方节点生成的第二密钥解密加密的组合,以获得交易盲因子r_t和交易金额t,以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a computer-implemented method for information protection includes: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, wherein the commitment scheme includes at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a receiver node associated with a receiver of the transaction, so that the receiver node: generates a second key of the symmetric key pair based on the receiver's private key SK_B and the sender's public key PK_A, decrypts the encrypted combination using the second key generated by the receiver node to obtain the transaction blinding factor r_t and the transaction amount t, and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,非暂时性计算机可读存储介质存储待由处理器执行以使所述处理器执行以下操作的指令,所述操作包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便所述接收方节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥,用由接收方节点生成的第二密钥对解密加密的组合,以获得交易盲因子r_t和交易金额t,以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a non-transitory computer-readable storage medium stores instructions to be executed by a processor so that the processor performs the following operations, the operations including: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, the commitment scheme including at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a receiver node associated with a receiver of the transaction, so that the receiver node: generates a second key of the symmetric key pair based on the receiver's private key SK_B and the sender's public key PK_A, decrypts the encrypted combination using the second key pair generated by the receiver node to obtain the transaction blinding factor r_t and the transaction amount t, and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,用于信息保护的系统包括处理器和耦合至所述处理器的非暂时性计算机可读存储介质,所述存储介质存储待由所述处理器执行以使所述系统执行操作的指令,所述操作包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便所述接收方节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥,用由接收方节点生成的第二密钥解密加密的组合,以获得交易盲因子r_t和交易金额t,以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a system for information protection includes a processor and a non-transitory computer-readable storage medium coupled to the processor, the storage medium storing instructions to be executed by the processor to enable the system to perform operations, the operations including: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, the commitment scheme including at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a receiver node associated with a receiver of the transaction, so that the receiver node: generates a second key of the symmetric key pair based on the receiver's private key SK_B and the sender's public key PK_A, decrypts the encrypted combination using the second key generated by the receiver node to obtain the transaction blinding factor r_t and the transaction amount t, and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,用于信息保护的计算机实现方法包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向交易的接收方相关联的接收节点发送交易承诺值T和加密的组合,以便所述接收节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥,用由接收方节点生成的第二密钥解密加密的组合,以获得交易盲因子r_t和交易金额t,以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a computer-implemented method for information protection includes: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, wherein the commitment scheme includes at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a receiving node associated with a recipient of the transaction, so that the receiving node: generates a second key of the symmetric key pair based on the recipient's private key SK_B and the sender's public key PK_A, decrypts the encrypted combination using the second key generated by the recipient node to obtain the transaction blinding factor r_t and the transaction amount t, and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,非暂时性计算机可读存储介质存储待由处理器执行以使所述处理器执行操作的指令,所述操作包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便所述接收方节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥,用由接收方节点生成的第二密钥解密加密的组合,以获得交易盲因子r_t和交易金额t,以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a non-transitory computer-readable storage medium stores instructions to be executed by a processor to cause the processor to perform operations, the operations including: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, the commitment scheme including at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a receiver node associated with a receiver of the transaction, so that the receiver node: generates a second key of the symmetric key pair based on the receiver's private key SK_B and the sender's public key PK_A, decrypts the encrypted combination using the second key generated by the receiver node to obtain the transaction blinding factor r_t and the transaction amount t, and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,用于信息保护的系统包括处理器和耦合至所述处理器的非暂时性计算机可读存储介质,所述存储介质存储待由所述处理器执行以使所述系统执行操作的指令,所述操作包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第一密钥;用第一密钥加密交易盲因子r_t和交易金额t的组合;以及向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便所述接收节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥,用由接收方节点生成的第二密钥解密加密的组合,以获得交易盲因子r_t和交易金额t,以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a system for information protection includes a processor and a non-transitory computer-readable storage medium coupled to the processor, the storage medium storing instructions to be executed by the processor to enable the system to perform operations, the operations including: committing a transaction amount t of a transaction using a commitment scheme to obtain a transaction commitment value T, the commitment scheme including at least a transaction blinding factor r_t; generating a first key of a symmetric key pair; encrypting a combination of the transaction blinding factor r_t and the transaction amount t using the first key; and sending the transaction commitment value T and the encrypted combination to a recipient node associated with a recipient of the transaction, so that the receiving node: generates a second key of the symmetric key pair based on the recipient's private key SK_B and the sender's public key PK_A, decrypts the encrypted combination using the second key generated by the recipient node to obtain the transaction blinding factor r_t and the transaction amount t, and verifies the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,用于信息保护的计算机实现方法包括:获取用对称密钥对的第一密钥加密的交易盲因子r_t和交易金额t的组合,并获取交易承诺值T,其中,由与交易的发送方相关联的发送方节点用承诺方案承诺交易金额t,以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第二密钥;用由与交易的接收方相关联的接收方节点生成的第二密钥解密所获得的组合,以获得交易盲因子r_t和交易金额T;以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a computer-implemented method for information protection includes: obtaining a combination of a transaction blinding factor r_t and a transaction amount t encrypted with a first key of a symmetric key pair, and obtaining a transaction commitment value T, wherein a sender node associated with a sender of the transaction commits to the transaction amount t using a commitment scheme to obtain the transaction commitment value T, and the commitment scheme includes at least the transaction blinding factor r_t; generating a second key of the symmetric key pair; decrypting the obtained combination with a second key generated by a receiver node associated with a receiver of the transaction to obtain the transaction blinding factor r_t and the transaction amount T; and verifying the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t and the transaction amount t.
根据另一方面,非暂时性计算机可读存储介质存储待由处理器执行以使所述处理器执行操作的指令,所述操作包括:获取用对称密钥对的第一密钥加密的交易盲因子r_t和交易金额t的组合,并获取交易承诺值T,其中,由与交易的发送方相关联的发送方节点用承诺方案承诺交易金额t,以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第二密钥;用与交易的接收方相关联的接收方节点生成的第二密钥解密所获得的组合,以获得交易盲因子r_t和交易金额t;以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a non-transitory computer-readable storage medium stores instructions to be executed by a processor to cause the processor to perform operations, the operations including: obtaining a combination of a transaction blinding factor r_t and a transaction amount t encrypted with a first key of a symmetric key pair, and obtaining a transaction commitment value T, wherein a sender node associated with a sender of the transaction commits the transaction amount t using a commitment scheme to obtain the transaction commitment value T, the commitment scheme including at least the transaction blinding factor r_t; generating a second key of the symmetric key pair; decrypting the obtained combination using a second key generated by a receiver node associated with a receiver of the transaction to obtain the transaction blinding factor r_t and the transaction amount t; and verifying the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t, and the transaction amount t.
根据另一方面,用于信息保护的系统包括处理器和耦合至所述处理器的非暂时性计算机可读存储介质,所述存储介质存储待由所述处理器执行以使所述系统执行操作的指令,所述操作包括:获取用对称密钥对的第一密钥加密的交易盲因子r_t和交易金额t的组合,并获取交易承诺值T,其中,由与交易的发送方相关联的发送方节点用承诺方案承诺交易金额t,以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t;生成对称密钥对的第二密钥;用与交易的接收方相关联的接收方节点生成的第二密钥解密所获得的组合,以获得交易盲因子r_t和交易金额T;以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。According to another aspect, a system for information protection includes a processor and a non-transitory computer-readable storage medium coupled to the processor, the storage medium storing instructions to be executed by the processor to cause the system to perform operations, the operations including: obtaining a combination of a transaction blinding factor r_t and a transaction amount t encrypted with a first key of a symmetric key pair, and obtaining a transaction commitment value T, wherein a sender node associated with a sender of the transaction commits the transaction amount t using a commitment scheme to obtain the transaction commitment value T, the commitment scheme including at least the transaction blinding factor r_t; generating a second key of the symmetric key pair; decrypting the obtained combination using a second key generated by a receiver node associated with a receiver of the transaction to obtain the transaction blinding factor r_t and the transaction amount T; and verifying the transaction based at least on the transaction commitment value T, the transaction blinding factor r_t, and the transaction amount t.
在参考附图考虑以下描述和所附权利要求书之后,本文公开的系统、方法和非暂时性计算机可读介质的这些特征和其它特征,以及操作方法和结构的相关元件的功能以及部件的组合和制造的经济性将变得更加明显,所有附图形成本说明书的一部分,其中在各个附图中,相同的附图标记表示对应的部件。然而,应当清楚地理解,附图仅用于说明和描述的目的,而不意图作为对本发明的限制的定义。These and other features of the systems, methods, and non-transitory computer-readable media disclosed herein, as well as the functionality of the related elements of the methods of operation and structures, and the economy of assembly and manufacture of parts, will become more apparent after consideration of the following description and appended claims with reference to the accompanying drawings, all of which form a part of this specification, wherein like reference numerals designate corresponding parts throughout the various figures. It should be expressly understood, however, that the drawings are for purposes of illustration and description only and are not intended as a definition of the limits of the invention.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
本技术的各种实施例的某些特征在所附权利要求中具体阐述。通过参考以下阐述了利用本发明原理的示例性实施例的详细说明以及附图,将获得对本技术的特征和优点的更好理解,其中,Certain features of various embodiments of the present technology are set forth with particularity in the appended claims. A better understanding of the features and advantages of the present technology will be obtained by referring to the following detailed description of exemplary embodiments utilizing the principles of the invention and the accompanying drawings, in which:
图1示出了根据各种实施例的用于信息保护的示例性系统。FIG1 illustrates an exemplary system for information protection according to various embodiments.
图2示出了根据各种实施例的交易发起和验证的示例性步骤。FIG2 illustrates exemplary steps of transaction initiation and verification according to various embodiments.
图3A示出了根据各种实施例的用于信息保护的示例性方法的流程图。FIG3A illustrates a flow chart of an exemplary method for information protection according to various embodiments.
图3B示出了根据各种实施例的用于信息保护的示例性方法的流程图。FIG3B illustrates a flow chart of an exemplary method for information protection according to various embodiments.
图4A示出了根据各种实施例的用于信息保护的示例性方法的流程图。FIG4A illustrates a flow chart of an exemplary method for information protection according to various embodiments.
图4B示出了根据各种实施例的用于信息保护的示例性方法的流程图。FIG4B illustrates a flow chart of an exemplary method for information protection according to various embodiments.
图5示出了可实现本文所描述的任何实施例的示例性计算机系统的框图。FIG5 illustrates a block diagram of an exemplary computer system upon which any of the embodiments described herein may be implemented.
具体实施方式DETAILED DESCRIPTION
因为操作由网络中的各个节点(例如,计算设备)执行,区块链可以被认为是去中心化的数据库,通常被称为分布式账本。任何信息都可以被写入并被保存至区块链中或从区块链被读取。任何人都可以建立服务器并作为节点加入区块链网络。任何节点都可以通过执行诸如哈希计算的复杂计算以向当前区块链添加区块,从而对维持区块链贡献计算能力,并且所添加的区块可以包含各种类型的数据或信息。可以用代币(例如,数字货币单位)对为所添加的区块贡献计算能力的节点进行奖励。由于区块链没有中心节点,所以每个节点是等同的,并且保存整个区块链数据库。Because operations are performed by individual nodes (e.g., computing devices) in the network, a blockchain can be considered a decentralized database, often referred to as a distributed ledger. Any information can be written to and stored in the blockchain, or read from the blockchain. Anyone can set up a server and join the blockchain network as a node. Any node can contribute computing power to maintaining the blockchain by performing complex calculations such as hashing to add blocks to the current blockchain. These added blocks can contain various types of data or information. Nodes that contribute computing power to added blocks can be rewarded with tokens (e.g., digital currency units). Because a blockchain has no central node, every node is equal and stores the entire blockchain database.
节点是例如支持区块链网络并保持其平稳运行的计算设备或大型计算机系统。有两种类型的节点,全量节点和轻量节点。全量节点保存区块链的完整副本。区块链网络上的全量节点验证它们接收的交易和区块,并将这些交易和区块中继到连接的对等点,以提供交易的共识验证。另一方面,轻量节点仅下载区块链的一小部分。例如,轻量节点用于数字货币交易。当轻量节点想要进行交易时,轻量节点将与全量节点通信。A node is a computing device or large computer system, such as one that supports a blockchain network and keeps it running smoothly. There are two types of nodes: full nodes and lightweight nodes. Full nodes maintain a complete copy of the blockchain. Full nodes on a blockchain network validate the transactions and blocks they receive and relay them to connected peers to provide consensus verification of transactions. Lightweight nodes, on the other hand, only download a small portion of the blockchain. For example, lightweight nodes are used for digital currency transactions. When a lightweight node wants to conduct a transaction, it communicates with a full node.
这种去中心化属性可以帮助防止处于控制位置的管理中心出现。例如,比特币区块链的维护是由运行区域中(装有)比特币软件的通信节点组成的网络执行。本公开使用一个或多个区块链或数字货币,例如比特币和以太币。本领域普通技术人员应当理解,本公开中公开的技术方案可以使用或应用于其他类型的区块链和数字货币。也就是说,取代传统意义上的银行、机构或管理员,多个中间角色以执行比特币软件的计算机服务器的形式存在。这些计算机服务器形成经由因特网连接的网络,其中任何人都可能加入该网络。网络所容纳的交易可以具有以下形式:“用户A想要将Z个比特币发送给用户B”,其中使用容易获得的软件应用程序将交易广播至网络。计算机服务器用作比特币服务器,该比特币服务器可操作以验证这些金融交易,并将这些金融交易的记录添加至其账本的副本中,接着向网络的其它服务器广播这些账本添加操作。This decentralized nature can help prevent the emergence of a centrally controlled administrative center. For example, the Bitcoin blockchain is maintained by a network of communicating nodes in a region running (or equipped with) the Bitcoin software. This disclosure utilizes one or more blockchains or digital currencies, such as Bitcoin and Ethereum. Those skilled in the art will appreciate that the technical solutions disclosed herein can be used or applied to other types of blockchains and digital currencies. In other words, instead of traditional banks, institutions, or administrators, multiple intermediaries exist in the form of computer servers executing the Bitcoin software. These computer servers form a network connected via the Internet, where anyone can join. Transactions accommodated by the network can take the form of "User A wants to send Z bitcoins to User B," where transactions are broadcast to the network using readily available software applications. The computer servers function as Bitcoin servers, which are operable to verify these financial transactions, add records of these transactions to their own copies of the ledger, and then broadcast these ledger additions to other servers in the network.
维护区块链被称为“挖矿”,并且进行这种维护的人被用如上所述的新创造的比特币和交易费进行奖励。例如,节点可以基于区块链网络已经同意的一组规则确定交易是否有效。矿工可位于任何大陆上,并通过验证每一交易是有效的以及将该交易添加至区块链中来处理支付。通过由多个矿工提供的共识实现这种验证,并且假定不存在系统串通。最后,所有数据将是一致的,因为计算必须满足某些要求才是有效的,并且所有节点将被同步以确保区块链是一致的。因此,数据可以被一致地存储在区块链节点的分布式系统中。Maintaining the blockchain is called "mining," and those who perform this maintenance are rewarded with newly created Bitcoin and transaction fees, as described above. For example, nodes can determine whether a transaction is valid based on a set of rules agreed upon by the blockchain network. Miners can be located on any continent and process payments by verifying that each transaction is valid and adding it to the blockchain. This verification is achieved through consensus provided by multiple miners, assuming there is no systematic collusion. Ultimately, all data will be consistent, as computations must meet certain requirements to be valid, and all nodes will be synchronized to ensure the blockchain is consistent. Therefore, data can be stored consistently across the distributed system of blockchain nodes.
通过挖矿过程,交易诸如资产转移被网络节点验证并被添加至区块链的区块的增长链中。通过遍历整个区块链,验证可包括例如付款方是否有权访问转账资产、资产是否以前已经被花费、转账金额是否正确等。例如,在由发送方签发的假设交易(例如,根据UTXO(未被花费的交易输出)模型的比特币交易,根据账户/余额模型的以太币交易)中,提出的交易可被广播至区块链网络以便挖矿。矿工需要根据区块链历史检查交易是否有资格被执行。如果根据现有的区块链历史,发送方的钱包余额具有足够的资金,则认为交易是有效的,并且可以将该交易添加至区块中。资产转移一旦被验证,其可以被包含于下一个待被添加至区块链的区块中。Through the mining process, transactions such as asset transfers are verified by network nodes and added to the growing chain of blocks in the blockchain. By traversing the entire blockchain, verification can include, for example, whether the payee has access to the transferred assets, whether the assets have been previously spent, and whether the transferred amount is correct. For example, in a hypothetical transaction issued by a sender (e.g., a Bitcoin transaction based on the UTXO (unspent transaction output) model, an Ethereum transaction based on the account/balance model), the proposed transaction can be broadcast to the blockchain network for mining. Miners need to check whether the transaction is eligible for execution based on the blockchain history. If the sender's wallet balance has sufficient funds based on the existing blockchain history, the transaction is considered valid and can be added to the block. Once the asset transfer is verified, it can be included in the next block to be added to the blockchain.
区块非常像数据库记录。每次写入数据时创建一个区块。这些区块被链接并使用密码术被保护以成为互连的网络。每个区块都连接至前一区块,这也是名称“区块链”的起源。每个区块通常包含前一区块的加密哈希值、生成时间和实际数据。例如,每个区块包含两个部分:记录当前区块的特征值的区块头,以及记录实际数据(例如,交易数据)的主体。区块的链通过区块头链接。每个区块头可以包含多个特征值,例如版本、前一区块哈希值、默克尔(Merkle)根、时间戳、难度目标和随机数。前一区块哈希值不仅包含前一区块的地址,而且包含前一区块内部的数据的哈希值,从而使得区块链不可变。随机数是当被包括时产生具有指定数量的前导零位的哈希值的数。Blocks are very similar to database records. Each time data is written, a block is created. These blocks are linked and secured using cryptography to form an interconnected network. Each block is connected to the previous block, hence the name "blockchain." Each block typically contains a cryptographic hash of the previous block, the time it was generated, and the actual data. For example, each block consists of two parts: a block header, which records the characteristic values of the current block, and a body, which records the actual data (e.g., transaction data). The chain of blocks is linked through the block header. Each block header can contain multiple characteristic values, such as a version, a hash of the previous block, a Merkle root, a timestamp, a difficulty target, and a nonce. The hash of the previous block contains not only the address of the previous block, but also the hash of the data within the previous block, making the blockchain immutable. A nonce is a number that, when included, produces a hash value with a specified number of leading zeros.
为了挖矿,节点获取新区块的内容的哈希值。随机数(例如,随机字符串)被附加到该哈希值,从而获得新字符串。新字符串被再次进行哈希处理。然后,将最终的哈希值与难度目标(例如,级别)进行比较,并确定最终的哈希值是否实际小于难度目标。如果最终的哈希值不小于难度目标,则改变随机数,并且再次重复该过程。如果最终的哈希值小于难度目标,则将所述区块添加至链中,更新公开账本并提醒所述添加。负责成功添加的节点获得比特币奖励,例如,通过向新区块添加对自身的奖励交易(称为造币生成)。To mine, a node obtains a hash value of the contents of a new block. A nonce (e.g., a random string) is appended to this hash value, resulting in a new string. The new string is hashed again. The final hash value is then compared to a difficulty target (e.g., a level) to determine whether the final hash value is actually less than the difficulty target. If the final hash value is not less than the difficulty target, the nonce is changed and the process is repeated. If the final hash value is less than the difficulty target, the block is added to the chain, the public ledger is updated, and the addition is notified. The node responsible for the successful addition is rewarded with Bitcoin, for example, by adding a reward transaction for itself to the new block (called minting).
即,对于每个输出“Y”,如果k是从最小熵(min-entropy)高的分布中选择的,则不可能找到输入x以使得H(k|x)=Y,其中K是随机数,x是区块的哈希值,Y是难度目标,并且“|”表示级联(concatenation)。由于加密哈希值基本上是随机的,由于加密哈希值的输出不能从其输入预测,仅存在一种找到随机数的已知方法:一个接一个地尝试整数,例如1、然后2、然后3、等等,这可以被称为蛮力。前导零的数量越大,找到必需的随机数Y所花费的平均时间就越长。在一个示例中,比特币系统不断地调整前导零的数量,使得找到随机数的平均时间约为十分钟。这样,由于计算硬件的处理能力随着时间提高,接下来几年,比特币协议将只需要更多的前导零位,以使得实现挖矿总是花费大约十分钟的持续时间。That is, for each output "Y," if k is chosen from a distribution with high minimum entropy, it is impossible to find an input x such that H(k|x) = Y, where K is a nonce, x is the hash of the block, Y is the difficulty target, and "|" represents concatenation. Because cryptographic hashes are essentially random, and because their output cannot be predicted from their input, there is only one known way to find a nonce: trying integers one by one, such as 1, then 2, then 3, and so on, which can be called brute force. The greater the number of leading zeros, the longer it takes on average to find the necessary nonce Y. In one example, the Bitcoin system continuously adjusts the number of leading zeros so that the average time to find a nonce is approximately ten minutes. Thus, as the processing power of computing hardware increases over time, over the next few years, the Bitcoin protocol will only need more leading zeros to achieve a mining duration of approximately ten minutes.
如上所述,哈希处理是区块链的重要基础。可以将哈希算法理解为将任何长度的消息压缩成固定长度消息摘要的函数。MD5和SHA是更常使用的。在一些实施例中,区块链的哈希值长度是256位,这意味着无论原始内容是什么,最终都计算256位的二进制数。并且只要原始内容不同,就可以保证相应的哈希值是唯一的。例如,字符串“123”的哈希值是a8fdc205a9f19cc1c7507a60c4f01b13d11d7fd0(十六进制),其当被转换为二进制时具有256位,并且仅“123”具有这个哈希值。区块链中的哈希算法是不可逆的,即,正向计算是容易的(从“123”至a8fdc205a9f19cc1c7507a60c4f01b1c7507a60c4f01b13d11d7fd0),并且即使耗尽所有计算资源,也不能完成逆向计算。因此,区块链的每个区块的哈希值是唯一的。As mentioned above, hashing is an important foundation of blockchain. A hash algorithm can be understood as a function that compresses a message of any length into a fixed-length message digest. MD5 and SHA are more commonly used. In some embodiments, the hash value of a blockchain is 256 bits long, meaning that regardless of the original content, a 256-bit binary number is ultimately calculated. And as long as the original content is different, the corresponding hash value is guaranteed to be unique. For example, the hash value of the string "123" is a8fdc205a9f19cc1c7507a60c4f01b13d11d7fd0 (hexadecimal), which has 256 bits when converted to binary, and only "123" has this hash value. The hash algorithm in the blockchain is irreversible. That is, while forward calculation is easy (from "123" to a8fdc205a9f19cc1c7507a60c4f01b1c7507a60c4f01b13d11d7fd0), the reverse calculation is impossible even if all computing resources are exhausted. Therefore, the hash value of each block in the blockchain is unique.
此外,如果区块的内容改变,则其哈希值也将改变。区块和哈希值一一对应,并且针对区块头具体计算每个区块的哈希值。即,连接区块头的特征值以形成长字符串,然后为所述字符串计算哈希值。例如,“哈希值=SHA256(区块头)”是区块哈希值计算公式,SHA256是应用于区块头的区块链哈希算法。哈希值由区块头而不是区块主体唯一地确定。如上所述,区块头包含许多内容,包括当前区块的哈希值和前一区块的哈希值。这意味着如果当前区块的内容改变,或者如果前一区块的哈希值改变,则将导致当前区块中的哈希值改变。如果黑客修改了区块,则所述区块的哈希值改变。由于下一区块必须包含前一区块的哈希值,为了使后面的区块连接至被修改的区块,黑客必须依次修改所有随后的区块。否则,被修改的区块将脱离区块链。由于设计原因,哈希值计算是耗时的,几乎不可能在短时间内修改多个区块,除非黑客已经掌握了整个网络51%以上的计算能力。因此,区块链保证了其自身的可靠性,并且一旦数据被写入,数据就不能被篡改。Furthermore, if the contents of a block change, its hash value will also change. Blocks and hash values correspond one-to-one, and the hash value of each block is calculated specifically for the block header. That is, the characteristic values of the block header are concatenated to form a long string, and then the hash value is calculated for this string. For example, "hash value = SHA256(block header)" is the formula for calculating a block hash value, and SHA256 is the blockchain hash algorithm applied to the block header. The hash value is uniquely determined by the block header, not the block body. As mentioned above, the block header contains many contents, including the hash value of the current block and the hash value of the previous block. This means that if the contents of the current block change, or if the hash value of the previous block changes, the hash value of the current block will change. If a hacker modifies a block, the hash value of the block will change. Since the next block must contain the hash value of the previous block, in order for subsequent blocks to be connected to the modified block, the hacker must modify all subsequent blocks in sequence. Otherwise, the modified block will be separated from the blockchain. Due to design reasons, hash value calculation is time-consuming, and it is almost impossible to modify multiple blocks in a short period of time unless the hacker has mastered more than 51% of the computing power of the entire network. Therefore, the blockchain guarantees its own reliability, and once the data is written, it cannot be tampered with.
一旦矿工找到了新区块的哈希值(即,合格的签名或解决方案),矿工就将该签名广播至所有其它矿工(区块链中的节点)。现在,其它矿工依次验证所述解决方案是否与发送方的区块的问题相对应(即,确定哈希值输入是否实际上导致所述签名)。如果所述解决方案是有效的,则其它矿工将确认该解决方案,并同意可将新区块添加至区块链。因此,达成了新区块的共识。这也被称为“工作量证明”。已经达成共识的区块现在可以被添加至区块链中,并且与其签名一起被广播至网络上的所有节点。只要区块内的交易在所述时间点正确地对应于当前钱包余额(交易历史),节点就将接受该区块并将保存该区块于节点的交易数据。每当在所述区块的顶部添加新的区块时,所述添加还可算作为对其之前的区块的另一“确认”。例如,如果交易被包括在区块502中,并且区块链有507个区块,这意味着交易具有五个确认(对应于区块507至区块502)。交易具有越多的确认,攻击者就越难改变。Once a miner finds the hash of the new block (i.e., a valid signature or solution), it broadcasts the signature to all other miners (nodes in the blockchain). The other miners then verify that the solution corresponds to the sender's block's problem (i.e., determine whether the hash input actually results in the signature). If the solution is valid, the other miners confirm it and agree that the new block can be added to the blockchain. Thus, consensus on the new block is reached. This is also known as "proof of work." The block that has reached consensus can now be added to the blockchain and broadcast to all nodes on the network, along with its signature. As long as the transactions within the block correctly correspond to the current wallet balance (transaction history) at that point in time, the node will accept the block and save it in its transaction data. Every time a new block is added on top of the previous block, the addition also counts as another "confirmation" of the previous block. For example, if a transaction is included in block 502, and the blockchain has 507 blocks, this means that the transaction has five confirmations (corresponding to blocks 507 through 502). The more confirmations a transaction has, the harder it is for an attacker to alter it.
在一些实施例中,示例性区块链资产系统利用公钥密码术,其中生成两个密钥,一个公钥和一个私钥。可认为公钥是账号,而可认为私钥是所有权凭证。例如,比特币钱包是公钥和私钥的集合。可以用属于资产地址的私钥的知识来证明与该地址相关联的资产(例如,数字货币、现金资产、股票、股权、债券)的所有权。例如,比特币钱包软件,有时称为“比特币客户软件”,允许给定用户交易比特币。钱包程序生成并存储私钥,并与比特币网络上的对等点通信。In some embodiments, the exemplary blockchain asset system utilizes public-key cryptography, in which two keys are generated: a public key and a private key. The public key can be considered an account number, while the private key can be considered an evidence of ownership. For example, a Bitcoin wallet is a collection of public and private keys. Knowledge of the private key associated with an asset address can be used to prove ownership of the asset (e.g., digital currency, cash assets, stocks, equities, bonds) associated with that address. For example, Bitcoin wallet software, sometimes referred to as "Bitcoin client software," allows a given user to trade Bitcoin. The wallet program generates and stores private keys and communicates with peers on the Bitcoin network.
在区块链交易中,通过付款人和收款人的公钥在区块链中识别付款人和收款人。例如,大多数当代比特币转移是从一个公钥到不同的公钥。实际上,这些密钥的哈希值被用于区块链中,并且被称为“比特币地址”。原则上,如果使用用户的比特币地址而不是他们的名字,假想的攻击者个人S可以通过简单地向区块链账本添加像“个人A向个人S支付100个比特币”一样的交易从个人A偷钱。比特币协议通过要求每次转账都用付款人的私钥进行数字签名防止这种盗窃,并且只有经签名的转账可以被添加至区块链账本中。由于个人S不能伪造个人A的签名,因此个人S不能通过向区块链添加相当于“个人A向个人S支付200个比特币”的条目来欺骗个人A。同时,任何人都可以使用他/她的公钥来验证个人A的签名,并因此在他/她是付款人的情况下验证他/她已经授权了区块链中的任何交易。In blockchain transactions, the payer and payee are identified in the blockchain by their public keys. For example, most contemporary Bitcoin transfers are from one public key to a different public key. In practice, hashes of these keys are used in the blockchain and are known as "Bitcoin addresses." In principle, if a user's Bitcoin address were used instead of their name, a hypothetical attacker, Person S, could steal money from Person A by simply adding a transaction to the blockchain ledger that reads something like "Person A pays Person S 100 Bitcoins." The Bitcoin protocol prevents this theft by requiring each transfer to be digitally signed with the payer's private key, and only signed transactions can be added to the blockchain ledger. Since Person S cannot forge Person A's signature, Person S cannot deceive Person A by adding an entry to the blockchain that reads "Person A pays Person S 200 Bitcoins." At the same time, anyone can verify Person A's signature using his or her public key and, therefore, verify that he or she authorized any transaction in the blockchain if he or she was the payee.
在比特币交易的情况下,为了向用户B转移一些比特币,用户A可以构造包含关于通过节点的交易的信息的记录。该记录可以签有用户A的签名密钥(私钥),并且包含用户A的公共验证密钥和用户B的公共验证密钥。签名用于确认交易来自用户A,并且一旦发布交易,还防止该交易被任何人更改。该记录与在新区块中的同一时间窗口中发生的其它记录一起可以被广播至全量节点。在接收到记录时,全量节点可以将记录合并到区块链系统中曾经发生的所有交易的账本中,通过上述挖矿过程将新区块添加至先前接受的区块链,并且针对网络的共识规则验证所添加的区块。In the case of a Bitcoin transaction, to transfer some Bitcoin to User B, User A can construct a record containing information about the transaction passing through the node. This record can be signed with User A's signing key (private key) and contain User A's public verification key and User B's public verification key. The signature serves to confirm that the transaction originated from User A and, once published, prevents anyone from altering the transaction. This record, along with other records occurring in the same time window in a new block, can be broadcast to all nodes. Upon receiving the record, the full node can merge it into the ledger of all transactions ever to have occurred in the blockchain system, add the new block to the previously accepted blockchain through the mining process described above, and validate the added block against the network's consensus rules.
UTXO(未被花费的交易输出)模型和账户/余额模型是用于实现区块链交易的两个示例性模型。UTXO是区块链对象模型。根据UTXO,资产由尚未被花费的区块链交易的输出表示,所述输出可以用作新交易中的输入。例如,用户A的待转移的资产可以是UTXO的形式。为了花费(交易)资产,用户A必须用私钥签名。比特币是使用UTXO模型的数字货币的示例。在有效的区块链交易的情况下,未被花费的输出可用于实现进一步的交易。在一些实施例中,在进一步的交易中可以仅使用未被花费的输出,以防止双花和欺诈。为此,区块链上的输入在交易发生时被删除,同时创建UTXO形式的输出。这些未被花费的交易输出可以(由私钥持有者,例如,具有数字货币钱包的人)用于未来交易。The UTXO (unspent transaction output) model and the account/balance model are two exemplary models for implementing blockchain transactions. UTXO is a blockchain object model. According to UTXO, assets are represented by outputs from unspent blockchain transactions, which can be used as inputs in new transactions. For example, user A's to-be-transferred assets may be in the form of UTXOs. To spend (transact) these assets, user A must sign with their private key. Bitcoin is an example of a digital currency that uses the UTXO model. In the case of a valid blockchain transaction, unspent outputs can be used to implement further transactions. In some embodiments, only unspent outputs can be used in further transactions to prevent double spending and fraud. To this end, inputs on the blockchain are deleted when a transaction occurs, while outputs in the form of UTXOs are created. These unspent transaction outputs can be used (by the private key holder, such as someone with a digital currency wallet) for future transactions.
另一方面,账户/余额模型(或称为基于账户的交易模型)保持跟踪每个账户的余额作为全局状态。检查账户余额,以确定账户余额大于或等于花费的交易金额。以下提供了账户/余额模型如何在以太坊中工作的示例:On the other hand, the account/balance model (also known as the account-based transaction model) keeps track of the balance of each account as global state. The account balance is checked to determine if the account balance is greater than or equal to the transaction amount being spent. The following provides an example of how the account/balance model works in Ethereum:
1.Alice通过挖矿获得5个以太币。在该系统中记录Alice具有5个以太币。1. Alice obtains 5 Ether through mining. The system records Alice as having 5 Ether.
2.Alice想给Bob 1个以太币,因此系统将首先从Alice的账户中扣除1个以太币,因此Alice现在具有4个以太币。2. Alice wants to give Bob 1 ether, so the system will first deduct 1 ether from Alice's account, so Alice now has 4 ether.
3.然后,系统给Bob的账户增加1个以太币。该系统知道Bob本来有2个以太币,因此Bob的余额增加到3个以太币。3. The system then adds 1 ether to Bob's account. The system knows that Bob originally had 2 ether, so Bob's balance increases to 3 ether.
以太坊的记账方式可以与银行中的记账方式相似。类比是使用ATM/借记卡。银行跟踪每张借记卡有多少钱,当Bob需要花钱时,银行在批准交易之前检查其记录以确保Bob具有足够的余额。Ethereum's ledger system can be compared to how banks keep accounts. An analogy is using an ATM/debit card. The bank keeps track of how much money is on each debit card, and when Bob needs to spend money, the bank checks its records to ensure he has a sufficient balance before approving the transaction.
由于区块链和其它类似的账本是完全公开的,因此区块链本身没有隐私保护。P2P网络的公开特性意味着尽管使用它的人不是通过名字来识别的,但是将交易链接至个人和公司是可行的。例如,在跨境汇款中或在供应链中,交易金额具有极高级别的隐私保护值,这是因为使用交易金额信息可以推断交易方的特定位置和身份。交易的主题可以包括例如金钱、代币、数字货币、合同、契据、医疗记录、客户详细资料、股票、债券、权益或可以以数字形式描述的任何其他资产。尽管UTXO模型可以例如通过门罗币(Monero)中的环签名(ringsignature)和零知识密码术大零币(Zcash)使得交易金额不公开,但是交易金额在账户/余额模型下仍然是不受保护的。因此,本公开所解决的技术问题是如何保护在线信息诸如交易金额的隐私。这样的交易可以采用账户/余额模型。Because blockchains and other similar ledgers are completely public, blockchains themselves offer no privacy protection. The public nature of P2P networks means that even though users are not identified by name, it is possible to link transactions to individuals and companies. For example, in cross-border remittances or supply chains, transaction amounts have a very high level of privacy protection value because the specific location and identity of the parties can be inferred using transaction amount information. The subject matter of a transaction can include, for example, money, tokens, digital currencies, contracts, deeds, medical records, customer details, stocks, bonds, equity, or any other asset that can be described in digital form. Although the UTXO model can make transaction amounts private, for example through ring signatures in Monero and zero-knowledge cryptography in Zcash, transaction amounts remain unprotected under the account/balance model. Therefore, the technical problem addressed by this disclosure is how to protect the privacy of online information such as transaction amounts. Such transactions can adopt the account/balance model.
一些现有技术提出使用佩德森(Pedersen)承诺方案加密交易金额并替换账户/余额模型。在该方案下,发送方通过区块链之外的安全通道向收款人发送交易金额和对应于交易金额的Pedersen承诺的随机数。收款人验证随机数与交易承诺是否匹配,并执行本地存储。例如,根据账户/余额模型,账户可被视为用于保存被汇总但未被合并的资产的钱包(账户)。每个资产可以对应于资产类型(例如,加密货币),并且账户的余额是资产价值的总和。即使是同一类型的资产也不被合并。在交易期间,可以指定转移资产的接收方,并且可以从钱包中移除相应资产以便为交易提供资金。区块链节点验证支付钱包是否具有足以覆盖交易的资产,然后节点从支付钱包中删除转移的资产,并将相应的资产添加至接收方钱包。Some existing technologies propose using a Pedersen commitment scheme to encrypt transaction amounts and replace the account/balance model. Under this scheme, the sender sends the transaction amount and a random number corresponding to the Pedersen commitment to the transaction amount to the payee via a secure channel outside the blockchain. The payee verifies that the random number matches the transaction commitment and performs local storage. For example, according to the account/balance model, an account can be considered a wallet (account) for storing assets that are aggregated but not merged. Each asset can correspond to an asset type (e.g., cryptocurrency), and the balance of the account is the sum of the asset values. Even assets of the same type are not merged. During a transaction, the recipient of the transferred assets can be specified, and the corresponding assets can be removed from the wallet to fund the transaction. The blockchain node verifies that the payment wallet has sufficient assets to cover the transaction. The node then removes the transferred assets from the payment wallet and adds the corresponding assets to the recipient's wallet.
然而,这种方案仍然存在限制。首先,所述方案要求用户在本地维护永久存储器,以管理与加密账户余额对应的随机数和明文余额,管理实现是复杂的;其次,存储在单个本地节点中的与“Pedersen资产”对应的盲因子(如随机数)和明文余额容易丢失或损坏,且由于账户余额频繁变化,多节点备份存储难以实现。However, this approach still has limitations. First, it requires users to maintain local persistent storage to manage the random numbers and plaintext balances corresponding to encrypted account balances, which is complex to implement. Second, the blinding factors (such as random numbers) and plaintext balances corresponding to "Pedersen assets" stored in a single local node are easily lost or damaged, and due to the frequent changes in account balances, multi-node backup storage is difficult to implement.
本公开中所提出的系统和方法可以克服上述限制,并且实现对承诺方案中的交易金额、资产价值和盲因子的稳健隐私保护。为此,可以使用通过迪菲-赫尔曼(Diffie-Hellman,DH)密钥交换协议获得的对称密钥来加密/解密随机数和明文余额,从而提供方便的管理。此外,将加密信息存储在区块链中确保了承诺方案中的交易金额、资产价值和盲因子不容易丢失或被篡改。The systems and methods proposed in this disclosure can overcome the aforementioned limitations and achieve robust privacy protection for transaction amounts, asset values, and blinding factors in commitment schemes. To this end, symmetric keys obtained through the Diffie-Hellman (DH) key exchange protocol can be used to encrypt/decrypt random numbers and plaintext balances, providing convenient management. Furthermore, storing the encrypted information in the blockchain ensures that transaction amounts, asset values, and blinding factors in commitment schemes are not easily lost or tampered with.
在讨论本公开的附图之前,以下描述了Pedersen承诺和Diffie-Hellman(DH)密钥交换协议。Before discussing the figures of this disclosure, the following describes Pedersen commitments and the Diffie-Hellman (DH) key exchange protocol.
在一些实施例中,承诺方案(例如,Pedersen承诺)可以加密某个值a(例如,交易金额、资产价值、关键参数)如下:In some embodiments, a commitment scheme (e.g., Pedersen commitment) may encrypt a value a (e.g., transaction amount, asset value, key parameter) as follows:
PC(a)=r×G+a×HPC(a)=r×G+a×H
其中,r是提供隐藏的随机盲因子(或者称为盲因子),G和H是达成共识的椭圆曲线的生成元/基点,并且可以是随机选择的,sn是承诺的值,C(sn)是用作承诺并被给予对方的曲线点,并且H是另一曲线点。也就是说,G和H可以是被节点已知的参数。可通过利用从一个点映射到另一个点的哈希函数(H=哈希(G))对基点G进行哈希处理,生成H的“空袖数(nothing up my sleeve)”。H和G是给定系统的公共参数(例如,椭圆曲线上的随机生成的点)。尽管以上提供了椭圆曲线形式的Pedersen承诺的示例,但是可以替代地使用各种其它形式的Pedersen承诺或其它承诺方案。Where r is a random blinding factor (or blinding factor) that provides concealment, G and H are generators/base points of the elliptic curve that reach consensus and can be randomly selected, sn is the value of the commitment, C(sn) is the curve point used as the commitment and given to the other party, and H is another curve point. That is, G and H can be parameters known to the nodes. The "nothing up my sleeve" of H can be generated by hashing the base point G using a hash function that maps from one point to another (H=hash(G)). H and G are public parameters of a given system (e.g., randomly generated points on the elliptic curve). Although an example of a Pedersen commitment in the form of an elliptic curve is provided above, various other forms of Pedersen commitments or other commitment schemes can be used instead.
承诺方案保持数据保密但承诺数据使得数据的发送方稍后不能改变数据。如果一方仅知道承诺值(例如,PC(a)),则它们不能确定哪些底层数据值(例如,a)已经被承诺。数据(例如,a)以及盲因子(例如,r)稍后可以(例如,由发起方节点)显露,承诺的接收方(例如,共识节点)可以运行该承诺,并验证该承诺的数据与所显露的数据相匹配。之所以存在这种盲因子,是因为如果没有这种盲因子,有人可能试图猜测数据。Commitment schemes keep data confidential but commit data so that the sender of the data cannot later change the data. If one party only knows the commitment value (e.g., PC(a)), they cannot determine which underlying data value (e.g., a) has been committed. The data (e.g., a) and the blinding factor (e.g., r) can later be revealed (e.g., by the initiating node), and the recipient of the commitment (e.g., a consensus node) can run the commitment and verify that the committed data matches the revealed data. This blinding factor exists because without it, someone could attempt to guess the data.
承诺方案是发送方(承诺方)承诺一值(例如,a)使得承诺的值保持私有,但是可以在当承诺方透露承诺过程的必要参数的稍后时间显示该承诺的值的一种方式。强承诺方案可以是信息隐藏和计算绑定。隐藏是指给定值a和该值的承诺PC(a)应该是不相关的这一概念。即,PC(a)不应显露关于a的信息。在已知PC(a)、G和H的情况下,因为随机数r,几乎不可能知道a。如果几乎不存在使得两个不同的值可以导致相同承诺的方式,则承诺方案是绑定的。Pedersen承诺在离散对数假设下是完全隐藏和计算绑定的。此外,在已知r、G、H和PC(a)的情况下,可以通过确定PC(a)=r×G+a×H是否成立来验证PC(a)。A commitment scheme is a way for a sender (committer) to commit to a value (e.g., a) such that the committed value remains private, but the committed value can be revealed at a later time when the committer reveals the necessary parameters of the commitment process. Strong commitment schemes can be information hiding and computationally binding. Hiding refers to the concept that a given value a and the commitment PC(a) to that value should be unrelated. That is, PC(a) should not reveal information about a. Given PC(a), G, and H, it is almost impossible to know a because of the random number r. A commitment scheme is binding if there is almost no way that two different values can lead to the same commitment. Pedersen commitments are completely hidden and computationally binding under the discrete logarithm assumption. Furthermore, given r, G, H, and PC(a), PC(a) can be verified by determining whether PC(a) = r×G+a×H holds.
Pedersen承诺具有加法属性:可以将承诺相加,并且一组承诺的总和与对数据总和的承诺相同(其中盲因子设置为盲因子的总和):Pedersen commitments have the additive property: commitments can be added together, and the sum of a set of commitments is the same as a commitment to the sum of the data (where the blinding factor is set to the sum of the blinding factors):
PC(r1,data1)+PC(r2,data2)==PC(r1+r2,data1+data2);PC(r 1 ,data 1 )+PC(r 2 ,data 2 )==PC(r 1 +r 2 ,data 1 +data 2 );
PC(r1,data1)-PC(r1,data1)==0。PC(r 1 ,data 1 )-PC(r 1 ,data 1 )==0.
换句话说,承诺保留了加法并且交换属性适用,即,Pedersen承诺是相加同态的,因为底层数据可以进行数学运算,就像它没有被加密一样。In other words, the commitment preserves addition and the commutative property applies, i.e., Pedersen commitments are additively homomorphic in that the underlying data can be mathematically operated on as if it were not encrypted.
在一个实施例中,用于加密输入值的Pedersen承诺可以使用椭圆曲线点来构造。传统上,椭圆曲线密码(ECC)公钥是通过将用于群(G)的生成元与密钥(r)相乘来创建的:Pub=rG。结果可以被序列化为33字节阵列。ECC公钥可以服从前面关于Pedersen承诺所提到的相加同态属性。即:Pub1+Pub2=(r1+r2(mod n))G。In one embodiment, a Pedersen commitment for encrypting input values can be constructed using elliptic curve points. Traditionally, an elliptic curve cryptography (ECC) public key is created by multiplying the generator for a group (G) with a secret key (r): Pub = rG. The result can be serialized as a 33-byte array. ECC public keys can obey the additive homomorphic property mentioned above for Pedersen commitments. That is, Pub1 + Pub2 = (r1 + r2 (mod n))G.
可以通过为所述群挑选附加的生成元(H,在下面的等式中)来创建用于输入值的Pedersen承诺,使得没有人知道第二生成元H相对于第一生成元G的离散对数(反之亦然),这意味着没有人知道使得xG=H的x。这可以例如通过使用G的加密哈希挑选H来完成:A Pedersen commitment for an input value can be created by picking an additional generator (H, in the equation below) for the group such that no one knows the discrete logarithm of the second generator H with respect to the first generator G (or vice versa), which means that no one knows x such that xG = H. This can be done, for example, by picking H using a cryptographic hash of G:
H=to_point(SHA256(ENCODE(G)))。H=to_point(SHA256(ENCODE(G))).
给定两个生成元G和H,加密输入值的示例性承诺方案可以被定义为:承诺=rG+aH。这里,r可以是秘密盲因子,a可以是被承诺的输入值。因此,如果sn被承诺,则可以获得上述承诺方案PC(a)=r×G+a×H。Pedersen承诺在信息理论上是私有的:对于任何承诺,存在使一数值与该承诺匹配的盲因子。因为任意映射是不可计算的,Pedersen承诺可以从计算上对抗虚假承诺。Given two generators G and H, an exemplary commitment scheme for encrypted input values can be defined as: commitment = rG + aH. Here, r can be a secret blinding factor, and a can be the input value being committed. Therefore, if sn is committed, the above commitment scheme PC(a) = r×G + a×H can be obtained. Pedersen commitments are information-theoretically private: for any commitment, there exists a blinding factor that matches a value with the commitment. Because arbitrary mappings are uncomputable, Pedersen commitments are computationally resistant to false commitments.
承诺该值的一方(节点)可以通过公开原始值a和完成承诺等式的因子r来公开该承诺。然后,希望公开值PC(a)的一方将再次计算承诺,以验证共享的原始值确实与最初接收的承诺PC(a)相匹配。因此,可以通过将资产类型信息映射至唯一的序列号,然后通过Pedersen承诺对其进行加密来保护资产类型信息。当生成承诺时选择的随机数r使得任何人几乎不可能根据承诺值PC(a)推断出承诺的资产类型的类型。The party (node) committing to the value can make the commitment public by disclosing the original value a and the factor r that completes the commitment equation. The party wishing to disclose the value PC(a) will then recalculate the commitment to verify that the shared original value indeed matches the originally received commitment PC(a). Thus, asset type information can be protected by mapping it to a unique serial number and then encrypting it via a Pedersen commitment. The random number r chosen when generating the commitment makes it virtually impossible for anyone to infer the type of the committed asset based on the commitment value PC(a).
在一些实施例中,Diffie-Hellman(DH)密钥交换可以用作用于通过公共信道安全地交换密码密钥的方法。DH密钥交换,也称为指数密钥交换,是一种数字加密方法,该方法使用提升至特定幂的数,以基于从不直接传送的组件产生解密密钥,使得潜在的代码破解者的任务在数学上是压倒性的。In some embodiments, Diffie-Hellman (DH) key exchange can be used as a method for securely exchanging cryptographic keys over a public channel. DH key exchange, also known as exponential key exchange, is a digital encryption method that uses numbers raised to specific powers to generate decryption keys based on components that are never directly communicated, making the task of a potential code cracker mathematically overwhelming.
在实现Diffie-Hellman(DH)密钥交换的示例中,两个终端用户Alice和Bob在通过他们已知是私有的信道通信时相互对正整数p和q达成共识,即p是素数、q是p的生成元。生成元q是如下的数:当该数被提升至小于p的正整数幂时,任何两个整数都不会产生相同的结果。p的值可以是大的,但是q的值通常是小的。即,q是模p的原根。In an example implementation of Diffie-Hellman (DH) key exchange, two end users, Alice and Bob, communicate over a known private channel and agree on positive integers p and q: p is a prime number and q is a generator of p. Generator q is a number such that when raised to a positive integer power less than p, no two integers produce the same result. While p can be large, q is typically small. That is, q is a primitive root modulo p.
一旦Alice和Bob私下对p和q达成共识,他们就选择正整数个人密钥a和b,两者都小于素数模p,并且两者都可以随机生成。用户不向任何人透露他们的个人密钥,并且理想地,他们记住这些数字并且不将它们写在或存储在任何地方。接下来,Alice和Bob根据公式基于他们的个人密钥计算公钥a*和公钥b*Once Alice and Bob privately agree on p and q, they choose positive integer personal keys a and b, both of which are less than a prime modulus p and both of which can be randomly generated. Users do not reveal their personal keys to anyone, and ideally, they memorize these numbers and do not write them down or store them anywhere. Next, Alice and Bob calculate the public keys a* and b* based on their personal keys according to the formula
a*=qa mod pa*=q a mod p
与and
b*=qb mod pb*=q b mod p
两个用户可以通过假定不安全的通信介质、诸如因特网或公司广域网(WAN)共享其公钥a*和公钥b*。根据这些公钥,任一用户可以基于他们自己的个人密钥生成数字k1。Two users can share their public keys a* and b* over an assumed insecure communication medium, such as the Internet or a corporate wide area network (WAN). From these public keys, either user can generate a number k1 based on their own personal key.
Alice使用下式计算k1:k1=(b*)a mod pAlice calculates k1 using the following formula: k1 = (b*) a mod p
Bob使用下式计算k1:k1=(a*)b mod pBob calculates k1 using the following formula: k1 = (a*) b mod p
根据上述两个式中的任一个,k1的值被证明是相同的。然而,在K1的计算中关键的个人密钥a和个人密钥b没有通过公共介质传送。即使已知p、q、a*和b*,仍然很难计算a和b。因为k1是大的、明显随机的数字,所以即使在强大的计算机的帮助下进行数百万次试验,潜在的黑客也几乎没有机会正确地猜测k1。因此,理论上,两个用户可以使用解密密钥k1用他们选择的加密方法通过公共介质进行私下通信。The value of k1 is proven to be the same using either of the two equations above. However, the personal keys a and b, crucial in the calculation of k1, are not transmitted over a public medium. Even if p, q, a*, and b* are known, calculating a and b remains difficult. Because k1 is a large, apparently random number, a potential hacker has little chance of correctly guessing k1, even after millions of attempts with the help of a powerful computer. Therefore, in theory, two users can use the decryption key k1 to communicate privately over a public medium using their chosen encryption method.
在实现Diffie-Hellman(DH)密钥交换的另一示例中,所有计算都发生在足够规模的离散群中,其中Diffie-Hellman问题被认为是难的,通常乘法群以大素数(例如,对于经典DH)或椭圆曲线群(例如,对于Diffie-Hellman椭圆曲线)为模。In another example, in an implementation of Diffie-Hellman (DH) key exchange, all computation occurs in a discrete group of sufficient size for the Diffie-Hellman problem to be considered hard, typically a multiplicative group modulo a large prime number (e.g., for classical DH) or an elliptic curve group (e.g., for the Diffie-Hellman elliptic curve).
对于交易双方,每一方选择私钥a或私钥b。For both parties of a transaction, each party chooses private key a or private key b.
每一方计算相应的公钥aG或公钥bG。Each party computes the corresponding public key aG or public key bG.
每一方将公钥aG或公钥bG发送给另一方。Each party sends either the public key aG or the public key bG to the other party.
每一方使用接收到的公钥连同其自己的私钥计算新的共享的秘密a(bG)=b(aG),这可以被称为对称密钥对的对称密钥。Each party uses the received public key together with its own private key to compute a new shared secret a(bG) = b(aG), which may be referred to as the symmetric key of the symmetric key pair.
如稍后所述,所述示例性方法可用于生成对称密钥abG和baG。所述密钥交换的结果是共享的秘密,该结果之后可以与密钥导出函数(例如,加密函数E(),其使用双方已知的其他输入、诸如随机数和资产价值的级联)一起用于导出对称加密方案的密钥集。或者,可以使用各种其它计算方法,例如,通过生成公钥ga和公钥gb以及共享密钥gab或共享密钥gba。As described later, the exemplary method can be used to generate symmetric keys abG and baG. The result of the key exchange is a shared secret, which can then be used with a key derivation function (e.g., an encryption function E() that uses other inputs known to both parties, such as a concatenation of a random number and an asset value) to derive a key set for a symmetric encryption scheme. Alternatively, various other computational methods can be used, for example, by generating public keys g a and g b and a shared key g ab or a shared key g ba .
在交易期间,信息保护对于保护用户隐私是重要的,并且交易金额是一种缺乏保护的信息类型。图1示出了根据各种实施例的用于信息保护的示例性系统100。如图所示,区块链网络可以包括多个节点(例如,在服务器、计算机等中实现的全量节点)。对于某些区块链平台(例如,NEO),具有某级别投票权的全量节点可称为共识节点,共识节点承担交易验证的责任。在本公开中,全量节点、共识节点或其它等效节点可验证交易。During transactions, information protection is important for protecting user privacy, and transaction amounts are one type of information that lacks protection. FIG1 illustrates an exemplary system 100 for information protection according to various embodiments. As shown, a blockchain network may include multiple nodes (e.g., full nodes implemented in servers, computers, etc.). For some blockchain platforms (e.g., NEO), full nodes with a certain level of voting power may be referred to as consensus nodes, which bear the responsibility for transaction verification. In the present disclosure, full nodes, consensus nodes, or other equivalent nodes may verify transactions.
此外,如图1所示,用户A和用户B可以使用作为轻量节点的相应设备、诸如膝上型计算机和移动电话等执行交易。例如,用户A可能想要通过将用户A的账户中的某些资产转移到用户B的账户来与用户B交易。用户A和用户B可以使用安装有适当的交易用区块链软件的相应设备。用户A的设备可以称为发起方节点A,发起方节点A发起与被称为接收方节点B的用户B的设备的交易。节点A可以通过与节点1的通信访问区块链,而节点B可以通过与节点2的通信访问区块链。例如,节点A和节点B可以通过节点1和节点2向区块链提交交易,以请求向区块链添加交易。除了区块链,节点A和节点B可以具有其它通信信道(例如,不经过节点1和节点2的常规因特网通信)。Furthermore, as shown in Figure 1, user A and user B can perform transactions using respective devices acting as lightweight nodes, such as laptops and mobile phones. For example, user A may want to transact with user B by transferring certain assets from user A's account to user B's account. User A and user B can use respective devices installed with appropriate blockchain software for transactions. User A's device can be referred to as initiator node A, which initiates a transaction with user B's device, referred to as recipient node B. Node A can access the blockchain through communication with node 1, while node B can access the blockchain through communication with node 2. For example, node A and node B can submit a transaction to the blockchain through nodes 1 and 2 to request that a transaction be added to the blockchain. Node A and node B can have other communication channels besides the blockchain (e.g., regular internet communication that does not go through nodes 1 and 2).
图1中的每个节点可以包括处理器和存储待由处理器执行以使得节点(例如,处理器)执行本文所述的用于信息保护的各种步骤的指令的非暂时性计算机可读存储介质。每个节点可以安装有软件(例如,交易程序)和/或硬件(例如,有线、无线连接)以与其它节点和/或其它设备通信。稍后参考图5描述节点硬件和软件的进一步细节。Each node in FIG1 may include a processor and a non-transitory computer-readable storage medium storing instructions to be executed by the processor so that the node (e.g., the processor) performs the various steps for information protection described herein. Each node may be installed with software (e.g., a transaction program) and/or hardware (e.g., wired or wireless connections) to communicate with other nodes and/or other devices. Further details of the node hardware and software will be described later with reference to FIG5.
图2示出了根据各种实施例的发送方节点A、接收方节点B以及一个或多个验证节点之间的交易和验证的示例性步骤。下面给出的操作旨在说明。取决于实现方式,示例性步骤可以包括以各种顺序执行的或并行执行的附加的、较少的或替代的步骤。Figure 2 illustrates exemplary steps for a transaction and verification between a sender node A, a receiver node B, and one or more verification nodes, according to various embodiments. The operations presented below are intended to be illustrative. Depending on the implementation, the exemplary steps may include additional, fewer, or alternative steps performed in various orders or in parallel.
在各种实施例中,交易方(发送方用户A和接收方用户B)的账户被配置用于账户/余额模型。用户A和用户B可以执行以下步骤以经由一个或多个设备(例如他们的膝上型计算机、移动电话等)执行交易。这些设备可以安装有用于执行各种步骤的适当软件和硬件。每个账户可以与加密私钥(密钥)-公钥对相关联。私钥可以表示为SK=x,公钥可以表示为PK=xG,其中G是群的生成元。每个账户可以包含各种资产,每个资产表示为:(V=PC(r,v),E(K,r,v)),其中v表示资产的面值,V表示面值v的Pedersen承诺,r是盲因子(例如,随机数),PC()是Pedersen承诺算法,E()是加密算法(例如,对称密钥加密算法),并且K是加密密钥。在一个示例中,每个资产可以表示为(V=PC(r,v),E(K,r||v)),其中||表示级联。每个资产还可以包括除了所列出的信息之外的信息,例如资产的源信息。In various embodiments, the accounts of the transacting parties (sender user A and recipient user B) are configured for an account/balance model. User A and User B can perform the following steps to execute a transaction via one or more devices (e.g., their laptops, mobile phones, etc.). These devices can be installed with appropriate software and hardware for performing the various steps. Each account can be associated with a cryptographic private key (secret key)-public key pair. The private key can be represented as SK = x, and the public key can be represented as PK = xG, where G is a generator of a group. Each account can contain various assets, each represented as: (V = PC(r,v), E(K,r,v)), where v represents the face value of the asset, V represents a Pedersen commitment to the face value v, r is a blinding factor (e.g., a random number), PC() is the Pedersen commitment algorithm, E() is an encryption algorithm (e.g., a symmetric key encryption algorithm), and K is an encryption key. In one example, each asset can be represented as (V = PC(r,v), E(K,r||v)), where || represents concatenation. Each asset may also include information in addition to the listed information, such as source information of the asset.
在一个示例中,在用户A在区块链验证的交易中成功地向用户B交易金额t之前,A的账户和B的账户中的资产的地址如下:In one example, before user A successfully trades amount t to user B in a blockchain-verified transaction, the addresses of the assets in A’s account and B’s account are as follows:
对于A的账户(账户A):For A's account (Account A):
地址:(SK_A=a,PK_A=aG)Address: (SK_A=a,PK_A=aG)
值a_1至值a_m的资产A_1至资产A_m分别表示为:Assets A_1 to A_m with values a_1 to a_m are represented as follows:
(A_1=PC(r_{a_1},a_1),E(K_A,r_{a_1}||a_1)),(A_1=PC(r_{a_1},a_1),E(K_A,r_{a_1}||a_1)),
(A_2=PC(r_{a_2},a_2),E(K_A,r_{a_2}||a_2)),(A_2=PC(r_{a_2},a_2),E(K_A,r_{a_2}||a_2)),
......
(A_m=PC(r_{a_m},a_m),E(K_A,r_{a_m}||a_m))(A_m=PC(r_{a_m},a_m),E(K_A,r_{a_m}||a_m))
对于B的账户(账户B):For B's account (Account B):
地址:(SK_B=b,PK_B=bG)Address: (SK_B=b,PK_B=bG)
值b_1至值b_n的资产B_1至资产B_n分别表示为:Assets B_1 to B_n with values b_1 to b_n are represented as follows:
(B_1=PC(r_{b_1},b_1),E(K_B,r_{b_1}||b_1)),(B_1=PC(r_{b_1},b_1),E(K_B,r_{b_1}||b_1)),
(B_2=PC(r_{b_2},b_2),E(K_B,r_{b_2}||b_2)),(B_2=PC(r_{b_2},b_2),E(K_B,r_{b_2}||b_2)),
......
(B_n=PC(r_{b_n},b_n),E(K_B,r_{b_n}||b_n))(B_n=PC(r_{b_n},b_n),E(K_B,r_{b_n}||b_n))
在一些实施例中,对于账户/余额模型下的每个账户,可以基于椭圆曲线ecp256k1生成密钥。例如,在以太坊ecp256k1上,1至2256-1之间的任何数字可以是有效私钥SK。在考虑足够的随机性的情况下,良好的库生成私钥。以太坊要求私钥SK长度为256位。使用ECC密码术的群运算完成公钥生成。为了导出公钥PK,私钥可以乘以G。用于导出公钥PK的乘法是不同于常规乘法的ECC乘法(椭圆曲线点乘法)。G是作为ECC密码术的域参数之一的生成元点。针对ecp256k1,G可以具有固定值。所述地址可以是例如公钥PK的哈希值的最后20字节。In some embodiments, for each account under the account/balance model, a key can be generated based on the elliptic curve ecp256k1. For example, on Ethereum ecp256k1, any number between 1 and 2256-1 can be a valid private key SK. A good library generates a private key while taking into account sufficient randomness. Ethereum requires that the private key SK be 256 bits long. Public key generation is completed using a group operation of ECC cryptography. To derive the public key PK, the private key can be multiplied by G. The multiplication used to derive the public key PK is ECC multiplication (elliptic curve point multiplication), which is different from conventional multiplication. G is a generator point that is one of the domain parameters of ECC cryptography. For ecp256k1, G can have a fixed value. The address can be, for example, the last 20 bytes of the hash value of the public key PK.
在一些实施例中,在步骤201处,节点A可以发起与节点B的交易。例如,用户A和用户B可以协商从用户A的账户A到用户B的账户B的交易金额t。账户A和账户B可以对应于本文描述的“钱包”。账户A可具有一个或多个资产。资产可以包括例如货币、代币、数字货币、合同、契约、医疗记录、客户详细资料、股票、债券、权益或能够以数字形式描述的任何其它资产。账户B可以具有一个或多个资产或者不具有资产。每个资产可以与存储在区块链的区块中的各种区块链信息相关联,所述区块链信息包括例如表示资产类型的NoteType、表示资产的唯一标识的NoteID、表示资产价值的承诺(例如,Pedersen承诺)值的承诺值、随机数和资产价值的加密等。In some embodiments, at step 201, node A may initiate a transaction with node B. For example, user A and user B may negotiate a transaction amount t from user A's account A to user B's account B. Account A and account B may correspond to the "wallets" described herein. Account A may have one or more assets. Assets may include, for example, currency, tokens, digital currencies, contracts, deeds, medical records, customer details, stocks, bonds, equities, or any other asset that can be described in digital form. Account B may have one or more assets or no assets. Each asset may be associated with various blockchain information stored in a block of the blockchain, including, for example, a NoteType representing the asset type, a NoteID representing the unique identifier of the asset, a commitment value representing a commitment value (e.g., a Pedersen commitment) of the asset value, a random number, and encryption of the asset value.
如针对账户A所描述的,在一些实施例中,资产A_1至资产A_m分别对应于资产价值a_1至资产价值a_m和随机数r_1至随机数r_m。基于随机数r_1至随机数r_m,节点A可将账户A中的资产价值交给承诺方案(例如,Pedersen承诺)以获得加密的承诺值。例如,加密的承诺值可以是PC_1至PC_m,其中PC_i=PC(r_{a_i},a_i)=r_{a_i}×G+a_i×H,其中G和H是已知参数,i为1至m。除了第一字段PC(…)之外,每个资产还与第二字段E(…)相关联,如前所述。第二字段E(…)可以表示用密钥K_A对相应的随机数和资产价值进行的加密。例如,加密可以是E(K_A,r_{a_i}||a_i))。每个资产的PC(…)和E(…)可以从先前的交易继承。同一机制可以应用于账户B及其资产。As described for account A, in some embodiments, assets A_1 to A_m correspond to asset values a_1 to asset values a_m and random numbers r_1 to r_m, respectively. Based on random numbers r_1 to r_m, node A can submit the asset values in account A to a commitment scheme (e.g., a Pedersen commitment) to obtain an encrypted commitment value. For example, the encrypted commitment value can be PC_1 to PC_m, where PC_i = PC(r_{a_i}, a_i) = r_{a_i}×G+a_i×H, where G and H are known parameters and i is 1 to m. In addition to the first field PC(…), each asset is also associated with a second field E(…), as described above. The second field E(…) can represent the encryption of the corresponding random number and asset value using the key K_A. For example, the encryption can be E(K_A, r_{a_i}||a_i)). The PC(…) and E(…) of each asset can be inherited from previous transactions. The same mechanism can be applied to Account B and its assets.
在一些实施例中,K_A可包括各种类型的加密密钥。例如,K_A可以是下面进一步描述的a*PK_A=aaG,K_B可以是下面进一步描述的a*PK_B=abG,其中a、b和G可以乘以ECC乘法。In some embodiments, K_A may include various types of encryption keys. For example, K_A may be a*PK_A=aaG as further described below, and K_B may be a*PK_B=abG as further described below, where a, b, and G may be multiplied by ECC multiplication.
在一些实施例中,为了满足交易金额t,用户A可以从账户A动用汇总价值至少为t的一个或多个资产。例如,参考图1,节点A可以选择用于所述交易的资产A_1和资产A_2。节点A可以从节点1读取资产PC(r_1,a_1)和PC(r_2,a_2)。在节点A已知随机数r_1和随机数r_2的情况下,节点A可以解密所读取的资产PC(r_1,a_1)和PC(r_2,a_2),获得资产价值a_1和资产价值a_2,以保证a_1和a_2之和不小于交易金额t。可以基于各种费率彼此兑换账户内不同的资产。In some embodiments, to satisfy a transaction amount t, user A can mobilize one or more assets from account A with a total value of at least t. For example, referring to Figure 1, node A can select assets A_1 and A_2 for the transaction. Node A can read assets PC(r_1, a_1) and PC(r_2, a_2) from node 1. Given the random numbers r_1 and r_2, node A can decrypt the read assets PC(r_1, a_1) and PC(r_2, a_2) to obtain the asset values a_1 and a_2, ensuring that the sum of a_1 and a_2 is no less than the transaction amount t. Different assets within an account can be exchanged for each other based on various rates.
在一些实施例中,如果所选资产价值的金额超过t,则设置y作为找零。例如,节点A可确定找零y=a_1+a_2-t。节点A可以选择随机数r_t和随机数r_y作为盲因子,以生成针对t和y的Pedersen承诺:In some embodiments, if the amount of the selected asset value exceeds t, y is set as the change. For example, node A may determine the change y = a_1 + a_2 - t. Node A may select a random number r_t and a random number r_y as blinding factors to generate a Pedersen commitment for t and y:
T=PC(r_t,t),Y=PC(r_y,y)。T=PC(r_t,t), Y=PC(r_y,y).
也就是说,节点A可针对t生成随机数r_t,针对y生成随机数r_y。节点A可将t和r_t交给承诺方案(例如,同态加密)以获得承诺值T=PC(r_t,t),并将y和r_y交给承诺方案(例如,同态加密)以获得承诺值Y=PC(r_y,y)。That is, node A may generate a random number r_t for t and a random number r_y for y. Node A may submit t and r_t to a commitment scheme (e.g., homomorphic encryption) to obtain a commitment value T = PC(r_t, t), and submit y and r_y to a commitment scheme (e.g., homomorphic encryption) to obtain a commitment value Y = PC(r_y, y).
此外,在一些实施例中,节点A生成对称密钥对的第一密钥a*PK_B=abG,并且生成另一密钥a*PK_A=aaG。节点A使用第一密钥abG加密(r_t||t),这产生了加密E(abG,r_t||t),并且使用密钥aaG来加密(r_y||y),产生加密E(aaG,r_y||y)。图3A和图3B可以遵循所述示例。作为通过节点A获得加密E(abG,r_t||t)的替代,用户A可以将r_t和t连同交易信息一起发送至节点B,从而使得节点B生成用于加密(r_t||t)的对称密钥对的第二密钥b*PK_A=baG。节点B向节点A发送密文以允许节点A验证。图4A和图4B可以遵循所述示例。尽管在本公开的各种示例中使用了级联,但是输入、输出或其他参数的替换组合可以用于加密函数或其他操作。In addition, in some embodiments, node A generates a first key a*PK_B=abG of a symmetric key pair and generates another key a*PK_A=aaG. Node A encrypts (r_t||t) using the first key abG, which produces the encryption E(abG, r_t||t), and uses the key aaG to encrypt (r_y||y), producing the encryption E(aaG, r_y||y). Figures 3A and 3B can follow the example. As an alternative to obtaining the encryption E(abG, r_t||t) through node A, user A can send r_t and t along with the transaction information to node B, so that node B generates a second key b*PK_A=baG of the symmetric key pair for encrypting (r_t||t). Node B sends a ciphertext to node A to allow node A to verify. Figures 4A and 4B can follow the example. Although cascading is used in various examples of the present disclosure, alternative combinations of inputs, outputs, or other parameters can be used for encryption functions or other operations.
此外,在一些实施例中,如果PC(r_t,t)的值和PC(r_y,y)的值各自在有效范围内,则节点A可生成范围证据RP以向区块链节点进行证明。例如,为了使PC(r_t,t)具有有效值,交易金额t可以在有效范围[0,2n-1]内;并且为了使PC(r_y,y)具有有效值,找零y可以在有效范围[0,2n-1]内。在一个实施例中,节点A可使用区块证明技术,生成与(r_y,y,Y,r_t,t,T)相关的范围证据RP,以供区块链节点(例如,共识节点)在稍后的步骤中基于范围证据来验证交易金额t和找零y是否在有效范围内。所述范围证据可以包括例如防弹(Bulletproofs)、博罗米尔(Borromean)环签名等。Furthermore, in some embodiments, if the values of PC(r_t, t) and PC(r_y, y) are each within a valid range, node A may generate a range proof (RP) to prove this to blockchain nodes. For example, in order for PC(r_t, t) to have a valid value, the transaction amount t may be within the valid range [0, 2n -1]; and in order for PC(r_y, y) to have a valid value, the change y may be within the valid range [0, 2n -1]. In one embodiment, node A may use block proof technology to generate a range proof (RP) associated with (r_y, y, Y, r_t, t, T), so that blockchain nodes (e.g., consensus nodes) can later verify whether the transaction amount t and change y are within the valid range based on the range proof. Such range proofs may include, for example, bulletproofs, Borromean ring signatures, and the like.
在步骤202处,节点A可以将交易信息发送至节点B(例如,通过区块链之外的安全信道)。所发送的交易信息可以包括例如承诺值T=PC(r_t,t)、承诺值Y=PC(r_y,y)、加密E(abG,r_t||t)、加密E(aaG,r_y||y)、范围证据RP等。承诺值Y=PC(r_y,y)、加密E(aaG,r_y||y)和范围证据RP可以是可选的,因为节点B可以不关心发送回账户A的找零。在一些实施例中,经由区块链外的通信信道的交易可防止交易信息被记录在区块链中并防止除发送方节点A和接收方节点B之外的节点获得交易信息。E(aaG,r_y||y)可能不需要被发送至节点B,但是由于所述找零y将被返回至账户A,因此用户A未来可能需要花费找零y。At step 202, node A may send transaction information to node B (e.g., via a secure channel outside the blockchain). The sent transaction information may include, for example, a commitment value T = PC(r_t, t), a commitment value Y = PC(r_y, y), encrypted E(abG, r_t||t), encrypted E(aaG, r_y||y), a range proof RP, and the like. Commitment value Y = PC(r_y, y), encrypted E(aaG, r_y||y), and range proof RP may be optional, as node B may not care about the change sent back to account A. In some embodiments, transactions via a communication channel outside the blockchain can prevent the transaction information from being recorded in the blockchain and prevent nodes other than the sender node A and the recipient node B from obtaining the transaction information. E(aaG, r_y||y) may not need to be sent to node B, but since the change y will be returned to account A, user A may need to spend the change y in the future.
在步骤203处,节点B可以验证随机数r_t、交易金额t和承诺值T。在一些实施例中,节点B可以生成对称密钥对的第二密钥b*PK_A=baG,并且使用第二密钥baG解密加密E(abG,r_t||t)以获得r_t||t。从r_t||t中,节点B可以获得r_t和t,然后验证r_t及t与T=PC(r_t,t)是否匹配。也就是说,节点B可以根据Pedersen承诺算法,基于随机数r_t和交易金额t验证承诺值T=PC(r_t,t)是否正确。如果匹配/验证失败,则节点B可以拒绝所述交易;如果匹配/验证成功,则在步骤204处,节点B可以对交易签名以答复节点A。At step 203, node B may verify the random number r_t, the transaction amount t, and the commitment value T. In some embodiments, node B may generate a second key b*PK_A=baG of the symmetric key pair, and use the second key bAG to decrypt the encrypted E(abG, r_t||t) to obtain r_t||t. From r_t||t, node B may obtain r_t and t, and then verify whether r_t and t match T=PC(r_t,t). In other words, node B may verify whether the commitment value T=PC(r_t,t) is correct based on the random number r_t and the transaction amount t according to the Pedersen commitment algorithm. If the match/verification fails, node B may reject the transaction; if the match/verification succeeds, node B may sign the transaction in reply to node A at step 204.
在步骤204处,节点B可以用用户B的私钥SK_B对交易签名,从而生成签名SIGB。该签名可以遵循数字签名算法(DSA),例如椭圆曲线数字签名算法(ECDSA),由此签名的接收方可以用签名人的公钥来验证签名,从而认证经签名的数据。签名SIGB指示接收方节点B同意所述交易。At step 204, Node B may sign the transaction using User B's private key SK_B, thereby generating a signature SIGB. This signature may conform to a digital signature algorithm (DSA), such as the Elliptic Curve Digital Signature Algorithm (ECDSA), so that the recipient of the signature can verify the signature using the signer's public key, thereby authenticating the signed data. The signature SIGB indicates that the recipient, Node B, agrees to the transaction.
在步骤205处,节点B可以将经签名的交易与签名SIGB一起发送回节点A。At step 205 , node B may send the signed transaction back to node A along with the signature SIGB.
在步骤206处,如果SIGB未被成功验证,则节点A可以拒绝所述交易。如果SIGB被成功验证,则节点A可以用用户A的私钥SK_A对交易签名,从而生成签名SIGA。类似地,该签名可以遵循数字签名算法(DSA)。在一个实施例中,节点A可以用用户A的私钥对(E(abG,r_t||t);E(aaG,r_y||y);Y;T;RP)签名,从而生成签名SIGA。At step 206, if SIGB is not successfully verified, node A may reject the transaction. If SIGB is successfully verified, node A may sign the transaction using user A's private key SK_A, thereby generating a signature SIGA. Similarly, the signature may conform to the Digital Signature Algorithm (DSA). In one embodiment, node A may sign the transaction using user A's private key pair (E(abG, r_t||t); E(aaG, r_y||y); Y; T; RP), thereby generating a signature SIGA.
在步骤207处,节点A可以向区块链提交交易,使得区块链节点验证交易并确定是否将所述交易添加至区块链。在一个实施例中,节点A可以经由节点1向区块链提交交易(E(abG,r_t||t);E(aaG,r_y||y);Y;T;RP;SIGA;SIGB)以执行该交易。该交易可以包括附加参数,或者可以不包括所有列出的参数。该交易可以被广播至区块链中的一个或多个节点(例如,共识节点)用于验证。如果验证成功,则将所述交易添加至区块链。如果验证失败,则拒绝将所述交易添加至区块链。At step 207, node A may submit the transaction to the blockchain, allowing the blockchain nodes to verify the transaction and determine whether to add the transaction to the blockchain. In one embodiment, node A may submit the transaction (E(abG, r_t||t); E(aaG, r_y||y); Y; T; RP; SIGA; SIGB) to the blockchain via node 1 to execute the transaction. The transaction may include additional parameters or may not include all listed parameters. The transaction may be broadcast to one or more nodes in the blockchain (e.g., consensus nodes) for verification. If verification succeeds, the transaction is added to the blockchain. If verification fails, the transaction is rejected from the blockchain.
在步骤208至步骤213处,一个或多个节点(例如,共识节点)对所提交交易的签名、范围证据和其它信息进行验证。如果验证失败,则节点拒绝所述交易。如果验证成功,则节点接受所述交易,分别更新用户A的账户和用户B的账户。At steps 208 to 213, one or more nodes (e.g., consensus nodes) verify the signature, range proof, and other information of the submitted transaction. If the verification fails, the node rejects the transaction. If the verification succeeds, the node accepts the transaction and updates User A's account and User B's account, respectively.
在一些实施例中,为了执行交易,可由各个区块链节点验证交易信息。交易信息可以包括交易地址TXID、签名、输入和输出。TXID可以包括交易内容的哈希值。签名可以包括发送方和接收方的密钥签名。输入可以包括发送方账户在区块链中的地址、从发送方的区块链账户为交易所动用的一个或多个资产等。输出可以包括接收方账户在区块链中的地址、接收方资产的资产类型、接收方资产的承诺值等。输入和输出可包括表格形式的索引信息。在一些实施例中,NoteID值的值可以是“TXID+输出中的资产的索引”。In some embodiments, to execute a transaction, each blockchain node may verify transaction information. Transaction information may include the transaction address TXID, signature, inputs, and outputs. The TXID may include a hash value of the transaction content. The signature may include the signatures of the sender and receiver's keys. Inputs may include the address of the sender's account on the blockchain, one or more assets mobilized from the sender's blockchain account for the transaction, etc. Outputs may include the address of the recipient's account on the blockchain, the asset type of the recipient's asset, the committed value of the recipient's asset, etc. Inputs and outputs may include index information in a tabular format. In some embodiments, the value of a NoteID may be "TXID + index of the asset in the output."
在一些实施例中,区块链的一个或多个节点可以验证所提交的交易(E(abG,r_t||t);E(aaG,r_y||y);Y;T;RP;SIGA;SIGB)。In some embodiments, one or more nodes of the blockchain may verify the submitted transaction (E(abG, r_t||t); E(aaG, r_y||y); Y; T; RP; SIGA; SIGB).
在步骤208处,节点可以使用防双花机制或防重放攻击机制验证是否已经执行所述交易。如果所述交易已经被执行,则节点可以拒绝所述交易;否则,所述方法可进入步骤209。At step 208 , the node may verify whether the transaction has been executed using an anti-double-spending mechanism or an anti-replay attack mechanism. If the transaction has been executed, the node may reject the transaction; otherwise, the method may proceed to step 209 .
在步骤209处,节点可以检查签名SIGA和签名SIGB(例如,分别基于A的公钥和B的公钥)。如果任何签名是不正确的,则节点可以拒绝所述交易;否则,所述方法可进入步骤210。At step 209 , the node may check the signature SIGA and the signature SIGB (e.g., based on A's public key and B's public key, respectively). If any signature is incorrect, the node may reject the transaction; otherwise, the method may proceed to step 210 .
在可选步骤210处,节点可以验证资产类型是否一致。例如,节点可以验证针对A_1至A_2的NoteType中的资产类型是否与交易金额t的资产类型一致。如果任何资产类型不一致,则节点可以拒绝所述交易;否则,所述方法可进入步骤211。在一些实施例中,钱包中的原始资产类型可能已经基于兑换汇率被转换为另一类型,可以跳过所述步骤。At optional step 210, the node may verify whether the asset types are consistent. For example, the node may verify whether the asset type in the NoteType for A_1 to A_2 is consistent with the asset type of the transaction amount t. If any asset type is inconsistent, the node may reject the transaction; otherwise, the method may proceed to step 211. In some embodiments, the original asset type in the wallet may have already been converted to another type based on the exchange rate, so this step can be skipped.
在步骤211处,节点可检查范围证据RP以验证PC(r_t,t)的值和PC(r_y,y)的值。在一个实施例中,节点可检查范围证据RP,以验证交易金额t是否不小于零以及找零y是否不小于零。如果验证失败,则节点可以拒绝所述交易;否则,所述方法可进入步骤212。At step 211, the node may check the range proof RP to verify the values of PC(r_t, t) and PC(r_y, y). In one embodiment, the node may check the range proof RP to verify that the transaction amount t is not less than zero and the change y is not less than zero. If verification fails, the node may reject the transaction; otherwise, the method may proceed to step 212.
在步骤212处,节点可以检查交易的输入和输出是否一致。如果检查失败,则节点可以拒绝所述交易;否则,所述方法可进入步骤213。At step 212, the node may check whether the input and output of the transaction are consistent. If the check fails, the node may reject the transaction; otherwise, the method may proceed to step 213.
在步骤213处,节点可以验证节点A是否具有为交易动用的资产。在一个实施例中,节点可以基于存储在区块链中的信息,诸如对应于账户A的信息,执行所述验证。所述信息可以包括所有资产的先前交易信息。因此节点可以确定账户A是否具有用于交易的交易资产。如果确定结果为否,则节点可以拒绝所述交易;否则,所述方法可进入步骤214。At step 213, the node may verify whether Node A has the assets mobilized for the transaction. In one embodiment, the node may perform this verification based on information stored in the blockchain, such as information corresponding to Account A. This information may include previous transaction information for all assets. Thus, the node can determine whether Account A has the transaction assets for the transaction. If this determination is negative, the node may reject the transaction; otherwise, the method may proceed to step 214.
在步骤214处,节点可以更新账户A和账户B。例如,节点可以从账户A中移除金额为t的交易资产,并且将其添加至账户B。基于同态属性,由于Y=PC(r_y,y)、且节点1知道r_y并可以从区块链访问承诺值Y,因此节点1可以解密Y以获得找零y并且将其返回至账户A。节点2在步骤202处从节点1获得随机数r_t,并且节点2可以从区块链获得承诺值T。因此,节点2可以解密T以获得资产价值t,并将其添加至账户B。At step 214, the node can update accounts A and B. For example, the node can remove a transaction asset in the amount of t from account A and add it to account B. Based on the homomorphic property, since Y = PC(r_y, y), and node 1 knows r_y and can access the commitment value Y from the blockchain, node 1 can decrypt Y to obtain the change y and return it to account A. Node 2 obtained the random number r_t from node 1 at step 202, and node 2 can also obtain the commitment value T from the blockchain. Therefore, node 2 can decrypt T to obtain the asset value t and add it to account B.
在一个示例中,在更新账户A和账户B之后,账户A接收针对所动用的资产的找零y,并接收其未动用的资产。例如,被动用的资产可以是A_1和A_2,它们在交易中被移除,找零y被返回至账户A,并且未被动用的资产是A_3、…、A_m。账户B接收交易金额t并接收其原始资产(例如,B_1、…、B_n)。A的账户和B的账户中的资产如下:In one example, after updating accounts A and B, account A receives change y for its deployed assets and its undeployed assets. For example, deployed assets may be A_1 and A_2, which are removed in the transaction, with change y returned to account A, and undeployed assets may be A_3, ..., A_m. Account B receives the transaction amount t and its original assets (e.g., B_1, ..., B_n). The assets in A's account and B's account are as follows:
对于A的账户(账户A),更新的资产被表示为:For A's account (Account A), the updated assets are represented as:
(Y=PC(r_y,y),E(aaG,r_y||y)),(Y=PC(r_y,y),E(aaG,r_y||y)),
......
(A_m=PC(r_{a_m},a_m),E(K_A,r_{a_m}||a_m))(A_m=PC(r_{a_m},a_m),E(K_A,r_{a_m}||a_m))
对于B的账户(账户B),更新的资产被表示为:For B's account (Account B), the updated assets are represented as:
(B_1=PC(r_{b_1},b_1),E(K_B,r_{b_1}||b_1)),(B_1=PC(r_{b_1},b_1),E(K_B,r_{b_1}||b_1)),
(B_2=PC(r_{b_2},b_2),E(K_B,r_{b_2}||b_2)),(B_2=PC(r_{b_2},b_2),E(K_B,r_{b_2}||b_2)),
......
(B_n=PC(r_{b_n},b_n),E(K_B,r_{b_n}||b_n)),(B_n=PC(r_{b_n},b_n),E(K_B,r_{b_n}||b_n)),
(T=PC(r_t,t),E(abG,r_t||t))(T=PC(r_t,t),E(abG,r_t||t))
尽管本公开使用节点A/用户A和节点B/用户B分别示出发送方和接收方,但是发送方和接收方可以是同一节点/用户。例如,交易的找零y(账户A中的被动用的总资产减去交易金额)可以被发送回交易的发送方。因此,如本文所述的由节点B执行的各种步骤可以替代地由节点A执行。Although this disclosure uses Node A/User A and Node B/User B to illustrate the sender and receiver, respectively, the sender and receiver can be the same node/user. For example, the change y for a transaction (the total active assets in Account A minus the transaction amount) can be sent back to the sender of the transaction. Therefore, various steps described herein as being performed by Node B can alternatively be performed by Node A.
图3A示出了根据本公开的各种实施例的用于信息保护的示例性方法300的流程图。方法300可由图1的系统100的一个或多个组件(例如,节点A、节点1、节点A和节点1的组合)实现。方法300可由包括处理器和非暂时性计算机可读存储介质(例如,存储器)的系统或装置(例如,计算机、服务器)实现,所述存储介质存储将由处理器执行以使系统或装置(例如,处理器)执行方法300的指令。下面给出的方法300的操作旨在说明。取决于实现方式,示例性方法300可包括以各种顺序或并行执行的附加的、较少的或替代的步骤。Figure 3A shows a flowchart of an exemplary method 300 for information protection according to various embodiments of the present disclosure. Method 300 may be implemented by one or more components of system 100 of Figure 1 (e.g., node A, node 1, a combination of node A and node 1). Method 300 may be implemented by a system or device (e.g., a computer, a server) including a processor and a non-transitory computer-readable storage medium (e.g., a memory), wherein the storage medium stores instructions to be executed by the processor to enable the system or device (e.g., a processor) to perform method 300. The operations of method 300 given below are intended to be illustrative. Depending on the implementation, exemplary method 300 may include additional, fewer, or alternative steps performed in various orders or in parallel.
框301包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t。例如,如前所述,T=PC(r_t,t)。在一些实施例中,该承诺方案包括Pedersen承诺,Pedersen承诺至少基于交易盲因子r_t并且具有作为被承诺值的交易金额t。Block 301 includes committing a transaction amount t of a transaction using a commitment scheme, wherein the commitment scheme includes at least a transaction blinding factor r_t to obtain a transaction commitment value T. For example, as previously described, T = PC(r_t, t). In some embodiments, the commitment scheme includes a Pedersen commitment, which is based on at least the transaction blinding factor r_t and has the transaction amount t as the committed value.
框302包括:生成对称密钥对的第一密钥。例如,如前所述,SK_A=a、PK_B=bG,第一密钥可以是a*PK_B=abG。在一些实施例中,生成第一密钥和第二密钥包括:根据Diffie-Hellman(DH)密钥交换协议,基于交易的发送方的私钥SK_A和接收方的公钥PK_B,生成第一密钥和第二密钥。Block 302 includes generating a first key of a symmetric key pair. For example, as previously described, SK_A = a and PK_B = bG, and the first key may be a*PK_B = abG. In some embodiments, generating the first and second keys includes generating the first and second keys based on a private key SK_A of a sender of a transaction and a public key PK_B of a recipient of the transaction according to the Diffie-Hellman (DH) key exchange protocol.
框303包括:用第一密钥加密交易盲因子r_t和交易金额t的组合(例如,级联)。例如,如前所述,节点A可以使用第一密钥abG加密(r_t||t),这产生加密E(abG,r_t||t)。Block 303 includes encrypting the combination (e.g., concatenation) of the transaction blinding factor r_t and the transaction amount t using a first key. For example, as previously described, node A may encrypt (r_t||t) using a first key abG, which produces the encryption E(abG, r_t||t).
框304包括:向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便接收方节点验证所述交易。在一些实施例中,向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,以便接收方节点验证所述交易包括,向与交易的接收方相关联的接收方节点发送交易承诺值T和加密的组合,使得接收方节点:基于接收方的私钥SK_B和发送方的公钥PK_A生成对称密钥对的第二密钥;使用由接收方节点生成的第二密钥对加密的组合进行解密,以获得交易盲因子r_t和交易金额t;以及至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。参见,例如,步骤203。例如,如前所述,接收方节点可以独立地生成第二密钥b*PK_A=baG。密钥abG和baG是对称且相等的。也就是说,接收方节点可以不从发送方节点接收第一密钥abG,而是接收方节点独立地生成作为abG的等价物的第二密钥baG。Block 304 includes sending the transaction commitment value T and the encrypted combination to a recipient node associated with the recipient of the transaction so that the recipient node can verify the transaction. In some embodiments, sending the transaction commitment value T and the encrypted combination to the recipient node associated with the recipient of the transaction so that the recipient node can verify the transaction includes sending the transaction commitment value T and the encrypted combination to the recipient node associated with the recipient of the transaction, so that the recipient node: generates a second key of a symmetric key pair based on the recipient's private key SK_B and the sender's public key PK_A; decrypts the encrypted combination using the second key generated by the recipient node to obtain a transaction blinding factor r_t and a transaction amount t; and verifies the transaction based on at least the transaction commitment value T, the transaction blinding factor r_t, and the transaction amount t. See, for example, step 203. For example, as previously described, the recipient node can independently generate a second key b*PK_A=baG. The keys abG and baG are symmetric and equal. That is, the receiving node may not receive the first key abG from the sending node, but the receiving node may independently generate the second key baG which is equivalent to abG.
在一些实施例中,使接收方节点至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易包括使接收方节点:响应于基于交易盲因子r_t确定交易承诺值T与交易金额t的承诺方案不匹配,拒绝所述交易;以及响应于基于交易盲因子r_t确定交易承诺值T与交易金额t的承诺方案匹配,通过对所述交易签名来生成待返回至与发送方相关联的发送方节点的接收方签名SIGB,从而批准所述交易。In some embodiments, causing the receiving node to verify the transaction based on at least the transaction commitment value T, the transaction blinding factor r_t, and the transaction amount t includes causing the receiving node to: reject the transaction in response to determining that the transaction commitment value T does not match the commitment scheme for the transaction amount t based on the transaction blinding factor r_t; and approve the transaction by signing the transaction to generate a receiving signature SIGB to be returned to the sending node associated with the sender in response to determining that the transaction commitment value T matches the commitment scheme for the transaction amount t based on the transaction blinding factor r_t.
在一些实施例中,在向与接收方相关联的接收方节点传送加密的组合之前(框304),所述方法还包括:用承诺方案承诺交易的找零y以获得找零承诺值Y,该承诺方案至少包括找零盲因子r_y,该找零y是交易动用的发送方的一个或多个资产减去交易金额t;基于发送方的私钥SK_A和发送方的公钥PK_A生成另一密钥;以及用该另一密钥加密找零盲因子r_y和找零y的这另一组合。例如,如前所述,Y=PC(r_y,y)、PK_A=a,节点A可以生成密钥a*PK_A=aaG并使用密钥aaG加密(r_y||y),这产生加密E(aaG,r_y||y)。In some embodiments, before transmitting the encrypted combination to a recipient node associated with the recipient (block 304), the method further includes: committing the change y of the transaction using a commitment scheme to obtain a change commitment value Y, the commitment scheme including at least a change blinding factor r_y, the change y being the one or more assets of the sender mobilized in the transaction minus the transaction amount t; generating another key based on the sender's private key SK_A and the sender's public key PK_A; and encrypting the another combination of the change blinding factor r_y and the change y using the another key. For example, as previously described, Y = PC(r_y, y), PK_A = a, node A can generate a key a*PK_A = aaG and encrypt (r_y||y) using the key aaG, which produces the encryption E(aaG, r_y||y).
在一些实施例中,所述方法还包括:响应于接收到接收方签名SIGB,通过对交易签名来生成发送方签名SIGA,从而批准交易;以及向区块链网络中的一个或多个节点提交包括加密的组合、加密的另一组合、交易承诺值T、找零承诺值Y、发送方签名SIGA和接收方签名SIGB的交易,以便所述一个或多个节点验证所述交易。以上参考步骤208至213描述了更多细节。In some embodiments, the method further includes: in response to receiving the recipient signature SIGB, generating a sender signature SIGA by signing the transaction to approve the transaction; and submitting the transaction including the encrypted combination, the other encrypted combination, the transaction commitment value T, the change commitment value Y, the sender signature SIGA, and the recipient signature SIGB to one or more nodes in the blockchain network for verification of the transaction. More details are described above with reference to steps 208 to 213.
在一些实施例中,向区块链网络中的一个或多个节点提交包括加密的组合、加密的另一组合、交易承诺值T、找零承诺值Y、发送方签名SIGA和接收方签名SIGB的交易,以便所述一个或多个节点验证所述交易,包括:向区块链网络中的一个或多个节点提交包括加密的组合、加密的另一组合、交易承诺值T、找零承诺值Y、发送方签名SIGA和接收方签名SIGB的交易,使得所述一个或多个节点响应于成功验证所述交易,向所述接收方发布交易金额t、消除为所述交易动用的一个或多个资产、并向所述发送方发布找零y。以上参考步骤214描述了更多细节。In some embodiments, submitting a transaction comprising an encrypted combination, another encrypted combination, a transaction commitment value T, a change commitment value Y, a sender's signature SIGA, and a receiver's signature SIGB to one or more nodes in a blockchain network so that the one or more nodes can verify the transaction includes: submitting the transaction comprising the encrypted combination, another encrypted combination, a transaction commitment value T, a change commitment value Y, a sender's signature SIGA, and a receiver's signature SIGB to one or more nodes in the blockchain network, so that the one or more nodes, in response to successfully verifying the transaction, release the transaction amount t to the receiver, eliminate one or more assets mobilized for the transaction, and release change y to the sender. More details are described above with reference to step 214.
图3B示出了根据本公开的各种实施例的用于信息保护的示例性方法400的流程图。方法400可由图1的系统100的一个或多个组件(例如,节点B、节点2、节点B和节点2的组合等)实现。方法400可以由包括处理器和非暂时性计算机可读存储介质(例如,存储器)的系统或装置(例如,计算机、服务器)实现,所述存储介质存储将由处理器执行以使系统或装置(例如,处理器)执行方法400的指令。下面给出的方法400的操作旨在说明。取决于实现方式,示例性方法400可以包括以各种顺序或并行执行的附加的、较少的或替代的步骤。3B shows a flowchart of an exemplary method 400 for information protection according to various embodiments of the present disclosure. The method 400 may be implemented by one or more components of the system 100 of FIG. 1 (e.g., Node B, Node 2, a combination of Node B and Node 2, etc.). The method 400 may be implemented by a system or device (e.g., a computer, a server) including a processor and a non-transitory computer-readable storage medium (e.g., a memory), wherein the storage medium stores instructions to be executed by the processor so that the system or device (e.g., a processor) performs the method 400. The operations of the method 400 given below are intended to be illustrative. Depending on the implementation, the exemplary method 400 may include additional, fewer, or alternative steps performed in various orders or in parallel.
框401包括:获取用对称密钥对的第一密钥加密的交易盲因子r_t和交易金额t的组合,并获取交易承诺值T。由与交易的发送方相关联的发送方节点用承诺方案承诺交易金额t来获得交易承诺值T,该承诺方案至少包括交易盲因子r_t。在一些实施例中,第一密钥由发送方节点基于交易的发送方的私钥SK_A和交易的接收方的公钥PK_B生成。Block 401 includes obtaining a combination of a transaction blinding factor r_t and a transaction amount t encrypted using a first key of a symmetric key pair, and obtaining a transaction commitment value T. The transaction commitment value T is obtained by a sender node associated with the sender of the transaction committing to the transaction amount t using a commitment scheme that includes at least the transaction blinding factor r_t. In some embodiments, the first key is generated by the sender node based on a private key SK_A of the sender of the transaction and a public key PK_B of the recipient of the transaction.
框402包括:生成对称密钥对的第二密钥。在一些实施例中,生成对称密钥对的第二密钥包括:根据Diffie-Hellman(DH)密钥交换协议,基于交易的接收方的私钥SK_B和发送方的公钥PK_A,生成对称密钥对的第二密钥。Block 402 includes generating a second key of a symmetric key pair. In some embodiments, generating the second key of the symmetric key pair includes generating the second key of the symmetric key pair based on a private key SK_B of a recipient of the transaction and a public key PK_A of a sender according to a Diffie-Hellman (DH) key exchange protocol.
框403包括:用与接收方相关联的接收方节点生成的第二密钥对所获得的组合进行解密,以获得交易盲因子r_t和交易金额t。Block 403 includes decrypting the obtained combination using a second key generated by a receiver node associated with the receiver to obtain the transaction blinding factor r_t and the transaction amount t.
框404包括:至少基于交易承诺值T、交易盲因子r_t和交易金额t验证所述交易。Block 404 includes validating the transaction based on at least the transaction commitment value T, the transaction blinding factor r_t, and the transaction amount t.
替代在节点A处加密诸如(r_t||t)的组合(r_t,t),节点A可以将(r_t,t)发送至节点B,使得节点B加密组合(r_t,t),如下面参考图4A和图4B所描述的。图1至图3B的其它步骤和说明可类似地应用于图4A和图4B。Instead of encrypting a combination (r_t, t) such as (r_t||t) at node A, node A can send (r_t, t) to node B so that node B encrypts the combination (r_t, t), as described below with reference to Figures 4A and 4B. The other steps and descriptions of Figures 1 to 3B are similarly applicable to Figures 4A and 4B.
图4A示出了根据本公开的各种实施例的用于信息保护的示例性方法440的流程图。方法440可以由图1的系统100的一个或多个组件(例如,节点A、节点1、节点A和节点1的组合)实现。方法440可以由包括处理器和非暂时性计算机可读存储介质(例如,存储器)的系统或装置(例如,计算机、服务器)实现,所述存储介质存储将由处理器执行以使系统或装置(例如,处理器)执行方法440的指令。下面给出的方法440的操作旨在说明。取决于实现方式,示例性方法440可以包括以各种顺序或并行执行的附加的、较少的或替代的步骤。Figure 4A shows a flowchart of an exemplary method 440 for information protection according to various embodiments of the present disclosure. Method 440 can be implemented by one or more components of system 100 of Figure 1 (e.g., node A, node 1, a combination of node A and node 1). Method 440 can be implemented by a system or device (e.g., a computer, a server) including a processor and a non-transitory computer-readable storage medium (e.g., a memory), wherein the storage medium stores instructions to be executed by the processor to enable the system or device (e.g., a processor) to perform method 440. The operations of method 440 given below are intended to be illustrative. Depending on the implementation, exemplary method 440 may include additional, fewer, or alternative steps performed in various orders or in parallel.
框441包括:用承诺方案承诺交易的交易金额t以获得交易承诺值T,所述承诺方案至少包括交易盲因子r_t。Block 441 includes committing a transaction amount t of the transaction using a commitment scheme to obtain a transaction commitment value T, wherein the commitment scheme includes at least a transaction blinding factor r_t.
框442包括:向与交易的接收方相关联的接收方节点发送交易金额t、交易盲因子r_t和交易承诺值T,以便接收方节点验证所述交易、并用对称密钥对的第二密钥加密交易盲因子r_t和交易金额t。例如,节点B可以验证T=PC(r_t,t)是否成立,并且节点B可以用密钥baG加密所述组合以获得E(baG,r_t||t)。Block 442 includes sending the transaction amount t, the transaction blinding factor r_t, and the transaction commitment value T to a recipient node associated with the recipient of the transaction, so that the recipient node can verify the transaction and encrypt the transaction blinding factor r_t and the transaction amount t with the second key of the symmetric key pair. For example, node B can verify that T = PC(r_t, t) holds, and node B can encrypt the combination with the key b a G to obtain E(b a G, r_t||t).
框443包括:从接收方节点获得交易盲因子r_t和交易金额t的加密的组合(例如,E(baG,r_t||t))。Block 443 includes obtaining from the recipient node an encrypted combination of the transaction blinding factor r_t and the transaction amount t (eg, E(baG, r_t||t)).
框444包括:产生对称密钥对的第一密钥以对加密的组合进行解密,从而验证所述交易。例如,节点A可以生成第一密钥abG以解密E(baG,r_t||t),并验证r_t和t是否正确。一旦r_t和t由发送方节点和接收方节点进行了相互验证,则可以向区块链提交所述交易以便验证。Block 444 includes generating a first key of a symmetric key pair to decrypt the encrypted combination, thereby verifying the transaction. For example, node A may generate a first key abG to decrypt E(baG, r_t||t) and verify that r_t and t are correct. Once r_t and t are mutually verified by the sender and receiver nodes, the transaction may be submitted to the blockchain for verification.
图4B示出了根据本公开的各种实施例的用于信息保护的示例性方法450的流程图。方法450可由图1的系统100的一个或多个组件(例如,节点B、节点2、节点B和节点2的组合等)实现。方法450可由包括处理器和非暂时性计算机可读存储介质(例如,存储器)的系统或装置(例如,计算机、服务器)实现,所述存储介质存储将由处理器执行以使系统或装置(例如,处理器)执行方法450的指令。下面给出的方法450的操作旨在说明。取决于实现方式,示例性方法450可以包括以各种顺序或并行执行的附加的、较少的或替代的步骤。4B shows a flowchart of an exemplary method 450 for information protection according to various embodiments of the present disclosure. Method 450 may be implemented by one or more components of system 100 of FIG. 1 (e.g., Node B, Node 2, a combination of Node B and Node 2, etc.). Method 450 may be implemented by a system or device (e.g., a computer, a server) including a processor and a non-transitory computer-readable storage medium (e.g., a memory), wherein the storage medium stores instructions to be executed by the processor so that the system or device (e.g., a processor) performs method 450. The operations of method 450 given below are intended to be illustrative. Depending on the implementation, exemplary method 450 may include additional, fewer, or alternative steps performed in various orders or in parallel.
框451包括:获取交易的交易金额t、交易盲因子r_t和交易承诺值T。Block 451 includes: obtaining the transaction amount t, the transaction blinding factor r_t, and the transaction commitment value T of the transaction.
框452包括:基于所获得的交易金额t、所获得的交易盲因子r_t和所获得的交易承诺值T验证所述交易。Block 452 includes verifying the transaction based on the obtained transaction amount t, the obtained transaction blinding factor r_t, and the obtained transaction commitment value T.
框453包括:响应于成功地验证所述交易,用对称密钥对的第二密钥加密交易盲因子r_t和交易金额t以获得加密的组合(例如,E(baG,r_t||t))。Block 453 includes, in response to successfully verifying the transaction, encrypting the transaction blinding factor r_t and the transaction amount t with a second key of the symmetric key pair to obtain an encrypted combination (eg, E(baG, r_t||t)).
框454包括:向与交易的发送方相关联的发送方节点发送加密的组合。Block 454 includes sending the encrypted combination to a sender node associated with the sender of the transaction.
如图所示,可以通过计算技术的各种改进保护交易金额的隐私。例如,账户结构包括一个或多个字段,诸如与资产价值的Pedersen承诺相关联的第一字段(例如,第一字段是PC(r_{a_i},a_i),其中i为1至m),以及与Pedersen承诺的随机数及资产价值相关联的第二字段(例如,第二字段是E(…))。第一字段和第二字段也用于交易步骤,并存储在区块链中。As shown in the figure, the privacy of transaction amounts can be protected through various improvements in computational techniques. For example, the account structure includes one or more fields, such as a first field associated with a Pedersen commitment to an asset value (e.g., the first field is PC(r_{a_i}, a_i), where i is 1 to m), and a second field associated with a Pedersen commitment random number and the asset value (e.g., the second field is E(...)). The first and second fields are also used in the transaction process and stored in the blockchain.
对于另一个例子,对称密钥用于加密每个Pedersen承诺的随机数和相应的资产价值,并且将包括加密的随机数和资产价值的交易存储在区块链中。这种方式避免了对这种随机数的本地管理,并且基于分布式且共识的区块链存储提高了安全性。For another example, a symmetric key is used to encrypt the random number and corresponding asset value of each Pedersen commitment, and the transaction including the encrypted random number and asset value is stored on the blockchain. This approach avoids local management of such random numbers and improves security based on distributed and consensus-based blockchain storage.
此外,在DH密钥交换协议或替换协议下,即使没有直接通信,用户A和用户B也共享用于对承诺的随机数和资产价值进行加密/解密的共有密钥(对称密钥对abG和baG)。由于对称密钥对是从相应账户的公私密钥对获得的,因此可以通过区块链有效地存储用于承诺的随机数,且无需进一步添加加密密钥。Furthermore, under the DH key exchange protocol or replacement protocol, even without direct communication, user A and user B share a common key (symmetric key pair abG and baG) for encrypting/decrypting the committed random number and asset value. Since the symmetric key pair is derived from the public-private key pair of the corresponding account, the committed random number can be efficiently stored on the blockchain without the need for further encryption keys.
对于又一示例,范围证据用于证明交易的预先存在的资产与新资产和该交易是相平衡的,以及每个新资产的价值在合理范围内。此外,交易各方可以通过安全的区块链外信道向接收方发送承诺的随机数和新资产的价值,以验证承诺的值是否与交易资产的价值相匹配。For another example, range proofs are used to prove that the pre-existing assets traded are balanced with the new assets and the transaction, and that the value of each new asset is within a reasonable range. Furthermore, the transacting parties can send a committed random number and the value of the new asset to the recipient via a secure off-blockchain channel to verify that the committed value matches the value of the transacted assets.
这样,可以方便地管理Pedersen承诺的随机数,且没有出错的风险,并且不会导致附加的密钥管理负担。因此,可以彻底地保护交易隐私,并且可以将交易金额保持为秘密。This makes it possible to easily manage the random numbers of Pedersen commitments without the risk of error and without incurring additional key management burdens. Therefore, transaction privacy can be fully protected and transaction amounts can be kept secret.
本文描述的技术由一个或多个专用计算设备实现。专用计算设备可以是台式计算机系统、服务器计算机系统、便携式计算机系统、手持设备、联网设备或任何其他设备,或包括硬连线和/或程序逻辑以实现所述技术的设备的组合。计算设备通常由操作系统软件控制和协调。传统的操作系统控制和调度用于执行的计算机进程,执行存储器管理,提供文件系统、联网、I/O服务,并提供用户界面功能、例如图形用户界面(GUI)等等。The techniques described herein are implemented by one or more special-purpose computing devices. A special-purpose computing device may be a desktop computer system, a server computer system, a portable computer system, a handheld device, a networked device, or any other device, or a combination of devices that include hardwiring and/or program logic to implement the techniques. Computing devices are typically controlled and coordinated by operating system software. Traditional operating systems control and schedule computer processes for execution, perform memory management, provide file system, networking, I/O services, and provide user interface functionality, such as a graphical user interface (GUI).
图5是示出了可以在其上实现本文描述的任何实施例的计算机系统500的框图。系统500可以在本文描述的任何节点中实现,并且被配置为执行用于信息保护方法的相应步骤。计算机系统500包括总线502或用于传送信息的其它通信机制、与总线502耦合的用于处理信息的一个或多个硬件处理器504。硬件处理器504可以是例如一个或多个通用微处理器。5 is a block diagram illustrating a computer system 500 on which any of the embodiments described herein may be implemented. System 500 may be implemented in any of the nodes described herein and configured to perform the corresponding steps of the information protection method. Computer system 500 includes a bus 502 or other communication mechanism for transmitting information, and one or more hardware processors 504 coupled to bus 502 for processing information. Hardware processors 504 may be, for example, one or more general-purpose microprocessors.
计算机系统500还包括耦合至总线502的用于存储信息和要由处理器504执行的指令的主存储器506,诸如随机存取存储器(RAM)、高速缓存和/或其他动态存储设备。主存储器506还可以用于存储在执行指令期间要由(一个或多个)处理器504执行的临时变量或其它中间信息。当这些指令被存储在处理器504可访问的存储介质中时,这些指令使计算机系统500呈现为专用机器,所述专用机器被定制为执行指令中所指定的操作。计算机系统500还包括耦合至总线502的用于存储用于处理器504的静态信息和指令的只读存储器(ROM)508或其他静态存储设备。诸如磁盘、光盘或USB拇指驱动器(闪存驱动器)等的存储装置510被提供并耦合至总线502,用于存储信息和指令。The computer system 500 also includes a main memory 506, such as random access memory (RAM), a cache, and/or other dynamic storage device, coupled to the bus 502 for storing information and instructions to be executed by the processor 504. The main memory 506 can also be used to store temporary variables or other intermediate information to be executed by the processor(s) 504 during the execution of instructions. When these instructions are stored in a storage medium accessible to the processor 504, these instructions cause the computer system 500 to appear as a special-purpose machine customized to perform the operations specified in the instructions. The computer system 500 also includes a read-only memory (ROM) 508 or other static storage device coupled to the bus 502 for storing static information and instructions for the processor 504. A storage device 510, such as a magnetic disk, an optical disk, or a USB thumb drive (flash drive), is provided and coupled to the bus 502 for storing information and instructions.
计算机系统500可以使用定制的硬连线逻辑、一个或多个ASIC或FPGA、固件和/或程序逻辑实现本文描述的技术,所述固件和/或程序逻辑与计算机系统相结合使得计算机系统500成为专用机器或将计算机系统500编程为专用机器。根据一个实施例,计算机系统500响应于处理器504执行包含在主存储器506中的一个或多个指令的一个或多个序列,执行本文描述的操作、方法和过程。这些指令可以从另一存储介质诸如存储装置510读入主存储器506。执行包含在主存储器506中的指令序列使得处理器504执行本文描述的处理步骤。在替代实施例中,可以使用硬连线电路代替软件指令,或将硬连线电路与软件指令组合使用。The computer system 500 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, and/or program logic that, in combination with the computer system, renders the computer system 500 a special-purpose machine or programs the computer system 500 to be a special-purpose machine. According to one embodiment, the computer system 500 performs the operations, methods, and processes described herein in response to the processor 504 executing one or more sequences of one or more instructions contained in the main memory 506. These instructions may be read into the main memory 506 from another storage medium, such as the storage device 510. Execution of the sequences of instructions contained in the main memory 506 causes the processor 504 to perform the process steps described herein. In alternative embodiments, hardwired circuitry may be used in place of, or in combination with, software instructions.
主存储器506、ROM 508和/或存储装置510可以包括非暂时性存储介质。如本文所使用的术语“非暂时性介质”和类似术语指的是存储用以使机器以特定方式操作的数据和/或指令的介质,所述介质不包括瞬态信号。这种非暂时性介质可包括非易失性介质和/或易失性介质。非易失性介质包括例如光盘或磁盘,诸如存储装置510。易失性介质包括动态存储器,例如主存储器506。非暂时性介质的常见形式包括例如软盘、柔性盘、硬盘、固态驱动器、磁带或任何其它磁性数据存储介质、CD-ROM、任何其它光学数据存储介质、具有孔图案的任何物理介质、RAM、PROM和EPROM、FLASH-EPROM、NVRAM、任何其它存储芯片或存储盒、以及它们的联网版本。Main memory 506, ROM 508, and/or storage device 510 may include non-transitory storage media. As used herein, the term "non-transitory media" and similar terms refer to media that store data and/or instructions for causing a machine to operate in a specific manner, and the media does not include transient signals. Such non-transitory media may include non-volatile media and/or volatile media. Non-volatile media include, for example, optical or magnetic disks, such as storage device 510. Volatile media include dynamic memory, such as main memory 506. Common forms of non-transitory media include, for example, floppy disks, flexible disks, hard disks, solid-state drives, magnetic tape or any other magnetic data storage medium, CD-ROMs, any other optical data storage medium, any physical medium with a pattern of holes, RAM, PROMs and EPROMs, FLASH-EPROMs, NVRAMs, any other memory chips or storage cartridges, and networked versions thereof.
计算机系统500还包括耦合至总线502的网络接口518。网络接口518提供耦合至一个或多个网络链路的双向数据通信,所述一个或多个网络链路连接至一个或多个本地网络。例如,网络接口518可以是综合业务数字网络(ISDN)卡、电缆调制解调器、卫星调制解调器或提供至相应类型的电话线的数据通信连接的调制解调器。作为另一示例,网络接口518可以是提供至兼容局域网(LAN)(或与WAN通信的WAN组件)的数据通信连接的LAN卡。无线链路也可以被实现。在任何这样的实现方式中,网络接口518发送和接收承载表示各种类型的信息的数字数据流的电信号、电磁信号或光信号。Computer system 500 also includes a network interface 518 coupled to bus 502. Network interface 518 provides two-way data communication coupled to one or more network links, and the one or more network links are connected to one or more local networks. For example, network interface 518 can be an integrated services digital network (ISDN) card, a cable modem, a satellite modem or a modem that is provided to the data communication connection of the telephone line of the corresponding type. As another example, network interface 518 can be a LAN card that is provided to the data communication connection of a compatible local area network (LAN) (or a WAN component that communicates with a WAN). A wireless link can also be implemented. In any such implementation, network interface 518 sends and receives electrical signals, electromagnetic signals or optical signals that carry digital data streams representing various types of information.
计算机系统500可以通过网络、网络链路和网络接口518发送消息并接收数据,包括程序代码。在因特网示例中,服务器可以通过因特网、ISP、本地网络和网络接口518传输所请求的用于应用程序的代码。Computer system 500 can send messages and receive data, including program code, through the network, network link, and network interface 518. In the Internet example, a server can transmit the requested code for an application program through the Internet, an ISP, a local network, and network interface 518.
所接收的代码可以在被接收时由处理器504执行,和/或存储在存储装置510或其他非易失性存储设备中以供稍后执行。The received code may be executed by processor 504 as it is received, and/or stored in storage 510 or other non-volatile storage for later execution.
在前述部分中描述的每个过程、方法和算法可以在由一个或多个计算机系统或包括计算机硬件的计算机处理器执行的代码模块中实现,并且是完全自动化或部分自动化的。过程和算法可以在专用电路中部分或全部地被实现。Each process, method, and algorithm described in the preceding sections can be implemented in a code module executed by one or more computer systems or computer processors comprising computer hardware, and can be fully automated or partially automated. The processes and algorithms can be implemented partially or fully in dedicated circuits.
上述各种特征和过程可彼此独立地使用,或者可以各种方式组合。所有可能的组合和子组合都将落入本公开的范围内。另外,在一些实现方式中可以省略某些方法或过程框。本文描述的方法和过程也不限于任何特定次序,且与其相关的框或状态可以以其它适当的次序来执行。例如,所描述的框或状态可以以不同于具体公开的顺序来执行,或者多个框或状态可以被组合在单个框或状态中。示例性框或状态可以串行、并行或以一些其它方式执行。可以向所公开的示例性实施例添加框或状态或从所公开的示例性实施例中移除框或状态。本文所述的示例性系统和组件可与所述的不同地构造。例如,与所公开的示例性实施例相比,可以添加、去除或重新布置元件。The various features and processes described above may be used independently of one another or may be combined in various ways. All possible combinations and sub-combinations will fall within the scope of this disclosure. In addition, certain method or process blocks may be omitted in some implementations. The methods and processes described herein are not limited to any particular order, and the blocks or states associated therewith may be performed in other appropriate orders. For example, the blocks or states described may be performed in an order different from that specifically disclosed, or multiple blocks or states may be combined in a single block or state. The exemplary blocks or states may be performed serially, in parallel, or in some other manner. Blocks or states may be added to or removed from the disclosed exemplary embodiments. The exemplary systems and components described herein may be constructed differently from those described. For example, elements may be added, removed, or rearranged compared to the disclosed exemplary embodiments.
本文描述的示例性方法的各种操作可以至少部分地由算法执行。所述算法可以包括在存储在存储器(例如,上述的非暂时性计算机可读存储介质)中的程序代码或指令中。这种算法可以包括机器学习算法。在一些实施例中,机器学习算法可以不显式地编程计算机以执行功能,但可以从训练数据中学习以建立执行所述功能的预测模型。The various operations of the exemplary methods described herein may be performed, at least in part, by an algorithm. The algorithm may be included in program code or instructions stored in a memory (e.g., the non-transitory computer-readable storage medium described above). Such an algorithm may include a machine learning algorithm. In some embodiments, the machine learning algorithm may not explicitly program a computer to perform a function, but may learn from training data to build a predictive model that performs the function.
本文描述的示例性方法的各种操作可以至少部分地由(例如,通过软件)被临时配置或永久地配置为执行相关操作的一个或多个处理器执行。无论是临时配置还是永久配置,这样的处理器可以构成操作以执行本文描述的一个或多个操作或功能的处理器实现的引擎。The various operations of the exemplary methods described herein may be performed, at least in part, by one or more processors that are temporarily or permanently configured (e.g., by software) to perform the relevant operations. Whether temporarily or permanently configured, such processors may constitute a processor-implemented engine that operates to perform one or more operations or functions described herein.
类似地,本文描述的方法可以至少部分地由处理器实现,其中特定的一个或多个处理器是硬件的示例。例如,方法的至少一些操作可以由一个或多个处理器或者处理器实现的引擎来执行。此外,一个或多个处理器还可操作以支持“云计算”环境中的相关操作的性能,或作为“软件即服务”(SaaS)操作。例如,至少一些操作可以由一组计算机(例如,包括处理器的机器)执行,这些操作可以经由网络(例如,因特网)并经由一个或多个适当的接口(例如,应用程序接口(API))被访问。Similarly, the method described herein can be implemented at least in part by a processor, wherein specific one or more processors are examples of hardware. For example, at least some operations of the method can be performed by one or more processors or an engine implemented by the processor. In addition, one or more processors can also be operated to support the performance of related operations in a "cloud computing" environment, or as a "software as a service" (SaaS) operation. For example, at least some operations can be performed by a group of computers (for example, a machine including a processor), which can be accessed via a network (for example, the Internet) and via one or more appropriate interfaces (for example, application program interface (API)).
某些操作性能可以分布在处理器之间,不仅驻留在单个机器内,而且跨多个机器部署。在一些示例性实施例中,处理器或处理器实现的引擎可以位于单个地理位置(例如,在家庭环境、办公室环境或服务器群内)。在其它示例性实施例中,处理器或处理器实现的引擎可以分布在多个地理位置上。Certain operational capabilities may be distributed among processors, residing not only within a single machine but also across multiple machines. In some exemplary embodiments, a processor or processor-implemented engine may be located in a single geographic location (e.g., in a home environment, an office environment, or a server farm). In other exemplary embodiments, a processor or processor-implemented engine may be distributed across multiple geographic locations.
在整个说明书中,多个实例可以实现被描述为单个实例的组件、操作或结构。尽管将一个或多个方法的各个操作示出并描述为单独的操作,但是这些单个操作中的一个或多个可以同时执行,并且不要求这些操作按所示顺序执行。在示例性配置中作为单独组件呈现的结构和功能可以被实现为组合结构或组件。类似地,作为单个组件呈现的结构和功能可以被实现为单独的组件。这些和其它变化、修改、添加和改进都落入本文的主题的范围内。Throughout the specification, multiple instances can be implemented as components, operations or structures described as single instances. Although each operation of one or more methods is shown and described as a separate operation, one or more of these separate operations can be performed simultaneously, and do not require these operations to be performed in the order shown. The structure and function presented as a separate component in the exemplary configuration can be implemented as a combined structure or component. Similarly, the structure and function presented as a separate component can be implemented as a separate component. These and other variations, modifications, additions and improvements all fall within the scope of the subject matter of this paper.
尽管已经参考具体的示例性实施例描述了主题的概述,但是在不脱离本发明的实施例的更广范围的情况下,可以对这些实施例进行各种修改和改变。如果实际上公开了不只一个公开内容或概念,主题的这些实施例在本文中可单独或共同地由术语“发明”指代,这仅仅是为了方便,而不是旨在主动将本申请的范围限制到任何单个公开内容或概念。不应以限制性意义来理解具体实施方式,且各种实施例的范围仅由所附权利要求书连同所述权利要求书有权获得的等效物的全部范围来界定。Although the overview of the subject matter has been described with reference to specific exemplary embodiments, various modifications and changes may be made to these embodiments without departing from the broader scope of the embodiments of the present invention. If more than one disclosure or concept is actually disclosed, these embodiments of the subject matter may be referred to herein individually or collectively by the term "invention," which is merely for convenience and is not intended to actively limit the scope of the present application to any single disclosure or concept. The detailed description should not be read in a limiting sense, and the scope of the various embodiments is defined solely by the appended claims, along with the full scope of equivalents to which such claims are entitled.
Claims (21)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40011077A HK40011077A (en) | 2020-07-10 |
| HK40011077B true HK40011077B (en) | 2022-06-02 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11102184B2 (en) | System and method for information protection | |
| US10715500B2 (en) | System and method for information protection | |
| US11080694B2 (en) | System and method for information protection | |
| US10885735B2 (en) | System and method for information protection | |
| AU2019101582A4 (en) | System and method for information protection | |
| HK40011077B (en) | System and method for information protection | |
| HK40011077A (en) | System and method for information protection | |
| HK40011687A (en) | System and method for information protection | |
| HK40011687B (en) | System and method for information protection |