crypto-deprecation-check 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ CC0 1.0 Universal — Public Domain Dedication
2
+
3
+ The person who associated a work with this deed has dedicated the work to the
4
+ public domain by waiving all of his or her rights to the work worldwide under
5
+ copyright law, including all related and neighboring rights, to the extent
6
+ allowed by law.
7
+
8
+ You can copy, modify, distribute and perform the work, even for commercial
9
+ purposes, all without asking permission.
10
+
11
+ Full text: https://creativecommons.org/publicdomain/zero/1.0/legalcode
12
+
13
+ ---
14
+
15
+ This dedication covers the compilation and the code in this package.
16
+
17
+ The underlying facts are taken from third-party sources, each of which is cited
18
+ by URL in the shipped data alongside the verbatim quote the value was read from:
19
+
20
+ * PyTorch's RELEASE.md and .ci/manywheel/build_cuda.sh — BSD-3-Clause
21
+ (pytorch/pytorch LICENSE)
22
+ * NVIDIA's CUDA Toolkit release notes and CUDA GPUs page — vendor technical
23
+ documentation
24
+
25
+ Facts are not copyrightable. What is reproduced from those sources is a fact
26
+ plus a short attributed quote linking back to it; neither document is
27
+ reproduced.
@@ -0,0 +1,153 @@
1
+ Metadata-Version: 2.4
2
+ Name: crypto-deprecation-check
3
+ Version: 0.1.0
4
+ Summary: Read the cryptographic algorithms your repository's own code calls — hashlib, Cipher.getInstance, MODE_ECB, a JWT alg, generate_private_key, an SSH HostKeyAlgorithms setting, an openssl subcommand — and say which of them carry a published deprecation status and by when, with the source sentence quoted under every answer
5
+ Author: referencesource.org
6
+ License: CC0-1.0
7
+ Project-URL: Homepage, https://referencesource.org/nist-cryptographic-algorithm-deprecation-schedule/
8
+ Project-URL: Source, https://referencesource.org/nist-cryptographic-algorithm-deprecation-schedule/
9
+ Keywords: crypto,cryptography,deprecation,nist,post-quantum,pqc,ml-kem,ml-dsa,fips,sp800-131a,sha1,rsa,ecdsa,inventory,audit,ci,pre-commit,lint,security
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Security :: Cryptography
14
+ Classifier: Topic :: Software Development :: Quality Assurance
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Dynamic: license-file
19
+
20
+ # crypto-deprecation-check
21
+
22
+ Read the cryptographic algorithms your repository's own code calls, and say for
23
+ each one whether it carries a published deprecation status, the date that status
24
+ changes, and the replacement — with the sentence behind every answer quoted and
25
+ the page it came from linked, so you can check the answer rather than trust it.
26
+
27
+ The first step NIST IR 8547 names for the post-quantum transition is an
28
+ inventory of which algorithms your code actually calls. This is that step, run
29
+ from a shell or a pre-commit hook.
30
+
31
+ ```
32
+ $ crypto-deprecation-check
33
+
34
+ crypto-deprecation-check — 34 file(s) read under /work/api
35
+
36
+ ALREADY DEPRECATED OR DISALLOWED — 2
37
+
38
+ SHA-1 (hashing)
39
+ status today: Disallowed for digital signature generation
40
+ planned: retirement scheduled under SP 800-131A Rev 3 draft
41
+ replacement: SHA-2 or SHA-3
42
+ called at src/sign.py:3 (a hashlib call), deploy/ci.yml:7 (an openssl subcommand)
43
+ "Rev. 3 proposes moving the minimum classical security strength from 112
44
+ bits to 128 bits at the end of 2030, retires ECB confidentiality mode and
45
+ DSA signature generation, and schedules the retirement of SHA-1 ..."
46
+ — the status for SP 800-131A Rev 3 draft, from https://www.encryptionconsulting.com/...
47
+ read 2026-11-15
48
+
49
+ ON THE SCHEDULE, APPROVED TODAY — 3
50
+ ...
51
+
52
+ $ echo $?
53
+ 1
54
+ ```
55
+
56
+ ## Install
57
+
58
+ ```
59
+ pip install crypto-deprecation-check
60
+ crypto-deprecation-check .
61
+ ```
62
+
63
+ Python 3.8 or newer. No dependencies. Nothing is sent anywhere: the statuses
64
+ ship inside the package and the scan is local.
65
+
66
+ As a pre-commit hook, or in CI:
67
+
68
+ ```yaml
69
+ - name: algorithm inventory
70
+ run: pipx run crypto-deprecation-check .
71
+ ```
72
+
73
+ There is an identical npm package, `crypto-deprecation-check`, for repositories
74
+ that would rather install with npm. Both read the same data file, byte for byte,
75
+ and a gate in our own repository runs the two over the same trees and fails if
76
+ any answer differs.
77
+
78
+ ## What it looks for, and why it is not a grep
79
+
80
+ Finding the string `sha1` in a file is not finding a call to SHA-1: it is in a
81
+ package name, a variable, a comment, a checksum field. So this does not grep for
82
+ algorithm names. It matches the places where naming an algorithm is the whole
83
+ point of the line:
84
+
85
+ - `hashlib.sha1()`, `hashlib.new("sha1")`, `createHash` / `createHmac`
86
+ - `MessageDigest.getInstance("SHA-1")`, `Cipher.getInstance("AES/ECB/...")`
87
+ - `AES.MODE_ECB` and the other PyCryptodome mode constants
88
+ - a JWT `alg` / `algorithm` / `algorithms` value — `RS256`, `ES256`, `none`
89
+ - `generate_private_key` / `generateKeyPair` / `GenerateKey`
90
+ - `createECDH`, `createDiffieHellman`
91
+ - an SSH `HostKeyAlgorithms`, `KexAlgorithms` or `PubkeyAcceptedAlgorithms`
92
+ setting, including every entry of a comma-separated list
93
+ - `ssh-keygen -t ...`
94
+ - `openssl dgst -sha1`, `openssl genrsa`, `openssl dsaparam`, `openssl dhparam`
95
+ - an RSA padding or signature-scheme choice
96
+ - the post-quantum names, with the parameter set attached as real code writes
97
+ it: `Kyber768`, `ML-KEM-1024`, `Dilithium3`, `SLH-DSA`
98
+
99
+ Caches, build output, virtualenvs and installed dependencies are not read:
100
+ `node_modules`, `.venv`, `site-packages`, `dist` and about fifty more. A crypto
101
+ call inside something you installed is not your call, and naming a file you
102
+ cannot edit is worse than silence. `.github/workflows` *is* read.
103
+
104
+ ## What it refuses to say
105
+
106
+ - **Nothing at all about MD5, DES, 3DES or RC4**, in either direction. We hold
107
+ no record for them, and a scanner that filled those in from general knowledge
108
+ would be inventing the one thing this package sells.
109
+ - **No verdict on a key length.** Bits named beside a key call are printed as
110
+ context. Our records carry the 112-bit minimum security strength but not the
111
+ table that turns an RSA modulus into a security strength, so no judgement is
112
+ reached on `key_size=1024`.
113
+ - **No "NIST says".** Each answer names the NIST document the status belongs to
114
+ and links the published summary the sentence was actually taken from, with the
115
+ day we read it.
116
+
117
+ ## Exit codes
118
+
119
+ | code | when |
120
+ |---|---|
121
+ | 0 | nothing found, or every finding is dated 2030 or later |
122
+ | 1 | the repository calls an algorithm whose status is **already** Deprecated or Disallowed |
123
+ | 2 | the scan could not run |
124
+
125
+ Only a status that is already Deprecated or Disallowed fails a build — today
126
+ that is SHA-1 and DSA signature generation. RSA and ECDSA are approved now and
127
+ deprecated after 2030, so they are reported and exit 0: failing CI in 2026 for
128
+ calling ECDSA would get this tool uninstalled the same day. `--no-fail` always
129
+ exits 0.
130
+
131
+ ## Options
132
+
133
+ ```
134
+ crypto-deprecation-check [path] [--json] [--quiet] [--no-fail] [--help]
135
+ ```
136
+
137
+ `--json` prints the whole reading, including every call site, every quote and
138
+ every source URL.
139
+
140
+ ## Where the answers come from
141
+
142
+ Every status, date, replacement and quote in this package comes from
143
+ [the NIST cryptographic algorithm deprecation
144
+ schedule](https://referencesource.org/nist-cryptographic-algorithm-deprecation-schedule/)
145
+ on referencesource.org — 21 algorithms, each with the sentence that states its
146
+ status quoted verbatim and the page it was read from. That page is re-checked on
147
+ a schedule and carries its own last-checked date; this package carries the
148
+ oldest reading date of the records inside it, printed at the end of every run.
149
+
150
+ The quoted sentence is from a published summary of the NIST documents, not from
151
+ the NIST text itself, and each answer says which document the status belongs to.
152
+
153
+ CC0-1.0. The records are facts with their sources attached; use them.
@@ -0,0 +1,134 @@
1
+ # crypto-deprecation-check
2
+
3
+ Read the cryptographic algorithms your repository's own code calls, and say for
4
+ each one whether it carries a published deprecation status, the date that status
5
+ changes, and the replacement — with the sentence behind every answer quoted and
6
+ the page it came from linked, so you can check the answer rather than trust it.
7
+
8
+ The first step NIST IR 8547 names for the post-quantum transition is an
9
+ inventory of which algorithms your code actually calls. This is that step, run
10
+ from a shell or a pre-commit hook.
11
+
12
+ ```
13
+ $ crypto-deprecation-check
14
+
15
+ crypto-deprecation-check — 34 file(s) read under /work/api
16
+
17
+ ALREADY DEPRECATED OR DISALLOWED — 2
18
+
19
+ SHA-1 (hashing)
20
+ status today: Disallowed for digital signature generation
21
+ planned: retirement scheduled under SP 800-131A Rev 3 draft
22
+ replacement: SHA-2 or SHA-3
23
+ called at src/sign.py:3 (a hashlib call), deploy/ci.yml:7 (an openssl subcommand)
24
+ "Rev. 3 proposes moving the minimum classical security strength from 112
25
+ bits to 128 bits at the end of 2030, retires ECB confidentiality mode and
26
+ DSA signature generation, and schedules the retirement of SHA-1 ..."
27
+ — the status for SP 800-131A Rev 3 draft, from https://www.encryptionconsulting.com/...
28
+ read 2026-11-15
29
+
30
+ ON THE SCHEDULE, APPROVED TODAY — 3
31
+ ...
32
+
33
+ $ echo $?
34
+ 1
35
+ ```
36
+
37
+ ## Install
38
+
39
+ ```
40
+ pip install crypto-deprecation-check
41
+ crypto-deprecation-check .
42
+ ```
43
+
44
+ Python 3.8 or newer. No dependencies. Nothing is sent anywhere: the statuses
45
+ ship inside the package and the scan is local.
46
+
47
+ As a pre-commit hook, or in CI:
48
+
49
+ ```yaml
50
+ - name: algorithm inventory
51
+ run: pipx run crypto-deprecation-check .
52
+ ```
53
+
54
+ There is an identical npm package, `crypto-deprecation-check`, for repositories
55
+ that would rather install with npm. Both read the same data file, byte for byte,
56
+ and a gate in our own repository runs the two over the same trees and fails if
57
+ any answer differs.
58
+
59
+ ## What it looks for, and why it is not a grep
60
+
61
+ Finding the string `sha1` in a file is not finding a call to SHA-1: it is in a
62
+ package name, a variable, a comment, a checksum field. So this does not grep for
63
+ algorithm names. It matches the places where naming an algorithm is the whole
64
+ point of the line:
65
+
66
+ - `hashlib.sha1()`, `hashlib.new("sha1")`, `createHash` / `createHmac`
67
+ - `MessageDigest.getInstance("SHA-1")`, `Cipher.getInstance("AES/ECB/...")`
68
+ - `AES.MODE_ECB` and the other PyCryptodome mode constants
69
+ - a JWT `alg` / `algorithm` / `algorithms` value — `RS256`, `ES256`, `none`
70
+ - `generate_private_key` / `generateKeyPair` / `GenerateKey`
71
+ - `createECDH`, `createDiffieHellman`
72
+ - an SSH `HostKeyAlgorithms`, `KexAlgorithms` or `PubkeyAcceptedAlgorithms`
73
+ setting, including every entry of a comma-separated list
74
+ - `ssh-keygen -t ...`
75
+ - `openssl dgst -sha1`, `openssl genrsa`, `openssl dsaparam`, `openssl dhparam`
76
+ - an RSA padding or signature-scheme choice
77
+ - the post-quantum names, with the parameter set attached as real code writes
78
+ it: `Kyber768`, `ML-KEM-1024`, `Dilithium3`, `SLH-DSA`
79
+
80
+ Caches, build output, virtualenvs and installed dependencies are not read:
81
+ `node_modules`, `.venv`, `site-packages`, `dist` and about fifty more. A crypto
82
+ call inside something you installed is not your call, and naming a file you
83
+ cannot edit is worse than silence. `.github/workflows` *is* read.
84
+
85
+ ## What it refuses to say
86
+
87
+ - **Nothing at all about MD5, DES, 3DES or RC4**, in either direction. We hold
88
+ no record for them, and a scanner that filled those in from general knowledge
89
+ would be inventing the one thing this package sells.
90
+ - **No verdict on a key length.** Bits named beside a key call are printed as
91
+ context. Our records carry the 112-bit minimum security strength but not the
92
+ table that turns an RSA modulus into a security strength, so no judgement is
93
+ reached on `key_size=1024`.
94
+ - **No "NIST says".** Each answer names the NIST document the status belongs to
95
+ and links the published summary the sentence was actually taken from, with the
96
+ day we read it.
97
+
98
+ ## Exit codes
99
+
100
+ | code | when |
101
+ |---|---|
102
+ | 0 | nothing found, or every finding is dated 2030 or later |
103
+ | 1 | the repository calls an algorithm whose status is **already** Deprecated or Disallowed |
104
+ | 2 | the scan could not run |
105
+
106
+ Only a status that is already Deprecated or Disallowed fails a build — today
107
+ that is SHA-1 and DSA signature generation. RSA and ECDSA are approved now and
108
+ deprecated after 2030, so they are reported and exit 0: failing CI in 2026 for
109
+ calling ECDSA would get this tool uninstalled the same day. `--no-fail` always
110
+ exits 0.
111
+
112
+ ## Options
113
+
114
+ ```
115
+ crypto-deprecation-check [path] [--json] [--quiet] [--no-fail] [--help]
116
+ ```
117
+
118
+ `--json` prints the whole reading, including every call site, every quote and
119
+ every source URL.
120
+
121
+ ## Where the answers come from
122
+
123
+ Every status, date, replacement and quote in this package comes from
124
+ [the NIST cryptographic algorithm deprecation
125
+ schedule](https://referencesource.org/nist-cryptographic-algorithm-deprecation-schedule/)
126
+ on referencesource.org — 21 algorithms, each with the sentence that states its
127
+ status quoted verbatim and the page it was read from. That page is re-checked on
128
+ a schedule and carries its own last-checked date; this package carries the
129
+ oldest reading date of the records inside it, printed at the end of every run.
130
+
131
+ The quoted sentence is from a published summary of the NIST documents, not from
132
+ the NIST text itself, and each answer says which document the status belongs to.
133
+
134
+ CC0-1.0. The records are facts with their sources attached; use them.
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "crypto-deprecation-check"
7
+ version = "0.1.0"
8
+ description = "Read the cryptographic algorithms your repository's own code calls — hashlib, Cipher.getInstance, MODE_ECB, a JWT alg, generate_private_key, an SSH HostKeyAlgorithms setting, an openssl subcommand — and say which of them carry a published deprecation status and by when, with the source sentence quoted under every answer"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "CC0-1.0" }
12
+ authors = [{ name = "referencesource.org" }]
13
+ keywords = ["crypto", "cryptography", "deprecation", "nist", "post-quantum",
14
+ "pqc", "ml-kem", "ml-dsa", "fips", "sp800-131a", "sha1", "rsa",
15
+ "ecdsa", "inventory", "audit", "ci", "pre-commit", "lint",
16
+ "security"]
17
+ classifiers = [
18
+ "Development Status :: 4 - Beta",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Security :: Cryptography",
22
+ "Topic :: Software Development :: Quality Assurance",
23
+ ]
24
+ dependencies = []
25
+
26
+ [project.urls]
27
+ Homepage = "https://referencesource.org/nist-cryptographic-algorithm-deprecation-schedule/"
28
+ Source = "https://referencesource.org/nist-cryptographic-algorithm-deprecation-schedule/"
29
+
30
+ [project.scripts]
31
+ crypto-deprecation-check = "crypto_deprecation_check.__main__:main"
32
+
33
+ [tool.setuptools.packages.find]
34
+ where = ["src"]
35
+
36
+ [tool.setuptools.package-data]
37
+ crypto_deprecation_check = ["data.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+