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

Security exception error while trying to decrypt. #8

Open
AppleDecryptorRJ opened this issue Feb 26, 2015 · 2 comments
Open

Security exception error while trying to decrypt. #8

AppleDecryptorRJ opened this issue Feb 26, 2015 · 2 comments

Comments

@AppleDecryptorRJ
Copy link

Hello,

I've been trying to decrypt the apple pay token with beatty/applepay_crypto_demo program.

I loaded the message.json file, the .p12 file and the .cer files in the appropriate parts of the code, but I got an exception message as in,

Exception in thread "main" java.io.IOException: error constructing MAC: java.lang.SecurityException: JCE cannot authenticate the provider BC
at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(JDKPKCS12KeyStore.java:716)
at java.security.KeyStore.load(Unknown Source)
at Main.loadPrivateKey(Main.java:178)
at Main.main(Main.java:116)

when I tried and followed some online helper forums, now its throwing another exception,

Exception in thread "main" java.io.IOException: exception unwrapping private key - java.security.InvalidKeyException: Illegal key size
at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(Unknown Source)
at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at Main.loadPrivateKey(Main.java:158)
at Main.main(Main.java:110)

I'm really led out of this place here. Its really important to get this thing working. Am I doing something wrong here?? can someone help me out of this situation please. Its really important, any thoughts would be appreciated. Thanks in advance.

@xslim
Copy link

xslim commented Aug 3, 2015

You need to install 256 key security.

follow this link http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters

@AppleDecryptorRJ
Copy link
Author

Thank you, I got that working already!

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

2 participants