If a public key has been configured for a log, check that it is consistent with the private key#1044
Merged
AlCutter merged 3 commits intogoogle:masterfrom Mar 24, 2023
Conversation
…stent with the private key
AlCutter
reviewed
Mar 21, 2023
Comment on lines
+140
to
+143
| case ed25519.PublicKey: | ||
| if !pub.Equal(signer.Public()) { | ||
| return nil, errors.New("public key is not consistent with private key") | ||
| } |
Member
There was a problem hiding this comment.
Strictly speaking, I think these should only ever really be RSA or ECDSA P-256 ('cos RFC-6962), but probably no harm in having this here.
Contributor
Author
There was a problem hiding this comment.
Yeah, I thought about that. I couldn't find any other restriction on the key algorithm in the codebase though, and since RFC9162 permits Ed25519 I figured that future-proofing was worth these 4 lines of code.
Member
|
/gcbrun |
Contributor
|
/gcbrun |
AlCutter
approved these changes
Mar 24, 2023
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.
Sectigo's Sabre log was recently migrated from SuperDuper to Trillian. Due to a configuration mistake, the CTFE server signed STHs and SCTs using the wrong private key for a period of approximately 20 hours, until the problem was detected and corrected. Before and during this incident, the correct public key was specified in the
public_keyfield in the CTFE configuration, but that field currently is not actually used by the CTFE.This PR adds a check for the consistency of the
public_keyandprivate_key, when both of these fields are specified in the CTFE configuration.Checklist