-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECDSA verification support #98
Conversation
It is unsafe to use the signature method field, as it could result in a key confusion attack. Use the key type instead. Also, don't assume that we're only working with Ed25519. Signed-off-by: Jonathan Rudenberg <[email protected]>
Signed-off-by: Jonathan Rudenberg <[email protected]>
func (ecdsaSigner) Type() string { | ||
return data.KeyTypeECDSA_SHA2_P256 | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these definitions belong in the test file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. This patch intentionally implements only verification in the exposed code. This is in preparation for supporting ECDSA signing keys via PKCS11 in external devices like the Yubikey and HSMs. If you can store keys locally, Ed25519 should be used. We're only adding support for ECDSA because the dedicated hardware devices do not support Ed25519.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha.
LGTM |
theupdateframework#96 and ECDSA support added in theupdateframework#98
verify: Don't assume signature method, use key type
It is unsafe to use the signature method field, as it could result in a key confusion attack. Use the key type instead.
Also, don't assume that we're only working with Ed25519.
verify: Add support for
ecdsa-sha2-p256
signatures