[hsmtool] Regularize command parameters
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
Hsmtool supports several different asymmetric key types: rsa, ecdsa, mldsa, slh-dsa (and the legacy spx).
There is a little bit of drift between allowed input parameters for sign, verify, import and export. Examine the variance between the command hierarchies and regularize the parameters.
Of particular note:
- `ecdsa sign` supports an `--update_in_place` parameter that instructs hsmtool to update a byte-slice in the input file with the signature result.
- `ecdsa verify` supports a `--signature_at` parameter that gives a byte-slice where a signature is located within the input file.
Its okay for the different hierarchies to have additional command-line options that are relevant to that algorithm type, but we should try to regularize the options as much as possible.
Contributor guide
Research direction
Compare the hsmtool sign, verify, import, and export command hierarchies, focusing on the parameter differences for RSA, ECDSA, ML-DSA, SLH-DSA, and legacy SPX. Done means shared options are regularized where appropriate, while algorithm-specific options such as --update_in_place and --signature_at remain where relevant.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100