You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(29) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(88) |
Feb
(75) |
Mar
(86) |
Apr
(81) |
May
(47) |
Jun
(36) |
Jul
(87) |
Aug
(61) |
Sep
(37) |
Oct
(36) |
Nov
(18) |
Dec
(4) |
2004 |
Jan
(19) |
Feb
(26) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
(14) |
Aug
(21) |
Sep
(8) |
Oct
(51) |
Nov
(20) |
Dec
(11) |
2005 |
Jan
(5) |
Feb
(5) |
Mar
(25) |
Apr
(48) |
May
(6) |
Jun
(29) |
Jul
(42) |
Aug
(25) |
Sep
(11) |
Oct
(42) |
Nov
(43) |
Dec
(52) |
2006 |
Jan
(39) |
Feb
(21) |
Mar
(42) |
Apr
(25) |
May
(22) |
Jun
(9) |
Jul
(4) |
Aug
(7) |
Sep
(3) |
Oct
(7) |
Nov
(11) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(5) |
Mar
(11) |
Apr
(2) |
May
(5) |
Jun
(9) |
Jul
(1) |
Aug
(9) |
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(5) |
Dec
|
2009 |
Jan
(8) |
Feb
|
Mar
(1) |
Apr
(5) |
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Matt F. <mf...@fi...> - 2006-10-30 10:47:58
|
Hi. I'm trying to use the cryptix library to verify a message sent against a public key. I've managed to do this successfully for plaintext emails sent and signed using both OpenPGP and PGPDesktop. However html emails sent using PGPDesktop appear to do things a little differently to other html email signing apps. It produces the Signature as a detached signature and doesn't appear to have a BEGIN PGP MESSAGE block. Could anyone tell me which parts of the following message are included in the signature and how I should go about verifying these parts against the signature. At the moment I generateMessages using a message factory then cast as a SignedMessage then verify against the public key. but the MessageFactory.generateMessages doesn't appear to work for these emails. The email I wish to very follows: Content-Type: multipart/signed; boundary="PGP_Universal_6B953E55_15A796E5_56A705A0_EBCD36FC"; protocol="application/pgp-signature"; micalg="pgp-sha1" --PGP_Universal_6B953E55_15A796E5_56A705A0_EBCD36FC Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01C6FBFE.5F722960" This is a multi-part message in MIME format. ------=_NextPart_000_000D_01C6FBFE.5F722960 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Test ------=_NextPart_000_000D_01C6FBFE.5F722960 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Test</FONT></DIV></BODY></HTML> ------=_NextPart_000_000D_01C6FBFE.5F722960-- --PGP_Universal_6B953E55_15A796E5_56A705A0_EBCD36FC Content-Type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig Content-Disposition: attachment; filename=PGP.sig -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.5.0 (Build 1202) qANQR1DEDQMBAgFZPe+GV6SkXgHClQMFAUVFuaNZPe+GV6SkXgECeooD/2xNHJpr 0tbd/hrNS52MwPekgqnzQkzWefKmb88jlwoOaGqr5+mRCH23Xjocq5jwg9wKYnTL Vz+hRAy2F+yZbw/KURzgQzmLjzmxfeKEyg4XyRIZn4llet4WDQ5l5TX9I4WX+FYv aWoxX84g+ArtyomDS2E0ijPEZz5N62bBpPh6 =gmqt -----END PGP SIGNATURE----- --PGP_Universal_6B953E55_15A796E5_56A705A0_EBCD36FC-- Thanks... ___________________________________________________________ First Option's outgoing email policy is at http://www.firstoption.net/emailpolicy.html, but a short summary is :- - all email/attachments are confidential; do not use, circulate or release without our consent - email is not authorised unless it is on First Option business - email is not binding unless it is from an authorised person and is signed with a digital certificate First Option Ltd. - Switchboard +44 (0) 1962 738200 Signal House, Jacklyns Lane, Alresford, Hants, SO24 9JJ, United Kingdom ___________________________________________________________ |
From: Smith, C. <cs...@em...> - 2006-10-23 12:04:35
|
Hello and how are you Thomas? How did you pass the blank pass phrase = string? I believe in JAVA some methods need this syntax as a blank = string: "\""\" I believe that is the syntax of a string. I know that it = does want the \\ I just not sure how many or where.=20 =20 Corey ________________________________ From: cry...@li... on behalf of THOMAS = CARUSO Sent: Fri 10/20/2006 4:06 PM To: cry...@li... Subject: [Cryptix-users] UnrecoverableKeyException: Invalid passphrase Hi, I'm new to the cryptography world, and I had a problem with an Java application I wrote to encrypt and decrypt information. I had public and private key rings created on a Unix server using gpg (GnuPG) 1.4.2, and I created one key without a passphrase and one with a passphrase. I can use the gpg command line utility to encrypt and decrypt files using either key without a problem. I moved the keyrings to my Windows XP desktop and used them to develop my class. I can encrypt and decrypt files using the key with a passphrase. When I try to decrypt a file that was encrypted on the Unix server using key without a passphrase my app throws an "UnrecoverableKeyException:Invalid passphrase" on the following line of code: Message msg =3D = em.decrypt((PGPKeyBundle)getSigningKey(), signingPassword.toCharArray() ); The signingPassword is a zero length string. I also modified the code to pass a null to the decrypt method as a passphrase and this did not change the error. Does anyone know why gpg allows encryption/decryption without a passphrase but the Cryptix code has a problem with it? Short of recreating the keys with passphrases, is there a work around I can use? Thanks, Tom Here's the stacktrace: main: caught exception: Invalid passphrase java.security.UnrecoverableKeyException: Invalid passphrase at cryptix.openpgp.provider.PGPKeyBundleImpl.getPrivateSubKey(PGPKeyBundleI mpl.java:908) at cryptix.openpgp.provider.PGPEncryptedMessageImpl.decrypt(PGPEncryptedMes sageImpl.java:311) I'm running Java 1.4.2_09 under Windoze XP. The Cryptix JCE Provider and OpenPGP jar files were downloaded this week, so they should be the most current versions. -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Cryptix-Users mailing list Cry...@li... https://lists.sourceforge.net/lists/listinfo/cryptix-users CONFIDENTIALITY NOTICE: If you have received this e-mail in error, = please immediately notify the sender by e-mail at the address shown. = This e-mail transmission may contain confidential information. This = information is only for the use of the individual(s) or entity to whom = it is intended even if addressed incorrectly. Please delete it from your = files if you are not the intended recipient. Thank you for your = compliance.=20 |
From: swamy r. <gsw...@ya...> - 2006-10-23 09:10:23
|
Hi,=0A=0A We r using cryptixopenPGP.we r encrypting the text file.After = encryption it is genarating the file(.pgp) in ascii format.I want the encry= pted file in binary.Plz give the solution.=0A=0AAppreciate for this help=0A= =0AThanks&Regards,=0ASwamy=0A=0A |
From: Robert R. <rr...@gs...> - 2006-10-22 12:12:55
|
It appears that the SUN provider is renaming the RC4 cipher to ARCFOUR, this is regardless of the position of the 'sun.security.provider.Sun' in the java.security file. Once the cipher is renamed, it cannot be found in provider 'Cryptix', causing the exception to be created. Is there a way to run both the SUN provider and the Cryptix one? Robert Rich wrote: > Hey Folks! > > I'm trying to upgrade the JVM from 1.4.1. to 1.5.0 for an internal > project, and am running into a problem. Every time our Cryptix wrapper > class gets invoked, i get this following exception (this time i'm > running from Junit) > > EncryptionFailureException(0) Unable to initialize cryptography > provider, {}, java.security.NoSuchAlgorithmException:algorithm ARCFOUR > is not available from provider Cryptix > at com.wendys.common.crypto.Crypto.<init>(Crypto.java:56) > at > com.wendys.common.crypto.CryptoTest.testEncryptEric(CryptoTest.java:36) > > > I've added the following line to the java.security file: > > # > # List of providers and their preference orders (see above): > # > security.provider.1=sun.security.provider.Sun > security.provider.2=cryptix.provider.Cryptix > security.provider.3=sun.security.rsa.SunRsaSign > security.provider.4=com.sun.net.ssl.internal.ssl.Provider > security.provider.5=com.sun.crypto.provider.SunJCE > security.provider.6=sun.security.jgss.SunProvider > security.provider.7=com.sun.security.sasl.Provider > > And out of desperation i've copied all of the jars included with the > latest distribution of cryptix to the jre\lib\ext directory of my JDK > installation. > > None of this helps. The odd thing is, if you look at the constructor > below, we're asking for cipher 'RC4', but it comes back 'ARCFOUR', and > i'm not sure why. If it is at all possible, I would like to try to make > this work with no code changes. > > Thank you. > > -- > > public class Crypto { > > /** The Cipher instance that will be used for encryption/decryption */ > private Cipher cipher; > /** The name/id of the algorithm used by the Cipher instance (in > this case RC4) */ > private static final String ALGORITHM_NAME = "RC4"; > /** The JCE provider to use for encryption/decryption */ > private static final String PROVIDER_NAME = "Cryptix"; > > /** > * Create a new Crypto instance for encryption/decryption > * services. Adds/installs the Cryptix provider into the JVM > * and creates a new Cipher instance internally. > * > * @throws EncryptionFailureException if problems occur installing > the provider or creating the Cipher > */ > public Crypto() throws EncryptionFailureException { > super(); > Security.addProvider(new Cryptix()); > > try { > cipher = Cipher.getInstance(ALGORITHM_NAME, PROVIDER_NAME); > } catch (Exception e) { > throw new EncryptionFailureException( "Unable to initialize > cryptography provider", e ); > } > } > ... > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Cryptix-Users mailing list > Cry...@li... > https://lists.sourceforge.net/lists/listinfo/cryptix-users > |
From: Robert R. <rr...@gs...> - 2006-10-22 09:48:45
|
Hey Folks! I'm trying to upgrade the JVM from 1.4.1. to 1.5.0 for an internal project, and am running into a problem. Every time our Cryptix wrapper class gets invoked, i get this following exception (this time i'm running from Junit) EncryptionFailureException(0) Unable to initialize cryptography provider, {}, java.security.NoSuchAlgorithmException:algorithm ARCFOUR is not available from provider Cryptix at com.wendys.common.crypto.Crypto.<init>(Crypto.java:56) at com.wendys.common.crypto.CryptoTest.testEncryptEric(CryptoTest.java:36) I've added the following line to the java.security file: # # List of providers and their preference orders (see above): # security.provider.1=sun.security.provider.Sun security.provider.2=cryptix.provider.Cryptix security.provider.3=sun.security.rsa.SunRsaSign security.provider.4=com.sun.net.ssl.internal.ssl.Provider security.provider.5=com.sun.crypto.provider.SunJCE security.provider.6=sun.security.jgss.SunProvider security.provider.7=com.sun.security.sasl.Provider And out of desperation i've copied all of the jars included with the latest distribution of cryptix to the jre\lib\ext directory of my JDK installation. None of this helps. The odd thing is, if you look at the constructor below, we're asking for cipher 'RC4', but it comes back 'ARCFOUR', and i'm not sure why. If it is at all possible, I would like to try to make this work with no code changes. Thank you. -- public class Crypto { /** The Cipher instance that will be used for encryption/decryption */ private Cipher cipher; /** The name/id of the algorithm used by the Cipher instance (in this case RC4) */ private static final String ALGORITHM_NAME = "RC4"; /** The JCE provider to use for encryption/decryption */ private static final String PROVIDER_NAME = "Cryptix"; /** * Create a new Crypto instance for encryption/decryption * services. Adds/installs the Cryptix provider into the JVM * and creates a new Cipher instance internally. * * @throws EncryptionFailureException if problems occur installing the provider or creating the Cipher */ public Crypto() throws EncryptionFailureException { super(); Security.addProvider(new Cryptix()); try { cipher = Cipher.getInstance(ALGORITHM_NAME, PROVIDER_NAME); } catch (Exception e) { throw new EncryptionFailureException( "Unable to initialize cryptography provider", e ); } } ... |
From: THOMAS C. <tc...@ar...> - 2006-10-20 20:06:44
|
Hi, I'm new to the cryptography world, and I had a problem with an Java application I wrote to encrypt and decrypt information. I had public and private key rings created on a Unix server using gpg (GnuPG) 1.4.2, and I created one key without a passphrase and one with a passphrase. I can use the gpg command line utility to encrypt and decrypt files using either key without a problem. I moved the keyrings to my Windows XP desktop and used them to develop my class. I can encrypt and decrypt files using the key with a passphrase. When I try to decrypt a file that was encrypted on the Unix server using key without a passphrase my app throws an "UnrecoverableKeyException:Invalid passphrase" on the following line of code: Message msg =3D em.decrypt((PGPKeyBundle)getSigningKey(), signingPassword.toCharArray() ); The signingPassword is a zero length string. I also modified the code to pass a null to the decrypt method as a passphrase and this did not change the error. Does anyone know why gpg allows encryption/decryption without a passphrase but the Cryptix code has a problem with it? Short of recreating the keys with passphrases, is there a work around I can use? Thanks, Tom Here's the stacktrace: main: caught exception: Invalid passphrase java.security.UnrecoverableKeyException: Invalid passphrase at cryptix.openpgp.provider.PGPKeyBundleImpl.getPrivateSubKey(PGPKeyBundleI mpl.java:908) at cryptix.openpgp.provider.PGPEncryptedMessageImpl.decrypt(PGPEncryptedMes sageImpl.java:311) I'm running Java 1.4.2_09 under Windoze XP. The Cryptix JCE Provider and OpenPGP jar files were downloaded this week, so they should be the most current versions. |
From: Fanshawe, A. (GF-X) <ale...@gf...> - 2006-10-03 10:50:49
|
Hi, appologies if this is old hat or not posted as expected, just = started with your user group.=20 I'm running=20 cryptix-pki-api.jar modified 28 March 2005, 19:57:42 cryptix-jce-api.jar modified 28 March 2005, 20:03:22 cryptix-jce-provider.jar modified 18 April 2005, 15:13:50 cryptix-message-api.jar modified 18 April 2005, 15:13:52 cryptix-openpgp-provider.jar modified 18 April 2005, 15:13:50 And can't seem to satisfactorily decrypt UTF-8 extended character sets. For example the string: <?xml version=3D"1.0" = encoding=3D"UTF-8"?><UserDetails><FullName>=F6=F0rum = vir=F0ingu</FullName><Name>br=F3=F0urlega</Name></UserDetails> Comes back as <?xml version=3D"1.0" encoding=3D"UTF-8"?><UserDetails><FullName> rum = vir ingu</FullName><Name>br urlega</Name></UserDetails> I'm using OpenPGP and LiteralMessage.getTextData(), please see attached = Junit test class for example code... You'll have to gen your own keys. I've noticed the LiteralMessage.getEncoded() returns the correctly = decoded string, but has 8 chars of rubbish prepended to start... Should = it??? Adivice on what's going on with getTextData & getEncoded would be = greatly appreciated. Many thanks Alex. |
From: Smith, C. <cs...@em...> - 2006-09-26 20:33:20
|
Also here is the last method called before the error in the stack trace. If this helps The File name is PGPElGamal.java The class name is cryptix.openpgp.algorithm.PGPElGamal The method name is encrypt The line number is 568 Hello and how is it? I am receiving an error when I try to encrypt with a PGP 9.0 DH/DSS Size 2048/1024, CAST key. The error is:=20 We have a runtime exception.Not allowed to use ElGamal. Perhaps you need to download the Unlimited Strength Jurisdiction Policy Files from the Sun website? java.lang.SecurityException: Unsupported keysize or algorithm parameters Now I have the Policy files already installed in my Security folder. However, I was using an RSA Legacy key before so my Instance on my EncryptionBuilder was "OpenPGP/Legacy", I changed that to just OpenPGP. Is that were I am going wrong are am I missing something else. Thanks :-) Corey R. Smith CONFIDENTIALITY NOTICE: If you have received this e-mail in error, = please immediately notify the sender by e-mail at the address shown. = This e-mail transmission may contain confidential information. This = information is only for the use of the individual(s) or entity to whom = it is intended even if addressed incorrectly. Please delete it from your = files if you are not the intended recipient. Thank you for your = compliance.=20 |
From: Smith, C. <cs...@em...> - 2006-09-26 19:07:51
|
Hello and how is it? I am receiving an error when I try to encrypt with a PGP 9.0 DH/DSS Size 2048/1024, CAST key. The error is:=20 We have a runtime exception.Not allowed to use ElGamal. Perhaps you need to download the Unlimited Strength Jurisdiction Policy Files from the Sun website? java.lang.SecurityException: Unsupported keysize or algorithm parameters Now I have the Policy files already installed in my Security folder. However, I was using an RSA Legacy key before so my Instance on my EncryptionBuilder was "OpenPGP/Legacy", I changed that to just OpenPGP. Is that were I am going wrong are am I missing something else. Thanks :-) Corey R. Smith CONFIDENTIALITY NOTICE: If you have received this e-mail in error, = please immediately notify the sender by e-mail at the address shown. = This e-mail transmission may contain confidential information. This = information is only for the use of the individual(s) or entity to whom = it is intended even if addressed incorrectly. Please delete it from your = files if you are not the intended recipient. Thank you for your = compliance.=20 |
From: Steffen B. [c] <sb...@si...> - 2006-09-07 08:33:04
|
hi, i had to copy cryptix-crypto from one debian (jdk 1.4.2) to another debian(jdk1.4.2) and putted the files in the same dir-structure as on the first debian. i replaced the policy-files with unlimited strength policy files. but on the first machine everything works, on the second one i get "CryptixCrypto may not be signed by a trusted party". is there a jar,package,... that i have forgotten? cu steffen |
From: Jeroen v. G. <je...@va...> - 2006-08-28 19:24:17
|
On 8/28/06, Edwin Woudt <ed...@wo...> wrote: > >> I've looked at the examples, but I can't figure out a way to use a plain > >> text private key to sign some text. > >> > >> I can't use a keystore because the method I'm writing will receive the > >> key and the text to be signed as Strings and return another String which > >> is the signed text. > >> > >> Could someone point me in the right direction? I just need the Classes to > >> use and I should be able to figure things out by my self. > > > > Are KeySpec and SecretKeyFactory what you are looking for? > > > > See: > > http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#S > > ecretFactory > > Not for OpenPGP. > > Use something like: > > ByteArrayInputStream in = > new ByteArrayInputStream(keyString.getBytes()); > KeyBundleFactory kbf = > KeyBundleFactory.getInstance("OpenPGP"); > KeyBundle bundle = kbf.generateKeyBundle(in); > in.close(); A much saner interface indeed. |
From: Edwin W. <ed...@wo...> - 2006-08-28 18:54:04
|
>> I've looked at the examples, but I can't figure out a way to use a plain >> text private key to sign some text. >> >> I can't use a keystore because the method I'm writing will receive the >> key and the text to be signed as Strings and return another String which >> is the signed text. >> >> Could someone point me in the right direction? I just need the Classes to >> use and I should be able to figure things out by my self. > > Are KeySpec and SecretKeyFactory what you are looking for? > > See: > http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#S > ecretFactory Not for OpenPGP. Use something like: ByteArrayInputStream in = new ByteArrayInputStream(keyString.getBytes()); KeyBundleFactory kbf = KeyBundleFactory.getInstance("OpenPGP"); KeyBundle bundle = kbf.generateKeyBundle(in); in.close(); Edwin |
From: Jeroen \Slim\ v. G. <as...@gm...> - 2006-08-28 18:14:36
|
On 8/28/06, Arsalan Zaidi <ars...@gm...> wrote: > I've looked at the examples, but I can't figure out a way to use a plain > text private key to sign some text. > > I can't use a keystore because the method I'm writing will receive the key > and the text to be signed as Strings and return another String which is the > signed text. > > Could someone point me in the right direction? I just need the Classes to > use and I should be able to figure things out by my self. Are KeySpec and SecretKeyFactory what you are looking for? See: http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#SecretFactory |
From: Arsalan Z. <ars...@gm...> - 2006-08-28 08:41:07
|
Hi all. I've looked at the examples, but I can't figure out a way to use a plain text private key to sign some text. I can't use a keystore because the method I'm writing will receive the key and the text to be signed as Strings and return another String which is the signed text. Could someone point me in the right direction? I just need the Classes to use and I should be able to figure things out by my self. Thanks in advance! |
From: kaushik m <kau...@gm...> - 2006-08-18 13:49:02
|
Hi all, i have encrypted an excel file (.xls) using cryptix api. when i decrypt it , i'm not able to receive the same excel file(some information is garbled).can anyone explain why cryptix api is not able to encrypt and decrypt excel files successfully. Thanks and Regards kk |
From: Karsten L. <kar...@gm...> - 2006-08-15 13:10:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, does Cryptix support usage of common system-wide parameters p and g for ElGamal key generation? If not, how can I add support for it? Therefore I need to accomplish two tasks: 1. Generate secure ElGamal parameters once, e.g. by generating a common ElGamal key and reading its parameters. 2. Generate other ElGamal keys using those parameters. I spent some time trying to understand the Cryptix code and think that the following code might be a starting point (but don't know how to continue): - - cryptix.jce.ElGamalParams: This interface provides three getter methods which return BigIntegers containing the ElGamal parameters (btw: why three, not two?!). How can I access them from my generated java.security.KeyPair? - - cryptix.jce.provider.elgamal.ElGamalKeyPairGenerator.initialize( AlgorithmParameterSpec params, SecureRandom random): This method throws a RuntimeException to signal that it has not been implemented yet. Can I implement it and use the changed code? I remember some jar signing problems in archived Cryptix-users mails. Or am I on the wrong path with my findings? Thanks for your replies! Kind regards, Karsten -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE4ceVq8q8gkGfGakRAhxTAJ4nubZQlcwUjMHsh0e/ntiYOi1QvACfeBWp 8Bs0hqAMMOBwrkMlLEHyQgc= =ZKMl -----END PGP SIGNATURE----- |
From: Aredeji D. <ar...@ho...> - 2006-08-09 17:01:21
|
I was unable to decode PGP files encrypted with multiple keys. Only one of the private keys would work during the decryption. The following code seems to be a part of the problem. public class PGPDecodedMessageInputStream public void engineInit(InputStream in, DecryptionKeyCallback dkc, VerificationKeyCallback vkc) line 191: while (it.hasNext()) { PGPPublicKey pubsubkey = (PGPPublicKey)it.next(); PGPPrivateKey privsubkey; try { privsubkey = (PGPPrivateKey) pgpbundle.getPrivateSubKey( pubsubkey, val.getPassphrase()); PGPEncryptor cryptor = (PGPEncryptor) privsubkey.getPacket().getAlgorithm(); for (int i=0; i<sessionkeys.size(); i++) { if (sessionkeys.elementAt(i) instanceof PGPPublicKeyEncryptedSessionKeyPacket) { PGPPublicKeyEncryptedSessionKeyPacket pkeskp = (PGPPublicKeyEncryptedSessionKeyPacket) sessionkeys.elementAt(i); boolean success = false; pkeskp.decrypt(cryptor); success = true; if (success) { decryptkey = pkeskp.getSessionKey(); } } } } catch (UnrecoverableKeyException uke) { } catch (PGPDataFormatException e) { } catch (PGPDecryptionFailedException e) { } I have changed the above code to: while (it.hasNext()) { PGPPublicKey pubsubkey = (PGPPublicKey)it.next(); PGPPrivateKey privsubkey; try { privsubkey = (PGPPrivateKey) pgpbundle.getPrivateSubKey( pubsubkey, val.getPassphrase()); PGPEncryptor cryptor = (PGPEncryptor) privsubkey.getPacket().getAlgorithm(); KeyIDFactory kidf = KeyIDFactory.getInstance(PGPConstants.OPENPGP); KeyID kID_Decrypt = kidf.generateKeyID((PublicKey)pubsubkey); for (int i=0; i<sessionkeys.size(); i++) { if (sessionkeys.elementAt(i) instanceof PGPPublicKeyEncryptedSessionKeyPacket) { PGPPublicKeyEncryptedSessionKeyPacket pkeskp = (PGPPublicKeyEncryptedSessionKeyPacket) sessionkeys.elementAt(i); boolean success = false; if((PGPHex.toString(pkeskp.getKeyID())).equals(PGPHex.toString(kID_Decrypt.getBytes(8)))) { pkeskp.decrypt(cryptor); success = true; } if (success) { decryptkey = pkeskp.getSessionKey(); } } } } catch (UnrecoverableKeyException uke) { } catch (PGPDataFormatException e) { } catch (PGPDecryptionFailedException e) { } catch (NoSuchAlgorithmException e) { } catch (InvalidKeyException e) { } } It seems to be working now. I can decode files encrypted with multiple keys. I was also unable to decode PGP files of certain size. I changed the following code public int read(byte[] b, int off, int len) throws IOException { try { if (buf.length - bufoffset >= len) { System.arraycopy(buf, bufoffset, b, 0, len); if (mdc != null) mdc.update(b, 0, len); bufoffset += len; return len; } byte[] temp; if (in.available() > 32) { temp = new byte[(int)in.available() & 0xffffffe0]; if (temp.length < len+blocksize*2+2) temp = new byte[len+blocksize*2+2]; } else { temp = new byte[len+blocksize*2+2]; } if ((in.available() == 0) && (buf.length - bufoffset == 0)) return 0; int size = in.readBuffer(temp); byte[] data; if (size < temp.length) { try { data = cipher.doFinal(temp, 0, size); } catch (IllegalBlockSizeException ibse) { throw new IOException(""+ibse); } catch (BadPaddingException bpe) { throw new IOException(""+bpe); } } else { data = cipher.update(temp, 0, size); } size = 0; if (bufoffset < buf.length) { System.arraycopy(buf, bufoffset, b, off, buf.length-bufoffset); size += buf.length-bufoffset; } if (size + data.length > len) { System.arraycopy(data, 0, b, off+size, len-size); int newbuflen = data.length-(len-size); buf = new byte[newbuflen]; System.arraycopy(data, len-size, buf, 0, newbuflen); bufoffset = 0; if (mdc != null) mdc.update(b, 0, len); return len; } else { System.arraycopy(data, 0, b, off+size, data.length); bufoffset = buf.length; if (mdc != null) mdc.update(b, 0, size + data.length); return size + data.length; } } catch (PGPDataFormatException pdfe) { throw new IOException(""+pdfe); } catch (PGPFatalDataFormatException pdfe) { throw new IOException(""+pdfe); } } to public int read(byte[] b, int off, int len) throws IOException { try { if (buf.length - bufoffset >= len) { System.arraycopy(buf, bufoffset, b, 0, len); if (mdc != null) mdc.update(b, 0, len); bufoffset += len; return len; } byte[] temp; if (in.available() > 32) { temp = new byte[(int)in.available() & 0xffffffe0]; if (temp.length < len+blocksize*2+2) temp = new byte[len+blocksize*2+2]; } else { temp = new byte[len+blocksize*2+2]; //FIXME if(temp.length == in.available()) { temp = new byte [temp.length * 2]; } } if ((in.available() == 0) && (buf.length - bufoffset == 0)) { return 0; } int size = in.readBuffer(temp); byte[] data; if (size < temp.length) { try { data = cipher.doFinal(temp, 0, size); } catch (IllegalBlockSizeException ibse) { throw new IOException(""+ibse); } catch (BadPaddingException bpe) { throw new IOException(""+bpe); } } else { data = cipher.update(temp, 0, size); } size = 0; if (bufoffset < buf.length) { System.arraycopy(buf, bufoffset, b, off, buf.length-bufoffset); size += buf.length-bufoffset; } if (size + data.length > len) { System.arraycopy(data, 0, b, off+size, len-size); int newbuflen = data.length-(len-size); buf = new byte[newbuflen]; System.arraycopy(data, len-size, buf, 0, newbuflen); bufoffset = 0; if (mdc != null) mdc.update(b, 0, len); return len; } else { System.arraycopy(data, 0, b, off+size, data.length); bufoffset = buf.length; if (mdc != null) mdc.update(b, 0, size + data.length); return size + data.length; } } catch (PGPDataFormatException pdfe) { throw new IOException(""+pdfe); } catch (PGPFatalDataFormatException pdfe) { throw new IOException(""+pdfe); } } Please let me know what permanent changes can be made to ensure successful decoding. Best wishes, Ared _________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement |
From: Subbaraman, S. R. P. \(Cognizant\)
<Sun...@co...> - 2006-07-28 20:32:11
|
Hi, I used Cryptix API to generate a Keypair (DH/DSS). When I saw the key properties I saw the cipher as "IDEA". I would like to use either "CAST" or "TripleDES" as the cipher algorithm for my key. Could anyone please help me how to write a java code which uses Cryptix API to generate key pair which has the above specified algorithm as the cipher algorithm . Regards, Sundar. This e-mail and any files transmitted with it are for the sole use of the= intended recipient(s) and may contain confidential and privileged= information. If you are not the intended recipient, please contact the sender by reply= e-mail and destroy all copies of the original message.=0D Any unauthorized review, use, disclosure, dissemination, forwarding,= printing or copying of this email or any action taken in reliance on this= e-mail is strictly=0D prohibited and may be unlawful. Visit us at http://www.cognizant.com |
From: Teodosio V. H. <tv...@as...> - 2006-07-27 21:59:42
|
Hello Users of Criptix I am trying to encrypt a file with the example class StreamEncryptSign.java, but when the object LiteralMessageOutputStream makes the write of the array of bytes the exit it is not in format ASCII, that is to say, I don't find the one headed--- BEGIN PGP--- and the--END PGP--. How can I make so that the exit of the encription process is in this format? Is it possible to make this? Thank you, the topic is enough urgency. TEO VARELA |
From: Teodosio V. H. <tv...@as...> - 2006-07-11 15:54:38
|
Hello Experts of Crytix: I am a beginner in the encription topic PGP. I need to encrypt a big file with PGP. My Name is Teo. I am working with the version cryptix-openpgp-20050418-snap and cryptix-jce-20050328-snap. I run the class StreamEncryptSign, but the encrypted file is not generated in Format ASCII, that is to say, the archive doesn't have a headed and a footer. As I can solve this? Can somebody help me with this doubt? Thank you |
From: Himesh M. <hm...@hn...> - 2006-07-10 20:07:32
|
Hi, =20 I am trying to work my way through the examples to decrypt a file. Below = is the psedo code. =20 // Read the message file. FileInputStream fis =3D null; try { fis =3D new FileInputStream(fileName); } catch (FileNotFoundException e1) { logger.error("Unable the file to be decoded"); throw new PGPHelperException("Missing the message file" +=20 e1.getMessage()); } EncryptedMessage encMsg =3D null; =20 // Try to read message try { Collection msgs =3D this.mf.generateMessages(fis); encMsg =3D (EncryptedMessage)msgs.iterator().next(); } catch (Exception e) { System.out.println(e.getMessage()); }=20 =20 // Decode the message and return decoded message. try { PGPSignedMessageImpl decMsg =3D (PGPSignedMessageImpl) = encMsg.decrypt(this.key, // the key "passphrase".toCharArray()); =20 String decodedMessage =3D String(decMsg.getContents().getEncoded()); } catch (Exception e) { System.out.println(e.getMessage()); } When I look at the decodedString I always get some extra garbage = characters. For example: If my file had word -- "Test" and the file name = was "TestDocument.txt" =20 I get following output.=20 =AC=1Ab=10TestDocument.txt=FETest =20 =20 Can someone help me out to get rid of the extra characters ? =20 =20 - Himesh |
From: Paul S. <pa...@ro...> - 2006-06-26 17:39:23
|
Hi Everyone, 2 things; a) managed to solve the problem that gave the error the other day. ElGamal algorithm not found.java.security.NoSuchAlgorithmException: = Cannot find any provider supporting ElGamal/ECB/PKCS#1 This occurred on the line; pgpKeyMgr.loadPublicKeystore(new FileInputStream(new = File(pubRingFile)), null); Code ran fine before Apache was set up with SSL. A re-start of = Tomcat corrected the error but does anyone know why this should happen? b) On a couple of recent occassions, users have had a problem with a = license expiring and giving a mis-leading error message. If you are one = of those affected I would be very grateful to find out what the error = message was and how it was corrected. Many thanks, Paul. |
From: KDS d. <kd...@ya...> - 2006-06-23 09:34:29
|
Can anyone point me to the location where I can get implementation of ECDH for elliptix. Thanks in advance... Thanks Lili Dump --------------------------------- Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail Beta. |
From: Paul S. <pa...@ro...> - 2006-06-22 12:20:18
|
Hi Everyone, just started picking up this error when attempting to encrypt a simple = message after applying SSL to my website ---- think this is a red = herring though. Last worked fine about end of May under non-SSL. Seem to remember corresponding with a chap a few weeks ago who had this = or a similar error and it was eventually tracked down to a software = license expiring??? "ElGamal algorithm not found.java.security.NoSuchAlgorithmException: = Cannot find any provider supporting ElGamal/ECB/PKCS#1" Any help would be welcome, Kind Regards, Paul. |
From: Roodzant, M. <Mar...@Ge...> - 2006-06-21 07:29:49
|
Hi, I have the following problem: We have just recently upgraded our application from jdk1.3 to jdk1.5. In jdk1.3 we used cryptix-3.2.0.jar and the following encryptiong: // getting the cipher java.security.Security.addProvider(new = cryptix.provider.Cryptix()); cipher =3D = Cipher.getInstance(Cipher.getInstance("Blowfish", "Cryptix") , (Mode) Mode.getInstance("CFB", "Cryptix") , PaddingScheme.getInstance("OneAndZeroes")); // encrypting RawSecretKey privateKey =3D new RawSecretKey("Blowfish", = Hex.fromString(encryptionkey)); cipher.initEncrypt(privateKey); byte[] ect =3D cipher.crypt(plain.getBytes()); // decrypting privateKey =3D new RawSecretKey("Blowfish", = Hex.fromString(encryptionkey)); cipher.initDecrypt(privateKey); byte[] dct =3D cipher.crypt(Hex.fromString(secret)); Now we use jdk1.5, with the set of cryptix-jce-xxx jars = (cryptix-jce-api.jar,cryptix-jce-compat.jar,cryptix-jce-provider.jar, = cryptix-jce-tests.jar) and the 'unlimited strength' versions of = local_policy.jar and US_export_policy.jar. The following code works in itself but does NOT give the same cipher as = before, which is a problem because we have encrypted values stored in a = database. These we still cannot decrypt propertly. public class PasswordUtil { private static Log log =3D = LogFactory.getLog(PasswordUtil.class.getName()); private static String default_key =3D CryptNames.ENCRYPTION_KEY; /** * Get the cipher to use for encryption or decryption */ private static Cipher getCipher(int mode, String encryptionKey ) { log.debug("PasswordUtil::getCipher()"); Cipher cipher =3D null; try { byte[] raw =3D encryptionKey.getBytes(); SecretKeySpec skeySpec =3D new SecretKeySpec(raw, = "Blowfish"); System.out.println("PasswordUtil::getCipher - got = secretKey "); cipher =3D Cipher.getInstance("Blowfish/CFB/NoPadding"); // cipher =3D = Cipher.getInstance("Blowfish/CFB/NoPadding", new = cryptix.jce.provider.CryptixCrypto()); System.out.println("PasswordUtil::getCipher - got = instance "); byte[] IV =3D new byte[8]; IvParameterSpec IVspec =3D new IvParameterSpec( IV ); cipher.init(mode, skeySpec, IVspec); System.out.println("PasswordUtil::getCipher - = initialized cipher "); log.debug("PasswordUtil::getCipher - Got Cipher = instance"); System.out.println("PasswordUtil::getCipher - Got Cipher = instance"); } catch (java.security.NoSuchAlgorithmException e) { log.fatal("PasswordUtil::getCipher - Encryption = Algorithm not found - null will be returned ", e); System.out.println("PasswordUtil::getCipher - Encryption = Algorithm not found - null will be returned"); e.printStackTrace(); } catch ( NoSuchPaddingException e ) { log.fatal("PasswordUtil::getCipher - Padding not found - = null will be returned", e); System.out.println("PasswordUtil::getCipher - Padding = not found - null will be returned"); e.printStackTrace(); } catch ( InvalidKeyException e ) { log.fatal("PasswordUtil::getCipher - InvalidKey - null = will be returned", e); System.out.println("PasswordUtil::getCipher - InvalidKey = - null will be returned"); e.printStackTrace(); } catch ( InvalidAlgorithmParameterException e ) { log.fatal("PasswordUtil::getCipher - = InvalidAlgorithmParameter - null will be returned", e); System.out.println("PasswordUtil::getCipher - = InvalidAlgorithmParameter - null will be returned"); e.printStackTrace(); //To change body of catch = statement use File | Settings | File Templates. } log.debug("PasswordUtil::getProvider():Finished"); System.out.println("PasswordUtil::getProvider():Finished"); return cipher; } /** * Decrypt string * * @param secret Encrypted text. * @return plain (decrypted) text */ private static String decrypt(String secret) { log.debug("decrypt()::Started"); return decrypt(secret, default_key); } private static String decrypt(String secret, String key) { log.debug("decrypt()::Started"); String plain =3D null; try { Cipher cipher =3D getCipher(Cipher.DECRYPT_MODE, key); log.debug("PasswordUtil::decrypt()::Initialized = decryption"); byte[] dct =3D cipher.doFinal(Hex.decode(secret)); plain =3D new String(dct); } catch (Exception e) { log.fatal("PasswordUtil::Failed to decrypt", e); } log.debug("PasswordUtil::decrypt()::Returning " + plain); log.debug("PasswordUtil::decrypt()::Finished"); return plain; } /** * Encrypt a string * * @param plain plain text string * @return an encrypted string */ private static String encrypt(String plain) { log.debug("encrypt()::Started"); return encrypt(plain, default_key); } private static String encrypt(String plain, String key) { log.debug("encrypt()::Started"); String encrypted =3D null; try { Cipher cipher =3D getCipher(Cipher.ENCRYPT_MODE, key); log.debug("encrypt()::Initialized encryption"); byte[] dct =3D cipher.doFinal(plain.getBytes()); encrypted =3D Hex.encode(dct); log.debug("encrypt()::Crypting " + plain); } catch ( Exception e ) { log.fatal("PasswordUtil::Failed to encrypt", e); } log.debug("decrypt()::Returning " + encrypted); log.debug("encrypt()::Finished"); return encrypted; } public static void main( String[] args ) { String cipher =3D encrypt("ttmjb6f5"); String cipherInStorage =3D "965C23639DAF690B"; String cleartext =3D decrypt(cipher); String cleartextFromStorage =3D decrypt(cipherInStorage); System.out.println("cleartext : ttmjb6f5"); System.out.println("cipherInStorage : 965C23639DAF690B"); System.out.println("encrypted : "+cipher); System.out.println("decrypted : "+cleartext); System.out.println("decrypted ldap value: "+cleartextFromStorage); } } The result of the main is: cleartext : ttmjb6f5 cipherInStorage : 965C23639DAF690B encrypted : 7e5567be2369a2cc decrypted : ttmjb6f5 decrypted ldap value: oe})=B7=DC=F0=F2 There are two issues here: 1. I cannot find any Provider (not even Cryptix) that allows the = OneAndZeroes padding (I used NoPadding here to get any result at all) 2. To decrypt using Blowfish/CFB you MUST provide a byte[] (IV). When = encrypting en when decrypting the same byte[] must be used. The old code = does not use this byte[] so I have no idea what byte[] to use to get a = correct decryption. Does anyone know how to make a code that works and provides the right = encryption and decryption using JCE? Or if this is possible at all? If it is not possible I can look at alternative courses of action. thanks in advance for any input Marjon |