-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add signature context #2222
Add signature context #2222
Conversation
Co-authored-by: Yaron Sheffer <yaronf@gmx.com>
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.
I remain unconvinced that context
provides any real value, so I'm against including it in the spec. If we do end up including it anyway, we must not imply that it provides security benefits that it does not.
@@ -480,6 +480,7 @@ The signature parameters component value is the serialization of the signature p | |||
* `nonce`: A random unique value generated for this signature as a String value. | |||
* `alg`: The HTTP message signature algorithm from the HTTP Message Signature Algorithm Registry, as a String value. | |||
* `keyid`: The identifier for the key material as a String value. | |||
* `context`: A context for the signature as a String value. This value is used by applications to help identify the signature's validity in specific applications or protocols. Context is often needed for avoiding cross-protocol attacks. |
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.
* `context`: A context for the signature as a String value. This value is used by applications to help identify the signature's validity in specific applications or protocols. Context is often needed for avoiding cross-protocol attacks. | |
* `context`: A context for the signature as a String value. This value may be used by applications to help identify the intended usage of the signature. |
I'm still not thrilled by the second sentence, but this wording seems more accurate to me. The third sentence is simply not true. Signing all components that are semantically meaningful to the application will prevent cross-protocol attacks in most cases; in the remaining cases, there is no reason to assume context will provide any additional mitigation.
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.
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.
Works for me. Thanks!
Adds an optional
context
parameter to signatures, to allow applications to signal specific usage between the signer and verifier.Closes #2133
This PR does not add this to any examples yet, but we probably should if accepted.