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

Make DSACryptoServiceProvider set legal key sizes to most restrictive for platform #50192

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

elinor-fung
Copy link
Member

The legal key sizes for DSA are more restrictive than on other platforms. Update DSACryptoServiceProvider to use the most restrictive sizes as the legal key sizes.

cc @jkoritzinsky @steveisok @AaronRobinsonMSFT @bartonjs

@ghost
Copy link

ghost commented Mar 24, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

The legal key sizes for DSA are more restrictive than on other platforms. Update DSACryptoServiceProvider to use the most restrictive sizes as the legal key sizes.

cc @jkoritzinsky @steveisok @AaronRobinsonMSFT @bartonjs

Author: elinor-fung
Assignees: -
Labels:

area-System.Security

Milestone: -

{
key.KeySize = 576;
}
catch (CryptographicException) when (PlatformDetection.IsAndroid)
Copy link
Member

Choose a reason for hiding this comment

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

Exception filters are problematic in AOT scenarios. I would move this check inside the catch block.

Copy link
Member

Choose a reason for hiding this comment

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

Do we AOT our tests?

Copy link
Member

@steveisok steveisok Mar 24, 2021

Choose a reason for hiding this comment

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

Yes, we send all assemblies in a suite's publish directory, for example, to the AOT compiler.

Copy link
Member

Choose a reason for hiding this comment

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

Huh, TIL. Cool 😄.

@elinor-fung elinor-fung merged commit dcbd832 into dotnet:main Mar 24, 2021
@elinor-fung elinor-fung deleted the dsaCsp-android branch March 24, 2021 23:25
@ghost ghost locked as resolved and limited conversation to collaborators Apr 24, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants