Remove Dilithium - #2275
Conversation
bhess
left a comment
There was a problem hiding this comment.
Thanks @xuganyu96 for taking care of the Dilithium removal. I've added two comments inline.
âĶlithium` from `copy_from_upstream.yml`. Removed everything under `src/sig/dilithium` Re-run `copy_from_upstream.py -d copy`, which produced downstream changes to various build files. Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
âĶ which also updated README.md and cbom.json Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
âĶlithium from README.md. README.md still mentions Dilithium but only to say that it has been excluded Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
âĶ the test fail hard if the algorithm is not enabled Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
âĶomized-signing.patch Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
939af11 to
bfe7e43
Compare
baentsch
left a comment
There was a problem hiding this comment.
LGTM. Only thought (not meant to stop this PR): Worthwhile adding a HISTORY section somewhere stating the algorithms that OQS no longer supports (plus maybe a rationale for each alg (family) removal)?
This would be a long list and require a fair bit of digging back in Git history to properly reconstruct. An alternative would be to have a clearly stated policy somewhere on what our algorithm inclusion policy is. I wouldn't hold this PR for that. |
* Removed upstream `name: pqcrystals-dilithium` and signature `name: dilithium` from `copy_from_upstream.yml`. Removed everything under `src/sig/dilithium` Re-run `copy_from_upstream.py -d copy`, which produced downstream changes to various build files. Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * remove Dilithium entries from kats.json Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * remove Dilithium entries from constant_time tests Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Removed dilithium.yml and dilithium.md. Re-run copy_from_upstream.py, which also updated README.md and cbom.json Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Removed Dilithium from FUZZING.md Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * removed license information about pqclean Dilithium and pqcrystals-dilithium from README.md. README.md still mentions Dilithium but only to say that it has been excluded Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Upgraded CONFIGURE.md minimal build example to ML-KEM-768 and ML-DSA-44 Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Upgraded C++ sig linking test to ML-DSA-44; also added option to make the test fail hard if the algorithm is not enabled Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * remove Dilithium from GitHub action workflows Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * removed Dilithium from zephyr configuration and examples Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Removed scripts/copy_from_upstream/patches/pqclean-dilithium-arm-randomized-signing.patch Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Removed dilithium from upstream.name==pqclean.ignore Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> * Removed orphaned patches Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca> --------- Signed-off-by: Ganyu (Bruce) Xu <g66xu@uwaterloo.ca>
Fine. It would have been good to hold the merge to follow through our stated questionnaire, though: The "Yes" above meant that a fitting downstream PR should (have) be(en) ready by the time of merge. This did not happen. In consequence, all downstream PRs and "main" CI fail now :-( Time to do away with the questionnaire and go back to dealing with problems only as they arise? That's not really efficient, though and impacts many people (at least active maintainers and PR contributors). |
I just didn't think to go back and check that before merging, my mistake; sorry. Maybe we can reformulate the text/questionnaire slightly -- Github's PR list will show how many checkboxes remain unchecked. So maybe it should be less of a questionnaire, and more of a "remove the lines that don't apply, and for the ones that do apply, leave the checkboxes unchecked until they are resolved"? |
This pull request removes Dilithium source code, tests, configurations, and documentation from the repository. This pull request closes #2156 . See reviewer's guide below for details:
Reviewer's guide to "removing Dilithium"
The north star of this pull request is a
grepcommand that recursively searched through the entire repository for the keyword "dilithium":grep -ril \ --exclude-dir .git \ --exclude-dir "ml_kem" \ --exclude-dir "ml_dsa" \ --exclude-dir build \ --exclude-dir .pytest_cache \ --exclude-dir patches \ --exclude ml_dsa.yml \ --exclude ml_dsa.md \ --exclude RELEASE.md \ --exclude copy_from_upstream.yml \ "dilithium" .-imakes the search case insensitive.git,.pytest_cache,buildare excluded because they are build/VCS artifactsml_kemis excluded becausesrc/kem/ml_kemmentions Dilithium only as a academic reference/bibliography; similarly we don't care about mentions of Dilithium in ML-DSA code and/or documentationcopy_from_upstream.ymlis excluded because many ML-DSA integrations have patches that mention Dilithium. CI pipeline will confirm that this does not affectcopy_from_upstream.pyWith
mainat1ae1b92302piping thegrepcommand intowc -lgives194. With this pull request, the number of matches is 1.Here is a summary of the changes (in this order) that got us to the state of this pull request:
41b34eedeleted two sections fromcopy_from_upstream.yml(the upstreampqcrystals-dilithiumand the signature schemedilithium). It also deleted everything undersrc/sig/dilithium. Re-runningcopy_from_upstream.pythen produced downstream changes in the files below. After this commit,grepproduces 20 matches..CMake/alg_support.cmakeCMakeLists.txtsrc/CMakeLists.txtsrc/oqsconfig.h.cmaketests/kat_sig.cc2ac9abdeletedDilithiumfromtests/KATs/sig/kats.json.grep19 matchesa2c7f66deletedDilithiumfromtests/constant_time/sig.grepat 14329f601deleteddocs/algorithm/sig/dilithium.ymlanddocs/algorithm/sig/dilithium.md. Re-runningcopy_from_upstream.pythen modifiedREADME.md, andcbom.json.grepproduces 11 matches.2273d55updated the documentation inFUZZING.md. 10 matches.9f214d9removed Dilithium entries from the "licensing" section inREADME.md. Still at 10 matches becauseREADME.mdcontains one more mention of Dilithium saying "Dilithium-AES has been deprecated", which I chose not to remove.6d7175cupdated the example inCONFIGURE.mdto use ML-KEM-768 and ML-DSA-44 instead of Kyber-768 and Dilithium-2. 9 matches.232493cupdated the C++ linking test to use ML-DSA-44 instead of Dilithium-2. This is done with a straightforwards/dilithium_2/ml_dsa_44/gsearch and replace.db3b29eand7d1fd49replaced Dilithium with ML-DSA in CI pipeline and in Zephyr's examples, respectively.