I can easily handcraft my own encryption algorithm like the following:
// make sure the private key is long enough
byte key[] = {0x3e, 0x33, 0x7e, 0x02, 0x48, 0x2a, 0x4e, ...};
byte data[] = "a string to be encrypted".getBytes("utf-8");
for (int i = 0, j = 0; i < data.length; ++i, ++j) {
data[i] ^= key[j];
if (j + 1 == key.length)
j = 0;
}
With the above algorithm, if I don't give away the private key, I find no easy way of breaking the encryption(or I am too naive?), if an encryption algorithm can be created easily like this, what's the point in creating the standard? what's the benefit of using those well-known algorithms?