Linked Questions

6
votes
2answers
5k views

Privacy of smart contract? How can one implement “private” smart contract on Ethereum? [duplicate]

Based on my current reading, I understand smart contract as a code visible and runnable on the whole blockchain. The smart contract code could be published by author, and everyone can verify the code ...
0
votes
1answer
1k views

Private Variables [duplicate]

I am wondering if it is possible to have some "private" variables in a contract, by private I mean that I can read the value only if I am the owner of a specific wallet. A simple example is today's ...
0
votes
1answer
649 views

Can a smart contract safely store and use private keys? [duplicate]

Is there a way for a smart contract to safely store (and maybe use) private keys from other blockchains?
1
vote
0answers
343 views

Will people still be able to see my smart contract code if I make the functions private? [duplicate]

I am interested in knowing if someone can read the code for my smart contract after I deploy it to the live ethereum blockchain. If I make my functions private. The goal is to hide the code.
0
votes
1answer
59 views

Private Variable [duplicate]

Question1: If I declare a private variable and put in personal information (if I did not create a getter function), does anyone have a way to see this information?
1
vote
1answer
69 views

How can we make our variables private? [duplicate]

"Everything that is inside a contract is visible to all external observers. Making something private only prevents other contracts from accessing and modifying the information, but it will still be ...
22
votes
2answers
3k views

What are effective techniques to encrypt/decrypt data stored in a smart contract?

Rather than sending and storing plain text in a smart contract, the use case objective is to encrypt first and then subsequently access the data and decrypt at the point of use. What is the most ...
11
votes
3answers
6k views

Is there any way to hide a transaction?

Is there any way to hide a transaction on the Ethereum blockchain? Some blockchain have protocols that implement this by default, like Monero and Zcash. Is something similar possible on Ethereum?
6
votes
1answer
2k views

Store secret data in contract [duplicate]

I know about the general open / trustless protocol of storing transactions. How would I approach a scenario here where I want to store some data in a contract on deployment, to later be retrieved by ...
2
votes
1answer
1k views

Inspecting private variables of a contract

In the solidity documentation, it is written Everything that is inside a contract is visible to all external observers. Making something private only prevents other contracts from accessing and ...
1
vote
2answers
728 views

Storing Secret in Smart contract [duplicate]

i am currently storing a secret (string) directly inside a smart contract. The idea is that the smart contract only allows authorized people to obtain the secret. The problem is that the smart ...
1
vote
1answer
358 views

How to sign a contract call (not transaction)?

My contract uses onlyOwner to restrict access to several functions. Everything was working but I've had to port everything to use Infura and no longer have local accounts. I'm able to sign ...
0
votes
0answers
332 views

How to hide attributes in contracts? [duplicate]

When I set an attribute to private it's not accessible from outside, but everyone who runs a node can still see it. Someone told me to use encryption to hide attribute values, but how should this ...
1
vote
5answers
135 views

Retrieving key value while setting mapping

Im new to solidity and trying to figure out if there is any way to retrieve a mappings key value for example from the transaction data in which you set it? mapping (uint => bool) private solution; ...