=== BitSplit Media Delivery ===
Contributors: frolpaxa
Tags: images, anti-hotlink, scraping, media
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.4
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Add friction to direct image downloads, hotlinking, and generic scraping.

== Description ==

BitSplit changes the delivery workflow for public WordPress images. Instead of
leaving a finished image at one public URL, it converts the original and generated
sizes to incomplete BitSplit blocks. The browser obtains short-lived reconstruction
data and rebuilds each image on demand.

Learn more at [bitsplit.site](https://bitsplit.site/).

This adds friction to:

* direct "copy URL and download" workflows;
* hotlinking;
* generic image downloaders and scrapers;
* bulk collection of ready-to-use image files.

BitSplit is **not encryption, DRM, or a promise that downloading is impossible**.
A determined viewer can inspect the browser flow, automate reconstruction, or
capture rendered content. Use it when raising the cost of casual downloading is
valuable; use established encryption and access control when confidentiality is
required.

= Included functionality =

The plugin protects any number of image attachments. All image functionality
shipped in this WordPress.org package is available without payment, a license,
a trial, or a usage quota.

It includes public or logged-in-only access, Gutenberg image support,
featured-image and `srcset` handling, and backup/recovery tools.

= Delivery flow =

1. WordPress stores each image as an incomplete BitSplit block, with reconstruction
   data stored separately in attachment metadata.
2. Front-end image markup receives a placeholder instead of the original image URL.
3. The browser establishes an ephemeral P-256 ECDH session.
4. Reconstruction data is transported with HKDF and AES-256-GCM.
5. Block bytes require a short-lived, session-bound signed token.
6. The browser reconstructs the image into a temporary Blob URL.

The transport encryption protects reconstruction data in transit; the BitSplit
block itself is not encrypted and contains most source bytes.

= Access modes =

* **Public visitors** - public images remain viewable; BitSplit adds download and
  scraping friction.
* **Logged-in users only** - anonymous visitors cannot obtain reconstruction data
  or block bytes.

= WordPress coverage =

BitSplit handles normal attachment images, Gutenberg Image and Gallery blocks,
featured images, `srcset`, classic content containing `wp-image-ID`, and the
`[bitsplit id="123"]` shortcode.

= Storage =

Incomplete blocks are stored in a plugin-owned directory resolved through
`wp_upload_dir()`, while reconstruction data stays in WordPress post metadata.
The plugin does not write web-server configuration files or require users to edit
server configuration.

= Requirements =

* PHP 7.4 or newer
* GMP extension
* OpenSSL with ECDH support

== Installation ==

1. Upload the `bitsplit-media-delivery` folder to `/wp-content/plugins/`.
2. Activate **BitSplit Media Delivery**.
3. Open **Tools -> BitSplit**.
4. Choose an access mode.
5. Enable split image delivery.
6. Export the recovery manifest and store it safely.

== Frequently Asked Questions ==

= Does BitSplit make downloading impossible? =

No. Public content must reach the viewer's browser. BitSplit removes the simple
ready-file URL and makes downloaders reproduce the reconstruction protocol.

= Is BitSplit encryption? =

No. The reconstruction-data transport uses standard cryptography, but the stored
BitSplit block is an incomplete, unencrypted representation of the source.

= Is any included functionality locked behind payment? =

No. Every feature and all executable code included in this WordPress.org package
are available without payment, a license, a trial, or a quota.

= What happens when I deactivate or delete the plugin? =

The plugin attempts to restore protected image attachments to their normal public
paths before removing its metadata. Keep a current exported manifest and filesystem
backup before bulk operations.

= Does it need Python? =

No. The codec is implemented in PHP with GMP and in browser JavaScript.

== Changelog ==

= 1.2.4 =
* Make the directory package a self-contained image plugin with no locked functionality.
* Move separately distributed media-type integrations out of the directory package.
* Store images only as keyless blocks and do not write web-server configuration.

= 1.2.3 =
* Store images as keyless blocks and migrate records created by earlier versions.

= 1.2.2 =
* Improve activation and deactivation recovery.

= 1.2.1 =
* Preserve protected image settings during updates.

= 1.2.0 =
* Add unlimited image attachment protection.

= 1.1.0 =
* Add public and logged-in-only access policies.
* Add short-lived session-bound tokens and same-origin checks.
* Add Gutenberg Image/Gallery, featured-image, classic-content, and srcset coverage.
* Stream block creation for large image files.

= 1.0.0 =
* Initial image delivery prototype with ECDH key transport, browser reconstruction,
  and recovery manifests.
