Reputation: 3574
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
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