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

hi,sir! how to decrpt this kind of keystore.xml item from andorid device? #22

Open
andersling opened this issue May 4, 2022 · 8 comments

Comments

@andersling
Copy link

hi,sir! Thanks for your greate job!
but i encounter this problem:
in the keystore.xml form andrid, I found this keypair value, but i can't find any method to decrpt it:

[0,"7gSHycMPx28u1rgRr+/YpSgWxHaOg+2Ckog9OJQ+9n9JAPXb/go0FoBvYvp57NagOg31Dq3a1PejtmSXEtZ5dM/MW7V9WZYecLrfe86wjgc","+vMax4iwA+csF/k5"]

any one has some tips will be greate apreciated!

thanks a lot!

@andersling
Copy link
Author

<string name="client_static_keypair_pwd_enc">[2,&quot;3WRAH98QPMiKSnxxx3dmqTufGG+rJm2bSIxcu\/cyFzUnFAuwShO0h2cxxxxMQk8Awmp7dh7Zi4Q&quot;,&quot;rUQKAj3IdcTYvkZKYvqd\/Q&quot;,&quot;27yTag&quot;,&quot;8dAj7ciKg0xxxxxJV1A&quot;]</string> <long name="client_static_keypair_enc_success" value="3" /> <boolean name="can_user_android_key_store" value="true" />

@andersling
Copy link
Author

https://github.com/ben221199/WAPI/blob/master/src/main/java/nl/ben221199/wapi/tools/EncryptedClientStaticKeypair.java

Sir,Thanks for your reply!
But I found the link you sent seems thant It only support type=2, but the [client_static_keypair_enc] 's type is 0, and the fields count is 3

image

any ideas? big thanks!

@ben221199
Copy link
Owner

I think I haven't type 0 available yet.

@houjianwen123
Copy link

Hi ben, I write a java program to get the key but thow the exception "PBKDF2WithHmacSHA1And8bit SecretKeyFactory not available" is this program cannot run JDK11 ?

@ben221199
Copy link
Owner

I think you forgot to import BouncyCastle.

@houjianwen123
Copy link

Thanks for your reply, I do only copy this jar then write a simple main class java with import this jar to try , it can decrpt on my IDEA, but when I export with the related jar bcprov-jdk15on-1.69.jar as project jar file, to run java -jar , then it show "PBKDF2WithHmacSHA1And8bit SecretKeyFactory not available". just dont know what difference between ide and the export jar .....

@ben221199
Copy link
Owner

Does the exported JAR also have BouncyCastle packed? Also, it could be possible that the code only runs with OpenJDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@andersling @ben221199 @houjianwen123 and others