<p>Usually hashes are what's stored in the blockchain, not the data itself. It's safe to store hashes because it's extremely difficult to reconstruct a message given its hash (the so-called pre-image attack).</p>

CC BY-SA 3.0
2016-11-02T04:12:25.170Z
Salt it first! If you post a hash of your SSN to the blockchain, it takes me less than an hour to bruteforce that on a modern GPU. Make my job harder by prepending 32 random bytes to your data.
Nick ODell
CC BY-SA 3.0
2016-11-01T19:39:24.283Z
2016-11-01T19:39:24.283Z
Geremia
<p>I do my first steps in blockchain development and I have a questions about storing some sensitive data on a chain.</p>
<p>Assuming two companies developed the protocol of document exchange through Blockchain. They don't want to give access to their information to anybody except themselves.</p>
<p>Ok, I think they can choose between two possibilities:<br />
1) Content of docs is encoded cryptographically. The result is recorded on Blockchain directly. <br />
Pro: companies must not maintain their own DB's for storing docs.<br />
Contra: maybe it is expensive to store big data on blockchain; (the main) if verification key of a counterparty is stolen then malefactor get access to all documents since nobody can remove data from blockchain.<br />
2) Counterparties can record on a chain hash result of docs' content only.<br />
Pro: It is more safely.<br />
Contra: In this scenario it is impossible to create completely decentralized db since every must maintain the needed data by oneself to get whole content of docs.
</p>
<p>Do best practices exist for storing sensitive information on Blockchain?</p>

CC BY-SA 4.0
2021-07-05T06:16:20.147Z
Cross-posted: https://ethereum.stackexchange.com/q/9758/19041, https://bitcoin.stackexchange.com/q/49376/14915.  Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068).
D.W.
CC BY-SA 4.0
2021-07-06T13:00:55.983Z
I’m voting to close this question because it was cross-posted on Ethereum.SE and here.
Murch
<development><storage>
Is Blockchain safe to store personal information?
Ilya Loskutov
# Is Blockchain safe to store personal information?

(Asked by: username_0 on 2016-11-01)

I do my first steps in blockchain development and I have a questions about storing some sensitive data on a chain.

Assuming two companies developed the protocol of document exchange through Blockchain. They don't want to give access to their information to anybody except themselves.

Ok, I think they can choose between two possibilities:  
1) Content of docs is encoded cryptographically. The result is recorded on Blockchain directly.   
Pro: companies must not maintain their own DB's for storing docs.  
Contra: maybe it is expensive to store big data on blockchain; (the main) if verification key of a counterparty is stolen then malefactor get access to all documents since nobody can remove data from blockchain.  
2) Counterparties can record on a chain hash result of docs' content only.  
Pro: It is more safely.  
Contra: In this scenario it is impossible to create completely decentralized db since every must maintain the needed data by oneself to get whole content of docs.

Do best practices exist for storing sensitive information on Blockchain?

**Tags:** development, storage

> **Comments:**
> **username_1**: Cross-posted: https://ethereum.stackexchange.com/q/9758/19041, https://bitcoin.stackexchange.com/q/49376/14915.  Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068).  
> **username_2**: I’m voting to close this question because it was cross-posted on Ethereum.SE and here.  

---

## 1 answers

### Answer by username_3 on 2016-11-01. Score: 3

Usually hashes are what's stored in the blockchain, not the data itself. It's safe to store hashes because it's extremely difficult to reconstruct a message given its hash (the so-called pre-image attack).

> **Comments:**
> **username_4**: Salt it first! If you post a hash of your SSN to the blockchain, it takes me less than an hour to bruteforce that on a modern GPU. Make my job harder by prepending 32 random bytes to your data.  

---

