# Custody: chained CRC32C and SHA-256 on every block Each block carries a CRC32C and a SHA-256 (or BLAKE3) hash, chained across the whole file. A single changed byte fails conferir. November 13, 2026 · jsonW 1.3.11 · https://jsonw.org/en/newsroom/custody ## The problem A data file can be corrupted by a bad disk, cut by an interrupted write or altered by someone. In CSV and JSON, nothing in the file itself warns that this happened. ## How jsonW solves it Each block has two checks: CRC32C, fast, for accidental damage, and a cryptographic hash, SHA-256 by default or BLAKE3 as an option. The hashes form a chain that covers data, zones and dictionary. A cut file loses only its last block, and reparar rebuilds the end. ``` $ wjsw conferir vendas.jsw ok: 2 linhas, 1 blocos, sha256 e crc32c conferidos $ wjsw conferir adulterado.jsw FALHOU: bloco 0: nao veio ou nao confere $ wjsw conferir cortado.jsw FALHOU: sem rodape: rode wjsw reparar $ wjsw reparar cortado.jsw && wjsw conferir cortado.jsw ok ok: 2 linhas, 1 blocos, sha256 e crc32c conferidos $ wjsw regravar vendas.jsw vendas-b3.jsw --hash blake3 && wjsw conferir vendas-b3.jsw ok: 2 linhas, 1 blocos, blake3 e crc32c conferidos ``` Real output: a good file, one changed byte, the last 20 bytes cut off and the repair, and the switch to BLAKE3. ## Where it is wjsw conferir, wjsw reparar and the SDKs' conferir(). Custody proves integrity, not authorship: to prove origin, keep the file ID shown by info somewhere else or sign it separately. Read the full section in the paper: https://jsonw.org/paper/en#custodia