From cf47fd2f02b049a8c58205b7d53937edf06f1690 Mon Sep 17 00:00:00 2001 From: jappeace-sloth Date: Tue, 6 Oct 2026 20:34:52 +0200 Subject: [PATCH 1/5] doc: a summary for each 2.x release, and #197 to #201 under 2.1.0 Since 45d6051 each change is one line and a link, which reads well; what a reader deciding whether to upgrade still lacks is what a release means for them. 2.1.4 to 2.1.7 open with that, 2.0.1 to 2.1.3 did not, and 2.0.0 said what breaks but not what it gives. Each now opens with a few plain sentences: what got faster, what got harder to attack, and what breaks, with the detail left to the lines below. Two corrections, each checked against the tags: * 2.0.1 listed #197, #198, #199, #200 and #201, but `git log --merges crypton-v2.0.0..crypton-v2.0.1` holds only #203: 2.0.1 was the maintenance release from the 2.0 branch. The five merged between crypton-v2.0.1 and crypton-v2.1.0, so they move to 2.1.0, and with them #198, the ChaChaPoly1305 signature change. * 2.0.0 said no exported function changed its signature. Comparing the top-level signatures of every exposed module between crypton-v1.1.5 and crypton-v2.0.0 finds two that did, Crypto.MAC.Poly1305.initialize and auth (#192); the paragraph now names them. The same comparison from crypton-v2.0.0 to crypton-v2.1.7 finds only the ChaChaPoly1305 pair. 2.0.0's breaking paragraph also gains the DH and ECDH peer validation (#87, #89) and the prime-order subgroup check (#190), which refuse input that used to be accepted. 2.1.3's summary names the zero-length tag #233 refuses, which is a breaking change in a patch release. Prompt: hmm, I guess we can make a pr or issue to crypton asking to clarify the changelog, the overview you gave me was a lot better then the barf I read on hackage. we don't need to explain side channel attacks but it's a lot more encouraging to know what's actually being done without all these details can you fork the repo and show me how that pr would look on a pr against jappeace-sloth/crypton? Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 79 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17835c22..4ac45fe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,7 +61,8 @@ that fix. ## 2.1.4 2.1.3 could not be built from Hackage in the default configuration, and is -deprecated there. This release is that fix. +deprecated there. This release is that fix. It is deprecated on Hackage in +turn, as it does not build with GCC 14 or newer; use 2.1.5 or later. * Add p256 header files to cabal extra-source-files [#271](https://github.com/kazu-yamamoto/crypton/pull/271) @@ -74,6 +75,17 @@ deprecated there. This release is that fix. ## 2.1.3 +Deprecated on Hackage, as its tarball does not build; use 2.1.5 or later. A +hardening release. One-call AES-GCM and ChaCha20-Poly1305 decryption accepted +a tag of no bytes, which skipped authentication; a tag must now be 4 to 16 +bytes for AES-GCM and exactly 16 for ChaCha20-Poly1305, so a truncated +ChaCha20-Poly1305 tag is refused. `Crypto.Cipher.AES.GCM` refuses an empty +nonce, which gave the authentication key away. A message of 4 GiB or more was +silently truncated on its way to the C; the streaming ciphers now process all +of it and the one-call AEADs and AES modes refuse it. The C now runs under +the sanitizers and a constant-time check in CI, and key material is wiped +where the compiler cannot skip it. + * fix(aead): reject missing and oversized authentication tags [#233](https://github.com/kazu-yamamoto/crypton/pull/233) * fix(chacha): remove redundant Word8 import @@ -145,6 +157,11 @@ deprecated there. This release is that fix. ## 2.1.2 +Faster only; no API change. P-256, P-384, P-521, X25519 and, on x86-64, RSA +go through AWS's s2n-bignum, hand-written assembly carrying machine-checked +proofs, which makes them up to nine times faster depending on the curve and +the operation. AES-GCM uses the wide VAES instructions where x86-64 has them. + * perf(p256): 255 squarings for the field inversion, not 287 [#223](https://github.com/kazu-yamamoto/crypton/pull/223) * perf(p256): ECDH through s2n-bignum, 2.7x @@ -166,6 +183,11 @@ deprecated there. This release is that fix. ## 2.1.1 +New functions only; existing code is unaffected. `Crypto.PubKey.ECDSA` gains +RFC 6979 deterministic nonces, `Crypto.Cipher.ChaCha.Poly1305` does a whole +ChaCha20-Poly1305 message in one call, and `Crypto.Cipher.AES.GCM` gains +`decryptWithTag` for protocols that carry the tag apart from the ciphertext. + * feat(ecdsa): RFC 6979 deterministic nonces for Crypto.PubKey.ECDSA [#219](https://github.com/kazu-yamamoto/crypton/pull/219) * feat(gcm): a decrypt that hands back the tag instead of comparing it @@ -177,6 +199,26 @@ deprecated there. This release is that fix. ## 2.1.0 +AES-GCM is several times faster on short messages, the packet sizes QUIC and +TLS send, on x86-64 and AArch64. New are `Crypto.Cipher.AES.GCM` for many +messages under one key, `encryptWithMask` for QUIC header protection, and +Skein with the digest size as a type parameter. The Broadwell crash fixed in +2.0.1 is fixed here too. + +One change breaks callers: `Crypto.Cipher.ChaChaPoly1305.initialize` and +`initializeX` take a checked `Key`, built with `key`, and return a `State` +rather than a `CryptoFailable State`. + +* feat(hash): Skein with the digest size as a type parameter + [#197](https://github.com/kazu-yamamoto/crypton/pull/197) +* fix(chachapoly1305): take a checked key, so that initializing cannot fail + [#198](https://github.com/kazu-yamamoto/crypton/pull/198) +* feat(aes): Crypto.Cipher.AES.GCM, for many short messages under one key + [#199](https://github.com/kazu-yamamoto/crypton/pull/199) +* build: say which platforms the fallback AES sources are for + [#200](https://github.com/kazu-yamamoto/crypton/pull/200) +* feat(aes): encryptWithMask, for the QUIC header protection mask + [#201](https://github.com/kazu-yamamoto/crypton/pull/201) * fix(cpu): stop reading Intel's SDBG bit as AMD's XOP [#204](https://github.com/kazu-yamamoto/crypton/pull/204) * fix(bench): build the benchmark against the checked ChaCha20-Poly1305 key @@ -210,30 +252,33 @@ deprecated there. This release is that fix. ## 2.0.1 -* feat(hash): Skein with the digest size as a type parameter - [#197](https://github.com/kazu-yamamoto/crypton/pull/197) -* fix(chachapoly1305): take a checked key, so that initializing cannot fail - [#198](https://github.com/kazu-yamamoto/crypton/pull/198) -* feat(aes): Crypto.Cipher.AES.GCM, for many short messages under one key - [#199](https://github.com/kazu-yamamoto/crypton/pull/199) -* build: say which platforms the fallback AES sources are for - [#200](https://github.com/kazu-yamamoto/crypton/pull/200) -* feat(aes): encryptWithMask, for the QUIC header protection mask - [#201](https://github.com/kazu-yamamoto/crypton/pull/201) +A maintenance release from the 2.0 branch with one fix: SHA-512 and ChaCha20 +crashed on Intel processors from Broadwell on. + * fix(cpu): stop reading Intel's SDBG bit as AMD's XOP [#203](https://github.com/kazu-yamamoto/crypton/pull/203) ## 2.0.0 +A large release, faster and harder to attack. AES, GHASH, SHA-1, SHA-2, +SHA-3, ChaCha20 and Poly1305 use the processor's instructions on x86-64 and +AArch64, several through the CRYPTOGAMS assembly OpenSSL uses, and DES, +Camellia, Twofish and Blowfish run in C rather than Haskell. RSA, DSA, ECDSA +and the OTP checks no longer let a secret decide how long they take, `expSafe` +hides its exponent again, and showing a private key no longer prints it. + **Breaking changes.** Input that used to be accepted is now refused: a value at or above an RSA or Rabin modulus, a signature of the wrong length or out of range, a digest too short for HOTP's dynamic truncation, a non-canonical -Ed25519 signature, a PKCS#7 block size outside 1..255, and block cipher input -that is not a whole number of blocks. A refused KDF, Argon2 or bcrypt -parameter is reported as a `CryptoError` rather than raised as an `ErrorCall`, -and `CryptoError_ParameterInvalid` is appended to `CryptoError`; -`tryGetShared` is added beside `getShared`. No exported function changed its -signature. +Ed25519 signature, a DH or ECDH peer value that fails validation, an ECC +public point outside the prime-order subgroup, a PKCS#7 block size outside +1..255, and block cipher input that is not a whole number of blocks. A +refused KDF, Argon2 or bcrypt parameter is reported as a `CryptoError` rather +than raised as an `ErrorCall`, and `CryptoError_ParameterInvalid` is appended +to `CryptoError`; `tryGetShared` is added beside `getShared`. Two exported +functions changed their signature: `Crypto.MAC.Poly1305.initialize` and +`auth` take a checked `Key`, built with `key`, so `initialize` can no longer +fail. **Deprecated.** The eighteen curves over a binary field in `Crypto.ECC.Simple.Types`. They are obsolete, they are the curves whose From c5e1e2cb2df45025879f8956504bced10aa92cc3 Mon Sep 17 00:00:00 2001 From: jappeace-sloth Date: Tue, 6 Oct 2026 20:41:57 +0200 Subject: [PATCH 2/5] doc: only the summary for each 2.x release The one-line-per-PR lists run to several hundred lines for the 2.x series, and a reader deciding whether to upgrade has to piece together what a release means from titles such as "perf(gcm): read a short block where it lies". That list is already kept by git and GitHub, so each release now carries only its summary, with one link to the compare view for anyone who wants every change. Where a summary used to sit above a list it only partly covered (2.1.4, 2.1.5, 2.1.6, 2.1.3), it now says what the list said that matters to a user: the gcc 13 and AArch64 SHA-256 fixes in 2.1.4, the AArch64 GCM speed-up in 2.1.5, the PBKDF2 and scalarInv fixes in 2.1.6, and the fixes and speed-ups in 2.1.3. 2.0.0 gains ElGamal, Crypto.Debug and the C point multiplication, and getShared joins the CryptoError sentence. The bold "Breaking changes." and "Deprecated." labels become plain sentences. Unreleased is a summary of ML-KEM and ML-DSA. Sections before 2.0.0 are a few lines each already and are left alone. Every compare link was checked to resolve. Prompt: I think the real issue is that bullet list, we *just* want the summary in the changelog Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 506 +++++++-------------------------------------------- 1 file changed, 61 insertions(+), 445 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac45fe5..ac517e6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,11 @@ ## Unreleased -* chore: stop hiding foldl' from Prelude - [#294](https://github.com/kazu-yamamoto/crypton/pull/294) -* chore: ask for hidden visibility only where the format has it - [#295](https://github.com/kazu-yamamoto/crypton/pull/295) -* feat: ML-KEM and ML-DSA, through mlkem-native and mldsa-native - [#297](https://github.com/kazu-yamamoto/crypton/pull/297) +`Crypto.PubKey.MLKEM` and `Crypto.PubKey.MLDSA`: ML-KEM and ML-DSA, the +post-quantum key encapsulation and signature schemes of FIPS 203 and FIPS +204, through mlkem-native and mldsa-native. + +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.7...main) ## 2.1.7 @@ -16,62 +15,34 @@ is a conformance fault rather than a forgery: producing such a signature takes the private key, so a third party holding a valid signature cannot turn it into one of these. -* chore(p256): drop two declarations nothing defines - [#292](https://github.com/kazu-yamamoto/crypton/pull/292) -* fix(pss): refuse an encoding with a bit set outside emBits - [#293](https://github.com/kazu-yamamoto/crypton/pull/293) +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.6...crypton-v2.1.7) ## 2.1.6 -The `license:` field now says what the tree holds -- `BSD-3-Clause AND MIT -AND ISC` -- and `license-files:` lists all five texts. **Nothing is required -of a user that was not required before**; the field was simply incomplete. - -* Carry the MIT notice for the parts that follow fusion, and say what the tree holds - [#267](https://github.com/kazu-yamamoto/crypton/pull/267) -* fix: two preconditions the Haskell layer did not enforce - [#288](https://github.com/kazu-yamamoto/crypton/pull/288) -* fix(x86): stop casting a packed block to __m128i * - [#289](https://github.com/kazu-yamamoto/crypton/pull/289) -* fix(c): say that the digest pointers are never null - [#290](https://github.com/kazu-yamamoto/crypton/pull/290) -* fix(pbkdf2): refuse a digest larger than its block at compile time - [#291](https://github.com/kazu-yamamoto/crypton/pull/291) +A PBKDF2 output length of zero no longer aborts the process, and +`Crypto.PubKey.ECC.P256.scalarInv` no longer loops forever on zero. The +`license:` field now says what the tree holds, `BSD-3-Clause AND MIT AND +ISC`, and `license-files:` lists all five texts. **Nothing is required of a +user that was not required before**; the field was simply incomplete. + +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.5...crypton-v2.1.6) ## 2.1.5 -2.1.3 and 2.1.4 cannot be built with GCC 14 or newer. This release is -that fix. - -* Watch for a primitive fallen off its fast path - [#277](https://github.com/kazu-yamamoto/crypton/pull/277) -* The performance tables for 2.1.4 - [#278](https://github.com/kazu-yamamoto/crypton/pull/278) -* The x86-64 table, on the machine the README names - [#279](https://github.com/kazu-yamamoto/crypton/pull/279) -* perf(armv8): GHASH against a twisted H, a quarter faster - [#281](https://github.com/kazu-yamamoto/crypton/pull/281) -* ct: run the constant-time harness on AArch64, and put its AES to it - [#283](https://github.com/kazu-yamamoto/crypton/pull/283) -* Fix crypton_sha1_x86_do_chunk signature - [#284](https://github.com/kazu-yamamoto/crypton/pull/284) -* ci: build the C with a compiler stricter than this matrix has - [#285](https://github.com/kazu-yamamoto/crypton/pull/285) +2.1.3 and 2.1.4 cannot be built with GCC 14 or newer. This release is that +fix. AES-GCM is also about a quarter faster on AArch64. + +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.4...crypton-v2.1.5) ## 2.1.4 2.1.3 could not be built from Hackage in the default configuration, and is -deprecated there. This release is that fix. It is deprecated on Hackage in +deprecated there. This release is that fix, and two more: the C builds with +gcc before 13 on AArch64 again, and SHA-256 on AArch64 is back to the speed +of 2.1.2, which 2.1.3 had cut to a fifth. It is deprecated on Hackage in turn, as it does not build with GCC 14 or newer; use 2.1.5 or later. -* Add p256 header files to cabal extra-source-files - [#271](https://github.com/kazu-yamamoto/crypton/pull/271) -* Build what is published, not only what is checked out - [#272](https://github.com/kazu-yamamoto/crypton/pull/272) -* SHA-256 on AArch64 is 5.4x slower in 2.1.3 than in 2.1.2 - [#274](https://github.com/kazu-yamamoto/crypton/pull/274) -* The target attribute spelling gcc before 13 understands - [#276](https://github.com/kazu-yamamoto/crypton/pull/276) +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.3...crypton-v2.1.4) ## 2.1.3 @@ -82,78 +53,17 @@ bytes for AES-GCM and exactly 16 for ChaCha20-Poly1305, so a truncated ChaCha20-Poly1305 tag is refused. `Crypto.Cipher.AES.GCM` refuses an empty nonce, which gave the authentication key away. A message of 4 GiB or more was silently truncated on its way to the C; the streaming ciphers now process all -of it and the one-call AEADs and AES modes refuse it. The C now runs under -the sanitizers and a constant-time check in CI, and key material is wiped -where the compiler cannot skip it. - -* fix(aead): reject missing and oversized authentication tags - [#233](https://github.com/kazu-yamamoto/crypton/pull/233) -* fix(chacha): remove redundant Word8 import - [#234](https://github.com/kazu-yamamoto/crypton/pull/234) -* test(number): cover the two modulus sizes the assembly runs at - [#235](https://github.com/kazu-yamamoto/crypton/pull/235) -* perf(rsa): swap the buffers instead of copying them back - [#236](https://github.com/kazu-yamamoto/crypton/pull/236) -* perf(rsa): scan the exponentiation's table four limbs at a time - [#237](https://github.com/kazu-yamamoto/crypton/pull/237) -* fix(gcm): write the field doubling from its definition - [#238](https://github.com/kazu-yamamoto/crypton/pull/238) -* doc(gcm): carry the MIT notice for the parts that follow fusion - [#239](https://github.com/kazu-yamamoto/crypton/pull/239) -* perf(ed25519): the base point multiplication through s2n-bignum - [#240](https://github.com/kazu-yamamoto/crypton/pull/240) -* perf(gcm): AES-GCM through the 512-bit VAES and VPCLMULQDQ - [#241](https://github.com/kazu-yamamoto/crypton/pull/241) -* doc: the README said AVX-512 was not used, and it is - [#242](https://github.com/kazu-yamamoto/crypton/pull/242) -* perf(ecdsa): P-256 verification multiplies both scalars at once - [#243](https://github.com/kazu-yamamoto/crypton/pull/243) -* perf(rsa): four limbs and two carry chains on AArch64 - [#244](https://github.com/kazu-yamamoto/crypton/pull/244) -* perf(rsa): write out the ragged end of the AArch64 row - [#245](https://github.com/kazu-yamamoto/crypton/pull/245) -* perf(rsa): build R^2 by squaring, not by doubling - [#246](https://github.com/kazu-yamamoto/crypton/pull/246) -* perf(rsa): stop clearing the scratch a Montgomery multiply writes over - [#247](https://github.com/kazu-yamamoto/crypton/pull/247) -* doc(gcm): write down what the AArch64 GHASH is short of - [#248](https://github.com/kazu-yamamoto/crypton/pull/248) -* security(aes): refuse a nonce of no bytes in Crypto.Cipher.AES.GCM - [#250](https://github.com/kazu-yamamoto/crypton/pull/250) -* ci: build and test the C the other architectures use - [#251](https://github.com/kazu-yamamoto/crypton/pull/251) -* perf(p256): five teeth to a comb block, over the signed representation - [#252](https://github.com/kazu-yamamoto/crypton/pull/252) -* security(cipher): stop truncating message lengths on the way to the C - [#253](https://github.com/kazu-yamamoto/crypton/pull/253) -* fix(c): two left shifts the standard leaves undefined - [#254](https://github.com/kazu-yamamoto/crypton/pull/254) -* ci: run the C under the sanitizers - [#255](https://github.com/kazu-yamamoto/crypton/pull/255) -* fix(c): read words out of a block rather than pointing at it - [#256](https://github.com/kazu-yamamoto/crypton/pull/256) -* fix(internal): drop an import nothing uses any more - [#257](https://github.com/kazu-yamamoto/crypton/pull/257) -* fix(c): decide the dispatch table once, not on every key - [#258](https://github.com/kazu-yamamoto/crypton/pull/258) -* Fix the three cabal flag settings that were broken - [#259](https://github.com/kazu-yamamoto/crypton/pull/259) -* Run the C that only 32-bit architectures get, and fix what that found - [#260](https://github.com/kazu-yamamoto/crypton/pull/260) -* Let the last addition of each scalar multiplication be a complete one - [#261](https://github.com/kazu-yamamoto/crypton/pull/261) -* Ask whether the secrets decide anything - [#262](https://github.com/kazu-yamamoto/crypton/pull/262) -* Ask a big-endian machine the same questions - [#263](https://github.com/kazu-yamamoto/crypton/pull/263) -* Ask what the secrets leave behind - [#264](https://github.com/kazu-yamamoto/crypton/pull/264) -* Stop taking eighteen runner slots to test three things - [#265](https://github.com/kazu-yamamoto/crypton/pull/265) -* Make the scrubs ones the compiler cannot drop, and finish round ten - [#266](https://github.com/kazu-yamamoto/crypton/pull/266) -* Feed the parsers bytes nobody chose - [#268](https://github.com/kazu-yamamoto/crypton/pull/268) +of it and the one-call AEADs and AES modes refuse it. The arithmetic used +without GMP no longer overruns a buffer, two threads setting up AES keys no +longer race, and the three cabal flag settings that were broken work again. + +RSA on AArch64, Ed25519 signing and key generation, and P-256 ECDSA +verification are faster, and AES-GCM uses 512-bit VAES where x86-64 has it. +The C now runs under the sanitizers and a constant-time check in CI, on +32-bit and big-endian machines too, and key material is wiped where the +compiler cannot skip it. + +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.2...crypton-v2.1.3) ## 2.1.2 @@ -162,24 +72,7 @@ go through AWS's s2n-bignum, hand-written assembly carrying machine-checked proofs, which makes them up to nine times faster depending on the curve and the operation. AES-GCM uses the wide VAES instructions where x86-64 has them. -* perf(p256): 255 squarings for the field inversion, not 287 - [#223](https://github.com/kazu-yamamoto/crypton/pull/223) -* perf(p256): ECDH through s2n-bignum, 2.7x - [#224](https://github.com/kazu-yamamoto/crypton/pull/224) -* perf(ecc): P-384 and P-521 through s2n-bignum, 7x and 9x - [#225](https://github.com/kazu-yamamoto/crypton/pull/225) -* perf(p256): ECDSA signing 2.4x and verification 2.2x - [#226](https://github.com/kazu-yamamoto/crypton/pull/226) -* perf(rsa): the Montgomery multiplication through s2n-bignum on x86-64 - [#227](https://github.com/kazu-yamamoto/crypton/pull/227) -* perf(ecdsa): invert modulo the order in division steps, not an exponentiation - [#228](https://github.com/kazu-yamamoto/crypton/pull/228) -* perf(x25519): X25519 through s2n-bignum, and a table for key generation - [#229](https://github.com/kazu-yamamoto/crypton/pull/229) -* perf(gcm): AES-GCM through VAES and VPCLMULQDQ - [#230](https://github.com/kazu-yamamoto/crypton/pull/230) -* perf(gcm): compile the wide loop once per key length - [#231](https://github.com/kazu-yamamoto/crypton/pull/231) +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.1...crypton-v2.1.2) ## 2.1.1 @@ -188,14 +81,7 @@ RFC 6979 deterministic nonces, `Crypto.Cipher.ChaCha.Poly1305` does a whole ChaCha20-Poly1305 message in one call, and `Crypto.Cipher.AES.GCM` gains `decryptWithTag` for protocols that carry the tag apart from the ciphertext. -* feat(ecdsa): RFC 6979 deterministic nonces for Crypto.PubKey.ECDSA - [#219](https://github.com/kazu-yamamoto/crypton/pull/219) -* feat(gcm): a decrypt that hands back the tag instead of comparing it - [#220](https://github.com/kazu-yamamoto/crypton/pull/220) -* feat(chachapoly): ChaCha20-Poly1305 a message at a time - [#221](https://github.com/kazu-yamamoto/crypton/pull/221) -* docs(rsa): say in the haddock what the optional blinder covers - [#222](https://github.com/kazu-yamamoto/crypton/pull/222) +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.0...crypton-v2.1.1) ## 2.1.0 @@ -209,314 +95,44 @@ One change breaks callers: `Crypto.Cipher.ChaChaPoly1305.initialize` and `initializeX` take a checked `Key`, built with `key`, and return a `State` rather than a `CryptoFailable State`. -* feat(hash): Skein with the digest size as a type parameter - [#197](https://github.com/kazu-yamamoto/crypton/pull/197) -* fix(chachapoly1305): take a checked key, so that initializing cannot fail - [#198](https://github.com/kazu-yamamoto/crypton/pull/198) -* feat(aes): Crypto.Cipher.AES.GCM, for many short messages under one key - [#199](https://github.com/kazu-yamamoto/crypton/pull/199) -* build: say which platforms the fallback AES sources are for - [#200](https://github.com/kazu-yamamoto/crypton/pull/200) -* feat(aes): encryptWithMask, for the QUIC header protection mask - [#201](https://github.com/kazu-yamamoto/crypton/pull/201) -* fix(cpu): stop reading Intel's SDBG bit as AMD's XOP - [#204](https://github.com/kazu-yamamoto/crypton/pull/204) -* fix(bench): build the benchmark against the checked ChaCha20-Poly1305 key - [#205](https://github.com/kazu-yamamoto/crypton/pull/205) -* ci: key the cache on the package version - [#206](https://github.com/kazu-yamamoto/crypton/pull/206) -* ci: build the benchmarks - [#207](https://github.com/kazu-yamamoto/crypton/pull/207) -* perf(gcm): a fused AES-GCM for x86-64 - [#208](https://github.com/kazu-yamamoto/crypton/pull/208) -* perf(gcm): a fused AES-GCM for AArch64 - [#209](https://github.com/kazu-yamamoto/crypton/pull/209) -* perf(gcm): build the counter in vector registers - [#210](https://github.com/kazu-yamamoto/crypton/pull/210) -* perf(gcm): a spare lane for E(K,Y0), and a cheaper short block - [#211](https://github.com/kazu-yamamoto/crypton/pull/211) -* perf(gcm): unroll the tail pass, and take its blocks from registers - [#212](https://github.com/kazu-yamamoto/crypton/pull/212) -* perf(gcm): read a short block where it lies - [#213](https://github.com/kazu-yamamoto/crypton/pull/213) -* perf(gcm): the length block and the counter, in registers - [#214](https://github.com/kazu-yamamoto/crypton/pull/214) -* perf(gcm): let the one-call interface specialise - [#215](https://github.com/kazu-yamamoto/crypton/pull/215) -* perf(gcm): decryption takes the fused path too - [#216](https://github.com/kazu-yamamoto/crypton/pull/216) -* perf(gcm): GHASH takes the ciphertext from the output buffer - [#217](https://github.com/kazu-yamamoto/crypton/pull/217) -* perf(p256): a signed five-bit window for the variable-point multiply - [#218](https://github.com/kazu-yamamoto/crypton/pull/218) +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.0.0...crypton-v2.1.0) ## 2.0.1 A maintenance release from the 2.0 branch with one fix: SHA-512 and ChaCha20 crashed on Intel processors from Broadwell on. -* fix(cpu): stop reading Intel's SDBG bit as AMD's XOP - [#203](https://github.com/kazu-yamamoto/crypton/pull/203) +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.0.0...crypton-v2.0.1) ## 2.0.0 A large release, faster and harder to attack. AES, GHASH, SHA-1, SHA-2, SHA-3, ChaCha20 and Poly1305 use the processor's instructions on x86-64 and -AArch64, several through the CRYPTOGAMS assembly OpenSSL uses, and DES, -Camellia, Twofish and Blowfish run in C rather than Haskell. RSA, DSA, ECDSA -and the OTP checks no longer let a secret decide how long they take, `expSafe` -hides its exponent again, and showing a private key no longer prints it. - -**Breaking changes.** Input that used to be accepted is now refused: a value -at or above an RSA or Rabin modulus, a signature of the wrong length or out of -range, a digest too short for HOTP's dynamic truncation, a non-canonical -Ed25519 signature, a DH or ECDH peer value that fails validation, an ECC -public point outside the prime-order subgroup, a PKCS#7 block size outside -1..255, and block cipher input that is not a whole number of blocks. A -refused KDF, Argon2 or bcrypt parameter is reported as a `CryptoError` rather -than raised as an `ErrorCall`, and `CryptoError_ParameterInvalid` is appended -to `CryptoError`; `tryGetShared` is added beside `getShared`. Two exported -functions changed their signature: `Crypto.MAC.Poly1305.initialize` and -`auth` take a checked `Key`, built with `key`, so `initialize` can no longer -fail. - -**Deprecated.** The eighteen curves over a binary field in -`Crypto.ECC.Simple.Types`. They are obsolete, they are the curves whose -cofactor is not 1, and they will go in a later major version. Prefer a prime -curve, or X25519. - -* Add GHC 9.14 to CI - [#74](https://github.com/kazu-yamamoto/crypton/pull/74) -* fix(ed25519): reject non-canonical signatures - [#81](https://github.com/kazu-yamamoto/crypton/pull/81) -* fix(hkdf): enforce RFC 5869 output limit - [#82](https://github.com/kazu-yamamoto/crypton/pull/82) -* fix(p256): accept valid edge-case points - [#83](https://github.com/kazu-yamamoto/crypton/pull/83) -* fix(ecc): accept zero-x P-256 shared secrets - [#84](https://github.com/kazu-yamamoto/crypton/pull/84) -* fix(otp): require a digest long enough for dynamic truncation - [#85](https://github.com/kazu-yamamoto/crypton/pull/85) -* fix(pkcs15): reject malformed PKCS#1 v1.5 signatures - [#86](https://github.com/kazu-yamamoto/crypton/pull/86) -* fix(ecdh): validate the peer point before the exchange - [#87](https://github.com/kazu-yamamoto/crypton/pull/87) -* fix(dsa): do not crash on non-invertible values - [#88](https://github.com/kazu-yamamoto/crypton/pull/88) -* fix(dh): validate the peer public number - [#89](https://github.com/kazu-yamamoto/crypton/pull/89) -* fix(argon2): report invalid options as CryptoFailed - [#90](https://github.com/kazu-yamamoto/crypton/pull/90) -* fix(rsa): drop the early exits from PKCS#1 v1.5 and OAEP unpadding - [#91](https://github.com/kazu-yamamoto/crypton/pull/91) -* fix(otp): compare TOTP candidates without an early exit - [#92](https://github.com/kazu-yamamoto/crypton/pull/92) -* feat(dh): add getShared' reporting rejections as CryptoFailable - [#93](https://github.com/kazu-yamamoto/crypton/pull/93) -* feat(aead): add aeadSimpleDecrypt' taking the tag length - [#94](https://github.com/kazu-yamamoto/crypton/pull/94) -* test: move the suite to hspec, with hspec-discover - [#95](https://github.com/kazu-yamamoto/crypton/pull/95) -* docs(bcrypt): say that only the first 72 bytes of a password count - [#96](https://github.com/kazu-yamamoto/crypton/pull/96) -* feat(elgamal): fix and expose Crypto.PubKey.ElGamal - [#97](https://github.com/kazu-yamamoto/crypton/pull/97) -* fix(padding): reject a PKCS7 block size outside 1..255 - [#98](https://github.com/kazu-yamamoto/crypton/pull/98) -* build(bench): move the benchmarks from gauge to tasty-bench - [#99](https://github.com/kazu-yamamoto/crypton/pull/99) -* feat(aes): use the ARMv8 cryptographic extensions on AArch64 - [#100](https://github.com/kazu-yamamoto/crypton/pull/100) -* ci: stop throwing the cache away, and keep the build products in it - [#101](https://github.com/kazu-yamamoto/crypton/pull/101) -* feat(aes): use PMULL for GHASH on AArch64 - [#102](https://github.com/kazu-yamamoto/crypton/pull/102) -* ci: cut the macOS queueing and supersede stale branch runs - [#103](https://github.com/kazu-yamamoto/crypton/pull/103) -* feat(sha256): use the ARMv8 SHA-2 instructions on AArch64 - [#104](https://github.com/kazu-yamamoto/crypton/pull/104) -* perf(gcm): fold four GHASH blocks into one reduction - [#105](https://github.com/kazu-yamamoto/crypton/pull/105) -* ci: build and test on aarch64 Linux - [#106](https://github.com/kazu-yamamoto/crypton/pull/106) -* fix(cabal): build the AES-NI paths on Windows too - [#107](https://github.com/kazu-yamamoto/crypton/pull/107) -* perf(aes): specialise by key size and interleave eight blocks on AArch64 - [#108](https://github.com/kazu-yamamoto/crypton/pull/108) -* perf(gcm): drive GCM from AArch64 rather than the generic loop - [#109](https://github.com/kazu-yamamoto/crypton/pull/109) -* feat(sha512): use the ARMv8.2 SHA-512 instructions on AArch64 - [#110](https://github.com/kazu-yamamoto/crypton/pull/110) -* perf(chacha): do four blocks at a time with NEON on AArch64 - [#111](https://github.com/kazu-yamamoto/crypton/pull/111) -* perf(chacha): do four blocks at a time with SSE2 on x86-64 - [#112](https://github.com/kazu-yamamoto/crypton/pull/112) -* perf(chacha): take eight blocks with AVX2 where the machine has it - [#113](https://github.com/kazu-yamamoto/crypton/pull/113) -* perf(gcm): give x86 its own decryption loop, and eight blocks either way - [#114](https://github.com/kazu-yamamoto/crypton/pull/114) -* fix(padding): bound PKCS7 padding by the block, and check ZERO's size - [#115](https://github.com/kazu-yamamoto/crypton/pull/115) -* ecc: say which curves branch on a secret scalar, and work in Jacobian coordinates - [#116](https://github.com/kazu-yamamoto/crypton/pull/116) -* perf(poly1305): take four blocks at a time with AVX2 on x86-64 - [#117](https://github.com/kazu-yamamoto/crypton/pull/117) -* perf(xts): drive XTS eight blocks at a time, and dispatch its decryption - [#118](https://github.com/kazu-yamamoto/crypton/pull/118) -* Report refused KDF parameters as CryptoError, and fix a PBKDF2 SIGBUS - [#119](https://github.com/kazu-yamamoto/crypton/pull/119) -* Search the HOTP resynchronization window without early exits - [#120](https://github.com/kazu-yamamoto/crypton/pull/120) -* Refuse an RSA representative that is not below the modulus - [#121](https://github.com/kazu-yamamoto/crypton/pull/121) -* Give AFIS one answer for a parameter it cannot use - [#122](https://github.com/kazu-yamamoto/crypton/pull/122) -* Say what ElGamal's signWith requires of k - [#123](https://github.com/kazu-yamamoto/crypton/pull/123) -* Draw Miller-Rabin witnesses per number, not once per process - [#124](https://github.com/kazu-yamamoto/crypton/pull/124) -* Refuse Rabin values that are not below the modulus, and keep the padding that was signed - [#125](https://github.com/kazu-yamamoto/crypton/pull/125) -* Decode Rabin's OAEP without early exits - [#126](https://github.com/kazu-yamamoto/crypton/pull/126) -* Make CMAC linear, and chain it through CBC - [#127](https://github.com/kazu-yamamoto/crypton/pull/127) -* Put DES in C - [#128](https://github.com/kazu-yamamoto/crypton/pull/128) -* Make the generic block cipher modes linear, and bulk where the blocks allow - [#129](https://github.com/kazu-yamamoto/crypton/pull/129) -* Walk Twofish's blocks once, and carry them in words - [#130](https://github.com/kazu-yamamoto/crypton/pull/130) -* Put Camellia in C - [#131](https://github.com/kazu-yamamoto/crypton/pull/131) -* Route P-256 through the C implementation it already had - [#132](https://github.com/kazu-yamamoto/crypton/pull/132) -* Fold instead of dividing in the generic curve arithmetic - [#133](https://github.com/kazu-yamamoto/crypton/pull/133) -* Reduce the binary field by folding, and work a byte and a nibble at a time - [#134](https://github.com/kazu-yamamoto/crypton/pull/134) -* Stop running a Fermat test Miller-Rabin subsumes - [#135](https://github.com/kazu-yamamoto/crypton/pull/135) -* Make expSafe hide the exponent again - [#136](https://github.com/kazu-yamamoto/crypton/pull/136) -* Square, and multiply, faster in expSafe - [#137](https://github.com/kazu-yamamoto/crypton/pull/137) -* Invert the signing nonce without a side channel - [#138](https://github.com/kazu-yamamoto/crypton/pull/138) -* Keep the P-256 signature out of Integer arithmetic - [#139](https://github.com/kazu-yamamoto/crypton/pull/139) -* Add at every bit in the prime-curve multiplication, which laziness was skipping - [#140](https://github.com/kazu-yamamoto/crypton/pull/140) -* Multiply points in C on curves over a prime field - [#141](https://github.com/kazu-yamamoto/crypton/pull/141) -* A ladder for the curves over a binary field - [#142](https://github.com/kazu-yamamoto/crypton/pull/142) -* Work RSA's qinv out without the extended Euclidean algorithm - [#143](https://github.com/kazu-yamamoto/crypton/pull/143) -* Keep the RSA blinding factor out of the extended algorithm - [#144](https://github.com/kazu-yamamoto/crypton/pull/144) -* Unroll the inner loop at four and two as well - [#145](https://github.com/kazu-yamamoto/crypton/pull/145) -* Keep a table for each curve's base point - [#146](https://github.com/kazu-yamamoto/crypton/pull/146) -* Start R squared at the top of the modulus, and why folding did not pay - [#147](https://github.com/kazu-yamamoto/crypton/pull/147) -* Do the binary field arithmetic in C - [#148](https://github.com/kazu-yamamoto/crypton/pull/148) -* Use the x86 carry-less multiply where the processor has it - [#149](https://github.com/kazu-yamamoto/crypton/pull/149) -* Close the two testing gaps: one multiplication for both APIs, one place for each buffer's size - [#150](https://github.com/kazu-yamamoto/crypton/pull/150) -* Ask aarch64 for its carry-less multiply as well - [#151](https://github.com/kazu-yamamoto/crypton/pull/151) -* Work the RSA private exponent out without the extended algorithm - [#152](https://github.com/kazu-yamamoto/crypton/pull/152) -* Fewer Miller-Rabin rounds for a candidate nobody chose - [#153](https://github.com/kazu-yamamoto/crypton/pull/153) -* Blowfish, and the key setup bcrypt wraps it in, in C - [#154](https://github.com/kazu-yamamoto/crypton/pull/154) -* perf(sha256): use the Intel SHA extensions on x86-64 - [#155](https://github.com/kazu-yamamoto/crypton/pull/155) -* perf(aes): AES-192 through the processor's AES instructions - [#156](https://github.com/kazu-yamamoto/crypton/pull/156) -* perf(aes): build the AArch64 key schedule with AESE, not the S-box table - [#157](https://github.com/kazu-yamamoto/crypton/pull/157) -* test(aes): run the XTS vectors, and OCB and CCM at 192 and 256 bits - [#158](https://github.com/kazu-yamamoto/crypton/pull/158) -* perf(ocb): drive OCB through the ECB paths a group at a time - [#159](https://github.com/kazu-yamamoto/crypton/pull/159) -* perf(gcm): take the GHASH of the group before, alongside this group's rounds - [#160](https://github.com/kazu-yamamoto/crypton/pull/160) -* perf(sha): compute the message schedule in vector registers on x86 - [#161](https://github.com/kazu-yamamoto/crypton/pull/161) -* perf(chacha): combine as the keystream comes out of the registers - [#162](https://github.com/kazu-yamamoto/crypton/pull/162) -* perf(poly1305): shorten the carry chain and stop spilling the loop - [#163](https://github.com/kazu-yamamoto/crypton/pull/163) -* docs(sidechannel): say what the prime-field modules keep from the clock - [#164](https://github.com/kazu-yamamoto/crypton/pull/164) -* perf(sha1): use the Intel SHA extensions on x86-64 - [#165](https://github.com/kazu-yamamoto/crypton/pull/165) -* refactor(aes): drop the keystream generator nobody can call - [#166](https://github.com/kazu-yamamoto/crypton/pull/166) -* build: compile the C at -O3 - [#167](https://github.com/kazu-yamamoto/crypton/pull/167) -* perf(modes): stop the generic cipher modes allocating per byte - [#168](https://github.com/kazu-yamamoto/crypton/pull/168) -* perf(poly1305): four blocks at a time with NEON - [#169](https://github.com/kazu-yamamoto/crypton/pull/169) -* perf(sha1): use the ARMv8 SHA-1 instructions - [#170](https://github.com/kazu-yamamoto/crypton/pull/170) -* perf(sha3): use the ARMv8.2 SHA-3 instructions - [#171](https://github.com/kazu-yamamoto/crypton/pull/171) -* perf(gcm): the CRYPTOGAMS stitched AES-GCM on x86-64 - [#172](https://github.com/kazu-yamamoto/crypton/pull/172) -* perf(chacha): the CRYPTOGAMS ChaCha20 on AArch64 - [#173](https://github.com/kazu-yamamoto/crypton/pull/173) -* perf(poly1305): the CRYPTOGAMS Poly1305 on AArch64 - [#174](https://github.com/kazu-yamamoto/crypton/pull/174) -* perf(sha256): the CRYPTOGAMS SHA-256 on AArch64 - [#175](https://github.com/kazu-yamamoto/crypton/pull/175) -* perf(poly1305): the CRYPTOGAMS Poly1305 on x86-64 too - [#176](https://github.com/kazu-yamamoto/crypton/pull/176) -* perf(chacha): the CRYPTOGAMS ChaCha20 on x86-64 too - [#177](https://github.com/kazu-yamamoto/crypton/pull/177) -* perf(sha2): the CRYPTOGAMS SHA-256 and SHA-512 on x86-64 - [#178](https://github.com/kazu-yamamoto/crypton/pull/178) -* perf(sha1): hand the SHA-1 block loop a run of blocks, not one at a time - [#179](https://github.com/kazu-yamamoto/crypton/pull/179) -* perf(xts): double the tweak in the integer registers - [#180](https://github.com/kazu-yamamoto/crypton/pull/180) -* perf(sha3): take the CRYPTOGAMS Keccak for AArch64 - [#181](https://github.com/kazu-yamamoto/crypton/pull/181) -* perf(sha1): take the CRYPTOGAMS SHA-1 for AArch64 - [#182](https://github.com/kazu-yamamoto/crypton/pull/182) -* docs: put the performance tables in the README - [#183](https://github.com/kazu-yamamoto/crypton/pull/183) -* perf(sha3): take the CRYPTOGAMS Keccak for x86-64 as well - [#184](https://github.com/kazu-yamamoto/crypton/pull/184) -* docs: rebuild the performance tables - [#185](https://github.com/kazu-yamamoto/crypton/pull/185) -* perf(ecc): stop sharing the doublings in the double multiplication - [#186](https://github.com/kazu-yamamoto/crypton/pull/186) -* perf(number): count bytes from the bit count, not from base 256 - [#187](https://github.com/kazu-yamamoto/crypton/pull/187) -* perf(p256): inline the field arithmetic on AArch64 - [#188](https://github.com/kazu-yamamoto/crypton/pull/188) -* fix(api): name the reporting variants try..., not with an apostrophe - [#189](https://github.com/kazu-yamamoto/crypton/pull/189) -* fix(ecc): require a public point to be in the prime-order subgroup - [#190](https://github.com/kazu-yamamoto/crypton/pull/190) -* fix(pubkey): stop printing private keys, and add Crypto.Debug - [#191](https://github.com/kazu-yamamoto/crypton/pull/191) -* fix(poly1305): take a checked key, so that initializing cannot fail - [#192](https://github.com/kazu-yamamoto/crypton/pull/192) -* fix(bcrypt): refuse a cost bcrypt does not have rather than substituting one - [#194](https://github.com/kazu-yamamoto/crypton/pull/194) -* chore: build without a warning - [#195](https://github.com/kazu-yamamoto/crypton/pull/195) -* docs: build the documentation without a warning - [#196](https://github.com/kazu-yamamoto/crypton/pull/196) +AArch64, several through the CRYPTOGAMS assembly OpenSSL uses; DES, Camellia, +Twofish and Blowfish run in C rather than Haskell; and point multiplication on +every prime curve runs in C. RSA, DSA, ECDSA and the OTP checks no longer let +a secret decide how long they take, `expSafe` hides its exponent again, and +showing a private key no longer prints it (`Crypto.Debug` prints one on +purpose). `Crypto.PubKey.ElGamal` is exposed. + +Upgrading can break code in three ways. Input that used to be accepted is now +refused: a value at or above an RSA or Rabin modulus, a signature of the wrong +length or out of range, a digest too short for HOTP's dynamic truncation, a +non-canonical Ed25519 signature, a DH or ECDH peer value that fails +validation, an ECC public point outside the prime-order subgroup, a PKCS#7 +block size outside 1..255, and block cipher input that is not a whole number +of blocks. A refused KDF, Argon2 or bcrypt parameter, and a peer value +`getShared` refuses, is reported as a `CryptoError` rather than an +`ErrorCall`; `CryptoError_ParameterInvalid` is appended to `CryptoError`, and +`tryGetShared` is added beside `getShared`. `Crypto.MAC.Poly1305.initialize` +and `auth` take a checked `Key`, built with `key`, so `initialize` can no +longer fail. + +The eighteen curves over a binary field in `Crypto.ECC.Simple.Types` are +deprecated. They are obsolete, they are the curves whose cofactor is not 1, +and they will go in a later major version. Prefer a prime curve, or X25519. + +[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v1.1.5...crypton-v2.0.0) ## 1.1.5 From de3cfcd4f5d7c62b6fb97f478084e947b868eb43 Mon Sep 17 00:00:00 2001 From: jappeace-sloth Date: Tue, 6 Oct 2026 20:52:20 +0200 Subject: [PATCH 3/5] doc: keep the per-PR lines under each summary A summary on top for the reader deciding whether to upgrade, and the existing one line and link per pull request below it for the reader who wants to find a change, which is the format 45d6051 introduced. The compare links go again, since the PR lines already point at the detail. Against main the per-PR lines are untouched (234 links, same set), except that #197 to #201 move from 2.0.1 to 2.1.0, where the tags put them. Prompt: actually linking to the specific pr with a one line summary should be fine, I guess those can be in bullet lists Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 421 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 410 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac517e6b..d9c46701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,12 @@ post-quantum key encapsulation and signature schemes of FIPS 203 and FIPS 204, through mlkem-native and mldsa-native. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.7...main) +* chore: stop hiding foldl' from Prelude + [#294](https://github.com/kazu-yamamoto/crypton/pull/294) +* chore: ask for hidden visibility only where the format has it + [#295](https://github.com/kazu-yamamoto/crypton/pull/295) +* feat: ML-KEM and ML-DSA, through mlkem-native and mldsa-native + [#297](https://github.com/kazu-yamamoto/crypton/pull/297) ## 2.1.7 @@ -15,7 +20,10 @@ is a conformance fault rather than a forgery: producing such a signature takes the private key, so a third party holding a valid signature cannot turn it into one of these. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.6...crypton-v2.1.7) +* chore(p256): drop two declarations nothing defines + [#292](https://github.com/kazu-yamamoto/crypton/pull/292) +* fix(pss): refuse an encoding with a bit set outside emBits + [#293](https://github.com/kazu-yamamoto/crypton/pull/293) ## 2.1.6 @@ -25,14 +33,36 @@ A PBKDF2 output length of zero no longer aborts the process, and ISC`, and `license-files:` lists all five texts. **Nothing is required of a user that was not required before**; the field was simply incomplete. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.5...crypton-v2.1.6) +* Carry the MIT notice for the parts that follow fusion, and say what the tree holds + [#267](https://github.com/kazu-yamamoto/crypton/pull/267) +* fix: two preconditions the Haskell layer did not enforce + [#288](https://github.com/kazu-yamamoto/crypton/pull/288) +* fix(x86): stop casting a packed block to __m128i * + [#289](https://github.com/kazu-yamamoto/crypton/pull/289) +* fix(c): say that the digest pointers are never null + [#290](https://github.com/kazu-yamamoto/crypton/pull/290) +* fix(pbkdf2): refuse a digest larger than its block at compile time + [#291](https://github.com/kazu-yamamoto/crypton/pull/291) ## 2.1.5 2.1.3 and 2.1.4 cannot be built with GCC 14 or newer. This release is that fix. AES-GCM is also about a quarter faster on AArch64. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.4...crypton-v2.1.5) +* Watch for a primitive fallen off its fast path + [#277](https://github.com/kazu-yamamoto/crypton/pull/277) +* The performance tables for 2.1.4 + [#278](https://github.com/kazu-yamamoto/crypton/pull/278) +* The x86-64 table, on the machine the README names + [#279](https://github.com/kazu-yamamoto/crypton/pull/279) +* perf(armv8): GHASH against a twisted H, a quarter faster + [#281](https://github.com/kazu-yamamoto/crypton/pull/281) +* ct: run the constant-time harness on AArch64, and put its AES to it + [#283](https://github.com/kazu-yamamoto/crypton/pull/283) +* Fix crypton_sha1_x86_do_chunk signature + [#284](https://github.com/kazu-yamamoto/crypton/pull/284) +* ci: build the C with a compiler stricter than this matrix has + [#285](https://github.com/kazu-yamamoto/crypton/pull/285) ## 2.1.4 @@ -42,7 +72,14 @@ gcc before 13 on AArch64 again, and SHA-256 on AArch64 is back to the speed of 2.1.2, which 2.1.3 had cut to a fifth. It is deprecated on Hackage in turn, as it does not build with GCC 14 or newer; use 2.1.5 or later. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.3...crypton-v2.1.4) +* Add p256 header files to cabal extra-source-files + [#271](https://github.com/kazu-yamamoto/crypton/pull/271) +* Build what is published, not only what is checked out + [#272](https://github.com/kazu-yamamoto/crypton/pull/272) +* SHA-256 on AArch64 is 5.4x slower in 2.1.3 than in 2.1.2 + [#274](https://github.com/kazu-yamamoto/crypton/pull/274) +* The target attribute spelling gcc before 13 understands + [#276](https://github.com/kazu-yamamoto/crypton/pull/276) ## 2.1.3 @@ -63,7 +100,74 @@ The C now runs under the sanitizers and a constant-time check in CI, on 32-bit and big-endian machines too, and key material is wiped where the compiler cannot skip it. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.2...crypton-v2.1.3) +* fix(aead): reject missing and oversized authentication tags + [#233](https://github.com/kazu-yamamoto/crypton/pull/233) +* fix(chacha): remove redundant Word8 import + [#234](https://github.com/kazu-yamamoto/crypton/pull/234) +* test(number): cover the two modulus sizes the assembly runs at + [#235](https://github.com/kazu-yamamoto/crypton/pull/235) +* perf(rsa): swap the buffers instead of copying them back + [#236](https://github.com/kazu-yamamoto/crypton/pull/236) +* perf(rsa): scan the exponentiation's table four limbs at a time + [#237](https://github.com/kazu-yamamoto/crypton/pull/237) +* fix(gcm): write the field doubling from its definition + [#238](https://github.com/kazu-yamamoto/crypton/pull/238) +* doc(gcm): carry the MIT notice for the parts that follow fusion + [#239](https://github.com/kazu-yamamoto/crypton/pull/239) +* perf(ed25519): the base point multiplication through s2n-bignum + [#240](https://github.com/kazu-yamamoto/crypton/pull/240) +* perf(gcm): AES-GCM through the 512-bit VAES and VPCLMULQDQ + [#241](https://github.com/kazu-yamamoto/crypton/pull/241) +* doc: the README said AVX-512 was not used, and it is + [#242](https://github.com/kazu-yamamoto/crypton/pull/242) +* perf(ecdsa): P-256 verification multiplies both scalars at once + [#243](https://github.com/kazu-yamamoto/crypton/pull/243) +* perf(rsa): four limbs and two carry chains on AArch64 + [#244](https://github.com/kazu-yamamoto/crypton/pull/244) +* perf(rsa): write out the ragged end of the AArch64 row + [#245](https://github.com/kazu-yamamoto/crypton/pull/245) +* perf(rsa): build R^2 by squaring, not by doubling + [#246](https://github.com/kazu-yamamoto/crypton/pull/246) +* perf(rsa): stop clearing the scratch a Montgomery multiply writes over + [#247](https://github.com/kazu-yamamoto/crypton/pull/247) +* doc(gcm): write down what the AArch64 GHASH is short of + [#248](https://github.com/kazu-yamamoto/crypton/pull/248) +* security(aes): refuse a nonce of no bytes in Crypto.Cipher.AES.GCM + [#250](https://github.com/kazu-yamamoto/crypton/pull/250) +* ci: build and test the C the other architectures use + [#251](https://github.com/kazu-yamamoto/crypton/pull/251) +* perf(p256): five teeth to a comb block, over the signed representation + [#252](https://github.com/kazu-yamamoto/crypton/pull/252) +* security(cipher): stop truncating message lengths on the way to the C + [#253](https://github.com/kazu-yamamoto/crypton/pull/253) +* fix(c): two left shifts the standard leaves undefined + [#254](https://github.com/kazu-yamamoto/crypton/pull/254) +* ci: run the C under the sanitizers + [#255](https://github.com/kazu-yamamoto/crypton/pull/255) +* fix(c): read words out of a block rather than pointing at it + [#256](https://github.com/kazu-yamamoto/crypton/pull/256) +* fix(internal): drop an import nothing uses any more + [#257](https://github.com/kazu-yamamoto/crypton/pull/257) +* fix(c): decide the dispatch table once, not on every key + [#258](https://github.com/kazu-yamamoto/crypton/pull/258) +* Fix the three cabal flag settings that were broken + [#259](https://github.com/kazu-yamamoto/crypton/pull/259) +* Run the C that only 32-bit architectures get, and fix what that found + [#260](https://github.com/kazu-yamamoto/crypton/pull/260) +* Let the last addition of each scalar multiplication be a complete one + [#261](https://github.com/kazu-yamamoto/crypton/pull/261) +* Ask whether the secrets decide anything + [#262](https://github.com/kazu-yamamoto/crypton/pull/262) +* Ask a big-endian machine the same questions + [#263](https://github.com/kazu-yamamoto/crypton/pull/263) +* Ask what the secrets leave behind + [#264](https://github.com/kazu-yamamoto/crypton/pull/264) +* Stop taking eighteen runner slots to test three things + [#265](https://github.com/kazu-yamamoto/crypton/pull/265) +* Make the scrubs ones the compiler cannot drop, and finish round ten + [#266](https://github.com/kazu-yamamoto/crypton/pull/266) +* Feed the parsers bytes nobody chose + [#268](https://github.com/kazu-yamamoto/crypton/pull/268) ## 2.1.2 @@ -72,7 +176,24 @@ go through AWS's s2n-bignum, hand-written assembly carrying machine-checked proofs, which makes them up to nine times faster depending on the curve and the operation. AES-GCM uses the wide VAES instructions where x86-64 has them. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.1...crypton-v2.1.2) +* perf(p256): 255 squarings for the field inversion, not 287 + [#223](https://github.com/kazu-yamamoto/crypton/pull/223) +* perf(p256): ECDH through s2n-bignum, 2.7x + [#224](https://github.com/kazu-yamamoto/crypton/pull/224) +* perf(ecc): P-384 and P-521 through s2n-bignum, 7x and 9x + [#225](https://github.com/kazu-yamamoto/crypton/pull/225) +* perf(p256): ECDSA signing 2.4x and verification 2.2x + [#226](https://github.com/kazu-yamamoto/crypton/pull/226) +* perf(rsa): the Montgomery multiplication through s2n-bignum on x86-64 + [#227](https://github.com/kazu-yamamoto/crypton/pull/227) +* perf(ecdsa): invert modulo the order in division steps, not an exponentiation + [#228](https://github.com/kazu-yamamoto/crypton/pull/228) +* perf(x25519): X25519 through s2n-bignum, and a table for key generation + [#229](https://github.com/kazu-yamamoto/crypton/pull/229) +* perf(gcm): AES-GCM through VAES and VPCLMULQDQ + [#230](https://github.com/kazu-yamamoto/crypton/pull/230) +* perf(gcm): compile the wide loop once per key length + [#231](https://github.com/kazu-yamamoto/crypton/pull/231) ## 2.1.1 @@ -81,7 +202,14 @@ RFC 6979 deterministic nonces, `Crypto.Cipher.ChaCha.Poly1305` does a whole ChaCha20-Poly1305 message in one call, and `Crypto.Cipher.AES.GCM` gains `decryptWithTag` for protocols that carry the tag apart from the ciphertext. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.1.0...crypton-v2.1.1) +* feat(ecdsa): RFC 6979 deterministic nonces for Crypto.PubKey.ECDSA + [#219](https://github.com/kazu-yamamoto/crypton/pull/219) +* feat(gcm): a decrypt that hands back the tag instead of comparing it + [#220](https://github.com/kazu-yamamoto/crypton/pull/220) +* feat(chachapoly): ChaCha20-Poly1305 a message at a time + [#221](https://github.com/kazu-yamamoto/crypton/pull/221) +* docs(rsa): say in the haddock what the optional blinder covers + [#222](https://github.com/kazu-yamamoto/crypton/pull/222) ## 2.1.0 @@ -95,14 +223,54 @@ One change breaks callers: `Crypto.Cipher.ChaChaPoly1305.initialize` and `initializeX` take a checked `Key`, built with `key`, and return a `State` rather than a `CryptoFailable State`. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.0.0...crypton-v2.1.0) +* feat(hash): Skein with the digest size as a type parameter + [#197](https://github.com/kazu-yamamoto/crypton/pull/197) +* fix(chachapoly1305): take a checked key, so that initializing cannot fail + [#198](https://github.com/kazu-yamamoto/crypton/pull/198) +* feat(aes): Crypto.Cipher.AES.GCM, for many short messages under one key + [#199](https://github.com/kazu-yamamoto/crypton/pull/199) +* build: say which platforms the fallback AES sources are for + [#200](https://github.com/kazu-yamamoto/crypton/pull/200) +* feat(aes): encryptWithMask, for the QUIC header protection mask + [#201](https://github.com/kazu-yamamoto/crypton/pull/201) +* fix(cpu): stop reading Intel's SDBG bit as AMD's XOP + [#204](https://github.com/kazu-yamamoto/crypton/pull/204) +* fix(bench): build the benchmark against the checked ChaCha20-Poly1305 key + [#205](https://github.com/kazu-yamamoto/crypton/pull/205) +* ci: key the cache on the package version + [#206](https://github.com/kazu-yamamoto/crypton/pull/206) +* ci: build the benchmarks + [#207](https://github.com/kazu-yamamoto/crypton/pull/207) +* perf(gcm): a fused AES-GCM for x86-64 + [#208](https://github.com/kazu-yamamoto/crypton/pull/208) +* perf(gcm): a fused AES-GCM for AArch64 + [#209](https://github.com/kazu-yamamoto/crypton/pull/209) +* perf(gcm): build the counter in vector registers + [#210](https://github.com/kazu-yamamoto/crypton/pull/210) +* perf(gcm): a spare lane for E(K,Y0), and a cheaper short block + [#211](https://github.com/kazu-yamamoto/crypton/pull/211) +* perf(gcm): unroll the tail pass, and take its blocks from registers + [#212](https://github.com/kazu-yamamoto/crypton/pull/212) +* perf(gcm): read a short block where it lies + [#213](https://github.com/kazu-yamamoto/crypton/pull/213) +* perf(gcm): the length block and the counter, in registers + [#214](https://github.com/kazu-yamamoto/crypton/pull/214) +* perf(gcm): let the one-call interface specialise + [#215](https://github.com/kazu-yamamoto/crypton/pull/215) +* perf(gcm): decryption takes the fused path too + [#216](https://github.com/kazu-yamamoto/crypton/pull/216) +* perf(gcm): GHASH takes the ciphertext from the output buffer + [#217](https://github.com/kazu-yamamoto/crypton/pull/217) +* perf(p256): a signed five-bit window for the variable-point multiply + [#218](https://github.com/kazu-yamamoto/crypton/pull/218) ## 2.0.1 A maintenance release from the 2.0 branch with one fix: SHA-512 and ChaCha20 crashed on Intel processors from Broadwell on. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v2.0.0...crypton-v2.0.1) +* fix(cpu): stop reading Intel's SDBG bit as AMD's XOP + [#203](https://github.com/kazu-yamamoto/crypton/pull/203) ## 2.0.0 @@ -132,7 +300,238 @@ The eighteen curves over a binary field in `Crypto.ECC.Simple.Types` are deprecated. They are obsolete, they are the curves whose cofactor is not 1, and they will go in a later major version. Prefer a prime curve, or X25519. -[All changes](https://github.com/kazu-yamamoto/crypton/compare/crypton-v1.1.5...crypton-v2.0.0) +* Add GHC 9.14 to CI + [#74](https://github.com/kazu-yamamoto/crypton/pull/74) +* fix(ed25519): reject non-canonical signatures + [#81](https://github.com/kazu-yamamoto/crypton/pull/81) +* fix(hkdf): enforce RFC 5869 output limit + [#82](https://github.com/kazu-yamamoto/crypton/pull/82) +* fix(p256): accept valid edge-case points + [#83](https://github.com/kazu-yamamoto/crypton/pull/83) +* fix(ecc): accept zero-x P-256 shared secrets + [#84](https://github.com/kazu-yamamoto/crypton/pull/84) +* fix(otp): require a digest long enough for dynamic truncation + [#85](https://github.com/kazu-yamamoto/crypton/pull/85) +* fix(pkcs15): reject malformed PKCS#1 v1.5 signatures + [#86](https://github.com/kazu-yamamoto/crypton/pull/86) +* fix(ecdh): validate the peer point before the exchange + [#87](https://github.com/kazu-yamamoto/crypton/pull/87) +* fix(dsa): do not crash on non-invertible values + [#88](https://github.com/kazu-yamamoto/crypton/pull/88) +* fix(dh): validate the peer public number + [#89](https://github.com/kazu-yamamoto/crypton/pull/89) +* fix(argon2): report invalid options as CryptoFailed + [#90](https://github.com/kazu-yamamoto/crypton/pull/90) +* fix(rsa): drop the early exits from PKCS#1 v1.5 and OAEP unpadding + [#91](https://github.com/kazu-yamamoto/crypton/pull/91) +* fix(otp): compare TOTP candidates without an early exit + [#92](https://github.com/kazu-yamamoto/crypton/pull/92) +* feat(dh): add getShared' reporting rejections as CryptoFailable + [#93](https://github.com/kazu-yamamoto/crypton/pull/93) +* feat(aead): add aeadSimpleDecrypt' taking the tag length + [#94](https://github.com/kazu-yamamoto/crypton/pull/94) +* test: move the suite to hspec, with hspec-discover + [#95](https://github.com/kazu-yamamoto/crypton/pull/95) +* docs(bcrypt): say that only the first 72 bytes of a password count + [#96](https://github.com/kazu-yamamoto/crypton/pull/96) +* feat(elgamal): fix and expose Crypto.PubKey.ElGamal + [#97](https://github.com/kazu-yamamoto/crypton/pull/97) +* fix(padding): reject a PKCS7 block size outside 1..255 + [#98](https://github.com/kazu-yamamoto/crypton/pull/98) +* build(bench): move the benchmarks from gauge to tasty-bench + [#99](https://github.com/kazu-yamamoto/crypton/pull/99) +* feat(aes): use the ARMv8 cryptographic extensions on AArch64 + [#100](https://github.com/kazu-yamamoto/crypton/pull/100) +* ci: stop throwing the cache away, and keep the build products in it + [#101](https://github.com/kazu-yamamoto/crypton/pull/101) +* feat(aes): use PMULL for GHASH on AArch64 + [#102](https://github.com/kazu-yamamoto/crypton/pull/102) +* ci: cut the macOS queueing and supersede stale branch runs + [#103](https://github.com/kazu-yamamoto/crypton/pull/103) +* feat(sha256): use the ARMv8 SHA-2 instructions on AArch64 + [#104](https://github.com/kazu-yamamoto/crypton/pull/104) +* perf(gcm): fold four GHASH blocks into one reduction + [#105](https://github.com/kazu-yamamoto/crypton/pull/105) +* ci: build and test on aarch64 Linux + [#106](https://github.com/kazu-yamamoto/crypton/pull/106) +* fix(cabal): build the AES-NI paths on Windows too + [#107](https://github.com/kazu-yamamoto/crypton/pull/107) +* perf(aes): specialise by key size and interleave eight blocks on AArch64 + [#108](https://github.com/kazu-yamamoto/crypton/pull/108) +* perf(gcm): drive GCM from AArch64 rather than the generic loop + [#109](https://github.com/kazu-yamamoto/crypton/pull/109) +* feat(sha512): use the ARMv8.2 SHA-512 instructions on AArch64 + [#110](https://github.com/kazu-yamamoto/crypton/pull/110) +* perf(chacha): do four blocks at a time with NEON on AArch64 + [#111](https://github.com/kazu-yamamoto/crypton/pull/111) +* perf(chacha): do four blocks at a time with SSE2 on x86-64 + [#112](https://github.com/kazu-yamamoto/crypton/pull/112) +* perf(chacha): take eight blocks with AVX2 where the machine has it + [#113](https://github.com/kazu-yamamoto/crypton/pull/113) +* perf(gcm): give x86 its own decryption loop, and eight blocks either way + [#114](https://github.com/kazu-yamamoto/crypton/pull/114) +* fix(padding): bound PKCS7 padding by the block, and check ZERO's size + [#115](https://github.com/kazu-yamamoto/crypton/pull/115) +* ecc: say which curves branch on a secret scalar, and work in Jacobian coordinates + [#116](https://github.com/kazu-yamamoto/crypton/pull/116) +* perf(poly1305): take four blocks at a time with AVX2 on x86-64 + [#117](https://github.com/kazu-yamamoto/crypton/pull/117) +* perf(xts): drive XTS eight blocks at a time, and dispatch its decryption + [#118](https://github.com/kazu-yamamoto/crypton/pull/118) +* Report refused KDF parameters as CryptoError, and fix a PBKDF2 SIGBUS + [#119](https://github.com/kazu-yamamoto/crypton/pull/119) +* Search the HOTP resynchronization window without early exits + [#120](https://github.com/kazu-yamamoto/crypton/pull/120) +* Refuse an RSA representative that is not below the modulus + [#121](https://github.com/kazu-yamamoto/crypton/pull/121) +* Give AFIS one answer for a parameter it cannot use + [#122](https://github.com/kazu-yamamoto/crypton/pull/122) +* Say what ElGamal's signWith requires of k + [#123](https://github.com/kazu-yamamoto/crypton/pull/123) +* Draw Miller-Rabin witnesses per number, not once per process + [#124](https://github.com/kazu-yamamoto/crypton/pull/124) +* Refuse Rabin values that are not below the modulus, and keep the padding that was signed + [#125](https://github.com/kazu-yamamoto/crypton/pull/125) +* Decode Rabin's OAEP without early exits + [#126](https://github.com/kazu-yamamoto/crypton/pull/126) +* Make CMAC linear, and chain it through CBC + [#127](https://github.com/kazu-yamamoto/crypton/pull/127) +* Put DES in C + [#128](https://github.com/kazu-yamamoto/crypton/pull/128) +* Make the generic block cipher modes linear, and bulk where the blocks allow + [#129](https://github.com/kazu-yamamoto/crypton/pull/129) +* Walk Twofish's blocks once, and carry them in words + [#130](https://github.com/kazu-yamamoto/crypton/pull/130) +* Put Camellia in C + [#131](https://github.com/kazu-yamamoto/crypton/pull/131) +* Route P-256 through the C implementation it already had + [#132](https://github.com/kazu-yamamoto/crypton/pull/132) +* Fold instead of dividing in the generic curve arithmetic + [#133](https://github.com/kazu-yamamoto/crypton/pull/133) +* Reduce the binary field by folding, and work a byte and a nibble at a time + [#134](https://github.com/kazu-yamamoto/crypton/pull/134) +* Stop running a Fermat test Miller-Rabin subsumes + [#135](https://github.com/kazu-yamamoto/crypton/pull/135) +* Make expSafe hide the exponent again + [#136](https://github.com/kazu-yamamoto/crypton/pull/136) +* Square, and multiply, faster in expSafe + [#137](https://github.com/kazu-yamamoto/crypton/pull/137) +* Invert the signing nonce without a side channel + [#138](https://github.com/kazu-yamamoto/crypton/pull/138) +* Keep the P-256 signature out of Integer arithmetic + [#139](https://github.com/kazu-yamamoto/crypton/pull/139) +* Add at every bit in the prime-curve multiplication, which laziness was skipping + [#140](https://github.com/kazu-yamamoto/crypton/pull/140) +* Multiply points in C on curves over a prime field + [#141](https://github.com/kazu-yamamoto/crypton/pull/141) +* A ladder for the curves over a binary field + [#142](https://github.com/kazu-yamamoto/crypton/pull/142) +* Work RSA's qinv out without the extended Euclidean algorithm + [#143](https://github.com/kazu-yamamoto/crypton/pull/143) +* Keep the RSA blinding factor out of the extended algorithm + [#144](https://github.com/kazu-yamamoto/crypton/pull/144) +* Unroll the inner loop at four and two as well + [#145](https://github.com/kazu-yamamoto/crypton/pull/145) +* Keep a table for each curve's base point + [#146](https://github.com/kazu-yamamoto/crypton/pull/146) +* Start R squared at the top of the modulus, and why folding did not pay + [#147](https://github.com/kazu-yamamoto/crypton/pull/147) +* Do the binary field arithmetic in C + [#148](https://github.com/kazu-yamamoto/crypton/pull/148) +* Use the x86 carry-less multiply where the processor has it + [#149](https://github.com/kazu-yamamoto/crypton/pull/149) +* Close the two testing gaps: one multiplication for both APIs, one place for each buffer's size + [#150](https://github.com/kazu-yamamoto/crypton/pull/150) +* Ask aarch64 for its carry-less multiply as well + [#151](https://github.com/kazu-yamamoto/crypton/pull/151) +* Work the RSA private exponent out without the extended algorithm + [#152](https://github.com/kazu-yamamoto/crypton/pull/152) +* Fewer Miller-Rabin rounds for a candidate nobody chose + [#153](https://github.com/kazu-yamamoto/crypton/pull/153) +* Blowfish, and the key setup bcrypt wraps it in, in C + [#154](https://github.com/kazu-yamamoto/crypton/pull/154) +* perf(sha256): use the Intel SHA extensions on x86-64 + [#155](https://github.com/kazu-yamamoto/crypton/pull/155) +* perf(aes): AES-192 through the processor's AES instructions + [#156](https://github.com/kazu-yamamoto/crypton/pull/156) +* perf(aes): build the AArch64 key schedule with AESE, not the S-box table + [#157](https://github.com/kazu-yamamoto/crypton/pull/157) +* test(aes): run the XTS vectors, and OCB and CCM at 192 and 256 bits + [#158](https://github.com/kazu-yamamoto/crypton/pull/158) +* perf(ocb): drive OCB through the ECB paths a group at a time + [#159](https://github.com/kazu-yamamoto/crypton/pull/159) +* perf(gcm): take the GHASH of the group before, alongside this group's rounds + [#160](https://github.com/kazu-yamamoto/crypton/pull/160) +* perf(sha): compute the message schedule in vector registers on x86 + [#161](https://github.com/kazu-yamamoto/crypton/pull/161) +* perf(chacha): combine as the keystream comes out of the registers + [#162](https://github.com/kazu-yamamoto/crypton/pull/162) +* perf(poly1305): shorten the carry chain and stop spilling the loop + [#163](https://github.com/kazu-yamamoto/crypton/pull/163) +* docs(sidechannel): say what the prime-field modules keep from the clock + [#164](https://github.com/kazu-yamamoto/crypton/pull/164) +* perf(sha1): use the Intel SHA extensions on x86-64 + [#165](https://github.com/kazu-yamamoto/crypton/pull/165) +* refactor(aes): drop the keystream generator nobody can call + [#166](https://github.com/kazu-yamamoto/crypton/pull/166) +* build: compile the C at -O3 + [#167](https://github.com/kazu-yamamoto/crypton/pull/167) +* perf(modes): stop the generic cipher modes allocating per byte + [#168](https://github.com/kazu-yamamoto/crypton/pull/168) +* perf(poly1305): four blocks at a time with NEON + [#169](https://github.com/kazu-yamamoto/crypton/pull/169) +* perf(sha1): use the ARMv8 SHA-1 instructions + [#170](https://github.com/kazu-yamamoto/crypton/pull/170) +* perf(sha3): use the ARMv8.2 SHA-3 instructions + [#171](https://github.com/kazu-yamamoto/crypton/pull/171) +* perf(gcm): the CRYPTOGAMS stitched AES-GCM on x86-64 + [#172](https://github.com/kazu-yamamoto/crypton/pull/172) +* perf(chacha): the CRYPTOGAMS ChaCha20 on AArch64 + [#173](https://github.com/kazu-yamamoto/crypton/pull/173) +* perf(poly1305): the CRYPTOGAMS Poly1305 on AArch64 + [#174](https://github.com/kazu-yamamoto/crypton/pull/174) +* perf(sha256): the CRYPTOGAMS SHA-256 on AArch64 + [#175](https://github.com/kazu-yamamoto/crypton/pull/175) +* perf(poly1305): the CRYPTOGAMS Poly1305 on x86-64 too + [#176](https://github.com/kazu-yamamoto/crypton/pull/176) +* perf(chacha): the CRYPTOGAMS ChaCha20 on x86-64 too + [#177](https://github.com/kazu-yamamoto/crypton/pull/177) +* perf(sha2): the CRYPTOGAMS SHA-256 and SHA-512 on x86-64 + [#178](https://github.com/kazu-yamamoto/crypton/pull/178) +* perf(sha1): hand the SHA-1 block loop a run of blocks, not one at a time + [#179](https://github.com/kazu-yamamoto/crypton/pull/179) +* perf(xts): double the tweak in the integer registers + [#180](https://github.com/kazu-yamamoto/crypton/pull/180) +* perf(sha3): take the CRYPTOGAMS Keccak for AArch64 + [#181](https://github.com/kazu-yamamoto/crypton/pull/181) +* perf(sha1): take the CRYPTOGAMS SHA-1 for AArch64 + [#182](https://github.com/kazu-yamamoto/crypton/pull/182) +* docs: put the performance tables in the README + [#183](https://github.com/kazu-yamamoto/crypton/pull/183) +* perf(sha3): take the CRYPTOGAMS Keccak for x86-64 as well + [#184](https://github.com/kazu-yamamoto/crypton/pull/184) +* docs: rebuild the performance tables + [#185](https://github.com/kazu-yamamoto/crypton/pull/185) +* perf(ecc): stop sharing the doublings in the double multiplication + [#186](https://github.com/kazu-yamamoto/crypton/pull/186) +* perf(number): count bytes from the bit count, not from base 256 + [#187](https://github.com/kazu-yamamoto/crypton/pull/187) +* perf(p256): inline the field arithmetic on AArch64 + [#188](https://github.com/kazu-yamamoto/crypton/pull/188) +* fix(api): name the reporting variants try..., not with an apostrophe + [#189](https://github.com/kazu-yamamoto/crypton/pull/189) +* fix(ecc): require a public point to be in the prime-order subgroup + [#190](https://github.com/kazu-yamamoto/crypton/pull/190) +* fix(pubkey): stop printing private keys, and add Crypto.Debug + [#191](https://github.com/kazu-yamamoto/crypton/pull/191) +* fix(poly1305): take a checked key, so that initializing cannot fail + [#192](https://github.com/kazu-yamamoto/crypton/pull/192) +* fix(bcrypt): refuse a cost bcrypt does not have rather than substituting one + [#194](https://github.com/kazu-yamamoto/crypton/pull/194) +* chore: build without a warning + [#195](https://github.com/kazu-yamamoto/crypton/pull/195) +* docs: build the documentation without a warning + [#196](https://github.com/kazu-yamamoto/crypton/pull/196) ## 1.1.5 From e6e90f0876a8a1bb1cb14b8c6a183a7b4ed50bad Mon Sep 17 00:00:00 2001 From: jappeace-sloth Date: Tue, 6 Oct 2026 21:07:42 +0200 Subject: [PATCH 4/5] doc: name both constructors 2.0.0 appends to CryptoError A diff of the Hoogle files Hackage built for 1.1.5 and 2.0.0 shows CryptoError_PointSubgroupInvalid appended next to CryptoError_ParameterInvalid (both in Crypto/Error/Types.hs at crypton-v2.0.0, neither at crypton-v1.1.5); the summary named only the first. The same diff confirms the Poly1305 initialize and auth signature changes are the only changed or removed exports in 2.0.0. Prompt: can you fork the repo and show me how that pr would look on a pr against jappeace-sloth/crypton? Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9c46701..b83a4eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -291,7 +291,8 @@ validation, an ECC public point outside the prime-order subgroup, a PKCS#7 block size outside 1..255, and block cipher input that is not a whole number of blocks. A refused KDF, Argon2 or bcrypt parameter, and a peer value `getShared` refuses, is reported as a `CryptoError` rather than an -`ErrorCall`; `CryptoError_ParameterInvalid` is appended to `CryptoError`, and +`ErrorCall`; `CryptoError_ParameterInvalid` and +`CryptoError_PointSubgroupInvalid` are appended to `CryptoError`, and `tryGetShared` is added beside `getShared`. `Crypto.MAC.Poly1305.initialize` and `auth` take a checked `Key`, built with `key`, so `initialize` can no longer fail. From 3bbe8a9891316b449bacbc7860fd71fdab40b7a0 Mon Sep 17 00:00:00 2001 From: jappeace-sloth Date: Tue, 6 Oct 2026 21:13:17 +0200 Subject: [PATCH 5/5] doc: the Unreleased summary says what changes besides ML-KEM and ML-DSA Against crypton-v2.1.7, main also adds Crypto.KEM (the KEM class, and SharedSecret moved there from Crypto.ECC, which still re-exports it, with a new Show instance that redacts the secret) and appends CryptoError_PublicKeyStructureInvalid to CryptoError. The summary now names both, and says which existing code can notice: an exhaustive match on CryptoError, and an orphan Show SharedSecret instance. Prompt: can you fork the repo and show me how that pr would look on a pr against jappeace-sloth/crypton? Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b83a4eb0..d3f2db89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,14 @@ `Crypto.PubKey.MLKEM` and `Crypto.PubKey.MLDSA`: ML-KEM and ML-DSA, the post-quantum key encapsulation and signature schemes of FIPS 203 and FIPS -204, through mlkem-native and mldsa-native. +204, through mlkem-native and mldsa-native. The new `Crypto.KEM` holds a +`KEM` class and `SharedSecret`, which moves there from `Crypto.ECC` (still +exported from it) and gains a `Show` instance that prints no secret. + +Existing code keeps compiling with two exceptions: +`CryptoError_PublicKeyStructureInvalid` is appended to `CryptoError`, which a +match without a wildcard will warn about, and an orphan `Show SharedSecret` +instance of your own now clashes with the new one. * chore: stop hiding foldl' from Prelude [#294](https://github.com/kazu-yamamoto/crypton/pull/294)