aspose file tools*
The moose likes Java in General and the fly likes Encryption/Decryption of Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Encryption/Decryption of Data" Watch "Encryption/Decryption of Data" New topic
Author

Encryption/Decryption of Data

Durgesh Kumar
Greenhorn

Joined: Dec 30, 2012
Posts: 16
Hello Programmers,
I am working on a small project which includes Encryption and decryption.
In my project I need to Encrypt the data while sending it to Server from Client and then Decrypt it back on the Server side.!!
So, I need:
1) Server-client connection
2)Sending of encrypted data/file from Client and then to decrypt it on Server side.
3) If possible , I need to do retrieve the data while sending from Client as a third party.
So could I get any help?
Please help if possible and suggest me some ways to do it.!
I am looking forward to get your replies.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1067
    
  10

Durgesh Kumar wrote:
3) If possible , I need to do retrieve the data while sending from Client as a third party.


Do you mean you actually want to be the man-in-the-middle? It is normal to try to prevent this!

If you don't actually want to allow man-in-the-middle then JSSE will do what you want and there are many tutorials on the web; Google will find them. Otherwise then a good starting point is "Beginning Cryptography with Java" by David Hook published by Wrox.
Durgesh Kumar
Greenhorn

Joined: Dec 30, 2012
Posts: 16
Richard Tookey wrote:

Do you mean you actually want to be the man-in-the-middle? It is normal to try to prevent this!


Yes, this would be better if I can show this by trying to be the man-in-the-middle. And I need to do all the previously mentioned things too.!!
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1067
    
  10

Durgesh Kumar wrote:
Richard Tookey wrote:

Do you mean you actually want to be the man-in-the-middle? It is normal to try to prevent this!


Yes, this would be better if I can show this by trying to be the man-in-the-middle. And I need to do all the previously mentioned things too.!!


It does sound like you need JSSE which does the other things and is designed to make a man-in-the-middle attack difficult. Google is your friend.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
If you're only concerned about protecting the data in transit, why not send it over HTTPS, and save yourself all the hassle of applying crypto explicitly?


Ping & DNS - my free Android networking tools app
Durgesh Kumar
Greenhorn

Joined: Dec 30, 2012
Posts: 16
Ulf Dittmer wrote:If you're only concerned about protecting the data in transit, why not send it over HTTPS, and save yourself all the hassle of applying crypto explicitly?


I need to show the whole process(1.Encryption of the file on client side. 2. Sending the encrypted data to the server side. 3. Decrypting the encrypted data on Server side.) by using some algorithms(AES, DES) on two different computers.
Durgesh Kumar
Greenhorn

Joined: Dec 30, 2012
Posts: 16
Richard Tookey wrote:

It does sound like you need JSSE which does the other things and is designed to make a man-in-the-middle attack difficult. Google is your friend.


I have to use some encryption algorithms, like AES, DES, RSA.!!!
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1067
    
  10

Durgesh Kumar wrote:
Richard Tookey wrote:

It does sound like you need JSSE which does the other things and is designed to make a man-in-the-middle attack difficult. Google is your friend.


I have to use some encryption algorithms, like AES, DES, RSA.!!!


Then you need to study the JCE. The 'Hook' book is a good starting point but there are many tutorials online. Again, Google is your friend.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
Oh, so this isn't a practical problem, but more like an academic exercise?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Encryption/Decryption of Data