ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Java key size encryption - restricted

Post new topic  Reply to topic
 Java key size encryption - restricted « View previous topic :: View next topic » 
Author Message
avieira
PostPosted: Thu Aug 11, 2016 4:35 am    Post subject: Java key size encryption - restricted Reply with quote

Newbie

Joined: 11 Aug 2016
Posts: 5

We're trying to decrypt an AES message using a JCN but we're getting an exception concerning illegal key size.

A bit of googling explains that Java restricts usage of encryption algorithms to 128-bit keys, which goes against our 256-bit key.

It is suggested to replace 2 jar files in the security folder of our local Java installation (local_policy.jar and US_export_policy.jar). In our case it would be WMB/IIB's java folder.

Those 2 jar files are composed of *.policy files used to restrict security policy. When we tried replacing them all our SFTP connections started to fail and the syslog showed multiple: java.lang.NoClassDefFoundError: javax.crypto.b (initialization failure).

I did try editing those policy files manually to allow AES 256-bit, but we keep getting the same exceptions.

Has anyone tried to do something similar?

In case it is relevant we're using the old un-supported WMB v7006 on a linux server.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 11, 2016 4:48 am    Post subject: Re: Java key size encryption - restricted Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

avieira wrote:
In case it is relevant we're using the old un-supported WMB v7006 on a linux server.


It's very relevant. Are you sure the (very old) JVM that goes with that unsupported version supports a key that wide? Is compatible with the policies / jar files you're using?

It works for me under v9.0.0.5. For the benefit of possibly skeptical regular readers and in the interests of full disclosure, I didn't make the changes myself but approved them and watched in a supervisory manner as my minions changed jar files and other Java magics.

I think I did a very creditable job of looking like I knew what was happening....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 11, 2016 5:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

...
http://www.ibm.com/support/knowledgecenter/en/SSKM8N_8.0.0/com.ibm.etools.mft.doc/bk58210_.htm

http://www.ibm.com/support/knowledgecenter/SSKM8N_8.0.0/com.ibm.etools.mft.doc/bk58220_.htm

You might not have a configurable service available in 7.0.x
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
avieira
PostPosted: Thu Aug 11, 2016 5:11 am    Post subject: Reply with quote

Newbie

Joined: 11 Aug 2016
Posts: 5

Once I noticed this problem, instead of replacing the jar files I edited them. The policy file that restricts the key sizes is found on the local_policy.jar and is named default_local.policy. Here are its contents:

grant {
permission javax.crypto.CryptoPermission "DES", 64;
permission javax.crypto.CryptoPermission "DESede", *;
permission javax.crypto.CryptoPermission "RC2", 128,
"javax.crypto.spec.RC2ParameterSpec", 128;
permission javax.crypto.CryptoPermission "RC4", 128;
permission javax.crypto.CryptoPermission "RC5", 128,
"javax.crypto.spec.RC5ParameterSpec", *, 12, *;
permission javax.crypto.CryptoPermission "RSA", 2048;
permission javax.crypto.CryptoPermission *, 128;
};

I basically replaced the number in last line with 256, but I keep getting the same "NoClassDefFoundError".

I've tried looking for some documentation of the IBM J9 VM we're using, to check if AES 256 is supported, but I couldn't find anything relevant.

I'm aware this is a highly specific question to an old version of WMB but some ideas/directions would be very helpful.

Thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Java key size encryption - restricted
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.