java.security.SignatureException: java.lang.ArithmeticException?
When I'm verifying the signature, I'm getting the following exception,
Not sure what it means and why the exception is happening, I'm using the same latest code provided in the book examples. Could you highlight what could be wrong? I'm able to create the signature file, this part fails when it tries to verify the signature.
java.security.SignatureException: java.lang.ArithmeticException: BigInteger not invertible
Caused by:
java.lang.ArithmeticException: BigInteger not invertible.
at java.math.MutableBigInteger.modInverse(MutableBigI nteger.java:1239)
at java.math.MutableBigInteger.mutableModInverse(Muta bleBigInteger.java:1114)
at java.math.BigInteger.modInverse(BigInteger.java:20 23)
at org.bouncycastle.crypto.signers.DSASigner.verifySi gnature(Unknown Source)
at org.bouncycastle.jce.provider.JDKDSASigner.engineV erify(Unknown Source)
at java.security.Signature$Delegate.engineVerify(Sign ature.java:1194)
at java.security.Signature.verify(Signature.java:647)
|