-
Notifications
You must be signed in to change notification settings - Fork 27
Improvements #125
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
base: master
Are you sure you want to change the base?
Improvements #125
Conversation
|
Is it correct to actually prohibit the alg header from the unprotected map? Even some of the examples from RFC 9052 contain unprotected alg headers, such as for the |
|
@BrianSipos Thank you! You're absolutely right. I overlooked AES-KW. What I had in mind was this part of RFC 9052:
From this, I understood that placing alg in the unprotected header is inappropriate if authentication is possible. Since Keywrap doesn’t support AAD, it might make sense to prohibit alg in unprotected headers for all other message types with an exception for algorithms like AES128KW. Would you agree? |
|
It is true that there are two categories of encrypt algorithms: those which support AAD and those which do not. For those that do support it your logic applies to require protection of The algorithms I know to not support AAD are:
|
…t support authentication)
|
The algorithm class I think the current constraint is good (cannot be in |
|
|
Yup, that makes sense. Thank you. |



I've added some improvements to pycose:
content-typeparameter — RFC 9052 says it can't have leading or trailing spaces and must follow the<type-name>/<subtype-name>format.algandcritheader parameters in the unprotected header, as per RFC 9052.