yongjhih / pepk

PEPK - Play Encrypt Private Key - Imported from pepk-src.jar
Apache License 2.0
40 stars 11 forks source link

pepk.jar failed to run: Cannot find any provider supporting RSA/NONE/OAEPWithSHA1AndMGF1Padding #2

Open ikool-cn opened 1 year ago

ikool-cn commented 1 year ago

截图

The new version of google play changed --encryptionkey to --encryption-key-path, when i am run the command,error occurred

java -jar pepk.jar --keystore=huoshanbox.jks --alias=huoshanbox --output=output.zip --include-cert --rsa-aes-encryption --encryption-key-path=encryption_public_key.pem

Enter password for store 'huoshanbox.jks':
Enter password for key 'huoshanbox':
Error: Unable to export or encrypt the private key
java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/OAEPWithSHA1AndMGF1Padding
    at java.base/javax.crypto.Cipher.getInstance(Cipher.java:563)
    at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.encryptPrivateKeyWithCkmRsaAesKeyWrapEncryption(ExportEncryptedPrivateKeyTool.java:284)
    at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.run(ExportEncryptedPrivateKeyTool.java:213)
    at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.main(ExportEncryptedPrivateKeyTool.java:165)

This tool requires jdk 11+,i am tried JDK 11, JDK 17, JDK 20, but got the same error. Which version of jdk should I use?

Help me pls, thanks!

Android-LiuHuan commented 1 year ago

Did you solve it? I had the same problem

abhisheksisodia commented 1 year ago

Try with OpenJDK 20 version

abhisheksisodia commented 1 year ago

Try with OpenJDK 20 version

kitkatRC commented 1 year ago

Try with OpenJDK 20 version

Not effective 微信截图_20230903180401

Osiris-Team commented 5 months ago

Use OpenJDK (https://jdk.java.net/) instead of the Oracle JDK; they are packaged with different tools, and evidently Google expects the OpenJDK set.

So uninstall your current Java and install a distro like temurin/adoptium that is based on openjdk, which you can download it from here (select msi for windows installer): https://adoptium.net/de/temurin/releases/?os=windows

Original awnser: https://stackoverflow.com/questions/76516045/cannot-find-any-provider-supporting-rsa-none-oaepwithsha1andmgf1padding-when-t

mertaksoy commented 3 months ago

I had the same issue. Changed to Open JDK instead of Oracle. Problem fixed ✅