in reply to Personal crypting algorithm
On code:
- Please use strict and warnings. It will save you time in the future.
- chr($key2) does nothing since you're discarding its value; using warnings would tell you this.
-
is the same as:@cles = split(//, $key); foreach $key2(@cles) { chr($key2); push(@key3, $key2); }
(given that you don't use @cles latter on).@key3 = split(//, $key); - You should try to make this into a module that can be used. perlnewmod has some instructions on how to do this (in your case, you probably should just ignore the upload-to-CPAN part for now.)
- You could write your code to have a lot less variables that are used twice and then thrown away.
On purpose:
- CPAN has many modules for en/decryption. These modules implement algorithms that are better then yours, in terms of how easy breaking a message is likely to be. (It looks to me like yours has signifigant vunerablities, mainly deriving from the join("1", @key3) and possibly also deriving from mathematically properties of the result of an xor'ing data, uuencoding it, and then xor'ing it the same way. Your algorithm is probably also vunerable to a brute-force attack.)
In Section
Code Catacombs