b1b98f8848d82584d3be103daa362308ae3be5478bb99fb6eeaab340ceabe56d
{
  "bitpost": "article",
  "data": "When creating a new post, Bitpost offers you a number of choices to make such as whether to store your content on-chain, or how to encrypt your content.\n\n![Publishing options](https://data.bitpost.app/file/f25b3839a69cc2c79aef3c16fc2c9e76f0abc95b767b0387b8dfac4ca13b4b5b)\n\nThis article takes a look at some of these options and explains what they mean.\n\n## Content as Bitcoin transactions\n\nWhenever you create a new post, your content is signed by your keychain and encoded inside a Bitcoin transaction. This raw transaction can be seen as a kind of envelope of data — a self-contained wrapper for your content that in theory can be downloaded, stored and shared with other apps and services.\n\nWhen you hand us a transaction we store it in two ways:\n\n1. We store the original raw transaction as it is, so we always have that original and signed envelope of data.\n2. We also decode the content and store it in a way where we can make it searchable and indexable, so we can serve your content to other users.\n\nIt’s worth underlining this point as it is important to understand when it comes to our approach to encryption. There are **two** versions of your content: the original, raw transaction; and the decoded, semantic version.\n\n![Semantic data inside Bitcoin transactions](https://data.bitpost.app/file/ed7d1b184e2b5e03cc8a40ff3214d0ea21e37bcefe77de0b118b11e1bda49e26)\n\n## Storage: On- or off-chain\n\nBitpost allows you to choose whether to store your content on- or off-chain. When you chose to store the content on-chain, we broadcast the raw transaction to the Bitcoin network for you, as well as storing the two versions above.\n\nThe benefit of putting your data on-chain is that it is immutably etched in to the Bitcoin blockchain. This allows you to treat the blockchain as a kind of digital archive and backup for your content. It also enables novel integration options with other apps and services.\n\n“Forever” is of course a very long time, and precisely how historic blockchain content will be accessed in future decades is something we can only speculate about. Some argue all non-spendable data will inevitably be pruned whereas others are certain someone somewhere will always store and make available that archived data (for a fee).\n\nStoring large binary files on-chain could turn in to a pretty expensive hobby, so for binary files Bitpost offers a third storage option: storing only the **hash** on-chain. In this case, the transaction contains a [32-byte digital fingerprint](https://en.wikipedia.org/wiki/SHA-2) of the data, and the data payload itself is sent to us outside of the transaction. This allows you to benefit from the time-stamping properties the blockchain offers, at a fraction of the cost of putting the entire data payload on-chain.\n\n## Encryption\n\nBitpost also lets you chose if and how to encrypt your content. You have three choices:\n\n1. Plain text / unencrypted\n2. Shared encryption\n3. Private encryption\n\nTo understand what these options mean and when to chose which, let’s look at each in turn.\n\n### Unencrypted content\n\nBy default, new posts are created without encryption. Your content is encoded in the Bitcoin transaction in plain unencrypted text (or binary data).\n\nThe benefit of no encryption is that if you chose to store the transaction on-chain, the blockchain really can be treated as a public archive. You can fight back against censorship and de-platforming. Your content will be etched in to the Bitcoin annals, accessible to all.\n\nThe flip-side to this is that what goes on-chain stays on chain. Whilst Bitpost will always allow you to delete your content from our database, the blockchain is another matter. Typos, drunken rants, incriminating evidence, and all those silly naive things you say when you’re twenty years younger — all remain signed by you and etched in to the Bitcoin annals, accessible to all.\n\n### Shared encryption\n\nThe shared encryption option uses an [ECDH derived secret](https://en.wikipedia.org/wiki/Elliptic-curve_Diffie%E2%80%93Hellman) to encrypt your content. What this means is that both yourself and Bitpost can derive the secret to decrypt the content, but no-one else can.\n\nIf the transaction is put on chain, no-one else can decipher and read the content. But should Bitpost disappear in a puff of smoke, you can still recover and decrypt your content.\n\nOn the Bitpost side, we index the **unencrypted** version of the content so that we can show your content to other users and make it searchable and indexable. Your encrypted content can still be public, but crucially, as you can delete your content from Bitpost and no-one else can decrypt the on-chain version, you give yourself more control and effectively grant yourself the right to be forgotten.\n\n### Private encryption\n\nThe private encryption option uses a secret derived purely from your private keychain. Bitpost never sees this key so Bitpost can never decrypt this content. It is truly private.\n\nAs with the shared encryption option, the on-chain data is securely encrypted but can still be restored by yourself if required.\n\nWithin the Bitpost database, we can only store the encrypted cipher. We can’t index this content or show it to other users. Therefore, privately encrypted content only exists as private notes for yourself.\n\n|                    | Bitpost    | Blockchain |\n|:-------------------|:-----------|:-----------|\n| Unencrypted        | Public     | Public     |\n| Shared encryption  | Public     | Private    |\n| Private encryption | Private    | Private    |\n\n## Conclusions\n\nHopefully this article helps explain what some of the publishing options Bitpost offers mean, and how storage and encryption options can be combined to offer you control over your content.\n\nIn a future article we’ll take a more technical dive into the encryption algorithms Bitpost uses and document precisely how users can decrypt their encrypted posts.",
  "opts": {
    "enc": "0",
    "pub": "1",
    "tip": "1"
  },
  "signatures": {
    "child": {
      "hash": "6bbdec23e140770374a6950807026c2d011f51007fef974d75a93eb8f0ed711e",
      "pubkey": "17Pbjdzkq5q5iuzL5tAWGfPk7NHP8sSZqN",
      "signature": "HyODrrewhZk8m0Ged157QqgwF3rw1nfGwwiWqsPgoMY+I+qmCKQOUhsTu84Y8p1n+qwcIWUxX59KgwAe2BsP/3U=",
      "timestamp": 1604592832,
      "verified": true
    },
    "parent": {
      "hash": "11246ef229957366e1789b17e5f9748c70b716401b28d10b5825c3554e879296",
      "pubkey": "19AYidjVePTaPkqKwJ9MMJqa1ec1y8F5KH",
      "signature": "HzP85ZHsHXXPERFme6rNwNb9T++UO5ovnFJWCMTfGq09W7oz2pnK73FWAKXdC4EKuOFWA3+kzT/7DSVgPfjPsvs=",
      "timestamp": 1604592832,
      "verified": true
    }
  },
  "title": "Controlling your content on Bitpost",
  "type": "text/markdown"
}
{
  "api_version": "0.1.0",
  "block_hash": "",
  "block_height": 0,
  "confirmations": 0,
  "miner_id": "03e92d3e5c3f7bd945dfbf48e7a99393b1bfb3f11f380ae30d286e7ff2aec5a270",
  "result_description": "",
  "return_result": "success",
  "timestamp": "2020-11-05T16:37:03.541Z",
  "tx_second_mempool_expiry": 0,
  "verified": true
}