Skip to content
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

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

whatyouhide
Copy link
Contributor

Took me a bit of reading to figure this out, so I figured some small pointers could be helpful. See this for example.

@IngelaAndin IngelaAndin added team:VM Assigned to OTP team VM team:PS Assigned to OTP team PS labels Nov 20, 2023
@@ -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
Copy link
Contributor

@IngelaAndin IngelaAndin Nov 23, 2023

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

Copy link
Contributor Author

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 🙃

@IngelaAndin IngelaAndin self-assigned this Nov 23, 2023
@whatyouhide whatyouhide force-pushed the improve-crypto-docs-on-aad branch from 7e4ebf2 to 83a2c4b Compare November 24, 2023 10:01
Copy link
Contributor

github-actions bot commented Nov 24, 2023

CT Test Results

    2 files    14 suites   5m 56s ⏱️
187 tests 173 ✔️   14 💤 0
481 runs  341 ✔️ 140 💤 0

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

@IngelaAndin IngelaAndin merged commit d77ef65 into erlang:master Nov 24, 2023
15 checks passed
@whatyouhide whatyouhide deleted the improve-crypto-docs-on-aad branch November 24, 2023 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants