Skip to content

signer: deduplicate signing scheme dissection  #594

@lukpueh

Description

@lukpueh

There is some duplicate code in securesystemslib.signer to dissect signing schemes, in order to figure out the

  • appropriate hash algorithm: e.g. "rsassa-pss-sha384" and "ecdsa-sha2-nistp384" use "sha384"), or
  • padding: e.g. "rsa-pkcs1v15-sha224 and "rsa-pkcs1v15-sha512" use "pkcs1v15"

It would be nice to provide a signer-wide helper function or map.

hint: the code can be found by grepping for split, also in pending PRs: #585, #588, #590. Note that we usually first extract the substring (which is the same for all schemes) and then map them e.g. to specific hash constants or objects (which differs between signers).

related: #593

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions