Can we store encrypted data into transaction?

0 votes

Can Ethereum store an encrypted string, for instance, "hello world" into the storage in a simple storage smart contract?

And can Ethereum decipher this string "hello world" for specific list of allowed addresses?

Jul 17, 2018 in Blockchain by sabby
• 4,350 points
30 views

1 answer to this question.

0 votes

Ethereum can store whatever bytes you want, so you can certainly encrypt a string and store that. But everything on the blockchain is public, so there's no place to store a decryption key. Even if the decryption key is off-chain, if it's ever brought on-chain to do decryption there, then everyone can immediately see it.

So encryption is only relevant of decryption is done off-chain. For example, you could encrypt something with a recipient's public key, and off-chain, that recipient could use their private key to decrypt it.

answered Jul 17, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

+1 vote
4 answers
0 votes
1 answer

How can we decrypt a transaction payload when confidentiality is on?

You can try the following: you can only ...READ MORE

answered May 2, 2018 in Blockchain by Shashank
• 10,350 points
80 views
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
177 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 67,660 points
110 views
+1 vote
1 answer

Can we copy a smart contract?

While the contract is open-source, if you ...READ MORE

answered Apr 6, 2018 in Blockchain by Christine
• 15,790 points
75 views
0 votes
1 answer

How can I modify stored data in blockchain??

One of the important feature of a ...READ MORE

answered Apr 18, 2018 in Blockchain by Christine
• 15,790 points
67 views