You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to integrate fips-approved version of BouncyCastle in my Android project.
When I'm trying to add provider by calling Security.addProvider(new BouncyCastleFipsProvider()) I receive following exception.
I was trying to add library from MAVEN and by adding the .jar manually to the project tree but the result is always the same.
I was also trying with different versions of library bc-fips-1.0.2.3, bc-fips-1.0.2.4 and bc-fips-1.0.2.5.
Thank you for help in advance
The exception I get: FATAL EXCEPTION: main Process: com.example.myapplication, PID: 5976 org.bouncycastle.crypto.fips.FipsOperationError: org.bouncycastle.crypto.fips.FipsOperationError: Module checksum failed: expected [7832e1dc547d4d3b0fdf2cc9248c0b64dc0382382f7501238f8aa4418817c5bd] got [d39ad83d4f8a008d9af2e1c6d7d85caff54028ca2eb59eeb7a5db05261b3f5ad] at org.bouncycastle.crypto.fips.FipsStatus.moveToErrorStatus(Unknown Source:2) at org.bouncycastle.crypto.fips.FipsStatus.checksumValidate(Unknown Source:307) at org.bouncycastle.crypto.fips.FipsStatus.isReady(Unknown Source:58) at org.bouncycastle.crypto.CryptoServicesRegistrar.getDefaultMode(Unknown Source:0) at org.bouncycastle.crypto.CryptoServicesRegistrar.<clinit>(Unknown Source:70) at org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode(Unknown Source:0) at org.bouncycastle.jcajce.provider.ProvSecureHash$MD5.configure(Unknown Source:0) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source:215) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source:1) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source:1) at com.example.myapplication.MainActivity.onCreate(MainActivity.kt:22) at android.app.Activity.performCreate(Activity.java:8305) at android.app.Activity.performCreate(Activity.java:8284) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to integrate fips-approved version of BouncyCastle in my Android project.
When I'm trying to add provider by calling
Security.addProvider(new BouncyCastleFipsProvider())
I receive following exception.I was trying to add library from MAVEN and by adding the .jar manually to the project tree but the result is always the same.
I was also trying with different versions of library bc-fips-1.0.2.3, bc-fips-1.0.2.4 and bc-fips-1.0.2.5.
Thank you for help in advance
The exception I get:
FATAL EXCEPTION: main Process: com.example.myapplication, PID: 5976 org.bouncycastle.crypto.fips.FipsOperationError: org.bouncycastle.crypto.fips.FipsOperationError: Module checksum failed: expected [7832e1dc547d4d3b0fdf2cc9248c0b64dc0382382f7501238f8aa4418817c5bd] got [d39ad83d4f8a008d9af2e1c6d7d85caff54028ca2eb59eeb7a5db05261b3f5ad] at org.bouncycastle.crypto.fips.FipsStatus.moveToErrorStatus(Unknown Source:2) at org.bouncycastle.crypto.fips.FipsStatus.checksumValidate(Unknown Source:307) at org.bouncycastle.crypto.fips.FipsStatus.isReady(Unknown Source:58) at org.bouncycastle.crypto.CryptoServicesRegistrar.getDefaultMode(Unknown Source:0) at org.bouncycastle.crypto.CryptoServicesRegistrar.<clinit>(Unknown Source:70) at org.bouncycastle.crypto.CryptoServicesRegistrar.isInApprovedOnlyMode(Unknown Source:0) at org.bouncycastle.jcajce.provider.ProvSecureHash$MD5.configure(Unknown Source:0) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source:215) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source:1) at org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider.<init>(Unknown Source:1) at com.example.myapplication.MainActivity.onCreate(MainActivity.kt:22) at android.app.Activity.performCreate(Activity.java:8305) at android.app.Activity.performCreate(Activity.java:8284) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Beta Was this translation helpful? Give feedback.
All reactions