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.201
[Host]    : .NET 10.0.5 (10.0.5, 10.0.526.15411), Arm64 RyuJIT armv8.0-a
.NET 10.0 : .NET 10.0.5 (10.0.5, 10.0.526.15411), 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 182.0 ns 3.32 ns 3.11 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 128B 481.3 ns 9.57 ns 8.95 ns -
TryComputeHash · SHA-224 · BouncyCastle 128B 612.6 ns 11.57 ns 11.88 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 137B 181.6 ns 0.67 ns 0.53 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 137B 473.1 ns 2.16 ns 1.68 ns -
TryComputeHash · SHA-224 · BouncyCastle 137B 616.1 ns 11.31 ns 10.03 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 1KB 476.9 ns 3.73 ns 3.49 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 1KB 2,722.2 ns 52.67 ns 56.36 ns -
TryComputeHash · SHA-224 · BouncyCastle 1KB 3,495.2 ns 66.54 ns 62.24 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 1025B 479.2 ns 2.88 ns 2.55 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 1025B 2,732.3 ns 50.08 ns 46.84 ns -
TryComputeHash · SHA-224 · BouncyCastle 1025B 3,508.5 ns 68.79 ns 67.56 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 8KB 2,908.4 ns 34.71 ns 30.77 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 8KB 20,743.0 ns 332.51 ns 294.76 ns -
TryComputeHash · SHA-224 · BouncyCastle 8KB 26,776.2 ns 464.77 ns 477.28 ns -
TryComputeHash · SHA-224 · SHA-224 (ArmSha256) 128KB 44,672.2 ns 669.29 ns 593.30 ns -
TryComputeHash · SHA-224 · CryptoHives-Scalar 128KB 321,087.9 ns 1,005.54 ns 839.67 ns -
TryComputeHash · SHA-224 · BouncyCastle 128KB 425,620.0 ns 5,750.59 ns 4,802.01 ns -

SHA-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-256 · OS Native 128B 83.49 ns 0.815 ns 0.680 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 128B 181.74 ns 2.683 ns 2.510 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 128B 472.94 ns 1.302 ns 1.154 ns -
TryComputeHash · SHA-256 · BouncyCastle 128B 590.38 ns 11.698 ns 18.554 ns -
TryComputeHash · SHA-256 · OS Native 137B 75.47 ns 0.443 ns 0.346 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 137B 181.95 ns 0.309 ns 0.241 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 137B 472.85 ns 1.490 ns 1.163 ns -
TryComputeHash · SHA-256 · BouncyCastle 137B 607.19 ns 12.006 ns 16.435 ns -
TryComputeHash · SHA-256 · OS Native 1KB 343.21 ns 2.430 ns 1.897 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 1KB 481.20 ns 5.477 ns 4.855 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 1KB 2,659.61 ns 12.411 ns 9.690 ns -
TryComputeHash · SHA-256 · BouncyCastle 1KB 3,353.56 ns 66.645 ns 74.075 ns -
TryComputeHash · SHA-256 · OS Native 1025B 341.99 ns 3.480 ns 2.717 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 1025B 479.30 ns 2.723 ns 2.274 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 1025B 2,668.47 ns 10.102 ns 8.436 ns -
TryComputeHash · SHA-256 · BouncyCastle 1025B 3,401.25 ns 67.877 ns 83.359 ns -
TryComputeHash · SHA-256 · OS Native 8KB 2,468.39 ns 28.814 ns 24.061 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 8KB 2,864.54 ns 8.435 ns 7.043 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 8KB 20,343.35 ns 314.208 ns 278.538 ns -
TryComputeHash · SHA-256 · BouncyCastle 8KB 25,781.05 ns 506.504 ns 676.168 ns -
TryComputeHash · SHA-256 · OS Native 128KB 39,223.08 ns 638.116 ns 565.674 ns -
TryComputeHash · SHA-256 · SHA-256 (ArmSha256) 128KB 43,949.58 ns 37.849 ns 29.550 ns -
TryComputeHash · SHA-256 · CryptoHives-Scalar 128KB 320,930.59 ns 1,156.055 ns 902.572 ns -
TryComputeHash · SHA-256 · BouncyCastle 128KB 421,281.36 ns 4,150.063 ns 3,240.096 ns -

SHA-384

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-384 · OS Native 128B 162.1 ns 1.99 ns 1.86 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 128B 398.3 ns 2.74 ns 2.29 ns -
TryComputeHash · SHA-384 · BouncyCastle 128B 560.2 ns 6.70 ns 5.23 ns -
TryComputeHash · SHA-384 · OS Native 137B 157.1 ns 1.08 ns 0.96 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 137B 397.7 ns 2.68 ns 2.10 ns -
TryComputeHash · SHA-384 · BouncyCastle 137B 555.0 ns 11.10 ns 10.39 ns -
TryComputeHash · SHA-384 · OS Native 1KB 611.5 ns 4.57 ns 3.82 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 1KB 1,775.2 ns 10.36 ns 8.65 ns -
TryComputeHash · SHA-384 · BouncyCastle 1KB 2,414.8 ns 47.36 ns 61.58 ns -
TryComputeHash · SHA-384 · OS Native 1025B 611.0 ns 4.10 ns 3.42 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 1025B 1,774.8 ns 7.21 ns 5.63 ns -
TryComputeHash · SHA-384 · BouncyCastle 1025B 2,435.1 ns 36.90 ns 34.51 ns -
TryComputeHash · SHA-384 · OS Native 8KB 4,280.1 ns 1.80 ns 1.50 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 8KB 12,920.6 ns 163.86 ns 145.26 ns -
TryComputeHash · SHA-384 · BouncyCastle 8KB 17,365.2 ns 343.94 ns 504.15 ns -
TryComputeHash · SHA-384 · OS Native 128KB 68,024.1 ns 843.11 ns 788.65 ns -
TryComputeHash · SHA-384 · CryptoHives-Scalar 128KB 203,362.9 ns 3,281.31 ns 2,908.80 ns -
TryComputeHash · SHA-384 · BouncyCastle 128KB 274,758.5 ns 5,471.45 ns 8,835.37 ns -

SHA-512

Description TestDataSize Mean Error StdDev Median Allocated
TryComputeHash · SHA-512 · OS Native 128B 152.7 ns 0.67 ns 0.60 ns 152.6 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 128B 397.2 ns 0.58 ns 0.51 ns 397.3 ns -
TryComputeHash · SHA-512 · BouncyCastle 128B 549.0 ns 10.86 ns 13.34 ns 557.5 ns -
TryComputeHash · SHA-512 · OS Native 137B 151.8 ns 0.80 ns 0.75 ns 151.8 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 137B 396.9 ns 0.92 ns 0.81 ns 397.1 ns -
TryComputeHash · SHA-512 · BouncyCastle 137B 555.7 ns 7.60 ns 7.11 ns 560.3 ns -
TryComputeHash · SHA-512 · OS Native 1KB 606.6 ns 0.24 ns 0.20 ns 606.6 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 1KB 1,774.6 ns 2.38 ns 1.99 ns 1,775.1 ns -
TryComputeHash · SHA-512 · BouncyCastle 1KB 2,418.8 ns 47.72 ns 56.81 ns 2,451.8 ns -
TryComputeHash · SHA-512 · OS Native 1025B 606.4 ns 0.32 ns 0.30 ns 606.4 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 1025B 1,773.8 ns 4.12 ns 3.65 ns 1,775.6 ns -
TryComputeHash · SHA-512 · BouncyCastle 1025B 2,427.0 ns 44.11 ns 39.11 ns 2,448.6 ns -
TryComputeHash · SHA-512 · OS Native 8KB 4,279.8 ns 1.73 ns 1.61 ns 4,279.9 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 8KB 12,931.7 ns 245.50 ns 252.11 ns 12,796.0 ns -
TryComputeHash · SHA-512 · BouncyCastle 8KB 17,404.2 ns 339.35 ns 348.48 ns 17,608.6 ns -
TryComputeHash · SHA-512 · OS Native 128KB 67,698.6 ns 689.31 ns 575.61 ns 67,401.7 ns -
TryComputeHash · SHA-512 · CryptoHives-Scalar 128KB 201,764.8 ns 781.71 ns 652.76 ns 201,812.4 ns -
TryComputeHash · SHA-512 · BouncyCastle 128KB 272,363.1 ns 5,428.22 ns 7,609.61 ns 276,010.0 ns -

SHA-512/224

Description TestDataSize Mean Error StdDev Median Allocated
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 128B 396.0 ns 0.68 ns 0.53 ns 396.3 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 128B 563.7 ns 10.97 ns 12.19 ns 566.9 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 137B 405.6 ns 8.00 ns 8.21 ns 401.0 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 137B 573.6 ns 8.16 ns 7.63 ns 572.6 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 1KB 1,799.4 ns 35.41 ns 36.36 ns 1,775.9 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 1KB 2,430.3 ns 47.97 ns 67.24 ns 2,465.6 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 1025B 1,770.0 ns 5.89 ns 4.92 ns 1,771.8 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 1025B 2,425.6 ns 47.09 ns 57.83 ns 2,461.1 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 8KB 12,802.2 ns 10.13 ns 7.91 ns 12,805.1 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 8KB 17,524.1 ns 307.39 ns 287.54 ns 17,667.5 ns -
TryComputeHash · SHA-512/224 · CryptoHives-Scalar 128KB 201,707.7 ns 311.13 ns 242.91 ns 201,747.5 ns -
TryComputeHash · SHA-512/224 · BouncyCastle 128KB 275,718.9 ns 5,289.19 ns 5,659.37 ns 278,516.3 ns -

SHA-512/256

Description TestDataSize Mean Error StdDev Median Allocated
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 128B 399.0 ns 6.02 ns 5.03 ns 397.1 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 128B 560.3 ns 11.09 ns 13.20 ns 563.7 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 137B 397.1 ns 1.21 ns 1.07 ns 397.8 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 137B 562.8 ns 11.19 ns 12.88 ns 570.3 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 1KB 1,794.4 ns 30.11 ns 28.17 ns 1,773.4 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 1KB 2,452.0 ns 47.13 ns 48.40 ns 2,470.1 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 1025B 1,777.0 ns 3.19 ns 2.66 ns 1,777.9 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 1025B 2,395.6 ns 47.66 ns 60.27 ns 2,406.9 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 8KB 12,785.1 ns 10.37 ns 8.09 ns 12,783.6 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 8KB 17,232.7 ns 336.34 ns 533.47 ns 17,555.3 ns -
TryComputeHash · SHA-512/256 · CryptoHives-Scalar 128KB 201,387.8 ns 458.99 ns 406.88 ns 201,549.1 ns -
TryComputeHash · SHA-512/256 · BouncyCastle 128KB 274,858.7 ns 5,290.38 ns 6,878.99 ns 278,414.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 157.8 ns 0.19 ns 0.18 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 128B 167.7 ns 0.21 ns 0.18 ns -
TryComputeHash · SHA3-224 · BouncyCastle 128B 178.9 ns 0.73 ns 0.61 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 137B 157.7 ns 0.45 ns 0.40 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 137B 167.6 ns 1.27 ns 1.06 ns -
TryComputeHash · SHA3-224 · BouncyCastle 137B 178.7 ns 0.25 ns 0.20 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 1KB 1,213.2 ns 1.94 ns 1.51 ns -
TryComputeHash · SHA3-224 · BouncyCastle 1KB 1,274.6 ns 7.62 ns 7.13 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 1KB 1,293.3 ns 1.70 ns 1.42 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 1025B 1,211.4 ns 3.81 ns 3.38 ns -
TryComputeHash · SHA3-224 · BouncyCastle 1025B 1,272.0 ns 3.98 ns 3.73 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 1025B 1,292.2 ns 4.57 ns 3.81 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 8KB 8,563.2 ns 14.18 ns 13.26 ns -
TryComputeHash · SHA3-224 · BouncyCastle 8KB 9,072.8 ns 8.63 ns 6.74 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 8KB 9,120.8 ns 37.42 ns 35.01 ns -
TryComputeHash · SHA3-224 · CryptoHives-Arm64 128KB 136,885.6 ns 332.11 ns 294.41 ns -
TryComputeHash · SHA3-224 · BouncyCastle 128KB 142,734.5 ns 1,287.69 ns 1,204.51 ns -
TryComputeHash · SHA3-224 · CryptoHives-Scalar 128KB 146,222.5 ns 351.63 ns 328.92 ns -

SHA3-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-256 · CryptoHives-Arm64 128B 157.3 ns 0.11 ns 0.10 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 128B 167.4 ns 0.19 ns 0.17 ns -
TryComputeHash · SHA3-256 · BouncyCastle 128B 178.6 ns 0.57 ns 0.53 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 137B 304.5 ns 0.64 ns 0.60 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 137B 324.5 ns 0.17 ns 0.15 ns -
TryComputeHash · SHA3-256 · BouncyCastle 137B 329.1 ns 0.20 ns 0.15 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 1KB 1,224.1 ns 2.01 ns 1.78 ns -
TryComputeHash · SHA3-256 · BouncyCastle 1KB 1,271.9 ns 4.65 ns 4.12 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 1KB 1,286.0 ns 1.96 ns 1.64 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 1025B 1,225.7 ns 1.80 ns 1.50 ns -
TryComputeHash · SHA3-256 · BouncyCastle 1025B 1,272.6 ns 2.98 ns 2.65 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 1025B 1,286.7 ns 3.64 ns 3.41 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 8KB 9,293.1 ns 11.72 ns 10.96 ns -
TryComputeHash · SHA3-256 · BouncyCastle 8KB 9,493.1 ns 19.27 ns 16.09 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 8KB 9,729.3 ns 29.39 ns 27.49 ns -
TryComputeHash · SHA3-256 · CryptoHives-Arm64 128KB 146,939.1 ns 169.90 ns 150.61 ns -
TryComputeHash · SHA3-256 · BouncyCastle 128KB 150,547.7 ns 964.49 ns 855.00 ns -
TryComputeHash · SHA3-256 · CryptoHives-Scalar 128KB 154,209.1 ns 210.44 ns 186.55 ns -

SHA3-384

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-384 · CryptoHives-Arm64 128B 303.3 ns 0.27 ns 0.25 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 128B 321.2 ns 0.34 ns 0.30 ns -
TryComputeHash · SHA3-384 · BouncyCastle 128B 326.5 ns 0.60 ns 0.50 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 137B 303.4 ns 0.70 ns 0.62 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 137B 321.8 ns 0.34 ns 0.32 ns -
TryComputeHash · SHA3-384 · BouncyCastle 137B 327.7 ns 1.06 ns 0.99 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 1KB 1,532.9 ns 1.04 ns 0.97 ns -
TryComputeHash · SHA3-384 · BouncyCastle 1KB 1,569.7 ns 7.00 ns 6.21 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 1KB 1,597.7 ns 1.64 ns 1.37 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 1025B 1,524.1 ns 2.66 ns 2.36 ns -
TryComputeHash · SHA3-384 · BouncyCastle 1025B 1,571.5 ns 6.69 ns 5.93 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 1025B 1,597.9 ns 2.79 ns 2.61 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 8KB 11,983.8 ns 66.25 ns 58.73 ns -
TryComputeHash · SHA3-384 · BouncyCastle 8KB 12,096.0 ns 53.81 ns 50.34 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 8KB 12,514.0 ns 56.46 ns 52.81 ns -
TryComputeHash · SHA3-384 · CryptoHives-Arm64 128KB 190,722.7 ns 122.61 ns 102.38 ns -
TryComputeHash · SHA3-384 · BouncyCastle 128KB 197,501.0 ns 2,827.13 ns 2,506.18 ns -
TryComputeHash · SHA3-384 · CryptoHives-Scalar 128KB 200,429.5 ns 654.87 ns 546.85 ns -

SHA3-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA3-512 · CryptoHives-Arm64 128B 304.9 ns 0.32 ns 0.28 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 128B 321.4 ns 1.00 ns 0.78 ns -
TryComputeHash · SHA3-512 · BouncyCastle 128B 331.9 ns 3.85 ns 3.60 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 137B 306.7 ns 3.94 ns 3.50 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 137B 320.9 ns 0.62 ns 0.55 ns -
TryComputeHash · SHA3-512 · BouncyCastle 137B 331.0 ns 3.34 ns 3.13 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 1KB 2,302.5 ns 33.31 ns 31.15 ns -
TryComputeHash · SHA3-512 · BouncyCastle 1KB 2,336.8 ns 26.80 ns 25.07 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 1KB 2,370.5 ns 6.91 ns 5.39 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 1025B 2,276.4 ns 10.08 ns 8.42 ns -
TryComputeHash · SHA3-512 · BouncyCastle 1025B 2,335.9 ns 22.64 ns 21.18 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 1025B 2,372.9 ns 4.39 ns 3.67 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 8KB 17,393.5 ns 178.69 ns 167.15 ns -
TryComputeHash · SHA3-512 · BouncyCastle 8KB 17,529.9 ns 177.85 ns 166.36 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 8KB 18,075.7 ns 116.74 ns 109.19 ns -
TryComputeHash · SHA3-512 · CryptoHives-Arm64 128KB 276,375.8 ns 2,372.12 ns 1,980.83 ns -
TryComputeHash · SHA3-512 · BouncyCastle 128KB 281,097.9 ns 1,865.41 ns 1,744.90 ns -
TryComputeHash · SHA3-512 · CryptoHives-Scalar 128KB 291,445.9 ns 3,671.93 ns 3,434.73 ns -

Keccak Family

Keccak-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Keccak-256 · CryptoHives-Arm64 128B 157.3 ns 0.24 ns 0.20 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 128B 166.9 ns 0.15 ns 0.12 ns -
TryComputeHash · Keccak-256 · BouncyCastle 128B 178.3 ns 0.29 ns 0.22 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 137B 305.8 ns 0.89 ns 0.74 ns -
TryComputeHash · Keccak-256 · BouncyCastle 137B 324.9 ns 1.03 ns 0.86 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 137B 331.1 ns 6.38 ns 6.83 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 1KB 1,232.5 ns 2.49 ns 2.33 ns -
TryComputeHash · Keccak-256 · BouncyCastle 1KB 1,267.5 ns 2.82 ns 2.50 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 1KB 1,286.0 ns 3.37 ns 3.15 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 1025B 1,221.1 ns 1.44 ns 1.28 ns -
TryComputeHash · Keccak-256 · BouncyCastle 1025B 1,268.5 ns 4.55 ns 4.04 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 1025B 1,286.1 ns 3.21 ns 2.84 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 8KB 9,269.5 ns 10.51 ns 9.31 ns -
TryComputeHash · Keccak-256 · BouncyCastle 8KB 9,519.3 ns 39.63 ns 35.13 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 8KB 9,740.7 ns 28.12 ns 24.93 ns -
TryComputeHash · Keccak-256 · CryptoHives-Arm64 128KB 147,398.1 ns 113.86 ns 100.93 ns -
TryComputeHash · Keccak-256 · BouncyCastle 128KB 150,396.5 ns 549.22 ns 458.62 ns -
TryComputeHash · Keccak-256 · CryptoHives-Scalar 128KB 153,848.1 ns 245.89 ns 217.97 ns -

Keccak-384

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Keccak-384 · CryptoHives-Arm64 128B 302.7 ns 0.24 ns 0.20 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 128B 320.5 ns 0.65 ns 0.54 ns -
TryComputeHash · Keccak-384 · BouncyCastle 128B 327.2 ns 2.57 ns 2.28 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 137B 307.3 ns 0.39 ns 0.33 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 137B 321.3 ns 0.81 ns 0.76 ns -
TryComputeHash · Keccak-384 · BouncyCastle 137B 324.3 ns 0.62 ns 0.55 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 1KB 1,528.8 ns 2.72 ns 2.12 ns -
TryComputeHash · Keccak-384 · BouncyCastle 1KB 1,566.6 ns 6.17 ns 5.47 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 1KB 1,593.9 ns 2.19 ns 2.05 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 1025B 1,530.2 ns 1.04 ns 0.92 ns -
TryComputeHash · Keccak-384 · BouncyCastle 1025B 1,574.6 ns 6.88 ns 6.10 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 1025B 1,595.7 ns 3.03 ns 2.83 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 8KB 12,051.4 ns 7.42 ns 6.58 ns -
TryComputeHash · Keccak-384 · BouncyCastle 8KB 12,163.8 ns 30.93 ns 27.42 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 8KB 12,493.0 ns 12.34 ns 10.30 ns -
TryComputeHash · Keccak-384 · CryptoHives-Arm64 128KB 192,623.2 ns 165.46 ns 129.18 ns -
TryComputeHash · Keccak-384 · BouncyCastle 128KB 195,703.5 ns 953.01 ns 795.80 ns -
TryComputeHash · Keccak-384 · CryptoHives-Scalar 128KB 200,130.6 ns 221.99 ns 196.79 ns -

Keccak-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Keccak-512 · CryptoHives-Arm64 128B 307.1 ns 0.32 ns 0.25 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 128B 320.3 ns 0.52 ns 0.49 ns -
TryComputeHash · Keccak-512 · BouncyCastle 128B 335.7 ns 1.27 ns 1.13 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 137B 303.2 ns 0.58 ns 0.48 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 137B 319.1 ns 1.03 ns 0.96 ns -
TryComputeHash · Keccak-512 · BouncyCastle 137B 326.7 ns 1.12 ns 1.05 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 1KB 2,270.7 ns 2.30 ns 2.04 ns -
TryComputeHash · Keccak-512 · BouncyCastle 1KB 2,340.3 ns 18.47 ns 17.28 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 1KB 2,368.3 ns 3.71 ns 3.29 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 1025B 2,299.3 ns 4.56 ns 4.05 ns -
TryComputeHash · Keccak-512 · BouncyCastle 1025B 2,318.3 ns 9.56 ns 8.94 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 1025B 2,369.7 ns 6.94 ns 6.50 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 8KB 17,202.5 ns 19.01 ns 16.85 ns -
TryComputeHash · Keccak-512 · BouncyCastle 8KB 17,422.1 ns 70.30 ns 62.32 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 8KB 17,950.7 ns 33.82 ns 29.98 ns -
TryComputeHash · Keccak-512 · CryptoHives-Arm64 128KB 274,909.7 ns 309.68 ns 258.60 ns -
TryComputeHash · Keccak-512 · BouncyCastle 128KB 277,699.9 ns 898.75 ns 750.50 ns -
TryComputeHash · Keccak-512 · CryptoHives-Scalar 128KB 286,797.2 ns 362.25 ns 321.13 ns -

SHAKE Family

SHAKE128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHAKE128 · CryptoHives-Arm64 128B 158.5 ns 0.60 ns 0.50 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 128B 171.4 ns 2.35 ns 2.20 ns -
TryComputeHash · SHAKE128 · BouncyCastle 128B 181.0 ns 1.00 ns 0.84 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 137B 158.6 ns 0.71 ns 0.60 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 137B 171.7 ns 1.94 ns 1.82 ns -
TryComputeHash · SHAKE128 · BouncyCastle 137B 180.5 ns 0.58 ns 0.45 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 1KB 1,072.8 ns 12.08 ns 11.30 ns -
TryComputeHash · SHAKE128 · BouncyCastle 1KB 1,138.1 ns 20.45 ns 19.13 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 1KB 1,149.4 ns 11.92 ns 11.15 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 1025B 1,067.6 ns 0.55 ns 0.48 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 1025B 1,136.5 ns 7.37 ns 6.54 ns -
TryComputeHash · SHAKE128 · BouncyCastle 1025B 1,148.3 ns 13.98 ns 13.08 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 8KB 7,456.4 ns 74.10 ns 69.31 ns -
TryComputeHash · SHAKE128 · BouncyCastle 8KB 7,795.7 ns 98.13 ns 91.79 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 8KB 7,942.2 ns 102.64 ns 96.01 ns -
TryComputeHash · SHAKE128 · CryptoHives-Arm64 128KB 118,130.5 ns 114.91 ns 107.49 ns -
TryComputeHash · SHAKE128 · BouncyCastle 128KB 123,132.5 ns 356.45 ns 333.42 ns -
TryComputeHash · SHAKE128 · CryptoHives-Scalar 128KB 125,449.4 ns 626.37 ns 523.05 ns -

SHAKE256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHAKE256 · CryptoHives-Arm64 128B 156.8 ns 0.12 ns 0.10 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 128B 170.3 ns 0.22 ns 0.19 ns -
TryComputeHash · SHAKE256 · BouncyCastle 128B 179.6 ns 0.86 ns 0.67 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 137B 314.6 ns 6.04 ns 6.20 ns -
TryComputeHash · SHAKE256 · BouncyCastle 137B 331.7 ns 5.69 ns 6.32 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 137B 333.6 ns 6.53 ns 8.26 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 1KB 1,224.8 ns 9.86 ns 8.24 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 1KB 1,288.6 ns 2.16 ns 1.69 ns -
TryComputeHash · SHAKE256 · BouncyCastle 1KB 1,301.6 ns 4.47 ns 3.49 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 1025B 1,218.6 ns 1.32 ns 1.24 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 1025B 1,288.0 ns 2.84 ns 2.65 ns -
TryComputeHash · SHAKE256 · BouncyCastle 1025B 1,300.9 ns 2.76 ns 2.45 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 8KB 9,286.8 ns 11.57 ns 10.25 ns -
TryComputeHash · SHAKE256 · BouncyCastle 8KB 9,492.8 ns 32.86 ns 30.74 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 8KB 9,728.2 ns 17.76 ns 15.74 ns -
TryComputeHash · SHAKE256 · CryptoHives-Arm64 128KB 146,779.2 ns 238.13 ns 211.10 ns -
TryComputeHash · SHAKE256 · BouncyCastle 128KB 149,803.9 ns 924.86 ns 772.30 ns -
TryComputeHash · SHAKE256 · CryptoHives-Scalar 128KB 153,747.4 ns 209.09 ns 195.59 ns -

cSHAKE Family

cSHAKE128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 128B 159.5 ns 0.81 ns 0.63 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 128B 169.5 ns 0.38 ns 0.30 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 128B 180.5 ns 0.53 ns 0.42 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 137B 158.8 ns 0.67 ns 0.60 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 137B 171.0 ns 0.32 ns 0.27 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 137B 180.9 ns 0.81 ns 0.63 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 1KB 1,086.2 ns 0.90 ns 0.84 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 1KB 1,127.3 ns 2.13 ns 1.89 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 1KB 1,131.8 ns 1.66 ns 1.47 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 1025B 1,065.1 ns 1.30 ns 1.09 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 1025B 1,119.0 ns 1.54 ns 1.20 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 1025B 1,134.8 ns 1.63 ns 1.44 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 8KB 7,377.3 ns 28.78 ns 22.47 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 8KB 7,719.5 ns 51.91 ns 46.02 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 8KB 7,849.9 ns 12.06 ns 9.41 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Arm64 128KB 119,435.1 ns 76.29 ns 63.70 ns -
TryComputeHash · cSHAKE128 · BouncyCastle 128KB 123,304.5 ns 493.69 ns 437.64 ns -
TryComputeHash · cSHAKE128 · CryptoHives-Scalar 128KB 124,918.5 ns 313.34 ns 277.77 ns -

cSHAKE256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 128B 160.9 ns 0.98 ns 0.76 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 128B 171.4 ns 0.89 ns 0.75 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 128B 179.7 ns 0.49 ns 0.45 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 137B 305.4 ns 0.26 ns 0.20 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 137B 327.3 ns 0.38 ns 0.34 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 137B 336.5 ns 1.03 ns 0.91 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 1KB 1,228.1 ns 4.29 ns 4.01 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 1KB 1,275.7 ns 12.12 ns 10.74 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 1KB 1,302.6 ns 21.02 ns 19.66 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 1025B 1,222.1 ns 1.40 ns 1.09 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 1025B 1,267.5 ns 3.94 ns 3.50 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 1025B 1,290.0 ns 3.78 ns 3.16 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 8KB 9,314.5 ns 16.66 ns 15.59 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 8KB 9,502.6 ns 39.18 ns 34.73 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 8KB 9,725.9 ns 15.54 ns 12.98 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Arm64 128KB 146,894.1 ns 272.24 ns 227.34 ns -
TryComputeHash · cSHAKE256 · BouncyCastle 128KB 151,896.5 ns 2,910.90 ns 2,722.86 ns -
TryComputeHash · cSHAKE256 · CryptoHives-Scalar 128KB 153,825.0 ns 356.39 ns 297.60 ns -

KangarooTwelve Family

KT128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KT128 · CryptoHives-Scalar 128B 102.6 ns 1.72 ns 1.61 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 128B 103.4 ns 0.28 ns 0.24 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 137B 100.2 ns 0.78 ns 0.65 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 137B 102.4 ns 1.28 ns 1.20 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 1KB 601.8 ns 8.52 ns 7.97 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 1KB 636.6 ns 10.00 ns 9.36 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 1025B 599.2 ns 1.59 ns 1.25 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 1025B 637.2 ns 9.80 ns 8.69 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 8KB 4,588.6 ns 66.42 ns 58.88 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 8KB 4,771.9 ns 21.87 ns 18.26 ns -
TryComputeHash · KT128 · CryptoHives-Arm64 128KB 69,227.4 ns 133.44 ns 118.29 ns -
TryComputeHash · KT128 · CryptoHives-Scalar 128KB 71,122.6 ns 132.93 ns 111.00 ns -

KT256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KT256 · CryptoHives-Arm64 128B 96.93 ns 0.338 ns 0.283 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 128B 100.93 ns 0.805 ns 0.629 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 137B 173.71 ns 0.214 ns 0.167 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 137B 186.66 ns 0.908 ns 0.805 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 1KB 678.11 ns 0.835 ns 0.652 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 1KB 710.71 ns 1.323 ns 1.033 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 1025B 677.40 ns 1.879 ns 1.569 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 1025B 709.34 ns 0.678 ns 0.566 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 8KB 5,494.82 ns 43.804 ns 36.578 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 8KB 5,699.26 ns 54.532 ns 48.341 ns -
TryComputeHash · KT256 · CryptoHives-Arm64 128KB 83,881.20 ns 182.055 ns 142.137 ns -
TryComputeHash · KT256 · CryptoHives-Scalar 128KB 87,553.90 ns 278.551 ns 217.474 ns -

TurboSHAKE Family

TurboSHAKE128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 128B 92.64 ns 1.626 ns 1.441 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 128B 95.25 ns 0.141 ns 0.110 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 137B 91.31 ns 0.488 ns 0.433 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 137B 95.43 ns 0.880 ns 0.735 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 1KB 590.08 ns 7.656 ns 6.393 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 1KB 615.26 ns 8.589 ns 7.172 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 1025B 586.61 ns 0.762 ns 0.676 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 1025B 619.10 ns 10.408 ns 13.162 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 8KB 4,044.47 ns 48.493 ns 42.987 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 8KB 4,237.82 ns 33.918 ns 30.068 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Arm64 128KB 65,424.95 ns 1,269.427 ns 1,461.874 ns -
TryComputeHash · TurboSHAKE128-32 · CryptoHives-Scalar 128KB 67,091.23 ns 282.341 ns 235.767 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 128B 91.42 ns 0.308 ns 0.240 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 128B 95.87 ns 0.474 ns 0.443 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 137B 91.21 ns 0.377 ns 0.315 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 137B 95.75 ns 0.720 ns 0.638 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 1KB 584.87 ns 0.677 ns 0.528 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 1KB 612.88 ns 1.490 ns 1.244 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 1025B 585.00 ns 0.987 ns 0.825 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 1025B 614.80 ns 0.999 ns 0.886 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 8KB 4,105.47 ns 3.710 ns 3.098 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 8KB 4,215.29 ns 8.172 ns 6.824 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Arm64 128KB 64,162.79 ns 187.619 ns 146.481 ns -
TryComputeHash · TurboSHAKE128-64 · CryptoHives-Scalar 128KB 67,503.29 ns 438.546 ns 366.206 ns -

TurboSHAKE256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 128B 89.83 ns 0.108 ns 0.084 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 128B 94.40 ns 0.179 ns 0.159 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 137B 171.44 ns 0.951 ns 0.742 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 137B 178.63 ns 0.420 ns 0.328 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 1KB 669.07 ns 1.584 ns 1.237 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 1KB 696.55 ns 1.939 ns 1.719 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 1025B 670.40 ns 1.788 ns 1.493 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 1025B 692.86 ns 0.863 ns 0.721 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 8KB 5,036.00 ns 14.722 ns 13.051 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 8KB 5,205.14 ns 19.761 ns 18.485 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Arm64 128KB 80,726.10 ns 743.523 ns 620.875 ns -
TryComputeHash · TurboSHAKE256 · CryptoHives-Scalar 128KB 82,358.96 ns 377.127 ns 294.436 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.21 ns 0.287 ns 0.268 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 128B 94.42 ns 0.421 ns 0.373 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 128B 126.65 ns 0.173 ns 0.154 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 128B 175.06 ns 1.923 ns 1.798 ns -
TryComputeHash · BLAKE2b-256 · Konscious 128B 580.56 ns 2.447 ns 2.289 ns 1120 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 137B 167.61 ns 0.536 ns 0.501 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 137B 181.89 ns 0.816 ns 0.764 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 137B 231.56 ns 0.295 ns 0.276 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 137B 359.77 ns 3.134 ns 2.931 ns -
TryComputeHash · BLAKE2b-256 · Konscious 137B 1,071.16 ns 6.749 ns 6.313 ns 1136 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 1KB 640.41 ns 2.543 ns 2.378 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 1KB 718.15 ns 1.917 ns 1.793 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 1KB 869.99 ns 0.782 ns 0.693 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 1KB 1,482.78 ns 3.662 ns 3.246 ns -
TryComputeHash · BLAKE2b-256 · Konscious 1KB 3,703.12 ns 10.129 ns 9.474 ns 2016 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 1025B 723.58 ns 2.977 ns 2.784 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 1025B 809.98 ns 2.489 ns 2.328 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 1025B 974.48 ns 1.068 ns 0.999 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 1025B 1,671.57 ns 3.627 ns 3.215 ns -
TryComputeHash · BLAKE2b-256 · Konscious 1025B 4,224.25 ns 41.654 ns 36.926 ns 2024 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 8KB 5,088.96 ns 20.869 ns 19.521 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 8KB 5,758.37 ns 20.977 ns 19.622 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 8KB 6,794.02 ns 5.772 ns 5.117 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 8KB 11,941.81 ns 4.603 ns 3.843 ns -
TryComputeHash · BLAKE2b-256 · Konscious 8KB 28,735.68 ns 107.900 ns 100.929 ns 9184 B
TryComputeHash · BLAKE2b-256 · Blake2Fast 128KB 81,489.19 ns 296.898 ns 277.718 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Scalar 128KB 92,497.55 ns 356.361 ns 333.340 ns -
TryComputeHash · BLAKE2b-256 · BouncyCastle 128KB 108,355.99 ns 52.738 ns 44.039 ns -
TryComputeHash · BLAKE2b-256 · CryptoHives-Neon 128KB 191,376.36 ns 68.707 ns 57.373 ns -
TryComputeHash · BLAKE2b-256 · Konscious 128KB 465,280.36 ns 1,665.225 ns 1,557.652 ns 132092 B

BLAKE2b-512

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2b-512 · Blake2Fast 128B 91.83 ns 0.609 ns 0.508 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 128B 95.61 ns 0.314 ns 0.293 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 128B 128.95 ns 0.251 ns 0.222 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 128B 175.13 ns 2.369 ns 2.216 ns -
TryComputeHash · BLAKE2b-512 · Konscious 128B 602.52 ns 3.409 ns 3.189 ns 1216 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 137B 168.54 ns 0.427 ns 0.379 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 137B 186.32 ns 0.386 ns 0.361 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 137B 234.90 ns 0.203 ns 0.180 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 137B 359.18 ns 3.128 ns 2.926 ns -
TryComputeHash · BLAKE2b-512 · Konscious 137B 1,103.62 ns 5.495 ns 5.140 ns 1232 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 1KB 643.30 ns 3.045 ns 2.848 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 1KB 724.40 ns 2.515 ns 2.229 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 1KB 873.38 ns 0.500 ns 0.443 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 1KB 1,482.35 ns 3.817 ns 3.571 ns -
TryComputeHash · BLAKE2b-512 · Konscious 1KB 3,728.16 ns 8.684 ns 7.699 ns 2112 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 1025B 731.73 ns 1.548 ns 1.448 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 1025B 815.15 ns 2.597 ns 2.430 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 1025B 976.76 ns 1.149 ns 1.019 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 1025B 1,668.03 ns 5.068 ns 4.492 ns -
TryComputeHash · BLAKE2b-512 · Konscious 1025B 4,275.44 ns 24.982 ns 23.368 ns 2120 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 8KB 5,147.42 ns 3.068 ns 2.720 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 8KB 5,851.02 ns 15.999 ns 14.182 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 8KB 6,794.57 ns 3.258 ns 2.888 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 8KB 11,965.72 ns 7.008 ns 5.852 ns -
TryComputeHash · BLAKE2b-512 · Konscious 8KB 29,267.41 ns 80.778 ns 75.560 ns 9280 B
TryComputeHash · BLAKE2b-512 · Blake2Fast 128KB 82,466.15 ns 67.661 ns 59.980 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Scalar 128KB 93,817.57 ns 225.412 ns 210.850 ns -
TryComputeHash · BLAKE2b-512 · BouncyCastle 128KB 108,382.96 ns 18.711 ns 17.502 ns -
TryComputeHash · BLAKE2b-512 · CryptoHives-Neon 128KB 191,339.40 ns 23.917 ns 18.673 ns -
TryComputeHash · BLAKE2b-512 · Konscious 128KB 475,078.70 ns 1,666.854 ns 1,559.176 ns 132188 B

BLAKE2s-128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2s-128 · Blake2Fast 128B 139.7 ns 0.39 ns 0.37 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 128B 155.3 ns 0.59 ns 0.55 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 128B 196.6 ns 0.21 ns 0.18 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 128B 389.3 ns 6.76 ns 6.32 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 137B 207.3 ns 0.69 ns 0.64 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 137B 230.2 ns 0.65 ns 0.61 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 137B 284.5 ns 1.37 ns 1.07 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 137B 591.7 ns 5.89 ns 5.50 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 1KB 1,086.1 ns 5.77 ns 5.40 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 1KB 1,215.4 ns 6.48 ns 6.07 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 1KB 1,470.1 ns 2.63 ns 2.46 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 1KB 3,225.5 ns 2.89 ns 2.41 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 1025B 1,151.3 ns 5.50 ns 5.15 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 1025B 1,300.5 ns 6.18 ns 5.78 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 1025B 1,556.2 ns 4.99 ns 4.67 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 1025B 3,469.4 ns 9.10 ns 7.60 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 8KB 8,585.2 ns 52.71 ns 49.30 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 8KB 9,755.4 ns 48.32 ns 45.20 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 8KB 11,616.9 ns 19.73 ns 18.45 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 8KB 26,318.5 ns 19.93 ns 18.65 ns -
TryComputeHash · BLAKE2s-128 · Blake2Fast 128KB 137,050.7 ns 576.60 ns 539.35 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Scalar 128KB 155,887.7 ns 868.04 ns 811.97 ns -
TryComputeHash · BLAKE2s-128 · BouncyCastle 128KB 185,352.5 ns 348.15 ns 325.66 ns -
TryComputeHash · BLAKE2s-128 · CryptoHives-Neon 128KB 420,691.3 ns 1,019.57 ns 953.70 ns -

BLAKE2s-256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · BLAKE2s-256 · Blake2Fast 128B 141.6 ns 0.59 ns 0.55 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 128B 155.6 ns 0.59 ns 0.55 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 128B 199.3 ns 0.84 ns 0.79 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 128B 383.4 ns 1.12 ns 0.93 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 137B 209.6 ns 0.50 ns 0.44 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 137B 231.3 ns 0.63 ns 0.59 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 137B 288.8 ns 1.35 ns 1.26 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 137B 589.6 ns 1.44 ns 1.35 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 1KB 1,084.8 ns 4.62 ns 4.32 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 1KB 1,224.5 ns 5.10 ns 4.77 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 1KB 1,470.2 ns 3.94 ns 3.69 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 1KB 3,264.7 ns 7.58 ns 7.09 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 1025B 1,150.9 ns 5.55 ns 5.20 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 1025B 1,300.6 ns 4.77 ns 4.46 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 1025B 1,561.8 ns 2.69 ns 2.52 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 1025B 3,468.8 ns 12.54 ns 11.73 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 8KB 8,582.3 ns 29.55 ns 26.19 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 8KB 9,752.9 ns 26.48 ns 22.11 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 8KB 11,597.5 ns 46.22 ns 43.23 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 8KB 26,304.4 ns 61.47 ns 57.50 ns -
TryComputeHash · BLAKE2s-256 · Blake2Fast 128KB 136,875.3 ns 502.88 ns 470.39 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Scalar 128KB 156,048.7 ns 718.24 ns 671.84 ns -
TryComputeHash · BLAKE2s-256 · BouncyCastle 128KB 185,106.1 ns 375.00 ns 332.43 ns -
TryComputeHash · BLAKE2s-256 · CryptoHives-Neon 128KB 421,315.6 ns 506.18 ns 448.72 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 101.7 ns 0.19 ns 0.18 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 128B 247.3 ns 0.43 ns 0.40 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 128B 514.9 ns 2.62 ns 2.33 ns -
TryComputeHash · BLAKE3 · BouncyCastle 128B 726.5 ns 2.75 ns 2.57 ns -
TryComputeHash · BLAKE3 · Blake3Native 137B 147.9 ns 0.60 ns 0.56 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 137B 371.9 ns 0.77 ns 0.72 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 137B 765.5 ns 2.90 ns 2.71 ns -
TryComputeHash · BLAKE3 · BouncyCastle 137B 1,073.6 ns 3.78 ns 3.35 ns -
TryComputeHash · BLAKE3 · Blake3Native 1KB 771.9 ns 3.18 ns 2.82 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 1KB 1,994.2 ns 4.83 ns 4.52 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 1KB 3,933.9 ns 24.13 ns 22.58 ns -
TryComputeHash · BLAKE3 · BouncyCastle 1KB 5,363.7 ns 26.55 ns 24.84 ns -
TryComputeHash · BLAKE3 · Blake3Native 1025B 881.0 ns 3.02 ns 2.83 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 1025B 2,238.4 ns 3.60 ns 3.19 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 1025B 4,584.5 ns 17.72 ns 15.71 ns -
TryComputeHash · BLAKE3 · BouncyCastle 1025B 6,120.7 ns 20.35 ns 19.03 ns 56 B
TryComputeHash · BLAKE3 · Blake3Native 8KB 3,304.4 ns 12.87 ns 12.04 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 8KB 17,542.1 ns 74.48 ns 69.67 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 8KB 34,242.6 ns 230.92 ns 216.01 ns -
TryComputeHash · BLAKE3 · BouncyCastle 8KB 45,147.6 ns 183.34 ns 171.49 ns 392 B
TryComputeHash · BLAKE3 · Blake3Native 128KB 52,182.4 ns 207.42 ns 194.02 ns -
TryComputeHash · BLAKE3 · CryptoHives-Neon 128KB 285,292.2 ns 882.20 ns 825.21 ns -
TryComputeHash · BLAKE3 · CryptoHives-Scalar 128KB 552,471.3 ns 2,326.83 ns 2,176.52 ns -
TryComputeHash · BLAKE3 · BouncyCastle 128KB 725,677.2 ns 2,436.17 ns 2,278.80 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 635.8 ns 4.52 ns 3.78 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 128B 905.8 ns 5.06 ns 4.22 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 137B 661.2 ns 2.57 ns 2.40 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 137B 949.8 ns 5.87 ns 4.90 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 1KB 4,203.6 ns 13.47 ns 11.25 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 1KB 5,944.4 ns 34.78 ns 29.04 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 1025B 4,205.1 ns 16.44 ns 15.38 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 1025B 5,960.7 ns 10.23 ns 9.57 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 8KB 32,710.5 ns 119.97 ns 106.35 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 8KB 46,325.1 ns 153.17 ns 135.78 ns -
TryComputeHash · Ascon-Hash256 · CryptoHives-Scalar 128KB 513,382.5 ns 1,573.39 ns 1,394.77 ns -
TryComputeHash · Ascon-Hash256 · BouncyCastle 128KB 736,800.5 ns 2,810.19 ns 2,491.16 ns -

Ascon-XOF128

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 128B 620.5 ns 1.66 ns 1.55 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 128B 895.1 ns 6.11 ns 5.10 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 137B 654.0 ns 1.93 ns 1.80 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 137B 945.2 ns 1.87 ns 1.66 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 1KB 4,133.3 ns 17.42 ns 15.44 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 1KB 5,892.3 ns 29.19 ns 24.37 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 1025B 4,140.8 ns 17.14 ns 15.20 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 1025B 5,963.5 ns 47.18 ns 46.34 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 8KB 32,461.6 ns 160.42 ns 142.20 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 8KB 46,017.5 ns 128.03 ns 119.76 ns -
TryComputeHash · Ascon-XOF128 · CryptoHives-Scalar 128KB 514,819.5 ns 2,785.03 ns 2,605.12 ns -
TryComputeHash · Ascon-XOF128 · BouncyCastle 128KB 731,904.6 ns 3,069.82 ns 2,871.51 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 553.6 ns 0.69 ns 0.61 ns -
TryComputeHash · KMAC-128 · BouncyCastle 128B 1,052.0 ns 1.54 ns 1.36 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 137B 548.1 ns 0.87 ns 0.81 ns -
TryComputeHash · KMAC-128 · BouncyCastle 137B 1,056.5 ns 4.20 ns 3.28 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 1KB 1,597.0 ns 3.23 ns 2.70 ns -
TryComputeHash · KMAC-128 · BouncyCastle 1KB 2,039.7 ns 6.97 ns 6.18 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 1025B 1,594.1 ns 2.50 ns 2.34 ns -
TryComputeHash · KMAC-128 · BouncyCastle 1025B 2,008.9 ns 13.35 ns 11.83 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 8KB 8,187.6 ns 6.22 ns 4.85 ns -
TryComputeHash · KMAC-128 · BouncyCastle 8KB 8,620.3 ns 68.86 ns 61.05 ns 256 B
TryComputeHash · KMAC-128 · BouncyCastle 128KB 123,300.1 ns 570.03 ns 476.00 ns 256 B
TryComputeHash · KMAC-128 · CryptoHives-Scalar 128KB 124,885.7 ns 138.11 ns 129.19 ns -

KMAC256

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · KMAC-256 · CryptoHives-Scalar 128B 552.4 ns 3.46 ns 3.07 ns -
TryComputeHash · KMAC-256 · BouncyCastle 128B 1,033.1 ns 2.42 ns 1.89 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 137B 827.0 ns 8.78 ns 6.86 ns -
TryComputeHash · KMAC-256 · BouncyCastle 137B 1,200.0 ns 18.86 ns 16.72 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 1KB 1,704.1 ns 6.04 ns 5.04 ns -
TryComputeHash · KMAC-256 · BouncyCastle 1KB 2,165.4 ns 10.41 ns 9.23 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 1025B 1,716.4 ns 18.95 ns 16.80 ns -
TryComputeHash · KMAC-256 · BouncyCastle 1025B 2,128.9 ns 9.52 ns 7.95 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 8KB 10,170.9 ns 33.04 ns 29.29 ns -
TryComputeHash · KMAC-256 · BouncyCastle 8KB 10,494.1 ns 142.42 ns 126.25 ns 256 B
TryComputeHash · KMAC-256 · BouncyCastle 128KB 151,979.4 ns 1,421.66 ns 1,260.27 ns 256 B
TryComputeHash · KMAC-256 · CryptoHives-Scalar 128KB 153,932.0 ns 349.90 ns 327.30 ns -

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 335.5 ns 1.28 ns 1.07 ns -
TryComputeHash · MD5 · OS Native 128B 419.5 ns 1.72 ns 1.44 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 128B 469.1 ns 0.41 ns 0.34 ns -
TryComputeHash · MD5 · BouncyCastle 137B 331.9 ns 1.67 ns 1.48 ns -
TryComputeHash · MD5 · OS Native 137B 402.1 ns 2.36 ns 2.09 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 137B 469.7 ns 0.31 ns 0.26 ns -
TryComputeHash · MD5 · OS Native 1KB 1,419.8 ns 5.90 ns 4.60 ns -
TryComputeHash · MD5 · BouncyCastle 1KB 1,884.2 ns 2.36 ns 1.97 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 1KB 2,730.7 ns 3.76 ns 2.93 ns -
TryComputeHash · MD5 · OS Native 1025B 1,413.2 ns 5.90 ns 5.23 ns -
TryComputeHash · MD5 · BouncyCastle 1025B 1,881.6 ns 3.13 ns 2.78 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 1025B 2,732.9 ns 2.92 ns 2.44 ns -
TryComputeHash · MD5 · OS Native 8KB 9,347.7 ns 37.06 ns 34.67 ns -
TryComputeHash · MD5 · BouncyCastle 8KB 14,312.9 ns 35.96 ns 30.03 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 8KB 20,836.6 ns 32.57 ns 27.20 ns -
TryComputeHash · MD5 · OS Native 128KB 146,095.1 ns 831.77 ns 737.35 ns -
TryComputeHash · MD5 · BouncyCastle 128KB 227,240.6 ns 649.73 ns 542.55 ns -
TryComputeHash · MD5 · CryptoHives-Scalar 128KB 331,133.5 ns 331.07 ns 293.48 ns -

SHA-1

Description TestDataSize Mean Error StdDev Allocated
TryComputeHash · SHA-1 · OS Native 128B 269.9 ns 1.92 ns 1.80 ns -
TryComputeHash · SHA-1 · BouncyCastle 128B 482.1 ns 0.57 ns 0.54 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 128B 534.0 ns 7.51 ns 6.27 ns -
TryComputeHash · SHA-1 · OS Native 137B 258.5 ns 2.29 ns 2.14 ns -
TryComputeHash · SHA-1 · BouncyCastle 137B 485.4 ns 0.57 ns 0.48 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 137B 527.3 ns 3.69 ns 3.08 ns -
TryComputeHash · SHA-1 · OS Native 1KB 525.8 ns 1.29 ns 1.20 ns -
TryComputeHash · SHA-1 · BouncyCastle 1KB 2,704.2 ns 2.13 ns 1.78 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 1KB 2,862.7 ns 5.31 ns 4.44 ns -
TryComputeHash · SHA-1 · OS Native 1025B 525.1 ns 2.12 ns 1.77 ns -
TryComputeHash · SHA-1 · BouncyCastle 1025B 2,726.1 ns 30.70 ns 27.21 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 1025B 2,884.0 ns 22.51 ns 19.96 ns -
TryComputeHash · SHA-1 · OS Native 8KB 2,657.3 ns 28.73 ns 25.47 ns -
TryComputeHash · SHA-1 · BouncyCastle 8KB 19,284.4 ns 65.89 ns 51.44 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 8KB 21,628.5 ns 134.34 ns 112.18 ns -
TryComputeHash · SHA-1 · OS Native 128KB 38,818.5 ns 52.16 ns 43.56 ns -
TryComputeHash · SHA-1 · BouncyCastle 128KB 325,737.9 ns 558.92 ns 466.72 ns -
TryComputeHash · SHA-1 · CryptoHives-Scalar 128KB 341,828.4 ns 1,323.97 ns 1,105.58 ns -