SIV properly handle zero AD components - #777
Conversation
sjaeckel
left a comment
There was a problem hiding this comment.
This has been discussed on the IETF ML [0] and FMU it was unconclusive.
Now I'm not sure if merging this would make our implementation worse, since we already allow a zero-length nonce...
[0] https://mailarchive.ietf.org/arch/msg/cfrg/Gu5cyorHPLrQ_CGYe775Xc6SV1c/
|
I did not look into it that deeply. I mainly wanted to be compatible with OpenSSL SIV implementation. You are right, it may need more investigation. |
|
I investigated this further and the main problem seems to be that with SIV there are two kinds of "empty associated data":
I found that empty AD was also an issue in OpenSSL before versions 3.0.9/3.1.1 - see: https://openssl-library.org/news/secadv/20230714.txt I updated So the main idea of this PR is: let us stick with what the "big boys" in the OpenSSL project are doing. |
This PR fixes an SIV corner case that occurs when zero AD components are used.
Checklist