-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve crypto docs around "AAD" #7876
Improve crypto docs around "AAD" #7876
Conversation
lib/crypto/doc/src/crypto.xml
Outdated
@@ -835,6 +835,8 @@ end | |||
<p>For decryption, set the <c>EncryptFlag</c> to <c>false</c> and put the tag to be checked | |||
in the argument <c>TagOrTagLength</c>. | |||
</p> | |||
<p>The <c>AAD</c> argument represents the Additional Authentication Data. It's optional. If it's |
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 suggest that we should clarify this a little further. I suggest:
"AAD (Additional Authenticated data) is plaintext that will not be encrypted, but will be covered by authenticity protection. It should be provided by the AAD argument, but can be the empty binary and in that case a plain AE (Authenticated Encryption) is performed instead of the AEAD (Authenticated Encryption with Associated Data). This function only supports ciphers
that can be used both with and without AAD. "
What do you think? See also https://en.wikipedia.org/wiki/Authenticated_encryption
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.
@IngelaAndin I like that, thanks for expanding on the doc! I updated the PR with your suggestion 🙃
7e4ebf2
to
83a2c4b
Compare
CT Test Results 2 files 14 suites 5m 56s ⏱️ Results for commit 83a2c4b. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
Took me a bit of reading to figure this out, so I figured some small pointers could be helpful. See this for example.