Coffeehouse Post

Single Post Permalink

View Thread: Picture Encryption
  • User profile image

    Maurits wrote:
    You should bear in mind that if you treat pictures as numbers, you are in fact limiting yourself to a certain set of numbers.  RSA allows you to pick from a much larger range of numbers.

    To put it into perspective, consider this - any algorithm that can crack RSA would - with only trivial modifications - be able to infer what your picture must look like.

    Could it though?  If I took a highly varied picture (one without a repeating pattern or large areas of repeating color values), even with a limited set of numbers, in one part of the encrypted document the letter 'A' might appear with a hex code (for instance) of $FE65, but in a couple words later it would appear as $5439, and then the next word would have it appear as $E401, etc.  Although I am not very familiar with RSA, I ran across it in a book about prime numbers, but have yet to look it up again.

    EDIT: Basically, the key could theoretically change from letter to letter in the document. If spaces are encrypted, too, it would look like one long stream of garbage.  Could a formula crack that if the key changes from letter to letter?  I'm not sure...

    I was trying to think of something in nature rather than in the math world to use as a "chaotic" key so to speak.  A picture was the first thing to come to mind.  Another way to put it: for the first letter in the document to be encrypted, you would use the first pixel in the picture.  For the second letter in the document, you would use the second pixel's value, etc.  If you wanted to throw a formula in between that, who knows what you would come up with...