sha512

Pure Haskell SHA-512, HMAC-SHA512 (docs.ppad.tech/sha512).
git clone git://git.ppad.tech/sha512.git
Log | Files | Refs | README | LICENSE

CHANGELOG (2329B)


      1 # Changelog
      2 
      3 - 0.2.4 (2026-07-06)
      4   * Reverts the unrolled MAC comparison introduced in 0.2.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.2.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.2.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. HMAC
     22     performance has also been modestly improved.
     23 
     24 - 0.2.1 (2026-01-11)
     25   * Adds a basic quickcheck test suite for asserting memory safety of
     26     library functions on random inputs.
     27 
     28 - 0.2.0 (2026-01-10)
     29   * The HMAC functions now produce a value of type MAC, which is a
     30     newtype over a ByteString. The 'Eq' instance for MAC compares values
     31     in constant time.
     32 
     33 - 0.1.5 (2026-01-08)
     34   * We now check if the ARM cryptographic extensions are available, and,
     35     if so, use them to calculate hashes. If they're unavailable we
     36     simply use the pure implementation as a fallback. This yields about
     37     a 5x performance boost for 'hash' and 3.5x boost for 'hmac' (again,
     38     when available).
     39 
     40   * Allocation for both the 'hash' and 'hmac' functions has been reduced
     41     dramatically, mostly by optimising the padding internals, and is now
     42     constant with respect to input.
     43 
     44 - 0.1.4 (2025-12-28)
     45   * Adds an 'llvm' build flag and tests with GHC 9.10.3.
     46 
     47 - 0.1.3 (2025-01-21)
     48   * Improves padding handling for the strict bytestring case, yielding
     49     performance increases for both 'hash' and 'hmac'.
     50 
     51 - 0.1.2 (2025-01-07)
     52   * Makes a minor optimisation to bytestring handling.
     53 
     54 - 0.1.1 (2024-10-13)
     55   * Adds an INLINE pragma to an internal step function.
     56   * 'hmac' no longer calls 'hmac_lazy', which has no practical effect
     57     other than to clean up profiling reports generated by GHC.
     58 
     59 - 0.1.0 (2024-10-07)
     60   * Initial release.
     61