Simple or actually very dangerous. This knowledge is seen in the book. I recently held a debate with a friend in this regard, so I was suddenly very interested in this issue. In fact, I have no experience in cryptography analysis, nor have I ever written related programs. Today, it took a day to write out the entire cracking program.
This is the core of the algorithm proposed by the Friend: Char g_szseed [5/** // * 26 */] = {
'A', 'B', 'C', '1', '2 ',
};
Bool compress (lpcstr lpstrsrc, lpstr lpstrden, unsigned long llen ){
_ Assert (llen> 0 );
Size_t nseedcount = sizeof (g_szseed)/sizeof (char );
For (unsigned long I = 0; I <llen; ++ I ){
Char chcurseed = g_szseed [I % nseedcount];
If (* (lpstrsrc + I ))
* (Lpstrden + I) = (chcurseed ^ * (lpstrsrc + I ));
Else
* (Lpstrden + I) = * (lpstrsrc + I );
}
Return true;
}
He wrote C ++ code. I converted it into a C # format. Then, the encrypted ciphertext is attacked, and the length and content of the key are unknown during the attack, it does not involve the encryption algorithm code itself (of course, it involves the relevant knowledge of the encryption algorithm ). Therefore, the attack process is fairly fair.
Do you want to know how I cracked it? Click here to download the source program (including cracking programs, of course ).
After running my program, you should have discovered how easy it is to crack the "simple or" encryption algorithm: the coding time of one day (beginning with no experience in this field), and the running time that cannot be reached in a few seconds, everything is done.