I still say the zip file was the moment everything went wrong.
That's because you think the moment everything went wrong was any point after nineteen eighty.
A zip is a box you can't see into until you open it. Every dispute I've ever had about a file came down to somebody handing me a box.
Then you're going to enjoy today, because Daniel's prompt is about the opposite of the box. It's called BagIt. It came out of the Library of Congress and the California Digital Library, it's written up as RFC 8493, and at heart it's a folder convention. Your files sit in one place, and next to them sit plain-text manifests with a checksum for every file, so whoever receives the bag can confirm everything arrived and nothing changed.
And Daniel's angle is the interesting part. It was built for moving and preserving digital collections, not courtrooms, but he's looking at it as a tool for anyone assembling digital evidence to hand to a lawyer, an insurer, a regulator or an archive. We've done chain of custody from the single-item side before, proving one photo or one recording is real. This is the package. What you do once you have a folder full of material and it has to stay verifiable as it passes from hand to hand.
His actual question, the one worth thirty minutes, is how far does a folder convention with checksums get an ordinary person towards a credible chain of custody.
Before we can judge that, we need to see what a bag actually is. And the RFC is unusually frank about what it was and wasn't built to do.
Unusually is the word. Most standards bury their limitations three sections deep. This one puts the limitation in the purpose section, right next to the boast. The boast is cryptographic-quality hash algorithms and in-place upgrades to stronger ones without breaking compatibility. The limit, same breath, and I'll quote it because it's the load-bearing sentence of the whole episode: this provides high levels of confidence against data corruption, but it is not designed to be secure against active attacks.
Corruption versus attack. Two different problems wearing the same checksum.
And the document knows the difference. It was published October twenty eighteen, twenty-five pages, five authors across three institutions. John Kunze at the California Digital Library, Justin Littman at Stanford Libraries, and then Erin Madden, James Scancella and Chris Adams at the Library of Congress. So this is the preservation world writing up a practice it had been using for years, not a security company selling a product.
Which already tells you the bias. These are people whose enemy is bit rot and interrupted transfers.
Right, their threat model is the universe being careless, not a person being deliberate. And there's a second thing about the document people skip. Its status line. It's Informational, not Standards Track. The RFC Editor's boilerplate on this one says the editor makes no statement about its value for implementation or deployment, and that it's not a candidate for any level of Internet Standard.
So the four-digit RFC number, which sounds like a seal of approval to anyone who's never read one, is attached to a document that explicitly disclaims being a standard.
An independent submission. A well-documented house practice that got an RFC number because that's how you publish a spec so it has a stable citation. Which is fine, that's what the series is for. But a lawyer reading the front page finds that disclaimer in about ninety seconds.
Let's open a bag, then. Because the layout is the whole trick, and it's almost embarrassingly simple.
Three required things. First, a file at the top called bagit.txt, the Bag Declaration. It's the file that marks this directory as a bag. Second, the data directory, the payload. All your actual content lives in there, ordinary folders and subfolders, exactly the tree you had before. Third, a payload manifest, and the algorithm is named in the filename, so manifest-sha256.txt for a SHA-256 manifest. That file lists every payload file with its checksum. One line per file, hash and path.
That's it? Three things and one of them is a folder?
That's the required core. The abstract's phrase is that a bag has just enough structure to enclose descriptive metadata tags and a file payload but does not require knowledge of the payload's internal semantics. Just enough structure. The whole design philosophy is in that phrase.
The optional parts are where it gets clever, I assume.
Four optional element types. The one that matters most for everything we're about to say is the tag manifest, tagmanifest-
.txt. The payload manifest checksums your files. The tag manifest checksums the tag files, which includes the payload manifest itself. The manifest gets checksummed too. Without that, anyone who edited a file could just edit the manifest to match, and the bag would still verify. With it, you can't touch the manifest without the tag manifest catching it.
You can't touch the manifest quietly. Hold that thought, because we're coming back to it with knives.
I'd be worried if you didn't. Then there's bag-info.txt, which is free-form key/value metadata about the bag. Who packed it, what it is, contact details. Plain text, human-readable. And there's fetch.txt, which is the odd one out: a list of URLs for payload content that can be pulled over the network to complete the bag.
Wait. The bag can arrive without its contents?
Deliberately so. It's a transfer optimization. Wikipedia's example is that you can run ten instances of Wget in parallel against the fetch list and move an enormous bag very quickly. For moving terabytes between institutions that's a feature. And we'll get to why, for evidence, that same feature is a hazard sign the size of a barn door.
Before that, the layout question. Why a real directory tree at all? Why not zip it, tar it, wrap it in anything? Every normal person's instinct is to compress.
The RFC addresses that head on, and it's my favorite part of the whole design. Because BagIt specifies an actual filesystem hierarchy rather than a serialized representation of one, files can be accessed using standard operating system utilities, you never need to process a potentially large archival file just to extract a subset of the data, and the format imposes no size limits on individual files or the bag. Your files stay files.
No extraction step. No archive that has to be unpacked before anyone can look at anything.
And nobody has to trust an unpacker. The other benefits fall out of that: content that starts as files just gets copied in, no encoding, no Base64 inflation, and what the recipient receives is a ready-to-go folder tree they already know how to navigate. The manifest is a text file. Your lawyer can open it in Notepad.
That's the part I'd undersell if I were writing the pitch, actually. Not the hashing, the legibility. A zip file asks you to trust the zipper.
Now walk a concrete case, because abstract structure evaporates. Say you've got two hundred scanned documents and some audio files for a dispute. You make a folder, drop the scans in as the data directory, put bagit.txt at the top, and run one of the bagging tools, which exist in Python, Ruby, Java, Perl, PHP, take your pick. The tool hashes every payload file and writes manifest-sha256.txt, two hundred lines of hash and path. Then the tag manifest, covering bagit.txt and the manifest itself. You hand the folder over, on a drive or however you like.
And the recipient, if they're diligent, runs the verification.
Or hashes by hand, if they're stubborn. And the RFC has a dedicated section on what the check means, titled Complete and Valid Bags. Two separate questions. Complete: is everything the manifest lists actually present? Valid: does everything present match its checksum?
Two words doing different jobs. Complete is the inventory check, valid is the integrity check.
And a bag can pass one and fail the other. A bag with everything present but one corrupted file is complete and not valid. A bag missing three files that the manifest still lists is valid, in the narrow sense that the files that are there match, and not complete. I'll be honest that I'm working from the section's structure here rather than its precise wording, but the two-part check is the verification model, and the recipient gets a specific list of failures either way. Not a green light or a red light. Which file, which failure.
Which is more than most people get from a zip.
Infinitely more. A zip tells you it's broken when it's broken. It doesn't enumerate what you were supposed to have.
The algorithm being in the filename is the detail I want to pull on. That's not decoration.
It's the agility mechanism. Because the manifest's filename carries the algorithm, a bag can carry two manifests at once. Say an institution bagged a collection years ago with MD5 manifests, because that was the tool they had. Today MD5 is cryptographic rubble. They can add a manifest-sha256.txt to the same bag without invalidating the old one. The RFC calls it in-place upgrades to add additional manifests using stronger algorithms without breaking backwards compatibility.
So the attestation can age without the artifact aging. The old hash still means what it meant in twenty ten, and the new hash means something stronger today, and they coexist.
And a later custodian can do it. The archive that receives your bag in twenty forty can strengthen it themselves, which is a quietly remarkable property. Most formats rot in exactly one direction.
There's a shoe waiting to drop, Herman. You've described a small cathedral of checksums. Where does it fall down?
Boringly. That's the punchline. The RFC's practical considerations section has three interoperability subsections: filename normalization, Windows and Unix file naming, and legacy checksum tools. I haven't read the subsection text, but the existence of those three subsections is itself the finding. Bags fail validation constantly for reasons that have nothing to do with tampering. A filename gets mangled crossing from a Unix system to a Windows machine. An old checksum utility writes its hashes in a different text convention. The manifest lists a path that arrived with different characters.
So the most likely real-world experience of a failed bag is not someone tampered with your evidence. It's that the folder passed through a Windows machine.
Or a tool written in nineteen ninety-eight. The sinister interpretation is the rare one, and the recipient who doesn't know the failure distribution will assume the sinister one.
A false alarm machine, then. Good. Now the knives.
Yes. The self-referential problem, and it's the whole ballgame. A bag is internally consistent by construction. The payload, the manifest and the tag manifest are all written by the same person, at the same time, on the same machine, from the same starting state. Anyone who can alter the payload can regenerate the manifest. Anyone who can regenerate the manifest can regenerate the tag manifest.
The tag manifest stops the quiet edit. It doesn't stop the full rebuild.
The tag manifest's job is to catch you editing the manifest without touching the payload, matching a hash to a changed file. It has no answer to someone who redoes the whole ceremony. Hash the new payload, write the new manifest, hash the manifest, write the new tag manifest. Internally consistent again, verified again, and not one byte of it is the original bag.
So the circle is closed and everything inside it agrees with everything else inside it, which is exactly what a forger wants.
And the RFC says so, in the purpose section, before you reach a single line of specification. Not designed to be secure against active attacks. That's the authors telling you the boundary of their own design.
Which means the question stops being about the bag and starts being about what's outside the bag.
That's where I want to land, but first let's be fair to what's inside, because the ledger has two columns. What a bag demonstrably gives you for a handover: a complete inventory, every payload file enumerated, so a recipient can tell if anything's missing. Per-file integrity, so they can tell if any file's bytes changed. Coverage of the metadata itself through the tag manifest. Algorithm agility. And format transparency, everything plain text, inspectable with no proprietary tool. That is most of the clerical work of assembling a handover, done properly.
Versus what it doesn't give you, which is any evidence about who made the statement or when.
Nothing in the required or optional elements is a signature. There's no cryptographic signature over the manifest, no trusted third-party timestamp anywhere in the structure. Bag-info.txt is exactly what it sounds like, key/value text a person fills in about themselves. I can write Bagging-Date: March 2019 in a bag I made this morning.
The metadata is a name tag, not a passport.
The RFC's own line on it is that processing a bag does not require any understanding of the payload file contents, and the payload files can be accessed without processing the BagIt metadata. It's agnostic about what's in the envelope. A bag containing a fabricated contract and a bag containing a genuine one both verify as valid. Both, identically. BagIt reports on the bytes, not on the events that produced the bytes.
Which is precisely the division of labor we've circled before on this show. When we did the deepfakes and watermarking episode, everything was about the single object. Is this photo what it claims to be. That question lives inside the bag. BagIt answers a different question, about the bag. Did the set arrive intact.
And the two stack, which is the constructive point. A bag whose payload contains individually authenticated items, plus a manifest hash that's been signed and timestamped and sent separately, is a much stronger package than either technique alone. The item-level tools and the container-level convention aren't competing, they're layers.
Okay, the separate channel. Spell it out, because I think it's the one practical move the whole episode distills to.
You make the bag. Then you take the manifest's own hash, not the payload hashes, the hash of the manifest file itself, and you send that one value to your lawyer through a different channel on a different day. Email it, or read it to them on the phone. Now there exists, outside the bag, a record of what the manifest said. If anyone later regenerates the manifest to match altered files, the new manifest's hash won't match the value your lawyer is holding.
The loop only breaks from outside. A hash by another road, a signature, a timestamp, or a witness.
One of those four, at minimum, or the bag is a beautifully formatted claim about itself.
Now the fetch.txt problem, because I haven't forgotten it and it's worse than the self-reference one in a way.
It's more practical, I'll give you that. A bag can be incomplete by design, with payload files referenced by URL rather than included. The security considerations section has two subsections on fetch.txt specifically, control of URLs and file sizes, and the authors clearly saw the risk. For a handover of evidence, it means the package you received may not contain the material. What you actually verify is what arrived after it was fetched, and what arrives depends on a remote server that can change between the day the bag was made and the day someone runs the fetch.
Exhibit A, contents sold separately.
The sender controls the server. The bag says the file at this URL has this hash, and that can all be true today and false next month, and both states were designed by the same person.
So a lawyer receiving a bag should ask one question before anything else: is there a fetch file, and does the payload actually contain the material?
That's a reasonable first screen. It's a five-second check on a text file, and it's the difference between receiving evidence and receiving a promise of evidence.
And that gets us back to Daniel's actual question, and I want to answer it honestly rather than generously. How far does this get an ordinary person towards a credible chain of custody?
My honest framing, and I'll flag that this is reasoning from the format's properties, because I haven't found anyone actually documenting BagIt in a legal or evidentiary context, no case law, no insurer guidance, nothing. The claim that it's very useful for evidence is Daniel's inference and a good one, but it's an inference, not a practice with a track record.
Noted. Reasoned, not reported. Continue.
What BagIt gets you is a strong, checkable, human-readable statement of what was in the folder at the moment the bag was made. That's most of the clerical work of a handover. It is miles better than a zip file, and light-years better than a shared drive link, which is what most people actually do. What it doesn't get you is anything about who made that statement or when. BagIt is the envelope and the packing list. It is not the notary.
The envelope and the packing list. I want to test that, because I think you're being slightly generous to the envelope and I'm not sure which direction my objection runs yet.
Go on.
If I hand you a folder with a hundred documents and a manifest, and I'm your opponent rather than your client, what have I actually given you? A list I wrote, of files I chose, hashed by a tool I ran, timestamped by nobody. Every element of it is my assertion.
Every element, yes. But consider what you'd have given me without it. A folder with a hundred documents and no list. Now at least the shape of your claim is pinned. If you later add a document to your story, it's not in the manifest I hold. If you swap a file, my copy of the manifest disagrees. The bag converts an unstructured dump into a fixed assertion you have to stand behind.
Hm. So the envelope's value is mostly that it commits the sender.
Commits the sender and equips the recipient. Both directions at once. And the commitment survives the sender's own carelessness. The most common way evidence degrades in a handover isn't malice, it's entropy. Renamed files, missing attachments, three versions of the same scan and nobody knows which was sent. The bag is armor against the boring stuff first and a speed bump against malice second, and the RFC is honest that the second rank is thin.
Which is the honest ordering, because that's also the order the real world fails in. I've watched a handover die over whether an attachment was in the original email.
The boring stuff is where handovers go to die. You said the earlier fraud question was the shoes and this is the box. I'd push it one further: a lawyer's paralegal can verify a bag. They can't verify a cryptographic signature over a manifest without being walked through it.
That's a real argument, actually. The verification has to be performable by the least technical person in the chain, or the chain has a weak link who just... trusts.
And with a bag, the least technical person in the chain can open the manifest in a text editor and count lines. That's not nothing. That might be the most underpriced property of the whole format.
So let me try the summary I think we've earned and you can tell me where it's wrong. BagIt converts a heap into a record. It makes the folder assert something specific and checkable. It cannot make the assertion true, cannot say who spoke or when they spoke, and says nothing about whether any item inside is genuine. For credibility it needs one thing from outside itself, and the minimum viable version is one hash sent down a different road.
That's the shape of it. Add the documented handover, named people and dates, and you've closed most of the gap that a format can't close. The rest is ceremony the legal world already has, it's just that nobody's connected it to a folder convention before.
And now, as ever, our switchboard is glowing, because on the line it's Corn's mother.
Dorothy! Always a delight.
Hello dear, it's Dorothy's History of Toast again.
Sliced bread was first sold in July nineteen twenty eight, in Chillicothe, Missouri, on a machine built by Otto Rohwedder. And his first prototype and plans had burned in a factory fire in nineteen seventeen, so. Eleven years, dear.
It does make you think most things are just a long wait after a fire. Anyway, have you had your lunch? I'll let you go.
I've had my lunch, Mum.
I've had mine as well, Dorothy, thank you.
Eleven years after a fire. She does find the pattern every time.
She really does. Where were we. The verification chain, the least technical person.
The Informational status. You flagged the RFC Editor's disclaimer early and I don't want it lost, because I think it cuts both ways and you've only used one edge.
Say the other edge.
A lawyer finds that disclaimer and argues the format is nothing, it's not a standard, the editor disclaims its value entirely. Fine. But then what's the alternative the lawyer trusts? A proprietary forensic package with a vendor's marketing behind it? A zip file with nothing behind it? The disclaimer sets the bar low, but everything else an ordinary person can actually use is under the bar.
The honest comparison isn't BagIt against some ideal evidentiary standard, it's BagIt against what people actually hand over. Which is folders, in emails, with no manifests at all.
The realistic baseline is chaos with a cover page.
And against that baseline, an Informational RFC written by five librarians is a documentary improvement of a large order. The adopters are telling too. Library of Congress, the Dryad Data Repository, NSF DataONE, the Rockefeller Archive Center, and university libraries at Cornell, Purdue, Stanford, Ghent, NYU, the University of California. These are institutions whose entire function is receiving material from strangers and keeping it verifiable for a century.
They're not in the courtroom business, but they are in the nobody-can-quietly-change-this business, which is the same shop with better lighting.
That's the institution that stress-tested the format, and for decades before the RFC wrote it down. BagIt's been in production since well before twenty eighteen.
One more hazard I want on the table before we wrap the analysis. The name itself. Bag it and tag it.
From the enclose and deposit method, yes, the RFC says the name comes from that, sometimes called bag it and tag it.
My worry is the phrase does half the persuasion. It sounds forensic. Tag sounds like evidence tags. A jury-adjacent word on a preservation word.
That's a fair catch on vocabulary. The format does one of the two things the name implies. It bags, thoroughly. The tagging is the part it leaves to you.
And the fetch.txt issue one more time, only because it's the one trap with moving parts. An insurer's adjuster is not going to read an RFC. They receive a folder, a tool says valid, and the word valid does the rest.
Valid means the bytes match the manifest. It doesn't mean the manifest is the one the sender wrote, or that the sender is who they say. If the word valid walks out of that narrow meaning, the whole format becomes a machine for manufacturing confidence.
That's the gap between the format and the practice, and it's the same gap every one of these tools leaves. The guarantee covers the bytes and stops at the person.
We said something like that about messaging apps once, on the privacy episode. The encryption protected the content and everything that mattered was in the metadata.
Same shape. The mechanism ends exactly where the question begins.
The envelope and the notary, yes.
But you've both undersold the envelope, and I'll tell you why. Most handovers don't fail because someone rebuilt the manifests at midnight. They fail because nobody can find the original list at all. A folder that says plainly what was in it, on a day, beats a clever argument every time. I've been the man holding the folder.
There's a filing cabinet at my mother's house with my name on masking tape across the top drawer. Insurance dispute, a while back. I bagged the lot before I sent it to the solicitor, and I wrote the manifest hash on the back of a photograph of her front gate and posted the photograph to myself. The postmark is the timestamp. It's still in the drawer.
The neighbor's dog sits against that cabinet whenever I'm there sorting it. I asked the neighbor to keep an eye on the drawer and she sends the dog. The arrangement is I leave the brisket ends. He's a good dog. Herman, you said the tag manifest catches the quiet edit. You spent a while on it. The postmark does the same job for the whole bag and it cost me a stamp.
The solicitor never understood a word of it. Match is match, he said. I let it go. Corn would not have let it go.
The postmark is the separate channel, though. You built the one outside thing we said the format can't supply, out of a photograph and a stamp.
It's not signed, but it's dated by an entity with no interest in your dispute. Royal Mail as a timestamping authority. That's... actually within the model we described.
It's a photograph of a gate, Herman. The hash is on the back. The gate is not load-bearing.
The brisket arrangement is load-bearing.
The dog knows what he's protecting. Nobody else does.
He was listening to the whole fetch.txt discussion, obviously.
The postmark point is the one I'm taking away. The outside-the-bag evidence doesn't have to be sophisticated, it just has to be independent and dated. A stamp beats nothing by more than nothing usually costs.
And it points at where this all goes next, I think. If BagIt is the envelope and not the notary, the open question is what a credible package for an ordinary person actually looks like when you assemble the pieces. Bag plus a manifest hash sent separately plus a signature plus a timestamp plus a documented handover. Every piece exists. Nobody has put them in one box and written the one page of instructions.
Whether the preservation world's format migrates into the evidentiary world is the thing to watch. The adopters today are archives, and the legal use is still an argument rather than a practice.
Our producer is Hilbert Flumingtop, who has been at the desk throughout, as ever.
If you want more of this, try episode three, Safetensors or something else; and episode eighteen sixty-one, Emergency Prep You Can Sing To. This has been My Weird Prompts. If you got anything out of this one, a review wherever you listen helps other people find the show. You'll find us at my weird prompts dot com.
We'll be back soon. Until then, keep your manifests where the dog can see them.
Goodbye, Herman.
Goodbye, Corn.