What is the best way to encrpyt then decrypt information? Let's say I want to store sensitive information such as credit cards or maybe create my own password management system like Keepass(I wouldn't because Keepass is awesome, but this is an example.)
Something that most languages support?
Edit: I want to point out that this is a very opinionated question, but would love to hear from anyone who has done research on this, and provide insight into what they learned as well as why they used a specific algorithm.
Edit 2: Looks like my question was very broad. I will ask a more narrow question on a separate post. Your answers are great though for me to look into and learn.
Define "best". This really isn't a question with an answer since there are so many factors to take into account. The most important thing to remember about cryptography is that it is really easy to get wrong in really un-obvious ways. Even programmers who routinely work with cryptography often make mistakes which are later pointed out or exploited by cryptography researchers. Unless you really know what you are doing then the best approach is to use a library such as Keyczar/NaCL where all the important decisions are made for you by people who do. Both those libraries have wrappers available for scripting languages such as python
If you're interested in learning about cryptography then this course from coursera is well worth looking at.
Alright. You ask a really broad question. And broad is the field of its study.
Any crypto algorithm can be segregated into two primitive types:
What's the use of these two things, you might ask?
Well, symmetric ciphers are really secure, and all that, however, they need a dependant transport channel for the passage of the symmetric key. The reason here is rather simple: if I can intercept your key, I can send something different to your recipient.
The solution? Using asymmetric ciphers. You can publicly go about blabbering of your public key, and still your system will be as strong as it ever has been. However, there exists a problem. With asymmetric ciphers (RSA), you can't encrypt data of any arbitrary size; i.e., data which is more than the size of the key. So, you can't encrypt a 1 GB file with a 4096-bit (or a 8192-bit) key.
Here, we use something called a hybrid cryptosystem: you encrypt the symmetric encryption key with the Public key, and transmit that; the recipient decrypts the key with his/her private key, and then decrypts the message.
I wouldn't really go into the gory details of how it all works. Integer rings, S-Box ciphers, key vectors, and what not. However, I can offer you some tailor-made advice for your specific application, should you wish. :)
I hope this helps!