A library written in C# to encrypt a text message and embed it in an image, or decrypt an image to get the text message.
The library uses 3 algorithms:
* Rijndael Algorithm to encrypt or decrypt the text message.
* RSA Algorithm to encrypt or decrypt the symmetric key.
* LSB Substitution to embed or extract the text message in the image.
To Initialize the library
Crypton classVar = new Crypton();
classVar.GenerateKeyPair(int param1, int param2);
int[] var = classVar.GetPublicKey();
int[] var = classVar.GetPublicKey();
To use the "Encrypt" function
Call the "Encrypt" function and supply it with 5 values, a String value for the text message, a String value for the symmetric key, a Bitmap value for the image that will contain the text message, an Int[] Array for the public key, and a String value for the output parameter encrypted key respectively.
Crypton classVar = new Crypton();
classVar.GenerateKeyPair(61, 53);
string message = "Sample Text";
string key = "Sample Key";
Bitmap img = new Bitmap("myImage.jpg");
int[] publicKey = classVar.GetPublicKey();
string encryptedKey;
Bitmap stegoImage = classVar.Encrypt(message, key, img, publicKey, encryptedKey);
To use the "Decrypt" function
Call the "Decrypt" function and supply it with 3 values, a Bitmap value for the image that contains the text message, a String value for the encrypted key, and an Int[] Array for the Private key respectively.
Crypton classVar = new Crypton();
classVar.GenerateKeyPair(61, 53);
int[] privateKey = classVar.GetPrivateKey();
Bitmap img = new Bitmap("stegoImage.jpg");
string encryptedKey = "*&&(*^(@^$&@*#";
string decryptedMessage = classVar.Decrypt(img, encryptedKey, privateKey);