区块链是分散分布的数据库,在网络上的每个节点都存在相同的数据,所以现在网络上的任何人都可以看到我的数据,那么如何在区块链网络上保护它呢?
发布于 2019-05-21 06:43:14
Ethereum是作为一个平台开发的,它为对等契约和应用程序提供便利。以太是一个公共的区块链。这意味着所有参与者都可以访问ethereum块链上的数据,其中包括特定地址的余额,地址所执行的事务。您的事务是安全的,因为在事实发生后,没有人可以更改您的事务。
部署智能契约时,可以在验证后添加代码以供参考。这以牺牲隐私为代价分散了信任。然而,只要一个人不能将你的虚空地址链接到物理你,你的交易就本质上是私有的。
基本上,您应该使用适合您的业务用例的块链平台。有一些私人许可的封锁链在一定程度上提供了隐私。
发布于 2019-05-20 19:36:53
为了使您的数据是私有的,并且其他任何人都不能访问它,应该对其进行加密,但这不是块链( else网络)的目标,所以应该由您来完成。
发布于 2019-05-21 09:59:53
在ethereum中,它们将patricia树保存在数据库中(参见:https://github.com/ethereum/wiki/wiki/Patricia-Tree),以便我们可以验证数据是否正确(在merlkle树中)。
另外,发送给每个对等点的消息是未加密的,您可以在它们的wiki (https://github.com/ethereum/devp2p)中看到。
以发送事务为例(https://github.com/ethereum/go-ethereum/blob/master/eth/peer.go#L196),在源代码(https://github.com/ethereum/go-ethereum/blob/master/p2p/message.go#L90)中:
// SendTransactions sends transactions to the peer and includes the hashes
// in its transaction hash set for future reference.
func (p *peer) SendTransactions(txs types.Transactions) error {
for _, tx := range txs {
p.knownTxs.Add(tx.Hash())
}
return p2p.Send(p.rw, TxMsg, txs)
}
// Send writes an RLP-encoded message with the given code.
// data should encode as an RLP list.
func Send(w MsgWriter, msgcode uint64, data interface{}) error {
size, r, err := rlp.EncodeToReader(data)
if err != nil {
return err
}
return w.WriteMsg(Msg{Code: msgcode, Size: uint32(size), Payload: r})
}
他们只发送rlp编码的消息。
https://ethereum.stackexchange.com/questions/70917
复制相似问题