CHANGELOG (2591B)
1 # Changelog 2 3 - 0.3.4 (2026-07-06) 4 * Reverts the unrolled MAC comparison introduced in 0.3.3, which was 5 found to introduce timing variation on both aarch64 and x86-64 when 6 compiled via the LLVM backend (the NCG backend was unaffected). 7 8 - 0.3.3 (2026-07-06) 9 * The constant-time 'Eq' on 'MAC' now folds over the two buffers 10 directly, rather than materialising an intermediate ByteString 11 holding their XOR on the heap. Semantics are unchanged. 12 13 * Improves the performance of constant-time MAC comparison. 14 15 - 0.3.2 (2026-02-01) 16 * The library has been refactored substantially to achieve greater 17 control over heap allocation, particularly around HMAC calculation. 18 19 * A couple of very low-level functions, '_hmac_rr' and '_hmac_rsb' are 20 now quietly exported for calculating specialized destructive HMAC 21 operations, mostly of use to HMAC-DRBG implementations. 22 23 * HMAC performance is also improved, now only about 2x that of hash 24 computation. 25 26 - 0.3.1 (2026-01-11) 27 * Adds a basic quickcheck test suite for asserting memory safety of 28 library functions on random inputs. 29 30 - 0.3.0 (2026-01-10) 31 * The HMAC functions now produce a value of type MAC, which is a 32 newtype over a ByteString. The 'Eq' instance for MAC compares values 33 in constant time. 34 35 - 0.2.5 (2026-01-08) 36 * We now check if the ARM cryptographic extensions are available, and, 37 if so, use them to calculate hashes. If they're unavailable we 38 simply use the pure implementation as a fallback. This yields about 39 a 5x performance boost for 'hash' and 3.5x boost for 'hmac' (again, 40 when available). 41 42 * Allocation for both the 'hash' and 'hmac' functions has been reduced 43 dramatically, mostly by optimising the padding internals, and is now 44 constant with respect to input. 45 46 - 0.2.4 (2025-12-28) 47 * Adds an 'llvm' build flag and tests with GHC 9.10.3. 48 49 - 0.2.3 (2025-01-21) 50 * Improves padding handling for the strict bytestring case, yielding 51 performance increases for both 'hash' and 'hmac'. 52 53 - 0.2.2 (2025-01-07) 54 * Minor bytestring-handling optimisations. 55 56 - 0.2.1 (2024-10-13) 57 * Adds an INLINE pragma to an internal step function. 58 59 * 'hmac' no longer calls 'hmac_lazy', which has no practical effect 60 other than to clean up profiling reports generated by GHC. 61 62 - 0.2.0 (2024-10-07) 63 * 'hmac' and 'hmac_lazy' now hash long keys before computing a HMAC, 64 instead of throwing an error, matching RFC 2104's suggested behaviour. 65 66 - 0.1.0 (2024-09-14) 67 * Initial release, supporting SHA256 and HMAC-SHA256 on strict and lazy 68 bytestrings.