cancel
Showing results for 
Search instead for 
Did you mean: 

Needed help with Cryptography Providers(IAIK)?

Former Member
0 Kudos

Hi

I am in a very strange situation.

I need to change thecryptography provider priority (Location in visual admin screen : service>security provider>runtime>cryptography providers) by assinging decryptto top and IAIK after that.

After saving(choosing set) and restarting the WAS when i go back to the admin console it shows the same old configuration.

Why i am doing this?

==========================

I need to test a senario where i had encrypted a string using the Sun's JCE implementation outside the WAS environment and i am now decrypting in the WAS environment.

i get the following error

ERROR: JCEEncryption:: failed to decrypt data

java.security.InvalidKeyException: Must be a PBEKey in RAW format.

at iaik.security.cipher.PbeWithMD5AndDES_CBC.initCipher(Unknown Source)

Since IAIK is selected as default, WAS uses it and i would like to see the behaviour when i change the priority from IAIK to SunJCE.

But changing this in the admin console doesnt works.

Pleazzz help!

My configuration(Solaris OS 9, WAS 6.40 sp12, jdk 1.4.2_06-b03 )

Thanks in advance

Thomas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In the sp13 or later versions of Visual Admin, you ca "set" the order of providers. This doesn't seem to live after restart, but is valid for the current server instance.

Try to set the different order prior to running your app.

However, the easier way is to get the key generated correctly by registering "PBEWithMD5AndDES" as alias for the IAIK PBE factory

i.e.

IAIK.addAsJDK14Provider();

Provider provider = Security.getProvider("IAIK");

provider.put("Alg.Alias.SecretKeyFactory.PBEWithMD5AndDES", "PBE");

Message was edited by: Jonathon Kopel

Former Member
0 Kudos

Hi Jonathon

Thanks a lot for this answer, Very well you shown it using code, Thanks for lot, i will surely try this out . I had given you full points

Regards

Thomas