On 04/05/17 05:55,
austin...@hotmail.com wrote:
> On Thursday, May 4, 2017 at 12:33:45 AM UTC+1, Chris M. Thomasson
> wrote:
<snip>
>> The program I wrote can supply you with "endless" text ppm's for
>> sure. Also, when I am finished with my c99 FFE implementation
>> adventure, an ADA version will be provided for sure.
>
> Many thanks Chris - putting this on the back burner for a few days -
> this hugely reduces the task of encrypting images.
Actually, it *increases* the workload.
Consider encryption of an image in the usual way:
1) encrypt the image.
That's it. You now have an encrypted image. Decryption? Easy:
1) decrypt the image.
That's it. You now have the original image again.
Now consider encryption of an image in the VeeCrypt way:
1) convert the image to a text format, using either Chris's program or
the GIMP or ImageMagick (`identify -list format` will give you a few
ideas on possible formats);
2) make a careful note of all characters not in the range 32-126 and
their exact positions in the converted file and then, just to be sure,
you'd better delete them;
3) if the resulting file is too big for VeeCrypt, split it into chunks;
4) encrypt the file (or files), praying that the encryption process
doesn't crash;
You now have an encrypted image. Decryption? Hard:
1) decrypt the file or files, giving you the textual data but without
any characters such as tabs and newlines, and praying that the process
doesn't crash;
2) if you had multiple files, stitch them all back together;
3) re-insert the tabs and newlines in exactly the right places;
4) convert the image back to the original format, using either Chris's
program or the GIMP or ImageMagick.
That's it. You *might* now have the original image again.
No, Austin. It doesn't save /any/ work. It's a huge waste of time.
Let's just pretend that our threat model is so ludicrously low (e.g.
Bruce Schneier's "kid sister" model) that we would be prepared to
entertain the idea of using a home-brew cipher - but let's also
recognise that our friends have limited patience.
Scenario:
Alice wants to buy a painting for a friend, Carol, as a birthday gift,
but she's not sure whether Carol would like it, and she wishes to
consult Carol's techno-savvy husband, Bob, so that he can give Alice an
informed opinion on whether Carol would like the gift. (Carol is, in a
sense, Eve, but any eavesdropping would be entirely accidental - this is
a VERY low threat model!).
Since Bob and Carol live on another continent, it's not practical to
invite them to tea. So Alice wishes to email the photograph (2325500
bytes). It must, therefore, be encrypted (to reduce the risk that Carol
will see the photograph accidentally and have her birthday surprise
spoiled).
What must Alice and Bob do to complete this task?
1. Agree on a cryptosystem and install it locally.
2. Agree on a key.
3. (Alice) C = E(P)
4. (Alice) Email C to Bob.
5. (Bob) P = D(C)
Alice and Bob consider two cryptosystems, CDX-3 (a fine example of an
insecure home-brew cipher) and your own VeeCrypt.
Step | CDX-3 | VeeCrypt
-----+---------------------------+-----------------------------
1 | store the two C files | wait for AOB to craft
| locally, type make, type | a mutually synchronised
| sudo make install | database (lead time: weeks);
| | install an Ada compiler and
| | IDE onto the system; install
| | VeeCrypt; learn how to use
| | the IDE
| |
| Maybe 5 minutes tops (but | weeks and weeks, might never
| more likely 30 seconds) | get it
-----+---------------------------+-----------------------------
2 | Think of an 8-letter word | select cipher variant,
| | select scrambling parameters,
| | communicate these to Bob
| |
| 2 seconds | several minutes
-----+---------------------------+-----------------------------
3 | encrypt the file | convert to a text format;
| | split into multiple files
| | of 100KB max size (after
| | conversion to text, this took
| | 95 files!);
| | store the position of every
| | single tab and newline in
| | every file;
| | encrypt every file
| |
| 0.652 seconds (I timed it)| several hours
-----+---------------------------+-----------------------------
4 | 2MB file, so one email | some email systems will reject
| | anything over 5MB, so we're
| | looking at two emails
| |
-----+---------------------------+-----------------------------
5 | decrypt the file | decrypt each of the 95 files;
| | restore every tab and newline;
| | re-join all the text files into
| | one;
| | convert back to image format
| |
| 0.664 seconds (I timed it)| several hours
-----+---------------------------+-----------------------------
What is the total time investment for Alice and Bob?
CDX: some time between one minute and ten minutes - twenty including
coffee break.
VeeCrypt: several weeks of waiting, and several hours of pains-taking,
error-prone, detailed editing.
If those were the only choices, which do you think any /sane/ person
would choose?
CDX is crap. It really is. It sucks. Nobody in their right mind would
use it to protect any serious secret. It does have the redeeming feature
that it's proving to be quite resistant to such cryptanalysis as it is
receiving - that is, it's an interesting puzzle.
Nevertheless, CDX is crap, and it sucks.
BUT it's more secure, faster, and much more convenient to use than VeeCrypt.
Austin, you need to get your cipher up to /at least/ CDX standard before
you even /think/ about telling anyone else about it, because right now
they have no incentive whatsoever to even /look/ at your cipher. It
isn't even much of a puzzle!