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.