Operators Dialog / Operator Details

10.4.45 - Random

Fills areas with random values based on a key (a text string) you supply. Can generate color or greyscale random data.

Warning: Do not use greyscale random data to encrypt (using XOR) a color image. Doing so leaves clues as to what the image data was.

An example of an encryption technique:

  1. Promote the image into a layered image
  2. Clone the layer using clone in the Layers dialog
  3. Set the layer mode of the clone to XOR
  4. Select the "entire image" area tool
  5. Select the Random operator
  6. Choose a long, highly variable passphrase
  7. Click on the clone image (the top layer)

That's it. The master is now an encrypted version of the image. You can now save the master as an 64-bit .ato file using S (shift+s); the only way to get it back from that .ato file is to repeat the process: load it back in, begin with step one above, and make sure you provide the same key or the image will not decrypt.

This is good where only you know the key. However, if you send the image to someone else, and they don't know the key, you also have to send them the key, and at that point, the encryption is insecure. To get around this, you can use the "double locked box" technique. It works like this:

  1. You encrypt the image as described above. Send the image to the other party.
  2. They encrypt the already-encrypted image again, using their own unique key. They then send this doubly-encrypted image back to you.
  3. You now decrypt the image using your own key. This will result in an image that is only encrypted using the other party's key. You send this image back to the other party.
  4. The other party now decrypts the image using their key, and it will decrypt completely.

Using this approach there is no exchange of keys between the two of you, only encrypted information, and no intermediate party can steal the keys in transit, which makes the technique secure with regard to channel-based interception.

Tip: It is worth noting that you can retrieve the other party's key with a bit of cleverness, because you have the original image. I leave that as an exercise for the student. Just be aware they can do the same to retrieve your key. This can be of considerable benefit, because once you have the other party's key, you can send single-encrypted images to them using their key and will no longer have to resort to the double locked box approach. You can even create a key, encrypt that, send it along, they use it to encrypt their key, send it to you, you recover it, and all this without ever sending actual image data. Fun!

For extra encryption goodness, generate more than one one layer of random information, each with its own unique key. Each layer goes above the image to be encrypted; each layer is set to XOR mode. To decrypt the image, all the layers will have to be reproduced with the correct keys. Don't lose the keys!

The random operator
Keyboard Navigation
, Previous Page . Next Page t TOC i Index o Operators g Glossary

Valid HTML 4.01 Loose

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
wtfm and aa_macro are coded in python 2.7
iToolBox 1.63
Please consider supporting my iToolBox development efforts with a small PayPal donation.

Hey, look:
A box!