yubikey.rs
yubikey.rs copied to clipboard
mgm: Generalize TDES logic to enable other algorithms
Part of #330.
Includes #584 because I don't have write permissions on the repo and thus can't create stacked PRs directly.
@str4d if you can rebase and remove draft we can get this reviewed
Rebased on main. Note that although I've marked it as not draft / ready for review, there are still some TODOs in the code that I want reviewers to comment on.
Force-pushed to fix a rebase bug.
Force-pushed to update a new test for the generalization.
Rebased on main to fix merge conflicts.
Force-pushed to address remaining TODOs and fill out changelog.
Force-pushed to simplify changelog.
Force-pushed to have MgmKey::generate callers select an algorithm at runtime instead of compile-time.
I opened #620 (WIP) as an alternative exploring only runtime dynamism like I was suggesting.
Especially since the algorithm choice is runtime-dependent on the YubiKey version, I don't see what the generics/traits in this approach are adding. It feels overengineered to me, and I would prefer to keep the block cipher types out of the public API if possible.
Pushed 333788029ed6df0b0a052c8471975ff2cd1496ba to show how removing SpecificMgmKey from this PR achieves the same goal.
Rebased on main to fix merge conflicts after #621 was merged.
Merged in #625