Hyperledger中的交易证书如何用于强制执行隐私? [英] How can the transaction certificates in Hyperledger be used to enforce privacy?

查看:77
本文介绍了Hyperledger中的交易证书如何用于强制执行隐私?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Hyperledger中创建一个区块链应用程序,该应用程序为一家制造公司执行投标过程.投标过程涉及4个供应商(供应商A到供应商D).出价最低的人获胜.

I am creating a blockchain app in Hyperledger that performs a bidding process for a manufacturing company. The bidding process involves 4 suppliers (Supplier A to Supplier D). The one with the lowest bid wins.

我能够为此创建链码.但是,由于它是一个区块链,因此供应商可以看到彼此的出价(例如,只需查看区块的内容).此外,不中标的供应商将知道实际中标的人.

I am able to create the chaincode for this. However, since it is a blockchain, the suppliers can see each other's bid (e.g., by simply looking at the contents of the blocks). In addition, the non-winning suppliers will know who actually won the bidding process.

我想在区块链中执行以下隐私规则:

I want to enforce the following privacy rules in the blockchain:

a.特定供应商的出价只能由制造公司和供应商本身查看(例如,供应商A看不到供应商B的出价)

a. the bid of a particular supplier should be viewable only by the manufacturing company and the supplier itself (e.g., supplier A cannot see the bid of supplier B)

b.只有制造公司和中标的供应商知道谁中了(例如,如果供应商A输了标书,那么供应商A只知道它输了标书,却不知道是谁中标了)

b. only the manufacturing company and the winning supplier knows who won (e.g., if supplier A loses the bid, supplier A only knows that it lost the bid but has no idea who won)

我已经查看了交易证书的目的,并且我认为这将解决我的隐私问题.

I have looked at the purpose of the transaction certificate, and I think this will address my privacy concern.

我能够使用REST API请求多个交易证书.但是,我不确定如何使用交易证书.

I am able to request for multiple transaction certificates using the REST API. However, I am not sure on how to utilize the transaction certificates.

是否打算在链码之外使用(例如,是否用于加密将传递给调用函数的参数)?

Is it meant to be used outside of the chaincode (e.g., is it is used to encrypt parameters that will be passed to an invoke function)?

还是将其作为参数传递给链码函数,然后在链码内部使用它对特定数据进行加密,然后再将其存储在区块链中?

Or is it meant to be passed as a parameter to a chaincode function and use it inside the chaincode to encrypt a particular data before storing it in the blockchain?

如何使用交易证书执行实际的加密?

How do I perform the actual encryption using the transaction certificates?

我当前正在将超级账本结构的v0.6用于我的链码.对于我的前端,我正在使用Node.JS HFC SDK v0.6.5.

I am currently using v0.6 of the Hyperledger fabric for my chaincode. For my front end, I'm using Node.JS HFC SDK v0.6.5.

是否有示例代码可以用作基础,以了解如何使用交易证书解决隐私问题?

Is there a sample code that I can use as a basis to understand how transaction certificates are used to address privacy?

推荐答案

注册用户可以请求交易证书.然后,这些证书用于在区块链上调用Chaincode交易.我认为这些证书不会给您带来私密性,它们更多地是用来验证交易的所有者.

Enrolled users can request transaction certificates. Then, these certificates are for invoking Chaincode transactions on the blockchain. I think that these certificates don't let you privacy, they are more to authenticate the owner of the transaction.

但是,如果我是您,我将开始使用Hyperledger Fabric v1.0.

However, if I were you, I'd start using the v1.0 of the Hyperledger Fabric.

  • Hyperledger架构的v0.6是一个旨在测试区块链优缺点的项目.他们意识到,网络中的每个对等方都需要执行每笔交易,维护分类账并达成共识.因此,它们无法很好地扩展,也无法支持真正的私人交易和机密合同. https://www.youtube.com/watch?v=EKa5Gh9whgU
  • v1.0使您有机会在网络内部创建隔离的区块链.多亏了渠道,这才有可能.定义渠道时,您要定义谁是该渠道的成员,因此,只有那些对等方才能通过该渠道发送交易.因此,只有该频道的成员才能看到您的跨音调.
  • 因此,对于您的方法,您应该创建四个渠道,每个供应商一个.制造公司应该是所有渠道的领导者.

我认为,如今有更多有关v1.0的信息.

In my opinion, nowadays there's more information about the v1.0.

这篇关于Hyperledger中的交易证书如何用于强制执行隐私?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆