Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: A few questions about encryption and decryption

  1. #1
    Member mjr's Avatar
    Join Date
    Jan 2012
    My Mood
    Thanked 2 Times in 1 Post

    Default A few questions about encryption and decryption

    I'm working on an app that I might potentially want to market. I want to encrypt some of the information, and then have the user be able to "recall" that information, which then decrypts the string.

    I want this to have a good amount of security, so it brings to mind a couple of questions:

    1. What is a good encryption algorithm to use that I can also decrypt with? So, if I store, let's say, a piece of information that a user might need to retrieve, they can recall it unencrypted to use.

    2. If I were to go about writing my own encryption/enciphering algorithm (with a private key), where would be a good place to store the key where it is not easily discovered? Additionally, here, I would want multiple keys, so that basically each item to be encrypted would have it's own private key.

    I apologize if something like this has already been asked.

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Thanked 833 Times in 772 Posts
    Blog Entries

    Default Re: A few questions about encryption and decryption

    a) There are thousands of different ways to encrypt, from a simple XOR cipher to something like the "Advanced Encryption Standard" (AES). The XOR is easy but less secure, while the AES is hard to implement but more secure. Look up these techniques for more info. b) The most secure place to keep the private key would be independent of the application - for instance in the user's head: when your app needs to decrypt they enter in the password.

Similar Threads

  1. Cipher Client/Server Encryption/Decryption Program - Please Help
    By drwatson in forum What's Wrong With My Code?
    Replies: 11
    Last Post: April 15th, 2013, 11:13 AM
  2. Replies: 0
    Last Post: September 6th, 2012, 10:57 AM
  3. Simple encryption/ decryption problem
    By searchformeaning in forum Loops & Control Statements
    Replies: 2
    Last Post: May 7th, 2012, 01:34 AM
  4. Java encryption and decryption
    By frozen java in forum Java Theory & Questions
    Replies: 2
    Last Post: December 4th, 2011, 04:01 PM
  5. Code for Decryption
    By me_newbie in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 17th, 2011, 07:40 AM