Table of Contents

macOS Arm64 Apple M4 Hash Benchmarks

Machine Profile

Machine Specification

The benchmarks were run on the following machine:

BenchmarkDotNet v0.15.8, macOS Tahoe 26.4.1 (25E253) [Darwin 25.4.0]
Apple M4, 1 CPU, 10 logical and 10 physical cores
.NET SDK 10.0.301
[Host]    : .NET 10.0.9 (10.0.9, 10.0.926.27113), Arm64 RyuJIT armv8.0-a
.NET 10.0 : .NET 10.0.9 (10.0.9, 10.0.926.27113), Arm64 RyuJIT armv8.0-a
Method=TryComputeHash  Job=.NET 10.0  Runtime=.NET 10.0
Toolchain=net10.0

Note: Results are machine-specific and may vary between systems. Run benchmarks locally for your specific hardware.

BenchmarkDotNet measurements for all hash algorithm implementations in CryptoHives.Foundation.Security.Cryptography. Each algorithm is benchmarked across representative payload sizes (128 bytes through 128 KiB) to capture both latency and throughput characteristics.

Implementations are compared against:

  • OS — .NET's built-in System.Security.Cryptography (backed by Apple CommonCrypto on macOS)
  • BouncyCastle — BouncyCastle C# library
  • Native — Platform-specific native libraries (e.g., blake3-dotnet)
  • Managed — CryptoHives managed implementation (scalar)
  • SIMD — CryptoHives SIMD variants (ArmSha256, Neon, Arm64)

Highlights

Family Leader Key Insight
SHA-2 OS (CommonCrypto) Apple Silicon SHA hardware ~2.2× faster than ArmSha256 at 128 B; ArmSha256 is ~2.6× faster than Scalar at 128 B and ~7.3× faster at 128 KiB
SHA-3/Keccak CryptoHives Arm64 Arm64 variant beats BouncyCastle at all sizes; Scalar on parity with BouncyCastle at bulk
BLAKE2b/2s BouncyCastle BouncyCastle ~2× faster than Neon at 128 KiB; Neon ~1.75× faster than Managed
BLAKE3 Native (Rust) Rust ~5.4× faster than BouncyCastle at 128 KiB; Neon ~2.6× faster than BouncyCastle
Streebog Managed ~1.7× faster than OpenGost; ~2.1× faster than BouncyCastle
Kupyna Managed ~1.5× faster than BouncyCastle at all sizes
KMAC Managed ~1.9× faster than BouncyCastle at 128 B; competitive at bulk sizes
Ascon Managed ~42% faster than BouncyCastle across all input sizes
Whirlpool Managed ~4.9× faster than BouncyCastle; ~2.2× faster than Hashify .NET

SHA-2 Family

On Apple M4, System.Security.Cryptography is backed by Apple CommonCrypto which uses Apple Silicon hardware SHA acceleration. At 128 B, OS (83 ns) is ~2.2× faster than ArmSha256 (182 ns). The ArmSha256 managed variant maps directly to the ARM Cryptography Extension SHA256H/SHA256H2/SHA256SU0/SHA256SU1 instructions and is 2.6× faster than the scalar Managed path (182 ns vs 473 ns at 128 B) and 7.3× faster at 128 KiB (44 μs vs 321 μs). The remaining gap to OS is due to Apple's proprietary SHA pipelining inside CommonCrypto, which is not accessible via the standard ARM intrinsics.

CryptoHives-Scalar outperforms BouncyCastle by ~20–24% across all sizes — consistent with the x86 result.

Key observations:

  • OS: Apple Silicon hardware SHA — ~2.2× faster than ArmSha256 at 128 B; ~12% faster at 128 KiB
  • ArmSha256: Uses SHA256H/SHA256H2 ARM Crypto Extension instructions; ~2.6× faster than Scalar at 128 B; ~7.3× faster at 128 KiB
  • CryptoHives-Scalar: ~20–24% faster than BouncyCastle across all sizes
  • BouncyCastle: ~7× slower than OS at 128 B (590 ns vs 83 ns); ~31% slower than Scalar at 128 KiB

SHA-224

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 128B 181.1 ns 0.11 ns 0.08 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 128B 471.0 ns 1.48 ns 1.31 ns -
TryComputeHash · SHA-224 · BouncyCastle 128B 600.1 ns 11.94 ns 18.24 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 137B 182.0 ns 0.09 ns 0.07 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 137B 471.5 ns 1.08 ns 1.01 ns -
TryComputeHash · SHA-224 · BouncyCastle 137B 617.8 ns 12.02 ns 11.80 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 1KB 476.1 ns 1.78 ns 1.58 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 1KB 2,657.9 ns 9.22 ns 8.18 ns -
TryComputeHash · SHA-224 · BouncyCastle 1KB 3,370.2 ns 53.56 ns 47.48 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 1025B 478.2 ns 1.60 ns 1.50 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 1025B 2,659.9 ns 11.64 ns 10.32 ns -
TryComputeHash · SHA-224 · BouncyCastle 1025B 3,431.9 ns 64.25 ns 60.10 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 8KB 2,858.7 ns 1.35 ns 1.20 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 8KB 20,154.1 ns 60.87 ns 56.93 ns -
TryComputeHash · SHA-224 · BouncyCastle 8KB 26,217.6 ns 511.32 ns 733.31 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 128KB 43,811.2 ns 9.02 ns 8.00 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 128KB 320,462.9 ns 437.86 ns 365.63 ns -
TryComputeHash · SHA-224 · BouncyCastle 128KB 424,271.3 ns 4,887.93 ns 4,572.17 ns -

SHA-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-256 · OS Native 128B 83.10 ns 0.417 ns 0.390 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 128B 181.39 ns 0.083 ns 0.069 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 128B 471.86 ns 0.825 ns 0.689 ns -
TryComputeHash · SHA-256 · BouncyCastle 128B 590.68 ns 11.812 ns 21.599 ns -
TryComputeHash · SHA-256 · OS Native 137B 74.52 ns 0.112 ns 0.105 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 137B 182.23 ns 0.107 ns 0.083 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 137B 472.35 ns 0.802 ns 0.750 ns -
TryComputeHash · SHA-256 · BouncyCastle 137B 599.68 ns 11.905 ns 17.451 ns -
TryComputeHash · SHA-256 · OS Native 1KB 337.71 ns 1.271 ns 1.189 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 1KB 477.27 ns 1.198 ns 1.120 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 1KB 2,661.17 ns 8.601 ns 8.046 ns -
TryComputeHash · SHA-256 · BouncyCastle 1KB 3,379.22 ns 66.631 ns 101.752 ns -
TryComputeHash · SHA-256 · OS Native 1025B 337.46 ns 1.605 ns 1.501 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 1025B 478.76 ns 2.299 ns 2.038 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 1025B 2,659.61 ns 6.883 ns 6.438 ns -
TryComputeHash · SHA-256 · BouncyCastle 1025B 3,339.07 ns 66.318 ns 92.968 ns -
TryComputeHash · SHA-256 · OS Native 8KB 2,442.64 ns 2.493 ns 2.082 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 8KB 2,863.24 ns 1.552 ns 1.376 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 8KB 20,192.18 ns 28.003 ns 24.824 ns -
TryComputeHash · SHA-256 · BouncyCastle 8KB 25,749.91 ns 503.835 ns 672.606 ns -
TryComputeHash · SHA-256 · OS Native 128KB 38,566.57 ns 5.639 ns 4.709 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 128KB 43,827.85 ns 20.486 ns 18.161 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 128KB 320,377.32 ns 948.276 ns 840.622 ns -
TryComputeHash · SHA-256 · BouncyCastle 128KB 420,091.05 ns 5,354.563 ns 5,008.661 ns -

SHA-384

Description TestDataSize Mean Error StdDev Median Allocated
TryComputeHash · SHA-384 · OS Native 128B 157.4 ns 0.68 ns 0.63 ns 157.2 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 128B 396.1 ns 0.49 ns 0.41 ns 396.3 ns -
TryComputeHash · SHA-384 · BouncyCastle 128B 545.7 ns 10.94 ns 17.35 ns 557.6 ns -
TryComputeHash · SHA-384 · OS Native 137B 155.0 ns 0.65 ns 0.54 ns 155.1 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 137B 397.6 ns 0.73 ns 0.65 ns 397.8 ns -
TryComputeHash · SHA-384 · BouncyCastle 137B 547.1 ns 10.60 ns 13.02 ns 548.5 ns -
TryComputeHash · SHA-384 · OS Native 1KB 611.9 ns 3.36 ns 3.14 ns 612.0 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 1KB 1,774.5 ns 0.76 ns 0.71 ns 1,774.5 ns -
TryComputeHash · SHA-384 · BouncyCastle 1KB 2,427.2 ns 46.37 ns 51.55 ns 2,453.1 ns -
TryComputeHash · SHA-384 · OS Native 1025B 610.5 ns 3.00 ns 2.66 ns 609.8 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 1025B 1,790.7 ns 29.76 ns 27.84 ns 1,775.9 ns -
TryComputeHash · SHA-384 · BouncyCastle 1025B 2,424.3 ns 48.46 ns 69.51 ns 2,460.3 ns -
TryComputeHash · SHA-384 · OS Native 8KB 4,281.0 ns 2.00 ns 1.77 ns 4,280.7 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 8KB 12,809.0 ns 9.65 ns 8.56 ns 12,811.1 ns -
TryComputeHash · SHA-384 · BouncyCastle 8KB 17,455.8 ns 327.53 ns 336.35 ns 17,625.2 ns -
TryComputeHash · SHA-384 · OS Native 128KB 67,251.3 ns 24.61 ns 21.82 ns 67,243.8 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 128KB 201,557.8 ns 144.01 ns 134.71 ns 201,607.3 ns -
TryComputeHash · SHA-384 · BouncyCastle 128KB 275,694.9 ns 5,206.54 ns 5,570.94 ns 278,174.1 ns -

SHA-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-512 · OS Native 128B 153.9 ns 0.73 ns 0.68 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 128B 397.2 ns 0.59 ns 0.55 ns -
TryComputeHash · SHA-512 · BouncyCastle 128B 552.3 ns 11.49 ns 16.11 ns -
TryComputeHash · SHA-512 · OS Native 137B 152.6 ns 1.03 ns 0.97 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 137B 397.8 ns 0.40 ns 0.35 ns -
TryComputeHash · SHA-512 · BouncyCastle 137B 550.4 ns 10.67 ns 13.50 ns -
TryComputeHash · SHA-512 · OS Native 1KB 608.5 ns 2.96 ns 2.77 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 1KB 1,772.5 ns 0.60 ns 0.54 ns -
TryComputeHash · SHA-512 · BouncyCastle 1KB 2,451.4 ns 1.52 ns 1.42 ns -
TryComputeHash · SHA-512 · OS Native 1025B 608.5 ns 3.23 ns 3.02 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 1025B 1,774.8 ns 5.37 ns 4.48 ns -
TryComputeHash · SHA-512 · BouncyCastle 1025B 2,431.5 ns 46.57 ns 47.82 ns -
TryComputeHash · SHA-512 · OS Native 8KB 4,278.6 ns 0.79 ns 0.66 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 8KB 12,806.3 ns 14.08 ns 11.00 ns -
TryComputeHash · SHA-512 · BouncyCastle 8KB 17,382.6 ns 341.00 ns 379.02 ns -
TryComputeHash · SHA-512 · OS Native 128KB 67,222.8 ns 14.68 ns 12.26 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 128KB 201,468.7 ns 431.84 ns 360.61 ns -
TryComputeHash · SHA-512 · BouncyCastle 128KB 276,519.1 ns 5,060.84 ns 4,733.92 ns -

SHA-512/224

Description TestDataSize Mean Error StdDev Median Allocated
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 128B 395.3 ns 0.67 ns 0.56 ns 395.3 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 128B 558.9 ns 10.92 ns 14.57 ns 567.0 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 137B 395.3 ns 1.09 ns 0.91 ns 395.7 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 137B 562.0 ns 11.25 ns 11.55 ns 569.7 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 1KB 1,773.4 ns 2.63 ns 2.20 ns 1,774.1 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 1KB 2,373.3 ns 46.77 ns 57.44 ns 2,356.6 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 1025B 1,773.5 ns 5.45 ns 4.55 ns 1,775.5 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 1025B 2,420.1 ns 47.67 ns 71.35 ns 2,459.2 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 8KB 12,791.9 ns 17.00 ns 15.07 ns 12,794.3 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 8KB 17,446.0 ns 346.48 ns 370.73 ns 17,609.6 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 128KB 201,848.2 ns 273.58 ns 242.52 ns 201,913.2 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 128KB 273,518.7 ns 5,423.38 ns 8,282.07 ns 277,900.3 ns -

SHA-512/256

Description TestDataSize Mean Error StdDev Median Allocated
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 128B 394.6 ns 0.83 ns 0.78 ns 394.9 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 128B 558.2 ns 11.19 ns 17.09 ns 569.2 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 137B 395.9 ns 1.03 ns 0.96 ns 396.4 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 137B 565.7 ns 9.51 ns 8.90 ns 571.6 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 1KB 1,772.8 ns 2.10 ns 1.75 ns 1,773.3 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 1KB 2,446.7 ns 46.13 ns 47.37 ns 2,465.6 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 1025B 1,772.0 ns 4.17 ns 3.26 ns 1,773.5 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 1025B 2,432.7 ns 47.19 ns 48.46 ns 2,460.7 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 8KB 12,777.4 ns 42.10 ns 35.16 ns 12,789.6 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 8KB 17,471.2 ns 283.72 ns 265.39 ns 17,623.3 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 128KB 201,798.2 ns 251.83 ns 223.24 ns 201,844.5 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 128KB 276,351.7 ns 5,238.71 ns 5,822.81 ns 278,249.1 ns -

Keccak-derived Families

On Apple M4, the CryptoHives Arm64 Keccak variant is the fastest managed implementation, beating BouncyCastle at all payload sizes (e.g., 147 μs vs 151 μs at 128 KiB for SHA3-256). The scalar Managed path is on parity with BouncyCastle at bulk sizes (~2% difference), while the Arm64 path stays ~2–3% ahead. This is the reverse of the x86 pattern — on x86, the scalar path is ~30% faster than OS SHA-3; here there is no OS SHA-3 reference and both managed paths operate at similar throughput.

Key observations:

  • CryptoHives Arm64: Fastest managed option — beats BouncyCastle at all sizes (~6% at 128 B, ~2.4% at 128 KiB for SHA3-256)
  • CryptoHives Scalar: On parity with BouncyCastle at bulk sizes; ~6% behind at 128 B
  • No OS SHA-3 comparison available (macOS CommonCrypto does not expose SHA-3 via .NET in current releases)
  • All Keccak variants (SHA-3, SHAKE, cSHAKE, TurboSHAKE, KT) share the same optimized core

SHA-3 Family

SHA3-224

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-224 · CryptoHives-Arm64 128B 158.7 ns 0.17 ns 0.14 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 128B 167.3 ns 0.09 ns 0.08 ns -
TryComputeHash · SHA3-224 · BouncyCastle 128B 178.0 ns 0.84 ns 0.74 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 137B 156.5 ns 0.07 ns 0.07 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 137B 167.1 ns 0.27 ns 0.24 ns -
TryComputeHash · SHA3-224 · BouncyCastle 137B 178.9 ns 0.72 ns 0.64 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 1KB 1,196.8 ns 0.87 ns 0.77 ns -
TryComputeHash · SHA3-224 · BouncyCastle 1KB 1,265.9 ns 2.91 ns 2.43 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 1KB 1,288.5 ns 0.75 ns 0.67 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 1025B 1,196.1 ns 1.05 ns 0.93 ns -
TryComputeHash · SHA3-224 · BouncyCastle 1025B 1,265.5 ns 2.74 ns 2.29 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 1025B 1,287.2 ns 0.92 ns 0.72 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 8KB 8,440.8 ns 10.73 ns 10.04 ns -
TryComputeHash · SHA3-224 · BouncyCastle 8KB 8,927.4 ns 74.40 ns 69.59 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 8KB 9,108.2 ns 16.14 ns 14.31 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 128KB 134,907.4 ns 222.55 ns 208.17 ns -
TryComputeHash · SHA3-224 · BouncyCastle 128KB 140,651.0 ns 91.83 ns 71.70 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 128KB 145,100.3 ns 162.33 ns 143.90 ns -

SHA3-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-256 · CryptoHives-Arm64 128B 156.3 ns 0.10 ns 0.09 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 128B 166.9 ns 0.21 ns 0.19 ns -
TryComputeHash · SHA3-256 · BouncyCastle 128B 179.1 ns 1.54 ns 1.44 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 137B 305.2 ns 0.31 ns 0.27 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 137B 325.5 ns 0.41 ns 0.36 ns -
TryComputeHash · SHA3-256 · BouncyCastle 137B 325.7 ns 1.36 ns 1.28 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 1KB 1,218.5 ns 21.41 ns 18.98 ns -
TryComputeHash · SHA3-256 · BouncyCastle 1KB 1,275.8 ns 6.20 ns 5.50 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 1KB 1,283.4 ns 2.07 ns 1.94 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 1025B 1,208.5 ns 0.51 ns 0.45 ns -
TryComputeHash · SHA3-256 · BouncyCastle 1025B 1,270.0 ns 2.63 ns 2.05 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 1025B 1,280.0 ns 1.40 ns 1.24 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 8KB 9,138.6 ns 16.86 ns 15.77 ns -
TryComputeHash · SHA3-256 · BouncyCastle 8KB 9,508.7 ns 15.22 ns 13.50 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 8KB 9,704.7 ns 16.19 ns 14.35 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 128KB 144,305.8 ns 167.71 ns 148.67 ns -
TryComputeHash · SHA3-256 · BouncyCastle 128KB 150,874.9 ns 855.18 ns 799.93 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 128KB 153,063.7 ns 123.65 ns 103.25 ns -

SHA3-384

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-384 · CryptoHives-Arm64 128B 304.0 ns 0.19 ns 0.18 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 128B 320.7 ns 0.23 ns 0.18 ns -
TryComputeHash · SHA3-384 · BouncyCastle 128B 323.8 ns 0.21 ns 0.16 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 137B 303.8 ns 0.14 ns 0.13 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 137B 321.8 ns 0.15 ns 0.12 ns -
TryComputeHash · SHA3-384 · BouncyCastle 137B 332.3 ns 1.39 ns 1.23 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 1KB 1,498.5 ns 0.25 ns 0.21 ns -
TryComputeHash · SHA3-384 · BouncyCastle 1KB 1,559.5 ns 8.11 ns 6.77 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 1KB 1,586.3 ns 2.57 ns 2.41 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 1025B 1,494.5 ns 1.16 ns 1.09 ns -
TryComputeHash · SHA3-384 · BouncyCastle 1025B 1,557.6 ns 5.09 ns 4.76 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 1025B 1,590.4 ns 2.38 ns 2.11 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 8KB 11,835.0 ns 3.74 ns 3.13 ns -
TryComputeHash · SHA3-384 · BouncyCastle 8KB 12,109.2 ns 71.79 ns 63.64 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 8KB 12,480.2 ns 12.99 ns 10.84 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 128KB 189,293.2 ns 166.63 ns 155.87 ns -
TryComputeHash · SHA3-384 · BouncyCastle 128KB 197,958.7 ns 892.42 ns 834.77 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 128KB 198,782.7 ns 98.48 ns 82.24 ns -

SHA3-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-512 · CryptoHives-Arm64 128B 297.4 ns 0.22 ns 0.17 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 128B 319.0 ns 0.56 ns 0.52 ns -
TryComputeHash · SHA3-512 · BouncyCastle 128B 326.5 ns 3.06 ns 2.86 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 137B 298.2 ns 0.30 ns 0.28 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 137B 318.9 ns 0.60 ns 0.56 ns -
TryComputeHash · SHA3-512 · BouncyCastle 137B 324.9 ns 0.96 ns 0.90 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 1KB 2,235.1 ns 2.25 ns 2.11 ns -
TryComputeHash · SHA3-512 · BouncyCastle 1KB 2,318.2 ns 11.13 ns 9.29 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 1KB 2,358.2 ns 2.86 ns 2.67 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 1025B 2,234.0 ns 1.48 ns 1.38 ns -
TryComputeHash · SHA3-512 · BouncyCastle 1025B 2,319.7 ns 8.28 ns 7.34 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 1025B 2,356.3 ns 2.36 ns 1.97 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 8KB 16,991.4 ns 15.03 ns 13.32 ns -
TryComputeHash · SHA3-512 · BouncyCastle 8KB 17,446.0 ns 55.55 ns 49.24 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 8KB 17,914.3 ns 59.60 ns 49.77 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 128KB 271,452.9 ns 464.92 ns 388.23 ns -
TryComputeHash · SHA3-512 · BouncyCastle 128KB 279,079.0 ns 903.13 ns 800.60 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 128KB 285,180.9 ns 273.99 ns 256.29 ns -

Keccak Family

Keccak-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Keccak-256 · CryptoHives-Arm64 128B 157.3 ns 0.18 ns 0.17 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 128B 166.6 ns 0.09 ns 0.07 ns -
TryComputeHash · Keccak-256 · BouncyCastle 128B 177.2 ns 0.51 ns 0.43 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 137B 304.1 ns 0.32 ns 0.30 ns -
TryComputeHash · Keccak-256 · BouncyCastle 137B 323.5 ns 0.87 ns 0.77 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 137B 324.6 ns 0.48 ns 0.40 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 1KB 1,203.1 ns 1.15 ns 1.02 ns -
TryComputeHash · Keccak-256 · BouncyCastle 1KB 1,272.9 ns 7.54 ns 6.68 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 1KB 1,287.6 ns 11.45 ns 9.56 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 1025B 1,203.7 ns 1.36 ns 1.21 ns -
TryComputeHash · Keccak-256 · BouncyCastle 1025B 1,262.0 ns 4.54 ns 4.02 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 1025B 1,285.2 ns 2.39 ns 2.24 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 8KB 9,205.9 ns 8.25 ns 7.71 ns -
TryComputeHash · Keccak-256 · BouncyCastle 8KB 9,530.1 ns 24.37 ns 21.61 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 8KB 9,682.7 ns 6.04 ns 5.36 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 128KB 145,944.9 ns 167.11 ns 156.31 ns -
TryComputeHash · Keccak-256 · BouncyCastle 128KB 149,002.5 ns 327.53 ns 290.35 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 128KB 153,006.7 ns 272.88 ns 255.25 ns -

Keccak-384

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Keccak-384 · CryptoHives-Arm64 128B 302.4 ns 0.65 ns 0.58 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 128B 322.1 ns 0.44 ns 0.39 ns -
TryComputeHash · Keccak-384 · BouncyCastle 128B 322.6 ns 1.21 ns 1.07 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 137B 300.1 ns 0.32 ns 0.28 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 137B 322.0 ns 0.37 ns 0.35 ns -
TryComputeHash · Keccak-384 · BouncyCastle 137B 323.6 ns 0.79 ns 0.70 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 1KB 1,493.5 ns 1.30 ns 1.22 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 1KB 1,585.8 ns 1.21 ns 1.01 ns -
TryComputeHash · Keccak-384 · BouncyCastle 1KB 1,594.7 ns 1.72 ns 1.44 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 1025B 1,493.0 ns 0.90 ns 0.80 ns -
TryComputeHash · Keccak-384 · BouncyCastle 1025B 1,561.5 ns 6.35 ns 5.30 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 1025B 1,585.6 ns 1.46 ns 1.30 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 8KB 11,771.0 ns 10.86 ns 10.16 ns -
TryComputeHash · Keccak-384 · BouncyCastle 8KB 12,156.3 ns 115.31 ns 107.86 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 8KB 12,492.5 ns 22.46 ns 21.01 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 128KB 189,417.5 ns 154.67 ns 144.68 ns -
TryComputeHash · Keccak-384 · BouncyCastle 128KB 198,459.5 ns 1,957.03 ns 1,634.21 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 128KB 198,889.5 ns 454.06 ns 424.73 ns -

Keccak-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Keccak-512 · CryptoHives-Arm64 128B 297.9 ns 0.59 ns 0.49 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 128B 318.5 ns 0.68 ns 0.60 ns -
TryComputeHash · Keccak-512 · BouncyCastle 128B 325.3 ns 1.53 ns 1.28 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 137B 297.9 ns 0.13 ns 0.10 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 137B 318.0 ns 0.33 ns 0.29 ns -
TryComputeHash · Keccak-512 · BouncyCastle 137B 324.2 ns 1.27 ns 1.13 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 1KB 2,234.3 ns 1.68 ns 1.58 ns -
TryComputeHash · Keccak-512 · BouncyCastle 1KB 2,317.4 ns 9.92 ns 8.79 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 1KB 2,356.1 ns 2.49 ns 2.08 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 1025B 2,224.5 ns 2.06 ns 1.83 ns -
TryComputeHash · Keccak-512 · BouncyCastle 1025B 2,296.3 ns 5.14 ns 4.55 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 1025B 2,360.7 ns 3.62 ns 3.21 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 8KB 16,995.6 ns 12.61 ns 11.18 ns -
TryComputeHash · Keccak-512 · BouncyCastle 8KB 17,316.4 ns 52.71 ns 44.01 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 8KB 17,875.3 ns 23.08 ns 20.46 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 128KB 271,416.7 ns 279.45 ns 261.40 ns -
TryComputeHash · Keccak-512 · BouncyCastle 128KB 277,299.2 ns 1,550.37 ns 1,374.36 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 128KB 285,156.0 ns 235.44 ns 183.82 ns -

SHAKE Family

SHAKE128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHAKE128 · CryptoHives-Arm64 128B 161.0 ns 0.13 ns 0.12 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 128B 170.6 ns 0.11 ns 0.09 ns -
TryComputeHash · SHAKE128 · BouncyCastle 128B 179.9 ns 0.73 ns 0.65 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 137B 162.9 ns 0.21 ns 0.18 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 137B 171.2 ns 0.16 ns 0.13 ns -
TryComputeHash · SHAKE128 · BouncyCastle 137B 179.4 ns 0.67 ns 0.60 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 1KB 1,061.3 ns 0.75 ns 0.70 ns -
TryComputeHash · SHAKE128 · BouncyCastle 1KB 1,112.9 ns 1.91 ns 1.60 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 1KB 1,127.8 ns 2.15 ns 1.90 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 1025B 1,050.3 ns 1.16 ns 1.09 ns -
TryComputeHash · SHAKE128 · BouncyCastle 1025B 1,117.0 ns 3.45 ns 3.06 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 1025B 1,130.8 ns 1.59 ns 1.49 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 8KB 7,358.6 ns 4.52 ns 4.01 ns -
TryComputeHash · SHAKE128 · BouncyCastle 8KB 7,668.5 ns 22.33 ns 20.88 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 8KB 7,824.4 ns 14.62 ns 12.96 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 128KB 116,944.0 ns 112.88 ns 105.59 ns -
TryComputeHash · SHAKE128 · BouncyCastle 128KB 123,433.1 ns 821.64 ns 768.56 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 128KB 124,387.7 ns 171.74 ns 134.08 ns -

SHAKE256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHAKE256 · CryptoHives-Arm64 128B 160.9 ns 0.16 ns 0.15 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 128B 169.7 ns 0.13 ns 0.10 ns -
TryComputeHash · SHAKE256 · BouncyCastle 128B 179.4 ns 0.53 ns 0.44 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 137B 303.0 ns 0.45 ns 0.42 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 137B 327.0 ns 0.30 ns 0.25 ns -
TryComputeHash · SHAKE256 · BouncyCastle 137B 330.9 ns 6.59 ns 7.59 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 1KB 1,201.9 ns 1.13 ns 1.06 ns -
TryComputeHash · SHAKE256 · BouncyCastle 1KB 1,261.3 ns 1.15 ns 1.02 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 1KB 1,282.6 ns 1.70 ns 1.50 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 1025B 1,201.3 ns 1.24 ns 1.16 ns -
TryComputeHash · SHAKE256 · BouncyCastle 1025B 1,263.6 ns 4.36 ns 3.87 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 1025B 1,281.7 ns 0.61 ns 0.48 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 8KB 9,114.5 ns 15.16 ns 14.19 ns -
TryComputeHash · SHAKE256 · BouncyCastle 8KB 9,425.8 ns 42.59 ns 35.57 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 8KB 9,683.6 ns 6.88 ns 6.10 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 128KB 144,570.2 ns 228.87 ns 214.08 ns -
TryComputeHash · SHAKE256 · BouncyCastle 128KB 149,071.9 ns 362.25 ns 321.13 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 128KB 153,241.2 ns 289.84 ns 271.12 ns -

cSHAKE Family

cSHAKE128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 128B 160.8 ns 0.13 ns 0.12 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 128B 171.3 ns 0.18 ns 0.15 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 128B 178.9 ns 0.18 ns 0.15 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 137B 159.8 ns 0.19 ns 0.18 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 137B 170.8 ns 0.12 ns 0.10 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 137B 180.1 ns 0.29 ns 0.24 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 1KB 1,050.5 ns 0.73 ns 0.64 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 1KB 1,114.2 ns 1.12 ns 0.87 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 1KB 1,127.6 ns 1.91 ns 1.70 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 1025B 1,049.4 ns 1.03 ns 0.91 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 1025B 1,113.8 ns 2.14 ns 1.89 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 1025B 1,127.2 ns 0.60 ns 0.50 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 8KB 7,281.6 ns 3.07 ns 2.87 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 8KB 7,683.2 ns 50.45 ns 44.72 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 8KB 7,817.0 ns 10.75 ns 8.98 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 128KB 116,737.6 ns 62.56 ns 55.46 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 128KB 121,959.6 ns 403.13 ns 336.63 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 128KB 124,507.2 ns 264.15 ns 247.09 ns -

cSHAKE256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 128B 159.9 ns 0.14 ns 0.13 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 128B 169.2 ns 0.09 ns 0.08 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 128B 178.4 ns 0.59 ns 0.55 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 137B 303.6 ns 0.14 ns 0.13 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 137B 325.3 ns 0.25 ns 0.21 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 137B 326.3 ns 0.31 ns 0.24 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 1KB 1,201.7 ns 1.89 ns 1.76 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 1KB 1,265.4 ns 10.17 ns 9.51 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 1KB 1,282.1 ns 1.29 ns 1.08 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 1025B 1,200.4 ns 0.73 ns 0.65 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 1025B 1,264.1 ns 4.27 ns 3.57 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 1025B 1,285.1 ns 3.84 ns 3.20 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 8KB 9,133.9 ns 9.11 ns 8.52 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 8KB 9,550.7 ns 64.23 ns 56.94 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 8KB 9,696.8 ns 17.24 ns 16.13 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 128KB 144,639.3 ns 201.10 ns 178.27 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 128KB 152,973.3 ns 463.45 ns 433.52 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 128KB 153,066.7 ns 212.68 ns 188.54 ns -

KangarooTwelve Family

KT128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KT128 · CryptoHives-Arm64 128B 95.92 ns 0.054 ns 0.045 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 128B 99.92 ns 0.140 ns 0.131 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 137B 96.07 ns 0.063 ns 0.059 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 137B 99.96 ns 0.090 ns 0.085 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 1KB 590.09 ns 0.535 ns 0.474 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 1KB 628.41 ns 0.448 ns 0.419 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 1025B 595.09 ns 0.499 ns 0.467 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 1025B 628.46 ns 0.482 ns 0.451 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 8KB 4,451.47 ns 23.548 ns 19.663 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 8KB 4,699.61 ns 18.565 ns 17.366 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 128KB 67,605.23 ns 71.047 ns 66.458 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 128KB 71,114.71 ns 137.620 ns 128.730 ns -

KT256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KT256 · CryptoHives-Arm64 128B 96.86 ns 0.141 ns 0.132 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 128B 99.83 ns 0.102 ns 0.095 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 137B 177.54 ns 0.195 ns 0.172 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 137B 186.76 ns 0.137 ns 0.114 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 1KB 674.70 ns 0.453 ns 0.424 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 1KB 708.49 ns 0.683 ns 0.570 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 1025B 684.70 ns 0.952 ns 0.890 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 1025B 708.00 ns 0.674 ns 0.598 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 8KB 5,431.03 ns 46.721 ns 43.703 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 8KB 5,614.83 ns 14.493 ns 12.847 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 128KB 84,597.94 ns 104.983 ns 93.065 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 128KB 87,465.33 ns 114.843 ns 101.806 ns -

TurboSHAKE Family

TurboSHAKE128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 128B 93.58 ns 0.075 ns 0.070 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 128B 97.37 ns 0.063 ns 0.053 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 137B 95.53 ns 0.080 ns 0.075 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 137B 97.04 ns 0.160 ns 0.150 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 1KB 591.63 ns 0.672 ns 0.629 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 1KB 609.41 ns 1.191 ns 1.114 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 1025B 574.29 ns 0.470 ns 0.392 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 1025B 610.89 ns 0.545 ns 0.455 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 8KB 4,085.53 ns 2.557 ns 2.392 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 8KB 4,193.14 ns 10.424 ns 9.750 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 128KB 63,322.64 ns 44.705 ns 37.331 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 128KB 67,017.33 ns 63.637 ns 56.413 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 128B 95.46 ns 0.099 ns 0.092 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 128B 98.07 ns 0.052 ns 0.046 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 137B 95.60 ns 0.058 ns 0.051 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 137B 97.44 ns 0.134 ns 0.112 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 1KB 591.23 ns 0.525 ns 0.438 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 1KB 609.92 ns 1.362 ns 1.063 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 1025B 574.61 ns 0.430 ns 0.381 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 1025B 611.61 ns 0.670 ns 0.627 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 8KB 4,084.25 ns 3.358 ns 2.977 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 8KB 4,183.97 ns 3.384 ns 2.642 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 128KB 63,181.73 ns 62.585 ns 52.261 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 128KB 66,886.43 ns 60.330 ns 53.481 ns -

TurboSHAKE256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 128B 92.90 ns 0.095 ns 0.089 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 128B 95.34 ns 0.097 ns 0.086 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 137B 166.86 ns 0.103 ns 0.092 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 137B 179.11 ns 0.808 ns 0.756 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 1KB 662.53 ns 0.746 ns 0.698 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 1KB 691.02 ns 0.468 ns 0.390 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 1025B 657.67 ns 0.858 ns 0.802 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 1025B 691.22 ns 1.210 ns 1.132 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 8KB 4,986.28 ns 2.533 ns 2.369 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 8KB 5,174.66 ns 7.651 ns 7.156 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 128KB 78,902.81 ns 170.378 ns 159.372 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 128KB 81,762.96 ns 168.762 ns 157.860 ns -

BLAKE2 Family

BouncyCastle leads the BLAKE2 benchmarks on Apple M4 — its JIT-compiled implementation is ~2× faster than the CryptoHives NEON path at 128 KiB. The CryptoHives NEON variant uses Vector128<ulong> G-function mixing with AdvSimd rotate-and-shift sequences, providing ~1.75× speedup over the scalar Managed path. The Konscious reference library is the slowest across most sizes and allocates heavily (~130 KB per 128 KiB hash call).

Key observations:

  • BouncyCastle: ~2× faster than Neon at 128 KiB; ~56% faster at 128 B
  • Neon: ~1.75× faster than Managed scalar at 128 KiB; zero allocation
  • Managed: Scalar fallback for non-SIMD platforms; zero allocation
  • Konscious: Allocates ~130 KB per 128 KiB call; slowest option

BLAKE2b-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2b-256 · Blake2Fast 128B 90.78 ns 0.144 ns 0.127 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 128B 96.62 ns 0.036 ns 0.030 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 128B 126.64 ns 0.381 ns 0.318 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 128B 176.86 ns 1.874 ns 1.753 ns -
TryComputeHash · BLAKE2b-256 · Konscious 128B 596.85 ns 1.770 ns 1.655 ns 1120 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 137B 169.41 ns 0.077 ns 0.072 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 137B 187.84 ns 0.069 ns 0.061 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 137B 231.65 ns 0.200 ns 0.187 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 137B 358.84 ns 3.634 ns 3.400 ns -
TryComputeHash · BLAKE2b-256 · Konscious 137B 1,106.53 ns 5.260 ns 4.920 ns 1136 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 1KB 652.69 ns 0.420 ns 0.372 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 1KB 740.11 ns 0.509 ns 0.476 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 1KB 871.04 ns 0.450 ns 0.399 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 1KB 1,482.17 ns 4.027 ns 3.767 ns -
TryComputeHash · BLAKE2b-256 · Konscious 1KB 3,812.72 ns 14.799 ns 13.843 ns 2016 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 1025B 733.22 ns 0.218 ns 0.204 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 1025B 833.15 ns 0.484 ns 0.452 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 1025B 975.35 ns 0.634 ns 0.593 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 1025B 1,669.58 ns 4.914 ns 4.356 ns -
TryComputeHash · BLAKE2b-256 · Konscious 1025B 4,330.46 ns 12.396 ns 11.595 ns 2024 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 8KB 5,166.35 ns 1.854 ns 1.643 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 8KB 5,899.13 ns 4.945 ns 4.626 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 8KB 6,800.68 ns 1.037 ns 0.970 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 8KB 11,948.40 ns 4.705 ns 4.401 ns -
TryComputeHash · BLAKE2b-256 · Konscious 8KB 29,477.76 ns 58.843 ns 55.042 ns 9184 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 128KB 82,555.48 ns 72.544 ns 60.578 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 128KB 94,428.75 ns 88.644 ns 82.918 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 128KB 108,437.98 ns 41.123 ns 38.467 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 128KB 191,429.31 ns 22.075 ns 17.234 ns -
TryComputeHash · BLAKE2b-256 · Konscious 128KB 476,149.05 ns 1,068.858 ns 999.810 ns 132092 B

BLAKE2b-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2b-512 · Blake2Fast 128B 91.55 ns 0.136 ns 0.127 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 128B 97.15 ns 0.038 ns 0.036 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 128B 128.82 ns 0.110 ns 0.103 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 128B 175.27 ns 3.424 ns 3.664 ns -
TryComputeHash · BLAKE2b-512 · Konscious 128B 614.05 ns 2.702 ns 2.528 ns 1216 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 137B 169.85 ns 0.071 ns 0.067 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 137B 187.67 ns 0.245 ns 0.229 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 137B 234.57 ns 0.152 ns 0.142 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 137B 358.89 ns 3.879 ns 3.628 ns -
TryComputeHash · BLAKE2b-512 · Konscious 137B 1,126.33 ns 2.826 ns 2.643 ns 1232 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 1KB 652.77 ns 0.201 ns 0.188 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 1KB 740.97 ns 0.429 ns 0.401 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 1KB 873.42 ns 0.208 ns 0.174 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 1KB 1,482.93 ns 3.797 ns 3.552 ns -
TryComputeHash · BLAKE2b-512 · Konscious 1KB 3,831.08 ns 17.872 ns 15.843 ns 2112 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 1025B 734.23 ns 0.235 ns 0.220 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 1025B 833.92 ns 0.745 ns 0.697 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 1025B 977.37 ns 0.891 ns 0.790 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 1025B 1,669.00 ns 4.344 ns 4.064 ns -
TryComputeHash · BLAKE2b-512 · Konscious 1025B 4,347.14 ns 13.297 ns 12.438 ns 2120 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 8KB 5,165.34 ns 2.845 ns 2.661 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 8KB 5,900.89 ns 4.463 ns 4.175 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 8KB 6,801.33 ns 3.801 ns 3.369 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 8KB 11,947.03 ns 3.470 ns 3.246 ns -
TryComputeHash · BLAKE2b-512 · Konscious 8KB 29,425.38 ns 68.039 ns 63.644 ns 9280 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 128KB 82,507.34 ns 45.378 ns 40.226 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 128KB 94,388.40 ns 62.834 ns 58.775 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 128KB 108,425.24 ns 80.851 ns 75.628 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 128KB 191,983.55 ns 32.314 ns 28.646 ns -
TryComputeHash · BLAKE2b-512 · Konscious 128KB 477,355.95 ns 1,189.806 ns 1,054.732 ns 132188 B

BLAKE2s-128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2s-128 · Blake2Fast 128B 141.2 ns 0.09 ns 0.08 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 128B 157.0 ns 0.09 ns 0.08 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 128B 196.4 ns 0.10 ns 0.10 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 128B 385.5 ns 5.26 ns 4.92 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 137B 209.8 ns 0.19 ns 0.18 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 137B 234.1 ns 0.34 ns 0.32 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 137B 284.9 ns 0.27 ns 0.25 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 137B 589.2 ns 5.74 ns 5.37 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 1KB 1,090.5 ns 1.27 ns 1.19 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 1KB 1,238.7 ns 4.91 ns 4.59 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 1KB 1,450.5 ns 1.06 ns 0.94 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 1KB 3,225.1 ns 7.11 ns 6.65 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 1025B 1,158.1 ns 1.06 ns 0.99 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 1025B 1,315.1 ns 4.04 ns 3.78 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 1025B 1,541.1 ns 1.51 ns 1.41 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 1025B 3,428.7 ns 6.77 ns 6.33 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 8KB 8,651.1 ns 7.63 ns 7.14 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 8KB 9,869.8 ns 28.20 ns 26.37 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 8KB 11,489.6 ns 10.28 ns 9.62 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 8KB 25,901.9 ns 9.05 ns 7.56 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 128KB 138,039.7 ns 206.60 ns 193.25 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 128KB 158,131.6 ns 432.87 ns 404.90 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 128KB 183,245.7 ns 173.48 ns 162.27 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 128KB 414,679.2 ns 74.05 ns 61.83 ns -

BLAKE2s-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2s-256 · Blake2Fast 128B 141.8 ns 0.06 ns 0.06 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 128B 157.0 ns 0.60 ns 0.56 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 128B 197.6 ns 0.34 ns 0.32 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 128B 387.8 ns 4.52 ns 4.23 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 137B 209.8 ns 0.09 ns 0.08 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 137B 233.8 ns 0.27 ns 0.25 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 137B 286.4 ns 0.44 ns 0.41 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 137B 594.6 ns 6.43 ns 6.01 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 1KB 1,091.5 ns 0.63 ns 0.56 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 1KB 1,237.5 ns 3.10 ns 2.90 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 1KB 1,456.0 ns 2.12 ns 1.98 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 1KB 3,222.4 ns 7.72 ns 7.22 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 1025B 1,158.8 ns 0.80 ns 0.67 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 1025B 1,315.9 ns 3.90 ns 3.46 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 1025B 1,542.7 ns 2.05 ns 1.82 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 1025B 3,425.8 ns 7.00 ns 6.54 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 8KB 8,649.4 ns 10.81 ns 10.11 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 8KB 9,867.2 ns 32.02 ns 29.95 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 8KB 11,468.2 ns 12.07 ns 11.29 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 8KB 25,900.4 ns 5.30 ns 4.13 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 128KB 138,001.5 ns 77.88 ns 65.03 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 128KB 157,959.0 ns 494.26 ns 462.33 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 128KB 183,363.1 ns 288.99 ns 270.32 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 128KB 414,645.1 ns 46.38 ns 38.73 ns -

BLAKE3

BLAKE3 is a modern hash function designed for extreme parallelism. At 128 KiB, the Native (Rust) variant via blake3-dotnet is ~5.4× faster than BouncyCastle and ~2.6× faster than the NEON path (52.6 μs vs 283 μs). The gap is smaller than on x86 (where the Rust build uses AVX-512 hash_many for ~12× advantage) because the ARM Rust build uses a single-threaded NEON path comparable in architecture to the CryptoHives Neon path — the key difference is that the Rust build also enables tree-hash parallelism via NEON-based chunk merging at 128 KiB, while the CryptoHives implementation processes chunks sequentially.

The CryptoHives Neon path uses Vector128<uint> for the BLAKE3 compression function, yielding ~2.6× speedup over BouncyCastle at 128 KiB (283 μs vs 729 μs). The scalar Managed path is ~1.4× faster than BouncyCastle at 128 B and ~1.3× at 128 KiB.

⚠️ Note: The macOS benchmarks in this run were produced before the Reset(bool) allocation fix landed. The Neon and Scalar rows currently report 24 B allocated per call. This is a known stale artifact — the fix is confirmed zero-allocation on Windows. These benchmarks will be updated after the next macOS run.

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE3 · Blake3Native 128B 100.9 ns 0.03 ns 0.03 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 128B 243.5 ns 0.05 ns 0.04 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 128B 525.3 ns 0.62 ns 0.55 ns -
TryComputeHash · BLAKE3 · BouncyCastle 128B 728.8 ns 1.45 ns 1.28 ns -
TryComputeHash · BLAKE3 · Blake3Native 137B 147.3 ns 0.06 ns 0.05 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 137B 366.4 ns 0.06 ns 0.05 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 137B 775.9 ns 3.23 ns 3.03 ns -
TryComputeHash · BLAKE3 · BouncyCastle 137B 1,076.8 ns 4.59 ns 4.29 ns -
TryComputeHash · BLAKE3 · Blake3Native 1KB 774.2 ns 0.36 ns 0.30 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 1KB 1,962.8 ns 0.56 ns 0.47 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 1KB 3,989.8 ns 25.63 ns 22.72 ns -
TryComputeHash · BLAKE3 · BouncyCastle 1KB 5,386.2 ns 11.73 ns 10.40 ns -
TryComputeHash · BLAKE3 · Blake3Native 1025B 883.2 ns 0.43 ns 0.38 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 1025B 2,202.6 ns 0.21 ns 0.17 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 1025B 4,624.9 ns 26.72 ns 24.99 ns -
TryComputeHash · BLAKE3 · BouncyCastle 1025B 6,134.7 ns 17.03 ns 15.93 ns 56 B
TryComputeHash · BLAKE3 · Blake3Native 8KB 3,358.2 ns 9.70 ns 9.08 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 8KB 17,274.7 ns 12.04 ns 11.26 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 8KB 34,620.2 ns 153.81 ns 143.87 ns -
TryComputeHash · BLAKE3 · BouncyCastle 8KB 45,280.7 ns 145.44 ns 136.05 ns 392 B
TryComputeHash · BLAKE3 · Blake3Native 128KB 52,975.0 ns 210.08 ns 196.50 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 128KB 282,003.9 ns 15.34 ns 13.60 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 128KB 559,868.7 ns 2,537.33 ns 2,373.42 ns -
TryComputeHash · BLAKE3 · BouncyCastle 128KB 727,077.2 ns 2,156.76 ns 2,017.43 ns 7112 B

Ascon Family

Ascon is a lightweight NIST standard (2023) designed for constrained environments. The CryptoHives managed implementation is ~42% faster than BouncyCastle at all input sizes (128 B through 128 KiB) — a stronger margin than on x86 Windows (~33%). This appears to be due to Apple M4's efficient branch prediction and low-latency ALU pipeline fitting Ascon's simple 5-word permutation structure very well.

Ascon-Hash256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 128B 654.7 ns 2.34 ns 2.19 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 128B 909.9 ns 0.27 ns 0.25 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 137B 682.6 ns 2.65 ns 2.48 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 137B 949.3 ns 0.14 ns 0.13 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 1KB 4,348.6 ns 19.48 ns 18.22 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 1KB 5,970.7 ns 3.96 ns 3.09 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 1025B 4,345.6 ns 25.07 ns 23.45 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 1025B 6,015.3 ns 2.41 ns 2.25 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 8KB 33,914.3 ns 160.27 ns 149.92 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 8KB 46,821.7 ns 18.47 ns 16.38 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 128KB 532,547.7 ns 3,634.23 ns 3,399.46 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 128KB 745,755.8 ns 320.98 ns 300.24 ns -

Ascon-XOF128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 128B 644.2 ns 2.67 ns 2.37 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 128B 907.8 ns 0.47 ns 0.41 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 137B 676.6 ns 2.95 ns 2.76 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 137B 955.9 ns 0.42 ns 0.39 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 1KB 4,282.0 ns 20.18 ns 18.88 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 1KB 5,969.5 ns 4.23 ns 3.95 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 1025B 4,282.4 ns 21.73 ns 19.26 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 1025B 5,982.0 ns 2.28 ns 2.14 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 8KB 33,402.3 ns 203.90 ns 190.73 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 8KB 46,478.2 ns 28.53 ns 26.69 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 128KB 531,503.5 ns 1,485.71 ns 1,389.74 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 128KB 737,834.9 ns 305.61 ns 285.86 ns -

KMAC Family

KMAC (NIST SP 800-185) is a Keccak-based keyed hash function. On Apple M4, the Managed CryptoHives implementation is ~1.9× faster than BouncyCastle at 128 B and leads up to ~1 KiB. At larger sizes (128 KiB), the gap narrows to near parity (~BouncyCastle 1.7% faster). This differs from x86 where Managed leads at all sizes. The convergence at bulk sizes reflects the Keccak permutation throughput being similar after the per-call overhead is amortized.

KMAC128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KMAC-128 · CryptoHives-Scalar 128B 485.2 ns 0.59 ns 0.55 ns -
TryComputeHash · KMAC-128 · BouncyCastle 128B 1,060.1 ns 4.81 ns 4.50 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 137B 483.6 ns 0.51 ns 0.43 ns -
TryComputeHash · KMAC-128 · BouncyCastle 137B 1,071.9 ns 3.54 ns 3.31 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 1KB 1,385.9 ns 1.64 ns 1.53 ns -
TryComputeHash · KMAC-128 · BouncyCastle 1KB 1,994.4 ns 4.49 ns 4.20 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 1025B 1,372.6 ns 0.54 ns 0.50 ns -
TryComputeHash · KMAC-128 · BouncyCastle 1025B 2,057.4 ns 11.63 ns 10.88 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 8KB 7,678.9 ns 3.77 ns 3.34 ns -
TryComputeHash · KMAC-128 · BouncyCastle 8KB 8,551.5 ns 30.06 ns 26.65 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 128KB 116,595.4 ns 84.89 ns 75.26 ns -
TryComputeHash · KMAC-128 · BouncyCastle 128KB 126,294.7 ns 997.15 ns 932.74 ns 256 B

KMAC256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KMAC-256 · CryptoHives-Scalar 128B 479.9 ns 0.83 ns 0.78 ns -
TryComputeHash · KMAC-256 · BouncyCastle 128B 1,034.3 ns 3.09 ns 2.89 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 137B 628.7 ns 0.72 ns 0.63 ns -
TryComputeHash · KMAC-256 · BouncyCastle 137B 1,184.3 ns 3.03 ns 2.83 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 1KB 1,523.0 ns 1.40 ns 1.24 ns -
TryComputeHash · KMAC-256 · BouncyCastle 1KB 2,122.0 ns 9.40 ns 7.85 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 1025B 1,524.3 ns 3.56 ns 2.98 ns -
TryComputeHash · KMAC-256 · BouncyCastle 1025B 2,122.2 ns 7.18 ns 6.71 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 8KB 9,427.9 ns 15.72 ns 13.13 ns -
TryComputeHash · KMAC-256 · BouncyCastle 8KB 10,293.9 ns 40.63 ns 33.92 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 128KB 144,662.7 ns 212.98 ns 199.22 ns -
TryComputeHash · KMAC-256 · BouncyCastle 128KB 153,577.0 ns 574.49 ns 537.38 ns 256 B

Legacy Algorithms

MD5 and SHA-1 are provided exclusively for backward compatibility with legacy protocols and file formats. Both algorithms have known cryptographic weaknesses:

  • MD5: Vulnerable to collision attacks since 2004; should not be used for security
  • SHA-1: Collision attacks demonstrated in 2017 (SHAttered); deprecated by NIST

On Apple M4, BouncyCastle leads MD5 at small sizes (~20% faster than OS at 128 B). For SHA-1, OS leads clearly (~45% faster than BouncyCastle and Managed at 128 B). The OS CommonCrypto benefits from Apple's hardware AES-based SHA-1 acceleration.

MD5

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · MD5 · BouncyCastle 128B 337.6 ns 0.87 ns 0.81 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 128B 363.7 ns 0.39 ns 0.36 ns -
TryComputeHash · MD5 · OS Native 128B 420.1 ns 0.74 ns 0.65 ns -
TryComputeHash · MD5 · BouncyCastle 137B 337.5 ns 0.88 ns 0.82 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 137B 363.1 ns 0.85 ns 0.80 ns -
TryComputeHash · MD5 · OS Native 137B 406.5 ns 3.20 ns 2.99 ns -
TryComputeHash · MD5 · OS Native 1KB 1,423.6 ns 4.52 ns 4.23 ns -
TryComputeHash · MD5 · BouncyCastle 1KB 1,894.2 ns 6.36 ns 5.95 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 1KB 2,101.7 ns 9.52 ns 8.90 ns -
TryComputeHash · MD5 · OS Native 1025B 1,420.0 ns 6.87 ns 6.43 ns -
TryComputeHash · MD5 · BouncyCastle 1025B 1,899.5 ns 11.99 ns 11.22 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 1025B 2,115.8 ns 29.74 ns 24.84 ns -
TryComputeHash · MD5 · OS Native 8KB 9,414.2 ns 43.88 ns 41.04 ns -
TryComputeHash · MD5 · BouncyCastle 8KB 14,340.0 ns 29.13 ns 25.83 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 8KB 16,019.7 ns 83.02 ns 77.66 ns -
TryComputeHash · MD5 · OS Native 128KB 146,074.5 ns 632.20 ns 591.36 ns -
TryComputeHash · MD5 · BouncyCastle 128KB 227,696.3 ns 925.76 ns 865.96 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 128KB 253,979.9 ns 1,081.91 ns 1,012.01 ns -

SHA-1

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-1 · OS Native 128B 270.6 ns 2.42 ns 2.26 ns -
TryComputeHash · SHA-1 · BouncyCastle 128B 482.5 ns 0.88 ns 0.82 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 128B 530.8 ns 5.38 ns 4.77 ns -
TryComputeHash · SHA-1 · OS Native 137B 253.9 ns 2.39 ns 2.23 ns -
TryComputeHash · SHA-1 · BouncyCastle 137B 484.0 ns 0.55 ns 0.51 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 137B 523.4 ns 0.66 ns 0.61 ns -
TryComputeHash · SHA-1 · OS Native 1KB 523.5 ns 0.91 ns 0.80 ns -
TryComputeHash · SHA-1 · BouncyCastle 1KB 2,699.4 ns 1.80 ns 1.59 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 1KB 2,855.5 ns 9.05 ns 7.56 ns -
TryComputeHash · SHA-1 · OS Native 1025B 525.4 ns 0.95 ns 0.89 ns -
TryComputeHash · SHA-1 · BouncyCastle 1025B 2,705.6 ns 1.16 ns 1.09 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 1025B 2,876.2 ns 30.36 ns 28.40 ns -
TryComputeHash · SHA-1 · OS Native 8KB 2,630.2 ns 0.68 ns 0.57 ns -
TryComputeHash · SHA-1 · BouncyCastle 8KB 20,419.2 ns 7.57 ns 7.08 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 8KB 21,468.3 ns 57.29 ns 50.79 ns -
TryComputeHash · SHA-1 · OS Native 128KB 38,756.5 ns 4.10 ns 3.63 ns -
TryComputeHash · SHA-1 · BouncyCastle 128KB 324,766.7 ns 182.96 ns 171.14 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 128KB 339,798.6 ns 878.04 ns 778.36 ns -