Skip to content

⬆️ Update pycryptodome requirement from ~=3.23.0 to ~=4.0.0 - #1112

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pycryptodome-approx-eq-4.0.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pycryptodome-approx-eq-4.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 19, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on pycryptodome to permit the latest version.

Release notes

Sourced from pycryptodome's releases.

v4.0.0 - Grenoble

Major release, with some breaking changes. See Changelog.

Changelog

Sourced from pycryptodome's changelog.

4.0.0 (14 October 2026) ++++++++++++++++++++++++++

Breaking changes

  • Remove support for Python 2.7 and 3.8. The minimum supported version is now Python 3.9.
  • The pycryptodomex package (Cryptodome namespace) is no longer released (except for important security patches, but still on the 3.x branch). The library is only available as pycryptodome, under the Crypto namespace.
  • The self-tests are now run by pytest, which must be installed for python -m Crypto.SelfTest to work. The test command of setup.py is removed: install the package (e.g. with pip install -e .) and run python -m Crypto.SelfTest instead.
  • In Crypto.Protocol.KDF.SP800_108_Counter(), the label can no longer contain zero bytes, while the context now can (for instance, a binary nonce). The zero byte between them still separates the two unambiguously, as required by NIST SP 800-108r1 (GH#896).
  • The coordinates of EccPoint and EccXPoint (x, y and xy), EccKey.d and the components of ElGamal keys (p, g, y and x) are now Python int objects, not Crypto.Math.Numbers.Integer. The ElGamal components can no longer be assigned.
  • The GMP library is no longer used, and the environment variable PYCRYPTODOME_DISABLE_GMP has no effect. Big integers are handled by the new constant-time code (see below). Crypto.Math.Numbers.Integer (an internal class) no longer supports negative values.
  • Elliptic curve points are decoded more strictly. Importing a NIST curve public key (SEC1, DER, PEM or OpenSSH) fails if a coordinate of the point is equal to or larger than the modulus p, as required by SEC1 (such coordinates were reduced modulo p before; EccPoint and ECC.construct() still reduce them). Ed25519 and Ed448 points (public keys, and R in signatures) are decoded as in RFC 8032: an encoding with x = 0 and the sign bit of x set, or (for Ed448) with any of the 7 low bits of the last byte set, is now rejected.
  • RSA keys are limited to a modulus of 16384 bits: RSA.generate(), RSA.construct() and RSA.import_key() raise ValueError for larger ones. The constant-time arithmetic is slower than GMP, and a large public key from an untrusted source could take minutes to import or use.
  • Crypto.Protocol.KDF.bcrypt_check() rejects (with Crypto.KdfIterationLimitError, a ValueError) a bcrypt hash whose cost is above 20, which takes about one minute: a hash from an untrusted source, which states its own cost, could otherwise tie up the CPU for a day. Use the new parameter max_cost to accept costs up to 31, as before (0 for no limit).
  • ChaCha20-Poly1305 with an 8-byte nonce follows RFC 8439 (the nonce is prefixed by 4 zero bytes, and the block counter has 32 bits): a single message longer than about 256 GiB is now rejected with MessageTooLongError. Before, the counter overflowed into the 4 zero bytes, which no specification defines. The ciphertext and the tag of shorter messages are unchanged.
  • Exporting a private key with a passphrase uses PKCS#8 with 'PBKDF2WithHMAC-SHA256AndAES256-CBC' and 600 000 iterations by default, instead of weak schemes. With RSA keys, export_key(passphrase=...) returned a PKCS#1 key with the obsolete PEM encryption (one round of MD5 and 3DES, easy to brute force), and now returns an ENCRYPTED PRIVATE KEY: the parameter pkcs of RsaKey.export_key()

... (truncated)

Commits
  • b60bcd5 Bump version
  • 7a78ab8 CI: Windows wheels, delvewheel without vcruntime140.dll
  • c9f8112 Upgrade cibuildwheel
  • 343968f Use Windows 2025
  • 5d37e2c Reduce wheel scope
  • fd8276f SelfTest: say once that pycryptodome-test-vectors is not installed
  • 7e73db8 mod25519: is_le25p5_zero() returns uint64_t
  • 3007c5d Tests: skip the KW/KWP message length test on 32-bit Python
  • 3205086 nat_mod.c: disable clang's -Wpass-failed warning (loop not unrolled)
  • 47d6f5e Docs: switch to the Furo theme
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [pycryptodome](https://github.com/Legrandin/pycryptodome) to permit the latest version.
- [Release notes](https://github.com/Legrandin/pycryptodome/releases)
- [Changelog](https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst)
- [Commits](Legrandin/pycryptodome@v3.23.0...v4.0.0)

---
updated-dependencies:
- dependency-name: pycryptodome
  dependency-version: 4.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants