Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor Rfc2898DeriveBytes to support spans#71888

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vcsjones merged 2 commits intodotnet:mainfromvcsjones:pbkdf2-managed-less-alloc
Jul 12, 2022

Conversation

vcsjones
Copy link
Member

Since the managedRfc2898DeriveBytes is used to implement the one-shots on some platforms, this changes the internals of it to better support spans.

I took this approach as an alternative to a pure one-shot managed PBKDF2 implementation to use as much existing, battle tested code as possible to increase the chances that it will be taken in time for .NET 7.


I investigated using the native PBKDF2 capabilities for Android and determined that unfortunately Android's APIs are not suitable for our needs for two reasons. First, it requires API Level 26 for SHA2 PBKDF2, which means we would still need the managed fallback since we support older Android versions. Second, it operates entirely onChar[] passwords, notByte[]. We can't feed arbitrary bytes in to Java character arrays.

@ghostghost assignedvcsjonesJul 9, 2022
@ghost
Copy link

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

Issue Details

Since the managedRfc2898DeriveBytes is used to implement the one-shots on some platforms, this changes the internals of it to better support spans.

I took this approach as an alternative to a pure one-shot managed PBKDF2 implementation to use as much existing, battle tested code as possible to increase the chances that it will be taken in time for .NET 7.


I investigated using the native PBKDF2 capabilities for Android and determined that unfortunately Android's APIs are not suitable for our needs for two reasons. First, it requires API Level 26 for SHA2 PBKDF2, which means we would still need the managed fallback since we support older Android versions. Second, it operates entirely onChar[] passwords, notByte[]. We can't feed arbitrary bytes in to Java character arrays.

Author:vcsjones
Assignees:-
Labels:

area-System.Security

Milestone:-

@vcsjones
Copy link
MemberAuthor

WASM failures are#71986. Merging.

@vcsjonesvcsjones merged commitc7613b6 intodotnet:mainJul 12, 2022
@vcsjonesvcsjones deleted the pbkdf2-managed-less-alloc branchJuly 12, 2022 02:11
@ghostghost locked asresolvedand limited conversation to collaboratorsAug 11, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@stephentoubstephentoubstephentoub left review comments

@bartonjsbartonjsbartonjs approved these changes

Assignees

@vcsjonesvcsjones

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vcsjones@stephentoub@bartonjs

[8]ページ先頭

©2009-2025 Movatter.jp