Wednesday, October 1, 2008

Cryptography problem in Java

Cryptography in java
1.first you download Castle Bouncy Java Cryptography API form
http://www.bouncycastle.org/checksums.html

2.if you are using jdk 1.6 then download two jar package from link given above.
i.bcpg-jdk16-140.jar
ii.bcprov-jdk16-140.jar
Past these two jar pkg in ext folder(In windows)
program files->java->jre1.6.0->lib->ext(past "bcpg-jdk16-140.jar,bcprov-jdk16-140.jar" in ext folder)

3.Make entry for castlebouncy pkg in security file of C:\Program Files\Java\jre1.6.0\lib\security
security.provider.8=sun.security.smartcardio.SunPCSC
security.provider.9=sun.security.mscapi.SunMSCAPI
for castlebouncy -----
"security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider".

4.Cryptography in java not provide unlimited strength openly in java because cryptography restricted by U.S.Govt. ,for unlimited strength in java download "Unlimited Strentgh policy files",which are "US_export_policy.jar,local_policy.jar"and past the policy jar in security folder of "C:\Program Files\Java\jre1.6.0\lib\".