954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Using fixed Key-pair for Encryption/Decryption

Hi

Is there any way I can use a pair of keys(private-public key pair) generated externally for encryption/decryption of files rather than generating a pair of keys for every cycle of encryption/decryption ??

My program requirement is that I need to run an encryption program packaged in a jar file. The decryption can happen at any arbitrary time which should not be dependent on a key. I do not store the key seperately. I wish to hard code the keys in my encryption class so that the same pair of keys(private-public) is used each time.

Any illustrations / ideas on the same?

Ashwin1985
Newbie Poster
7 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

I'm a bit confused by this. You seem to be wanting to give people an encrypted file and a decrypter with the key already filled in. Why bother encrypting in the first place?
But if that's what you want - just store your keys somewhere - eg a file that's included in your jar, or even in the source code.

JamesCherrill
Posting Genius
Moderator
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

Exactly, I want to know how we can store the Key objects generated once, for further use.

Ashwin1985
Newbie Poster
7 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 
JamesCherrill
Posting Genius
Moderator
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

thanks james..that was of great help !

Ashwin1985
Newbie Poster
7 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You