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

Add X509CertificateLoader SecurityDesign doc #112149

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bartonjs
Copy link
Member

@bartonjs bartonjs commented Feb 4, 2025

No description provided.

@bartonjs bartonjs added documentation Documentation bug or enhancement, does not impact product or test code area-System.Security labels Feb 4, 2025
@bartonjs bartonjs added this to the 10.0.0 milestone Feb 4, 2025
@bartonjs bartonjs self-assigned this Feb 4, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

Password-based confidentiality also specifies the number of iterations to run for the chosen KDF.
Callers can limit the number of iterations for the KDF on a single encrypted SafeContents via the `IndividualKdfIterationLimit` property (which .NET 9 defaults to 300,000).
As there can be more than one password-based SafeContents, callers can limit the total number of iterations across all KDFs via the `TotalKdfIterationLimit` property (which .NET 9 defaults to 1,000,000).
The `TotalKdfIterationLimit` property is also shared with ShroudedKeyBag entries, there are not separate controls for totals for SafeContents vs ShroudedKeyBags. If either the `IndividualKdfIterationLimit` or the `TotalKdfIterationLimit` would be exceeded when decrypting a SafeContents value, an exception is thrown BEFORE doing the work associated with the limit.
Copy link
Member

@vcsjones vcsjones Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth noting that some work might be done before limits are exceeded. We generally cannot guarantee all of the KDF work is known up-front. A ShroudedKeyBag inside an encrypted AuthSafe means we need to do work to decrypt the authsafe before we know the work involved with the encrypted key bags.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have some suggestion as to how to word that in, I'm happy to take it. To me, it's obvious by "would be exceeded when decrypting", indicating that it is evaluated at each individual decryption operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security documentation Documentation bug or enhancement, does not impact product or test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants