Prabhu M
Prabhu M

Reputation: 3574

Android NDK secure strings

I am doing a POC to secure strings using android NDK. I have kept a string "My secret key" in C++ code and then access it in Java using JNI. App is working without any issues. Then I have decompiled the apk file. Now I am still able to see the string "My secret key" in .so files. How to secure strings using NDK approach.

Upvotes: 0

Views: 964

Answers (1)

Ben-J
Ben-J

Reputation: 1125

We have an open source working implementation of storing secret key in the NDK. You can find all the details here : https://github.com/klaxit/hidden-secrets-gradle-plugin

This plugin uses the NDK and XOR operator to hide string keys and avoid reverse engineering based on apk decompilation.

Upvotes: 1

Related Questions