

It is a very insecure algorithm, however it breaks into the ideas of DES which can then be expanded on to learn AES.2-openssl. If people are interested I wrote an implementation of Baby-DES, which is a much smaller version of DES for my cryptography class. However this is also very heavy on number theory). If you are curious about these, look into DES (outdated) AES (heavy on number theory but one of the most secure algorithms), and RSA (this allows you to exchange keys publicly, so you don't have to have them stored in advance.

Pick a string of exactly one character: a for example, and a key of exactly one character 0xFF. Thus you breach the field of cryptography, where the trick is generating keys, exchanging them, and using them in a fashion so that even if a person got a hold of your unencrypted data, your key would still be secure so you could continue to use it. I cant see the bug, but I certainly know how I would debug it. Everyone would have to have stacks and stacks of private keying information, which would have to be different for every group of people you wanted to communicate securely with. Once this system is employed across multiple users, it becomes even more impractical. If you are encrypting your own information, you now have to come up with twice the space to store everything, because you have to store all the keying data as well. Why, you might wonder, do people have all these really complicated encryption systems when the most secure one is really simple? It all comes down to the key. However if your number of key bits = your number of data bits, you are sitting on perfect security, aka, the "one-time pad". What this means is that if a person knows a certain amount of your unencrypted data, they can decipher the key, and from that they can decrypt the rest of your data. That system is ok, however repeating usage of the same key bits leaves your algorithm weaker to known plaintext attacks. Here what I got, what do you think about security ? Is this code sure ? The easiest answer seems to be the required PHP to decode this answer of the JS part: Simple Javascript encrypt, PHP decrypt with shared secret key Open to any other lightweight methods. Hezad wrote:Hey :) Didn't know it was so "easy" to do a basic encryption :p There are plenty of examples with incomplete answers. Code: Select all '' XOR Encryption using a Keyįunction Encrypt(Text as String, Key as KeyType) as stringĮncryptedData+= chr(Text XOR Key.Value)įunction Decrypt(Text as String, Key as KeyType) as stringĭecryptedData+= chr(Text XOR Key.Value)ĭim as string MyText = "Bien le bonjour les amis ! Ce texte n'est pas crypte."ĭim as String Crypted = Encrypt(MyText, GenericKey)
