Skip to content

Conversation

@vcsjones
Copy link
Member

While working on something else, I noticed that we had some code for calling in to the android native shims for PBKDF2... but android doesn't use native code for PBKDF2. It uses a managed implementation. So this LibraryImport wasn't importing anything real.

@ghost
Copy link

ghost commented Mar 18, 2023

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

Issue Details

While working on something else, I noticed that we had some code for calling in to the android native shims for PBKDF2... but android doesn't use native code for PBKDF2. It uses a managed implementation. So this LibraryImport wasn't importing anything real.

Author: vcsjones
Assignees: -
Labels:

area-System.Security, os-android

Milestone: -

@vcsjones
Copy link
Member Author

/azp run runtime-android

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

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

Is there any code on the native side that provides an implementation here? If so, we want to switch to using the native implementation? Otherwise, we should remove the native implementation from the native shim.

@vcsjones
Copy link
Member Author

Is there any code on the native side that provides an implementation here?

No. There is no entry point CryptoNative_Pbkdf2 in the native shim for Android. So there is nothing to clean up there. It was a P/invoke to nothing.

To preemptively answer: Android does not have the native capability to do this, either when I last looked less than a year ago.

@marek-safar
Copy link
Contributor

/azp run runtime-android

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky jkoritzinsky merged commit a1d45c5 into dotnet:main Apr 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 24, 2023
@vcsjones vcsjones deleted the android-pbkdf2-shim-bye-bye branch April 5, 2025 12:30
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.

3 participants