Use the Mandelbrot function. It's a very simple function that can be implemented on the clientside, is essentially (though not exactly) one-way, but is easy reversible so that you can have a list of mappings for encryption. It maps (X,Y) coordinates into values in the range 0-N (where N is normally 255).
This is, essentially, a variation on Limbic~Region's shared-book approach. You can then vary a number of things:
- Order of coordinates sent. You could send messages in a NxM character grid and send them in col-row order (vs. the normal row-col) order.
- You can send every Nth coordinate as (Y,X) vs. (X,Y).
- You can vary the translation of the result of the Mandelbrot from an entry into the ASCII table to an entry into your own table.
- You can vary the Mandelbrot from a quadratic to a cubic (or quartic) equation. I did this in a course on fractals and instead of the normal Mandelbrot picture, I ended up with a cool picture of two wizards fighting each other. :-)
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|