• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

MX7 Encryption with Bouncy Castle Crypto help

Community Beginner ,
Oct 11, 2006 Oct 11, 2006

Copy link to clipboard

Copied

Followed instructions posted on this site and in Forta's "Advanced" application dev book on page 157 but cannot get it to work. Is anyone using the Bouncy Castle API?

The basic problem we're trying to solve is that we have several vendors that we want to send encrypted data to. In particular, one of them is using PGP, which I think is based on IDEA algorithm which looks like the Bouncy api supports BUT when trying to test a simple string encryption I always get "provider does not support" error message.

I've attached the test code I'm using, basically pulled from Forta's "Advanced" application development page 155 with slight mod to include the IDEA algorithm.

Thanks in advance for your time and consideration.



TOPICS
Advanced techniques

Views

543

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 11, 2006 Oct 11, 2006

Copy link to clipboard

Copied

It looks like you do not have the BouncyCastle provider installed correctly.

See the "Installing additional security providers" and "Installing the Sun Unlimited Strength Jurisdiction Policy Files" sections of the encryption TechNote at http://www.adobe.com/go/e546373d .

The most current BouncyCastle version for Java 1.4 is v1.34 in the file bcprov-jdk14-134.jar.

-tom-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

Thanks Tom, but we have followed those instructions carefully, added the bouncy jar to the ext directory, updated the jce policy jars to unlimited encryption from Sun, restarted / rebooted, made looked for other possible runtime environments being used... same problem. Has anyone successfully used the latest bouncy jar, bcprov-jdk14-134.jar? Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

Did you modify the java.security file? You might also try the Security.getProviders() java function to list the providers java is seeing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 13, 2006 Oct 13, 2006

Copy link to clipboard

Copied

LATEST
I can use your test code with BC 1.34 running CFMX 7.0.2 (build 142559 ) on Windows2000.

String " test", Password: " secret", Algorithm: " IDEA", Encoding: " HEX"
gives the result: " IDEA Encrypted: EF5083E0D33E8FFB".

re: Kabuto2's suggestion, the attached code should show whether the BouncyCastle provider is correctly loaded. The expected results are:
quote:

SUN version 1.42
SunJSSE version 1.42
SunRsaSign version 1.42
SunJCE version 1.42
SunJGSS version 1.0
BC version 1.34



-tom-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation