When enterprise archiving companies like Atempo pitch data security, the brochures are heavily abstracted. They talk about "end-to-end integrity checks" and "air-gapped vaults," but they rarely step down to the metal and explain how your bits are being protected.
If you are writing a 500 GB file to an LTO tape—and you do not plan to read that file again until the year 2035—you cannot afford to trust a black box. You need to know the mathematical certainty of the algorithms preserving that data. In HuskHoard, we made highly deliberate, modern choices to ensure survival over the "long game."
Why We Dropped MD5 and SHA-256 for BLAKE3
For a long time, standard backup tools relied on MD5 or SHA-1 for checksums. Both algorithms are now cryptographically broken (vulnerable to collision attacks). The industry default shifted to SHA-256, which is cryptographically secure, but carries a massive flaw for archival scale: it is painfully slow.
If you are streaming terabytes of data to a replication volume, your hashing algorithm cannot be the bottleneck. Calculating SHA-256 on 10 TB of data can add hours of purely CPU-bound overhead to an archival job.
The requirement: A cryptographic hash function that guarantees collision-resistance, but operates at the speed of hardware memory bandwidth.
Enter BLAKE3. Unlike legacy algorithms, BLAKE3 is based on a Merkle tree structure, meaning it can be highly parallelized across CPU cores. It is orders of magnitude faster than MD5, SHA-1, SHA-2, and SHA-3, while maintaining the highest tier of cryptographic security.
In HuskHoard's archive_worker, the BLAKE3 hash is calculated on the fly as the file streams into RAM:
let mut hasher = blake3::Hasher::new();
loop {
let n = src_file.read(&mut io_buf)?;
if n == 0 { break; }
hasher.update(&io_buf[..n]);
// stream straight to hardware...
}
let data_hash = hasher.finalize();
This exact hash is then burned permanently into the archive header. When you run HuskHoard's Scrub command ten years later, it reads the data off the tape and re-calculates the BLAKE3 hash at gigabytes per second, comparing it to the header to catch even a single flipped bit of degradation.
Zstd and the Power of Seekable Frames
Compression formats like gzip, bzip2, or standard Zstd are great for space, but they have a fatal flaw for archival retrieval: they produce a single sequential bitstream. To extract the last megabyte of a 100 GB compressed archive, you have to decompress the preceding 99.9 GB first.
HuskHoard solves this by heavily utilizing Zstd's Seekable Format.
Instead of compressing the file into one giant block, HuskHoard streams the data through a zstd::stream::write::Encoder, intentionally cutting the stream into independent 16-Megabyte frames. We then build a "Jump Table" mapped to uncompressed byte offsets.
Because of this, HuskHoard's StreamGate interface can intercept an HTTP range request from VLC Media Player, instantly cross-reference the Jump Table, and seek the physical tape head directly to the exact compressed frame containing the requested video scene. No wasted I/O. No wasted CPU.
The Self-Describing Archive (No Database Required)
One of the greatest dangers of long-term archiving is losing the catalog database. If your master index dies, your tapes become useless magnetic paperweights.
HuskHoard prevents this by making the tape format entirely self-describing. Before writing the payload, HuskHoard writes a strict, 4096-byte aligned ObjectHeader.
pub struct ObjectHeader {
pub magic_bytes: [u8; 8], // "USTD\0\x01\x02\x03"
pub payload_size: u64,
pub compressed_size: u64,
pub object_uuid: [u8; 16],
pub mtime: i64,
pub data_checksum: [u8; 32], // The BLAKE3 Hash
pub header_crc32: u32,
pub tlv_data: [u8; 3960], // Extended Metadata
}
The beauty of this header lies in the tlv_data (Type-Length-Value). HuskHoard packs the original filename, the POSIX permissions, the extended attributes (xattrs), and the entire Zstd StreamGate Jump Table directly into this 4KB block.
If your server burns down in 2035, you can point the HuskHoard Rebuild command at a raw tape drive. It will scan the tape, locate the magic bytes, read the BLAKE3 hash, extract the Zstd Jump Table from the TLV, and fully reconstruct your SQLite catalog from scratch.
When you store data for decades, proprietary magic is a liability. By utilizing open-source primitives like BLAKE3 and Zstd, and packing them into cleanly aligned POSIX data structures, HuskHoard ensures your data doesn't just survive—it remains fast, accessible, and mathematically verifiable for a lifetime.
Questions or want to see the implementation? Open an issue on GitHub or reach us at info@huskhoard.com.