From: Eric B. <Eri...@We...> - 2007-06-15 13:36:55
|
This is a similiar issue I was running into using the JCE RC4 = encryption. The only way I could get the code below to work was using a = maximum of 16 characters as the key, which is pretty weak. I couldn't = find and policy files and such. =20 All I am trying to do is RC4 encrypt a string using another string that = is 128 characters long as the string, and I am failing miserably. =20 java.security.Security.addProvider(new = cryptix.jce.provider.CryptixCrypto()); RawSecretKey v_key =3D new RawSecretKey("RC4", = "GFgksgjGNDKGlsgnLDGGknhjLdgnLSgnlsdkgNLSkgnlesnvlKENVlkENVLkNELVknLEKVns= ev".getBytes()); alg =3D Cipher.getInstance("RC4","CryptixCrypto"); alg.init(Cipher.ENCRYPT_MODE, v_key ); byte[] v_encrypted =3D alg.doFinal( = v_form_parameter.getBytes() ); -----Original Message----- From: cry...@li... = [mailto:cry...@li...]On Behalf Of Andreas = Kuehne Sent: Friday, June 15, 2007 3:37 AM To: Rakesh R Nair; cry...@li... Subject: Re: [Cryptix-users] Unsupported keysize or algorithm parameters Hi Rakesh, did you install the 'unlimited strength' policy files ? Greetings Andreas ----- Original Message ---- From: Rakesh R Nair <rak...@in...> To: cry...@li... Sent: Friday, June 15, 2007 5:54:55 AM Subject: [Cryptix-users] Unsupported keysize or algorithm parameters Hi,=20 I am new to PGP Encryption .... I downloaded the code from cryptix site=20 First I ran GenerateAndWriteKeys and it generated public and private key = Then I am trying to run Encrypt.java it is giving me the following error = Exception in thread "main" java.lang.SecurityException: Unsupported = keysize or algorithm parameters=20 at javax.crypto.Cipher.init(Unknown Source)=20 at = cryptix.openpgp.packet.PGPEncryptedDataPacket.encrypt(PGPEncryptedDataPac= ket.java:356)=20 at = cryptix.openpgp.provider.PGPEncryptedMessageBuilder.engineBuild(PGPEncryp= tedMessageBuilder.java:381)=20 at = cryptix.message.EncryptedMessageBuilder.build(EncryptedMessageBuilder.jav= a:253)=20 at com.scb.pgp.test.Encrypt.main(Encrypt.java:130)=20 Please somebody help me=20 rakesh=20 -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Cryptix-Users mailing list Cry...@li... https://lists.sourceforge.net/lists/listinfo/cryptix-users This message may contain confidential information. If you are not = the intended recipient, use of this message is prohibited. If you've = received this message in error, please delete it. Wells Real Estate = Funds is affiliated with Wells Investment Securities, Inc. Investment = details are available by prospectus; offers can be made only through = financial professionals. Tax statements are not intended to be used = to avoid penalties or promote transactions. =0D |