in reply to ascii to binary

Ascii is binary. It is simply a convention for interpreting binary data so you really are not changing anything by writing "ascii" out as "binary". Have a look on CPAN for the various encryption modules that are there.

A very simple (and weak) encryption is to xor the plain text with a key text (password). Xoring the cypher text with the key text regenerates the plain text.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: ascii to binary
by CountZero (Bishop) on Jul 23, 2005 at 21:26 UTC
    Actually XOR-ing the plain text with a key that is at least as long as the text itself is a very strong form of encryption. As long as you can keep the key secret, there is no way to reliably decrypt the encrypted text.

    And of course you should never use the same key twice.

    This is known as the one-time-pad encryption. Although it is totally secure and unbreakable, it suffers from the problem that you must find a way to provide the one-time-pad to the sender in a secure way. And as the one-time-pad is at least as long as the message you want to encrypt, you have only moved the problem on level "higher". If both sender and receiver can physically meet they can exchange the one-time-pad keys and the problem is solved. But you better not want to send more messages than pads you have!

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law