You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of issue or feature request:
As per DSSE signing-speckeyid field must be optional and treated the same as set-but-empty. Currently, securesystemslib Signature and Key Schema don't have keyid as optional. create_signature() and verify_signature() method in keys.py require them to create and verify signatures.
Current behavior:
There is no support for keyid as optional field in securesystemslib formats for SIGNATURE, or KEY_SCHEMA (e.g. ANYKEY_SCHEMA in formats.py).
Expected behavior:
securesystemslib should mark keyid field as optional, which can be any string not just hex? or provide good alternatives to current methods for creation or verification of signatures that doesn't requires keyid.
Thanks for posting this issue, @PradyumnaKrishna! Here's what I think:
Re securesystemslib's schema/formats facility: I'd like to deprecate it for the reasons outlined in #183. We don't have to do this now, but I'd also rather not put any efforts into improving it.
Re create_signature: The DSSE spec does not require us to support keyid-less signing. This means it should be okay if all Signature objects returned with e.g. Signature.sign and serialized into a DSSE envelope with e.g. Signature.to_dict include a keyid. So no need to change anything there.
Re verify_signature: The DSSE spec does, however, require us to support keyid-less signature verification. This means we need to be able to deserialize keyid-less signatures from DSSE envelopes with e.g. Signature.from_dict and verify them with e.g. Key.verify. Currently, the latter is not possible due to the internal use of keys.verify_signature, which does require a keyid on the passed signature.Let's, in a first iteration, just make a note that we are not fully DSSE spec compliant in this regard, and, in a second iteration, port the keys.verify_signature functionality to SSlibKey.verify.
Description of issue or feature request:
As per DSSE signing-spec
keyid
field must be optional and treated the same as set-but-empty. Currently, securesystemslib Signature and Key Schema don't havekeyid
as optional.create_signature()
andverify_signature()
method inkeys.py
require them to create and verify signatures.Current behavior:
There is no support for
keyid
as optional field in securesystemslib formats forSIGNATURE
, orKEY_SCHEMA
(e.g.ANYKEY_SCHEMA
in formats.py).securesystemslib/securesystemslib/formats.py
Lines 220 to 227 in 6f14522
Expected behavior:
securesystemslib should mark
keyid
field as optional, which can be any string not just hex? or provide good alternatives to current methods for creation or verification of signatures that doesn't requireskeyid
.Linked Discussion: in-toto#2 (comment)
The text was updated successfully, but these errors were encountered: