Hi all,

I want to write some cryptographic operations using RSA, but its provider, bouncy castle, does not come inbuilt in java, which is why when I put in this code:

Provider bcProv = new org.bouncycastle.jce.provider.BouncyCastleProvider();

I went to the providers site and they said something about putting this line "security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider" into the java.security file in <JAVA HOME>\jre\lib\security\, where N is the one more number more than the last on the list.

I opened the java.security file with wordpad and sure enough i found these:

I put in: "security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider", but when I tried saving I got a message saying I wasn't allowed access to the java.security file.

Anyway, right now, I'm stumped. Does anyone know anything about this cryptographic provider and how to install it?


It may just be a UAC thing with Win7 or Vista. Do you have administrator access on that machine?

I am the administrator and i'm logged in as the administrator. I right-clicked on the file to see if there was an option to open the file as an administrator, but there's no such option.

You could try with UAC disabled I suppose. I'm not sure what else would be preventing you from editing that property file.

Ok, i found a way to sort this out. I just copied the java.security file from the jre folder, edited it somewhere else and copied it back in.