"Beginning Cryptography with Java" by David Hook published by Wrox.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
The standard Java API for en-/decryption is called JCE, and it's part of JSE. See the SecurityFaq for more material about it. An algorithm like AES or TripleDES would work.
Can you guide me to some tutorials so that i can understand it better and can implement it.
john sal
Ranch Hand
Joined: Jul 30, 2010
Posts: 92
posted
0
Now the problem is that i need to encrypt the file at one system and want to decrypt at other system. So i need to have the same key for encryting and decrypting the data.
The algorithm i am using is DES encryption. Is there any way so that we give the key ourself instead of generating it randomly?
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
Don't use DES, it's too weak these days. Triple-DES (or "DESede", as it's called in JCE lingo) should be fine if you don't want to use AES.
The FAQ I pointed you to has an article that show how to use a pre-determined key instead of a random one with DES (in the JCE section); it works the same for Triple-DES.
pintoo saluja wrote:Now the problem is that i need to encrypt the file at one system and want to decrypt at other system. So i need to have the same key for encryting and decrypting the data.
The algorithm i am using is DES encryption. Is there any way so that we give the key ourself instead of generating it randomly?
Yes - but I'm not willing to just provide code. You need to spend a lot of time reading and the book I cited is a very good starting point.