-
Notifications
You must be signed in to change notification settings - Fork 16
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
Command Line Validation of Indirect Signatures #78
Merged
Conversation
This file contains 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
elantiguamsft
force-pushed
the
users/edwinlantigua/cmd-cds-validation
branch
from
February 12, 2024 06:14
8c6e612
to
78395dd
Compare
lemccomb
reviewed
Feb 14, 2024
lemccomb
reviewed
Feb 14, 2024
lemccomb
reviewed
Feb 14, 2024
lemccomb
reviewed
Feb 14, 2024
lemccomb
reviewed
Feb 14, 2024
lemccomb
approved these changes
Feb 14, 2024
elantiguamsft
added a commit
that referenced
this pull request
Mar 1, 2024
…idation Command Line Validation of Indirect Signatures
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.
The command line verb
validate
does not currently support the validation of "COSE detached signatures" - a COSE signing format that I will refer from this point on as "indirect signing".Indirect signatures, as it exists presently, constitutes an embedded COSE signature where the embedded content represents the hash of the payload. The hashing algorithm is also encoded in the message.
For indirect signatures, validation requires that the payload be hashed using the same algorithm used in the creation of the COSE message. The computed hash is then compared to the hash stored in the content header to ensure the payload has not been mutated. This pull request updates the CoseSignTool.exe
validate
verb to check if the signature is indirect, in which case the aforementioned extra hash validation steps are taken.Currently, indirect signatures embed the hash of the payload in the content header of the COSE message, and the hash algorithm is appended to the content type. The industry standard is likely to use a similar format where both the payload hash and algorithm name are stored in the content header encoded as a cbor object. Subsequent updates will be made to respect Microsoft internal practices and industry standards as they mature.