Skip to content

PK: inline & simplify check_pair functions #521

@mpg

Description

@mpg

Similar to #515 and #519 but with check_pair_func. Reminder of the steps:

  1. Review existing tests (see below) and possibly complete them.
  2. Refactor
  3. Optional: if the refactoring results in more cases being naturally supported, add corresponding test cases.

Step 1:

  • Positive: matching key pairs, both normal
  • Positive: matching key pairs, private is wrapping
  • Negative: non-matching pairs of the same type (different key materials, same bit size or curve)
  • Negative: non-matching pairs of the same type (RSA and ECC: different bit/curve size, ECC: same bit size but different curve)
  • Negative: non-matching pairs of different types (RSA vs ECC)
  • Negative: non-matching pairs (different key material), private is wrapping

Step 2: the usual.

Step 3: currently wrapping (formerly "opaque") RSA keys are not supported, consider adding support for them as it would probably use the same code path as ECC (just with different sizes).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestsize-sEstimated task size: small (~2d)

Type

Projects

Status

PK Rework Completion

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions