Skip to main content

crypto-deprecation-check

Read the cryptographic algorithms your repository's own code calls, and say for each one whether it carries a published deprecation status, the date that status changes, and the replacement — with the sentence behind every answer quoted and the page it came from linked, so you can check the answer rather than trust it.

The first step NIST IR 8547 names for the post-quantum transition is an inventory of which algorithms your code actually calls. This is that step, run from a shell or a pre-commit hook.

$ crypto-deprecation-check

crypto-deprecation-check — 34 file(s) read under /work/api

ALREADY DEPRECATED OR DISALLOWED — 2

  SHA-1  (hashing)
      status today: Disallowed for digital signature generation
      planned: retirement scheduled under SP 800-131A Rev 3 draft
      replacement: SHA-2 or SHA-3
      called at src/sign.py:3 (a hashlib call), deploy/ci.yml:7 (an openssl subcommand)
      "Rev. 3 proposes moving the minimum classical security strength from 112
       bits to 128 bits at the end of 2030, retires ECB confidentiality mode and
       DSA signature generation, and schedules the retirement of SHA-1 ..."
      — the status for SP 800-131A Rev 3 draft, from https://www.encryptionconsulting.com/...
        read 2026-11-15

ON THE SCHEDULE, APPROVED TODAY — 3
  ...

$ echo $?
1

Install

pip install crypto-deprecation-check
crypto-deprecation-check .

Python 3.8 or newer. No dependencies. Nothing is sent anywhere: the statuses ship inside the package and the scan is local.

As a pre-commit hook, or in CI:

- name: algorithm inventory
  run: pipx run crypto-deprecation-check .

There is an identical npm package, crypto-deprecation-check, for repositories that would rather install with npm. Both read the same data file, byte for byte, and a gate in our own repository runs the two over the same trees and fails if any answer differs.

What it looks for, and why it is not a grep

Finding the string sha1 in a file is not finding a call to SHA-1: it is in a package name, a variable, a comment, a checksum field. So this does not grep for algorithm names. It matches the places where naming an algorithm is the whole point of the line:

  • hashlib.sha1(), hashlib.new("sha1"), createHash / createHmac
  • MessageDigest.getInstance("SHA-1"), Cipher.getInstance("AES/ECB/...")
  • AES.MODE_ECB and the other PyCryptodome mode constants
  • a JWT alg / algorithm / algorithms value — RS256, ES256, none
  • generate_private_key / generateKeyPair / GenerateKey
  • createECDH, createDiffieHellman
  • an SSH HostKeyAlgorithms, KexAlgorithms or PubkeyAcceptedAlgorithms setting, including every entry of a comma-separated list
  • ssh-keygen -t ...
  • openssl dgst -sha1, openssl genrsa, openssl dsaparam, openssl dhparam
  • an RSA padding or signature-scheme choice
  • the post-quantum names, with the parameter set attached as real code writes it: Kyber768, ML-KEM-1024, Dilithium3, SLH-DSA

Caches, build output, virtualenvs and installed dependencies are not read: node_modules, .venv, site-packages, dist and about fifty more. A crypto call inside something you installed is not your call, and naming a file you cannot edit is worse than silence. .github/workflows is read.

What it refuses to say

  • Nothing at all about MD5, DES, 3DES or RC4, in either direction. We hold no record for them, and a scanner that filled those in from general knowledge would be inventing the one thing this package sells.
  • No verdict on a key length. Bits named beside a key call are printed as context. Our records carry the 112-bit minimum security strength but not the table that turns an RSA modulus into a security strength, so no judgement is reached on key_size=1024.
  • No "NIST says". Each answer names the NIST document the status belongs to and links the published summary the sentence was actually taken from, with the day we read it.

Exit codes

code when
0 nothing found, or every finding is dated 2030 or later
1 the repository calls an algorithm whose status is already Deprecated or Disallowed
2 the scan could not run

Only a status that is already Deprecated or Disallowed fails a build — today that is SHA-1 and DSA signature generation. RSA and ECDSA are approved now and deprecated after 2030, so they are reported and exit 0: failing CI in 2026 for calling ECDSA would get this tool uninstalled the same day. --no-fail always exits 0.

Options

crypto-deprecation-check [path] [--json] [--quiet] [--no-fail] [--help]

--json prints the whole reading, including every call site, every quote and every source URL.

Where the answers come from

Every status, date, replacement and quote in this package comes from the NIST cryptographic algorithm deprecation schedule on referencesource.org — 21 algorithms, each with the sentence that states its status quoted verbatim and the page it was read from. That page is re-checked on a schedule and carries its own last-checked date; this package carries the oldest reading date of the records inside it, printed at the end of every run.

The quoted sentence is from a published summary of the NIST documents, not from the NIST text itself, and each answer says which document the status belongs to.

CC0-1.0. The records are facts with their sources attached; use them.

Metadata

Release files for crypto-deprecation-check 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crypto-deprecation-check 0.1.0
File Size Uploaded Provenance Actions
crypto_deprecation_check-0.1.0.tar.gz 17.5 kB Without provenance Details for crypto_deprecation_check-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crypto-deprecation-check 0.1.0
File Interpreter ABI Platform Actions
crypto_deprecation_check-0.1.0-py3-none-any.whl Python 3 none any Details for crypto_deprecation_check-0.1.0-py3-none-any.whl

Total release size: 34.7 kB

Release files / crypto_deprecation_check-0.1.0.tar.gz

Download URL crypto_deprecation_check-0.1.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab9ae3e9e46f3a34f3500581e34b993cf6ad32df4c901cd1cdedde802f878456
BLAKE2b-256 checksum
How to use checksums
f4437fff6357a4941e645d0e4530c11da4a87b481f332fba817a9abea9c5d287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / crypto_deprecation_check-0.1.0-py3-none-any.whl

Download URL crypto_deprecation_check-0.1.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d10a1fff972bc82296a20df39d2ed9db115ce137bf7d237264bfd74cd7657c5f
BLAKE2b-256 checksum
How to use checksums
0b0f2f785cd92f20ce0aba3e3f97a7afa571f6524c1f35938c7fe0612ed290a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for crypto-deprecation-check 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page