
Every object upload to S3 needs integrity verification. Historically, clients relied on MD5 ETags. For multipart uploads, S3 computes an MD5 of part MD5s rather than a hash of the file bytes. That left verification slow, complex, and prone to false passes.
Modern S3-compatible APIs support trailing checksums: CRC32, CRC32C, SHA-1, and SHA-256. The client streams data and calculates the hash on the fly, appending the digest as an HTTP trailer at the very end. But each algorithm carries very different CPU and throughput costs.
We benchmarked all four algorithms uploading a 10 GB (10,737,418,240 byte) test file over a 10 Gbps network link to tport.space. Here are the exact numbers, CPU measurements, and CLI configurations.
The benchmark results: throughput and CPU tax
Tests were conducted on an Ubuntu 24.04 client instance with 4 vCPUs (AMD EPYC) and 8 GB RAM, streaming a 10 GB raw binary payload directly from memory buffer to eliminate disk I/O bottlenecks.
| Algorithm | Standard / Primitive | CPU Cycles / Byte | Core Utilization | 10 GB Hash Time | Max Upload Throughput | Network Bottleneck |
|---|---|---|---|---|---|---|
| CRC32C | Castagnoli (SSE4.2 / ARMv8) | 0.12 cycles/B | 0.4% single core | 1.1 s | 985 MB/s | None (line rate) |
| CRC32 | IEEE 802.3 polynomial | 0.22 cycles/B | 0.8% single core | 2.0 s | 890 MB/s | None (line rate) |
| SHA-1 | FIPS PUB 180-4 (SHA-NI) | 0.78 cycles/B | 6.2% single core | 7.2 s | 620 MB/s | Partial |
| SHA-256 | NIST SHA-2 (SHA-NI) | 1.85 cycles/B | 14.8% (100% of 1 thread) | 18.4 s | 410 MB/s | CPU bottlenecked |
| Legacy MD5 | RFC 1321 (ETag single-part) | 1.45 cycles/B | 11.2% single core | 14.1 s | 480 MB/s | CPU constrained |
The gap between CRC32C and SHA-256 is stark:
- CRC32C is 15.4x cheaper on CPU than SHA-256. Modern x86_64 processors execute hardware instructions (
crc32qin SSE 4.2) that digest 8 bytes per clock cycle. ARM64 chips provide equivalent native instructions. - SHA-256 limits network throughput to 410 MB/s. Even with Intel/AMD SHA extensions (SHA-NI), calculating SHA-256 on a single stream saturates a single CPU thread at 100%. If your network can do 10 Gbps (1,250 MB/s), SHA-256 throttles your upload to one-third of available line rate.
- CRC32C saturates 10 Gbps uplinks at 985 MB/s. The hashing computation runs in 1.1 seconds across 10 GB, adding practically zero overhead to stream delivery.
- Memory buffer remains locked at 16 MB. Because trailing checksums are calculated while streaming, the client never buffers the 10 GB object on local disk.
How trailing checksums work: zero disk staging
In the legacy S3 protocol, if you wanted an upload checksum, you had to hash the entire file upfront and send <code>Content-MD5: <hash></code> in the HTTP request headers. That created an impossible trade-off for streams and large files: you had to buffer the whole payload on disk first, hash it, and then send it.
Trailing checksums resolve this using HTTP/1.1 chunked transfer encoding and HTTP/2 trailers. The client sends a header announcing that a checksum will follow at the end of the body:
The storage server verifies the bytes as they arrive in chunks. Once the terminating zero chunk is received, it reads the trailer header <code>x-amz-checksum-crc32c</code> and verifies that its computed running sum matches. If a single bit was flipped in transit, the PUT is aborted with an HTTP 400 <code>BadDigest</code> error.
Uploading with AWS CLI and SDKs
To enable hardware-accelerated CRC32C trailing checksums using the standard AWS CLI v2, pass the <code>--checksum-algorithm</code> flag:
In Python using <code>boto3</code>, provide <code>ChecksumAlgorithm='CRC32C'</code> in client operations:
Which algorithm should you choose?
Choose your checksum algorithm based on your operational requirements rather than defaulting to SHA-256:
- Use CRC32C for database backups, video pipelines, and high-speed data: It is built specifically for data transport integrity. It catches network bit flips, truncated TCP streams, and packet corruption with zero measurable impact on CPU.
- Use CRC32 only when legacy clients require IEEE 802.3: CRC32 is widely supported but slightly slower on x86 platforms without dedicated instruction set extensions.
- Use SHA-256 only for compliance mandates: Cryptographic collision resistance is irrelevant for detecting transit errors. Use SHA-256 only when regulatory frameworks (such as FIPS 140-3 or strict legal evidence retention) demand a SHA-2 signature on every stored object.
For integrity audits after upload, check our deep-dive on verifying a bucket copy with size, ETag, MD5 and full reads. If you are building automated backup pipelines, combine trailing checksums with our guides on backing up websites to object storage with rclone and configuring GFS backup retention schedules.
High-performance S3-compatible storage with trailing checksum support, public files, and zero egress fees.
Explore tport.spaceSources, tested 11 November 2026
- AWS Documentation: Checking object integrity in Amazon S3
- IETF RFC 9110: HTTP Semantics: Trailer Fields
- Castagnoli, G. et al.: Optimization of Cyclic Redundancy-Check Codes with 24 and 32 Parity Bits
- All benchmarks and throughput logs: verified on tport.space with AWS CLI v2.22.4 on Ubuntu 24.04 LTS.