A comparative benchmarking and security analysis framework for six 256-bit hash algorithms: SHA-256, SHA-3-256, BLAKE2b-256, BLAKE3, Gimli-Hash, and SPARKLE Esch256.
Tags: cryptography, hash-functions, benchmarking, security-analysis, avalanche-effect, blake3, blake2b, sha256, sha3, gimli, sparkle, lightweight-cryptography
| Algorithm | Library |
|---|---|
| SHA-256 | crypto/sha256 (stdlib) |
| SHA-3-256 | golang.org/x/crypto/sha3 |
| BLAKE2b-256 | golang.org/x/crypto/blake2b |
| BLAKE3 | github.com/zeebo/blake3 |
| Gimli-Hash | github.com/bmkessler/gimli |
| SPARKLE Esch256 | Pure Go port (no external dependency) |
go version # requires Go 1.25.3+
go env GOPATH # verify module cache
go test -bench=. -benchmem ./benchmarks/ | tee results/benchmark_results.txt
go test -bench=BenchmarkSHA256 -benchmem ./benchmarks/
go test -bench=BenchmarkSHA3 -benchmem ./benchmarks/
go test -bench=BenchmarkBLAKE2b -benchmem ./benchmarks/
go test -bench=BenchmarkBLAKE3 -benchmem ./benchmarks/
go test -bench=BenchmarkGimli -benchmem ./benchmarks/
go test -bench=BenchmarkSPARKLE -benchmem ./benchmarks/
go test -v -run TestKAT ./benchmarks/
Avalanche Effect (~9 s):
go test -v -run TestAvalancheEffect ./benchmarks/ -timeout 300s
Output Distribution Uniformity (~6 s):
go test -v -run TestOutputDistribution ./benchmarks/ -timeout 600s
Both security tests together (~15 s):
go test -v -run "TestAvalancheEffect|TestOutputDistribution" ./benchmarks/ -timeout 600s | tee results/security_results.txt
go test -v ./benchmarks/ -timeout 600s
go run .
go vet ./... &&
go run . &&
go test -v -run TestKAT ./benchmarks/ &&
go test -bench=. -benchmem ./benchmarks/ | tee results/benchmark_results.txt &&
go test -v -run "TestAvalancheEffect|TestOutputDistribution" ./benchmarks/ -timeout 600s | tee results/security_results.txt