Skip to content

signer: add constants for key types and signing schemes #593

Open
@lukpueh

Description

@lukpueh

Supported key types and signing scheme strings are currently hardcoded all over the library. We should define them in a single place e.g. securesystemslib.signer._constants and update all secureystemslib.signer.* modules to use them. (I suggest to not touch legacy modules such as secureystemslib.keys)

Publicly registered key types and schemes can be found in:

("ecdsa", "ecdsa-sha2-nistp256"): SSlibKey,
("ecdsa", "ecdsa-sha2-nistp384"): SSlibKey,
("ecdsa-sha2-nistp256", "ecdsa-sha2-nistp256"): SSlibKey,
("ecdsa-sha2-nistp384", "ecdsa-sha2-nistp384"): SSlibKey,
("ed25519", "ed25519"): SSlibKey,
("rsa", "rsassa-pss-sha224"): SSlibKey,
("rsa", "rsassa-pss-sha256"): SSlibKey,
("rsa", "rsassa-pss-sha384"): SSlibKey,
("rsa", "rsassa-pss-sha512"): SSlibKey,
("rsa", "rsa-pkcs1v15-sha224"): SSlibKey,
("rsa", "rsa-pkcs1v15-sha256"): SSlibKey,
("rsa", "rsa-pkcs1v15-sha384"): SSlibKey,
("rsa", "rsa-pkcs1v15-sha512"): SSlibKey,
("sphincs", "sphincs-shake-128s"): SpxKey,
("rsa", "pgp+rsa-pkcsv1.5"): GPGKey,
("dsa", "pgp+dsa-fips-180-2"): GPGKey,
("eddsa", "pgp+eddsa-ed25519"): GPGKey,

Additionally, there are a few non-registered ones, which ca be found by looking for implementations of the Key interface.

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