Installing / Registering the Bouncy Castle JCE provider or JBoss Module

Solution Verified - Updated -

Issue

  • Install as JBoss Module
  • Register as JCE provider
  • Getting the below exception:

    java.lang.NoClassDefFoundError: Could not initialize class org.bouncycastle.jce.provider.BouncyCastleProvider
    
  • Getting following errors when using Bouncy Castle provider

    java.io.IOException: error constructing MAC: java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
    
  • See one of the the following errors

    java.security.NoSuchAlgorithmException: ****** SecretKeyFactory not available
    
    "java.lang.SecurityException: JCE cannot authenticate the provider BC"
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6
    • 7
  • Java 8
  • Java Cryptography Extensions (JCE)
  • Bouncy Castle as JCE provider library or Application library
  • Bouncy Castle deployed in ".war" or java_home/jre/lib/ext directory.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content