If the password is: “Critical”

Critical: express criticism or disapproval

Express: convey a thought or feeling in words or by gestures and conduct

Convey: transport or carry to a place

So, assuming you and I have the same dictionary, I can prove that I know the password “Critical” by telling you the hash “Transport”.

]]>For example, if we do a simple hash algorithm which assigns all the letters of a password to a number and adds all those numbers together we get a number from which it is impossible to retrieve the original password (unless it was something simple or very repetitive). While that protect the original password, it has a weakness because many other passwords could produce the same number (collisions); “password” and “drowssap” would produce the same number as would “ssawprod” and many others.

So the true objective of the math for a one way has is to generate a unique value and reduce (or eliminate) the potential of collisions.

With encryption, imagine that you have to have a way to reverse that algorithm to recover the original password. A good hash algorithm resists this recovery, this is where encryption comes in. There is a conversion (like password to number), but there is also a reverse (like recover the password from the number).

]]>Yes, you do not need to decode a one-way function. But I gave this example to build up to the discussion of public key encryption, so I wanted an example where you can decode. But you are right.

]]>NO, one way encryption should NOT have a way to decode it!!

Typical example:

Allice needs to verify her password on Bob’s system. Allice does not want to transmit the password in the clear and Bob does not want to store the password in the clear.

Allice uses a ONE-WAY encryption (‘hash’)to transform her password to a ‘hash’. Bob has a hash of Allice’s password stored on his system, created using the same ‘hashing’ algorithm as Alice. Bob can compare the 2 hashes to determine if the password is correct. No need to be able to DECODE the hash back to the password, that would be bad.

You can easily advert both the given attack and reverse lookup by either omitting digits or adding random ones (salt). ]]>

The other is the one-way function aspect of public, private keying. This is NOT THE SAME. Its a different thing, because the p,q form a pair, and there is a third player, such that p and q relate, and using one you can perform operations which relate to the other, but you cannot ‘guess’ the one from the other. Neither P or Q are like hash functions because the whole point is that p and q relate, against third knowledge. By making one public and keeping one secret you create a world where knowledge of public can prove operations performed by private, and knowledge of private can be proved by operations of public ON THIRD THINGS. So verification is sign(private, data) and then prove via public(data) that only private(data) created that thing. Whereas private communications is use public(data) to make something only private(data) can decode.

This latter one is the hard one to explain. This is the one you are searching for analogies to. And, because its so frighteningly unusual, there are just no good analogies to this one. “only alice did it” is not the same as “only alice can read it” and yet bob can do both, if alice keeps her private key private, and publishes her public key to the world, including bob. SO we get two outcomes from one keypair! this is unusual. Are they corollories? well yes. because they depend on the properties of p,q and third knowledge, and public private status of p and q. Both depend on this. but they use different instances. one is an operation on p, one on q an the proof each time is an inverse operation on q and p respectively.

Most of the analogies here depend on different world models. “only alice did it” is the “you have the other part of the torn label” that the spies used, which ultimately lead to the rosenberg trial. Its best analogy as I see it is “proof of posession”. “only alice can read it” is the world where you whisper something to alice and then only alice knows it. Alas, this is a very poor fit for how public,private works to send something privately to the private keyholder, because instead of whispering it to alice, alice SHOUTS TO THE WORLD the magic which only she can decode. Bizarre!

]]>I visualize these things in binary, where individual incoming bits perturb the state of *multiple* output ones – can’t think of a real-world example, but maybe one exists. How many people might understand simple wiring circuits with lightbulbs, or redstone bricks in minecraft, or whatever – it might not be so easy to say it, but a diagram to show it would work really well (the incoming bits, and how they each in-turn mess-up multiple outgoing ones to produce a result) ]]>