BitStream: Atomic data exchange protocol

律动

The idea of atomically purchasing digital files using digital currencies has a long history in this space. Digital goods, digital currencies, the two seem to be a perfect match. Digital goods, i.e. information, are also huge markets. Imagine all the video, audio, text, games, and other forms of digital content that people buy and consume on a regular basis, and their markets are worth billions of dollars, and people interact in these markets every day.

Most attempts to implement paid file sharing go down the wrong path. FIL tries to achieve this on top of FIL, but in the end the project is designed to be ridiculously ridiculous. BitTorrent (the company, not the protocol) was acquired by Justin Sun and integrated its own cryptocurrency and blockchain. Neither project has made substantial progress technically, is technically over-engineered, and economically motivated is dubious.

BitStream is a proposal by Robin Linus that attempts to solve the need for atomic purchase of data without unnecessary altcoins and over-engineered technical protocols.

All files can be uniquely identified by a single hash, which is a very important detail in this scheme. Atomic sales files require the files to be encrypted using a function that allows the user to verify the encrypted content, after which the user atomically purchases the encryption key for the file. The problem lies in the verification process, and more importantly in proving whether it was spoofed and that the files were decrypted as incorrect data is expensive. Simply put, you need to generate the entire encrypted file and the decryption key so that others can decrypt and verify that the decrypted data matches the desired hash.

File sharing systems like BitTorrent often split files into standard-sized chunks and build a merkle tree, which allows the root hash to act as a file identifier in a magnet link and verify that each individual chunk of the file you download is a valid part of that file. This is an attribute that can be exploited to greatly increase the efficiency of fraud proofs to show that the file distributor has cheated you.

The seller of the file can generate a random value and use this value to encrypt each file block by XOR on that random value. They can then sign a statement containing the root hash of the encrypted file and the hash of the encrypted value. The encrypted file tree is set up in a special way in order to simplify fraud proof.

Instead of just building a normal file block into an encrypted merkle tree, the tree creates a leaf pair consisting of a hash of an encrypted file block and an unencrypted file block next to it. Buyers can now download encrypted files and can atomically purchase decryption values after taking the hashes of all unencrypted blocks and creating a merkle tree from them to ensure they match the root hash of the unencrypted files. This is achieved by the seller using it as a preimage for HTLC on the Lightning Network or as a preimage for HTLC-enabled Chaumian eCash minting like Cashu.

If the file is decrypted incorrectly, either because the encrypted data is another file, or because the preimage is not the actual encryption key, then the Merkle path in the encrypted file tree to any two leaves can show that the seller deceived the buyer. Providing only the path to any encrypted file block and its corresponding unencrypted block hash and the preimage purchased by the buyer will clearly prove that the seller did not provide the buyer with the file they claimed.

Any seller of documents using the BitStream protocol can deposit a security deposit, which can be slashed with fraud proofs as designed above if they deceive customers. In the simplest case, this can be executed by depositing a margin in Chaumian Mint. Platforms like Liquid offer an alternative way to build trustless execution with features like OP_CAT. Scripts can be built to actually accept BitStream fraud proofs and validate them on the stack, allowing the creation of a UTXO that can be spent by anyone with a valid fraud proof. If OP_CAT becomes available on the main chain, it can even operate without a federated execution environment altogether.

BitStream is a very promising protocol for the atomic sale of digital information, with a very efficient fraud proof scheme without the need for shitcoins.

Disclaimer: The information on this page may come from third parties and does not represent the views or opinions of Gate. The content displayed on this page is for reference only and does not constitute any financial, investment, or legal advice. Gate does not guarantee the accuracy or completeness of the information and shall not be liable for any losses arising from the use of this information. Virtual asset investments carry high risks and are subject to significant price volatility. You may lose all of your invested principal. Please fully understand the relevant risks and make prudent decisions based on your own financial situation and risk tolerance. For details, please refer to Disclaimer.
Comment
0/400
No comments