Ponder on this.

Jun 26, 2011 47 Replies

Photographic JPG files of everything but the canonical white cat in snowstorm or black cat in a coal cellar are fairly high coding entropy typically S = 5.5 or higher, but that is still only about 250 states of good entropy per byte. And you can make some pretty good guesses about the relative frequencies of the possible byte values.

Any decent random number generator has to be very close to 256 states per byte over the long term, with S= ln(256) = 5.545177. I use entropy to detect valid fragments of damaged JPEG files in image recovery.

I once constructed for curiosity the lowest possible entropy JPEG which turns out to be grey cat in a grey fog with entropy ~ 0.04 and consists of 99.6% "00" bytes yeilding an average 0.03 bits/pixel on a 6M image.

Not random. Too much is known about the internal structure and statistical properties. I doubt if it would stand up for long.

By knowing that the JPEG output is the result of Huffman coding and making educated guesses about the frequency of the unavoidable "0" terminate JPEG block coefficients in the input stream. Get one symbol at a time by guessing at the codes.

"FF" in the input stream is always escaped as "FF,00" which is another serious weakness. Often those two symbols are 2x more frequent in a relatively good JPEG image - slightest blur and you get loads of truncation in the JPEG blocks = more clues for the attacker.

Any known correlations in a one time pad are *really* bad. Knowing it was encoded with a JPEG stream immediately tells me something about the long term 0:1 bias ratio in the pad and again that provides clues.

Off the top of my head I think that if you took two independent JPEG image data streams and XOR them byte for byte the resulting binary would be much closer to 256 states per byte of entropy. But I haven't tried it. There could still be serious problems in clear blue sky for instance...

Hiding messages inside the JPEG encoding is a recognised trick that goes by the name of steganography (the Greeks invented it).

formatting link

A secret message potentially hidden in plain sight.

Regards, Martin Brown

the

y

..

Yes, that gives a little more insight. I suppose you could XOR several JPEG files for more randomness. The first with the second, and that result with the third, and so forth. Seems not too difficult to produce secure encryption.

Are you familiar with the encryption used on the internet for secure financial transactions? I always wonder how secure my connection is when logging onto a financial site. Paypal or whatever.

-Bill

" snipped-for-privacy@att.bizzzzzzzzzzzz"

reduce the

number

and

of

entropy

which

consists

at

the

would

instance...

goes

Much of that is provided by secure sockets layer 'SSL'. =20 This may help you:

formatting link

?-)

uce the

r

nd

of

ropy

h
s

at

e

ld

ce...

es

Yes, thanks for the link. It was a little deep for me, so I did a search for (TLS) Transport Layer Security, and found something in wiki.

formatting link

"In order to generate the session keys used for the secure connection, the client encrypts a random number with the server's public key and sends the result to the server. Only the server should be able to decrypt it, with its private key."

So, I guess if you send me an encoded random number using my published procedure which everybody knows, I can decode it using my secret key which nobody else knows? So, the procedure of decoding is different from the procedure of encoding. Everybody knows how the data is encoded, but only the receiver knows how to decode it?

Is that about right?

-Bill

Getting a good bit closer.

That part of the preliminary key exchange is supported by what are called public key crypto systems. They have paired keys, one public and one private generated such that one key cannot be reasonably derived from the other. Examples include RSA, see:

formatting link

formatting link

And a related system issue, key exchange:

formatting link

Does this help you form a more complete picture?

the

In a public-key system, I publish my public key for all to see. Anybody can use that key, and a public program, to encrypt stuff and send it to me. But only I have the matching decode key.

John

On Jul 13, 8:53=A0am, John Larkin

It's the public program I don't get. Knowing the public program and the public key would suggest anyone could work it backwards to decode the original message. I think it has something to do with the time required to do that. I found an example in wiki, but the math is a little deep.

Notice it says;

"In real life situations the primes selected would be much larger; in our example it would be relatively trivial to factor n, 3233, obtained from the freely available public key back to the primes p and q. Given e, also from the public key, we could then compute d and so acquire the private key."

formatting link

-Bill

The public key is a product of two large primes. The program that manipulates the data can be published. There is no reliance at all on security by obscurity. The mathematics protects the secrets.

Those two large numbers are important in that have been carefully tested for primality: by construction having no small factors I think it has something to do with the time required to do that. I

The crucial point is that it is easy to compute the product of two primes, but it is incredibly difficult to factor a very large composite number where the factors are a roughly similar size.

A discussion of the relevance of key size in public key encryption algorithms is given at:

formatting link

PS. I would not rely on 128bit encryption for anything I really cared about keeping secret.

Certain methods may have backdoors and trapdoors as well as that of the official keyholder. US DOD tried to foist one such system on the world Clipper/Skipjack a while back. When it was eventually declassified cryptanalysts at universities pretty effectively shredded it.

Probably a bit too mathematical for you but a bit more detail online at:

formatting link

Regards, Martin Brown

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required