Can't support mode GCM

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't support mode GCM

Alexis Verdugo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

David Hook

Hi,

GCM support is in 1.47 (which I assume you are using as there is no BC
1.4.7).

Which jar are you actually using, are you sure there is not another
version of the provider somewhere in
the classpath?

Regards,

David

On 08/07/16 12:10, Alexis Verdugo wrote:

> Hello Team,
>
> I've got an issue when using BC 1.4.7 and Oracle JRE 1.7, so my process
> cannot start due to the following exception:
>
> java.lang.AssertionError: java.security.NoSuchAlgorithmException: No such
> algorithm: AES/GCM/NoPadding
>
> Caused by: java.security.NoSuchAlgorithmException: No such algorithm:
> AES/GCM/NoPadding
>         at javax.crypto.Cipher.getInstance(Cipher.java:673)
>         at javax.crypto.Cipher.getInstance(Cipher.java:580)
>
> Caused by: java.security.NoSuchAlgorithmException: can't support mode GCM
>         at
> org.bouncycastle.jce.provider.JCEBlockCipher.engineSetMode(Unknown Source)
>         at javax.crypto.Cipher$Transform.setModePadding(Cipher.java:357)
>         at javax.crypto.Cipher.getInstance(Cipher.java:655)
>         ... 13 more
>
> According to
> http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html,
> Java 7 doesn't support AES/GCM/NoPadding as it's included from Java 8. So
> the question is, what is the JCA provider that BC 1.4.7 uses?
>
> Is this error expected when using a Java 7 version of Java with BC 1.4.7?
>
> Thanks!
>
>
>
> --
> View this message in context: http://bouncy-castle.1462172.n4.nabble.com/Can-t-support-mode-GCM-tp4658219.html
> Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

Alexis Verdugo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

David Hook

What's the full name of the BC jar you are using? BC 1.47 does support GCM

Regards,

David

On 08/07/16 12:55, Alexis Verdugo wrote:

> Hi David,
>
> Thanks for your feedback. Sorry for the confusion, it's BC 1.47.
>
> Are you referring to the jce.jar?
>
> Manifest-Version: 1.0
> Implementation-Vendor: Oracle Corporation
> Implementation-Title: Java Runtime Environment
> Implementation-Version: 1.7.0_51
> Implementation-Vendor-Id: com.sun
> Specification-Vendor: Oracle Corporation
> Specification-Title: Java Platform API Specification
> Created-By: 1.6.0_18 (Sun Microsystems Inc.)
> Specification-Version: 1.7
> Extension-Name: javax.crypto
>
> I haven't got duplicate jars in my classpath. So I just wanted to know if I
> can use BC 1.47 with Java 7 or if this the possible cause of the exception.
>
> Cheers,
> /V
>
>
>
>
> --
> View this message in context: http://bouncy-castle.1462172.n4.nabble.com/Can-t-support-mode-GCM-tp4658219p4658221.html
> Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

Alexis Verdugo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

David Hook

That's not BC 1.47, it's BC 1.35 - you want bcprov-jdk15on-147.jar

Regards,

David

On 08/07/16 14:31, Alexis Verdugo wrote:

> It's bcprov-jdk15-135.jar (but I need further confirmation around this)
>
> Cheers,
>
> Alexis
>
>
>
> --
> View this message in context: http://bouncy-castle.1462172.n4.nabble.com/Can-t-support-mode-GCM-tp4658219p4658223.html
> Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

Alexis Verdugo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

David Hook

Hi Alexis,

I have no idea what's in those jars as they do not come from us.

I'd start with a small test program, confirm GCM is available in the
simplest manner possible. Assuming it works you'll need to have a closer
look at the environment that your application is executing in as it will
mean there is an older version of the provider somewhere in the classpath.

Regards,

David

On 11/07/16 09:25, Alexis Verdugo wrote:

> Thanks for your answer. Sorry about the confusion, these are the jars used:
>
> bcmail-jdk7-1.47.0.jar
> bcpkix-jdk7-1.47.0.jar
> bcprov-jdk7-1.47.0.jar
>
> So that's why I was wondering why I'm having the error "No such algorithm:
> AES/GCM/NoPadding" if 1.47 supports it, but JDK 7 does not. So I'm a bit
> concerned about this.
>
> Cheers,
> /V
>
>
>
>
> --
> View this message in context: http://bouncy-castle.1462172.n4.nabble.com/Can-t-support-mode-GCM-tp4658219p4658225.html
> Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

Alexis Verdugo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Can't support mode GCM

Alexis Verdugo
CONTENTS DELETED
The author has deleted this message.