AES is a symmetric key (or private key) encryption algorithm. Meaning that the same key is used for encryption and decryption.
If that system suits your needs, AES is just fine. Greg has also posted Skipjack and Serpent code. These are also symmetric key ciphers.
Note that these are all block cipher algorithms. What means that they can only en/decrypt one block of data (128 bits for AES) of that exact length at one time.
Often you will have shorter or longer data to encrypt.
In that case, you must provide a system to split up the data into multiple blocks before you encrypt it.
Encrypting these multiple blocks can be done in many different ways: ECB, CBC, CFB, CTR, etc.
If you are interested in a universal crypto library with ready-to-use functions for encrypting and decrypting data, perhaps take a look at my HIME (Huge Integer Math and Encryption) library.
It is a general-purpose encryption toolbox with lots of functionality.
Besides private key algorithms (like AES), HIME also has public key algorithms (RSA), huge integer math functions, compression/decompression functions, functions to securely erase files and free disk space and lots more.
[end of plug]

Kind regards
Leave a comment: