hi everyone..i need to crack a symmetric key by implementing a method called CrackSymmetricKey
I must use the TEA encryption algorithm below:
union myMsgType{
unsigned long textConverted[2];
char text[9];
};
class TEA_Algorithm
{
public:
void CrackSymmetricKey(union myMsgType plaintext, union myMsgType ciphertext);
void Decrypt(unsigned long k[], unsigned long ciphertext[], unsigned long plaintext[]);
void Encrypt(unsigned long k[], unsigned long plaintext[], unsigned long ciphertext[]);
TEA_Algorithm() {};
virtual ~TEA_Algorithm() {};
};
As input, im given the following ciphertext and i need to find the secret key that has been used to obtain this ciphertext, and hence, deduce the original plaintext.
// myCiphertext.textConverted[0] = 2022673309;
// myCiphertext.textConverted[1] = 3810199360;
/*
plaintext:= security
ciphertext:
myCiphertext.textConverted[0] = 2022673309;
myCiphertext.textConverted[1] = 3810199360;
additional information: key[0]=key[1]=k[2]=k[3]
and im asked to determine what is the secret key that
has been used to encrypt this plaintext.
*/
Can someone help me plz?