Hello,
I am new to this forum...
If anyone knows on AES and its s/w optimization techniques in c++ please help me out
I am using the AES code to encrypt and decrypt data..
In my code the plaintext is given in the main program itself it is in hexadecimal and i need to change it that is use files of different sizes, encrypt text such as: adv encryption standard and also encrypt images..
Here is the code in the main program:-
// Receive the length of key here.
while(Nr!=128 && Nr!=192 && Nr!=256)
{
cout<<"Enter the length of Key(128, 192 or 256 only): ";
cin>>Nr;
}
// Calculate Nk and Nr from the received value.
Nk = Nr / 32;
Nr = Nk + 6;
*********************************************************
// The array temp stores the key.
// The array temp2 stores the plaintext.
unsigned char temp[16] = {0x00 ,0x01 ,0x02 ,0x03 ,0x04 ,0x05 ,0x06 ,0x07 ,0x08 ,0x09 ,0x0a ,0x0b ,0x0c ,0x0d ,0x0e ,0x0f};
unsigned char temp2[16]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 ,0x55 ,0x66 ,0x77 ,0x88 ,0x99 ,0xaa ,0xbb ,0xcc ,0xdd ,0xee ,0xff};
*********************************************************
// If anyone knows how to change this option for prompting for an input file or image
// Copy the Key and PlainText
for(i=0;i<Nk*4;i++)
{
Key[i]=temp[i];
in[i]=temp2[i];
}
KeyExpansion();
Cipher();
cout<<"Cipher text: ";
please help me out...