CHANGELOG (3184B)
1 # Changelog 2 3 - 0.2.6 (2026-10-31) 4 * Uses the x86 SHA512 extensions on x86_64 CPUs that support them, 5 detected at runtime, falling back to the pure Haskell 6 implementation elsewhere. The x86 kernel requires GCC 14 or Clang 7 18 or later to build; older compilers always use the fallback. 8 9 - 0.2.5 (2026-10-10) 10 * Further defends MAC comparison timing against "helpful" LLVM 11 optimizations. 12 * Detects support for the ARM SHA512 extensions at runtime, rather 13 than assuming it on all aarch64 builds, which crashed on aarch64 14 CPUs lacking them (e.g. Graviton2, Raspberry Pi). 15 * The portable implementation now lives in an internal 16 'Crypto.Hash.SHA512.Pure' module, and 17 'Crypto.Hash.SHA512.Arm' is no longer exposed. Both are hidden 18 internal modules; the public API is unchanged. 19 * Improves 'hash_lazy' and 'hmac_lazy' performance. 20 21 - 0.2.4 (2026-07-06) 22 * Reverts the unrolled MAC comparison introduced in 0.2.3, which was 23 found to introduce timing variation on both aarch64 and x86-64 when 24 compiled via the LLVM backend (the NCG backend was unaffected). 25 26 - 0.2.3 (2026-07-06) 27 * The constant-time 'Eq' on 'MAC' now folds over the two buffers 28 directly, rather than materialising an intermediate ByteString 29 holding their XOR on the heap. Semantics are unchanged. 30 31 * Improves the performance of constant-time MAC comparison. 32 33 - 0.2.2 (2026-02-01) 34 * The library has been refactored substantially to achieve greater 35 control over heap allocation, particularly around HMAC calculation. 36 37 * A couple of very low-level functions, '_hmac_rr' and '_hmac_rsb' are 38 now quietly exported for calculating specialized destructive HMAC 39 operations, mostly of use to HMAC-DRBG implementations. HMAC 40 performance has also been modestly improved. 41 42 - 0.2.1 (2026-01-11) 43 * Adds a basic quickcheck test suite for asserting memory safety of 44 library functions on random inputs. 45 46 - 0.2.0 (2026-01-10) 47 * The HMAC functions now produce a value of type MAC, which is a 48 newtype over a ByteString. The 'Eq' instance for MAC compares values 49 in constant time. 50 51 - 0.1.5 (2026-01-08) 52 * We now check if the ARM cryptographic extensions are available, and, 53 if so, use them to calculate hashes. If they're unavailable we 54 simply use the pure implementation as a fallback. This yields about 55 a 5x performance boost for 'hash' and 3.5x boost for 'hmac' (again, 56 when available). 57 58 * Allocation for both the 'hash' and 'hmac' functions has been reduced 59 dramatically, mostly by optimising the padding internals, and is now 60 constant with respect to input. 61 62 - 0.1.4 (2025-12-28) 63 * Adds an 'llvm' build flag and tests with GHC 9.10.3. 64 65 - 0.1.3 (2025-01-21) 66 * Improves padding handling for the strict bytestring case, yielding 67 performance increases for both 'hash' and 'hmac'. 68 69 - 0.1.2 (2025-01-07) 70 * Makes a minor optimisation to bytestring handling. 71 72 - 0.1.1 (2024-10-13) 73 * Adds an INLINE pragma to an internal step function. 74 * 'hmac' no longer calls 'hmac_lazy', which has no practical effect 75 other than to clean up profiling reports generated by GHC. 76 77 - 0.1.0 (2024-10-07) 78 * Initial release. 79