Posted By:
Christian_Schuster
Posted On:
Tuesday, July 15, 2003 07:06 AM
I have big problem and I just do not get ahead. So what I did is I implemented the DH (Diffie-Hellman) key agreement protocol in my web application. First I was doing this in a little test application to check if it is working. Actually all works fine. The secret keys on the server and on the clients computer are the same. I also can create the ciphers for decryption or encryption. Still no problem. I just cannot do any encryption or decryption process. Neither on the client nor on the server. But in my test application it works. On the server I store the secret key in the session due cipher objects are not serializable. So each time I do a request I get the secret key and generate the cipher objects. But it is not possible
More>>
I have big problem and I just do not get ahead. So what I did is I implemented the DH (Diffie-Hellman) key agreement protocol in my web application. First I was doing this in a little test application to check if it is working.
Actually all works fine. The secret keys on the server and on the clients computer are the same. I also can create the ciphers for decryption or encryption. Still no problem. I just cannot do any encryption or decryption process. Neither on the client nor on the server. But in my test application it works.
On the server I store the secret key in the session due cipher objects are not serializable. So each time I do a request I get the secret key and generate the cipher objects. But it is not possible to do any crpytion process.
The same on the client. There I store the secret key and also the cipher objects after DH initialization. I then also tried to initialize the ciphers each time when I need to do cryption processing. But also her it does not work.
The exceptionion I get is:
javax.crypto.IllegalBlockSizeException: Input length (with padding) not multiple of 8 bytes
at com.sun.crypto.provider.DESCipher.a(DashoA6275)
at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA6275)
at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA6275)
at javax.crypto.Cipher.doFinal(DashoA6275)
at up.security.User.doCryption(User.java:292)
at up.security.User.decrypt(User.java:258)
Any one who could help me or point me into right direction?
<<Less