An edited ComfyUI image can look fine while some of its pixels have changed. HonestAngle records the original in a Merkle root receipt, using SHA-256 on individual blocks, then pinpoints changed blocks in later images. It's open source and runs on the Python 3.9+ standard library alone, with no pip dependencies. honestangle/pngio.py uses struct and zlib to read and write RGB8 and RGBA8 PNGs. Interlaced files and 16-bit images are skipped. The hashing code in honestangle/hashing.py starts with 16x16 blocks, hashes their raw pixels, duplicates odd Merkle nodes pairwise, and supplies audit proofs. honestangle/receipt.py writes deterministic JSON receipts containing image dimensions, leaf digests, a timestamp, and a receipt_sha256 self-check. honestangle/verify.py refuses forged leaf lists and returns VERIFIED, TAMPERED, REGENERATED, DIMENSIONS_MISMATCH, or RECEIPT_INVALID. With TAMPERED, you also get exact pixel rectangles of the changes. The CLI uses exit codes 0, 1, and 2, offers --json-out, and passes 33 unit tests.

Built With

Share this project:

Updates

Submission history