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
This is because supported ecdsa signing schemes contain additional details, which either can vary for a given key (hash, e.g. sha2) or cannot (curve, e.g. nistp256).
For comparison, rsa signing schemes only contain details, which can vary (padding, e.g. pss, and hash, eg. sha256).
Current behavior:
There is at least one case, where securesystemslib code uses "ecdsa-sha2-nistp256" as the default scheme for any "ecdsa" key, even if that key uses a different curve:
fixessecure-systems-lab#669
Fix SSlibKey.from_crypto to assign the correct default scheme, for
ecdsa nistp384 keys.
This includes refactoring from_crypto to use a single switch over
pyca/cryptography public key object type, in order to infer
securesystemslib "keytype" and default scheme.
Previously, only "keytype" was inferred from the key object, and the
default scheme then from the keytype. Given that for the same keytype
(ecdsa) there can be different default schemes, this needed to be
changed.
The refactoring also moves the keytype-specific public key value
serialization to the same switch.
Signed-off-by: Lukas Puehringer <[email protected]>
lukpueh
added a commit
to lukpueh/securesystemslib
that referenced
this issue
Apr 2, 2024
fixessecure-systems-lab#669
Fix SSlibKey.from_crypto to assign the correct default scheme, for
ecdsa nistp384 keys.
This includes refactoring from_crypto to use a single switch over
pyca/cryptography public key object type, in order to infer
securesystemslib "keytype" and default scheme.
Previously, only "keytype" was inferred from the key object, and the
default scheme then from the keytype. Given that for the same keytype
(ecdsa) there can be different default schemes, this needed to be
changed.
The refactoring also moves the keytype-specific public key value
serialization to the same switch.
Signed-off-by: Lukas Puehringer <[email protected]>
Description of issue or feature request:
ecdsa has repeatedly been a source of confusion for securesystemslib and its users:
#239, #363, #513, theupdateframework/specification#272, theupdateframework/python-tuf#1388, theupdateframework/go-tuf#508
This is because supported ecdsa signing schemes contain additional details, which either can vary for a given key (hash, e.g.
sha2
) or cannot (curve, e.g.nistp256
).For comparison, rsa signing schemes only contain details, which can vary (padding, e.g.
pss
, and hash, eg.sha256
).Current behavior:
There is at least one case, where securesystemslib code uses "ecdsa-sha2-nistp256" as the default scheme for any "ecdsa" key, even if that key uses a different curve:
Expected behavior:
The text was updated successfully, but these errors were encountered: