WAPI icon indicating copy to clipboard operation
WAPI copied to clipboard

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

Open andersling opened this issue 2 years ago • 8 comments

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 avatar May 04 '22 07:05 andersling

<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 avatar May 04 '22 08:05 andersling

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

ben221199 avatar May 04 '22 10:05 ben221199

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!

andersling avatar May 05 '22 00:05 andersling

I think I haven't type 0 available yet.

ben221199 avatar May 05 '22 08:05 ben221199

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 ?

houjianwen123 avatar Dec 26 '22 07:12 houjianwen123

I think you forgot to import BouncyCastle.

ben221199 avatar Dec 26 '22 22:12 ben221199

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 .....

houjianwen123 avatar Dec 27 '22 08:12 houjianwen123

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

ben221199 avatar Dec 27 '22 15:12 ben221199