The problem here is deriving something so simple from the key, and only applying it to the first 128 bytes. This is unforgivably dumb, when there are perfectly serviceable encryption services available as part of open source libraries, such as the aforementioned AES-256 algorithm.
[1]: http://en.wikipedia.org/wiki/One-time_pad [2]: http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#Th...
char* xor_encrypt(char* input, char key) {
int i;
int m = sizeof(input);
output = (char*)malloc((int) m + 1);
for (i = 0; i < m; i++) {
output[i] = input[i] ^ key;
}
output[m] = 0;
return output;
}The one-time-pad is a special case of any number of poly-alphabetic substitution ciphers, XOR just being one that happens to be implemented on lots of silicon. Considering this is all about an app that has very short keys (a few numeric digits) it's perfectly legitimate to criticise the use of a substitution cipher as they are especially poor when used with short keys compared to real crypto libraries that will use that short key as the passphrase for a real key.
http://www.cryptofails.com/post/87697461507/46esab-high-qual...