Is there any way to store personal data in a blockchain?

6

2

Generally everyone can see all data stored in a blockchain. Is there any way to handle private personal data like personal medical records which only right person can see?

Satoshi Nakanishi

Posted 2015-11-15T06:46:46.570

Reputation: 527

1Why would you want to store somebodies medical records there to begin with?Anonymous 2015-11-15T10:56:10.333

Have a look over at the Ethereum forum: Distributed Encrypted Electronic Health Data (This is one of the many theoretical uses of Ethereum's blockchain.)

Richard Horrocks 2015-11-15T14:30:04.997

1@RichardHorrocks It doesn't really seem like storing or encrypting the data is the difficult part. The page glosses over the most important detail: how does a doctor who should have access to your records obtain the key to decrypt them?Nick ODell 2015-11-15T17:50:43.150

I was asked by one of my friends if you can handle personal data in blockchains. I didn't think it's a good idea, but I just wanted to know if anyone knows how to do it in a good way.Satoshi Nakanishi 2015-11-17T11:42:27.893

Answers

2

You can store data or its hash in the blockchain using OP_RETURN outputs which can store up to 80 bytes http://blog.coinprism.com/2015/02/11/80-bytes-op-return/

Farghaly

Posted 2015-11-15T06:46:46.570

Reputation: 849

1

I don't see why you would store any data on the block chain instead of just a hash.

The Bitcoin blockchain is not intended (it's actively discouraged) and therefore not suitable for data storage. The distribution system will most likely not suit your needs either. And if you're still not convinced: you're not going to be able to pay for it anyway: Bitcoin transactions cost money per byte, so you want to use as little as possible.

Use some other network/storage system that matches your requirements. Be it a website or bittorrent or a piece of paper.

Whether the actual data there is encrypted or not is your own choice. The blockchain doesn't care.

Jannes

Posted 2015-11-15T06:46:46.570

Reputation: 5 823

0

I don't see why you wouldn't be able to encrypt the data you'd like to share on the blockchain with the intended recipient's public key. That should keep it private from everyone except the holder of the private key, which should be the intended recipient.

enkrates

Posted 2015-11-15T06:46:46.570

Reputation: 127

0

Yes, you can encrypt the data you wanted to add with SHA256 Here:

http://www.freeformatter.com/sha256-generator.html

Add the encrypted data to a note on one of your transaction by clicking Note button in My Transactions.

Lt.Bitcoin

Posted 2015-11-15T06:46:46.570

Reputation: 46

While it's technically true that SHA256 encrypts the data it's given, it seems misleading, since you can't actually get the data back.Nick ODell 2015-11-15T23:24:14.663

2Strictly speaking it's not encryption, simultaneously nor does it hide the contents at all. If you put a secret behind a hash "my phone number is (541) 754-3010" anybody can just take a stab at it and roll numbers until they get a hash which matches. Storing any sort of personal data in the Bitcoin blockchain, encrypted, hashed, whatever, is absolute insanity.Anonymous 2015-11-16T00:21:55.827

@Bitcoin if the message you hash is longer than the hash, there will be a collision. sounds like you don't trust hashing or encryption at all. people are already publicly sharing a lot of encrypted information, i don't see why doing it in the blockchain is different.Janus Troelsen 2017-07-14T11:19:11.287

The input space is ascii and extremely enumerable. A hash is not encryption.Anonymous 2017-07-28T00:53:51.200

-1

If you need something publicly readable (but encrypted) you can put bytes into your pubkey too. Of course the bigger the message the more fees you may have to pay.

A scriptPubKey like this could work:

'my-data' OP_DROP OP_DUP OP_HASH160 pubKeyHash OP_EQUALVERIFY OP_CHECKSIG

Richard

Posted 2015-11-15T06:46:46.570

Reputation: 107