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 <jonathan@titanous.com>
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
| func (ecdsaSigner) Type() string { | ||
| return data.KeyTypeECDSA_SHA2_P256 | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Do these definitions belong in the test file?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
|
LGTM |
lebauce
pushed a commit
to lebauce/go-tuf
that referenced
this pull request
Jul 26, 2021
theupdateframework#96 and ECDSA support added in theupdateframework#98
lebauce
pushed a commit
to lebauce/go-tuf
that referenced
this pull request
Jul 26, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-p256signatures