6

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?

  • 1
    Why would you want to store somebodies medical records there to begin with? – Anonymous Nov 15 '15 at 10:56
  • 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 Nov 15 '15 at 14:30
  • 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 Nov 15 '15 at 17:50
  • 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 Nov 17 '15 at 11:42
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/

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.

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.

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.

  • 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 Nov 15 '15 at 23:24
  • 2
    Strictly 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 Nov 16 '15 at 0:21
  • @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 Jul 14 '17 at 11:19
  • The input space is ascii and extremely enumerable. A hash is not encryption. – Anonymous Jul 28 '17 at 0:53
-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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.