29

I'm trying to explain the basics of Bitcoin to my parents.

One of the core components of bitcoin, is signing transactions to make sure your identity can't be impersonated, and thus the need to explain a simplified asymmetric cipher.

What's an extremely simple asymmetric cipher I can use as an example?

How can this simplified cipher be used for signing?

Ryan Leach
  • 410
  • 4
  • 8

4 Answers4

28

If you want to present public key cryptography to your parents or friends, then I suggest you follow some guidelines. First, don't talk about specific functions, nobody cares about SHAxxx, keep your talk conceptual. The problem solved by public key cryptography is allowing two parties who never met before to securely exchange information in a public channel. Do not confuse this with other applications that are achieved by public key encryption, such as digital signatures or authentication.

An illuminating simple illustration of this that I have seen is the following. Suppose that two parties have a bucket and a number of colors, and they want to agree on a specific secret compound. They are allowed to send each other a bucket with a certain compound, but anything sent is exposed to an evil adversary. The underline assumption is that mixing colors is easy, but decomposing a mixture to its ingredients is hard. This assumption (which is easily connected to the formal side of things) allows you to achieve their goal. Pick a public color $P$, and allow both parties to pick a secret color, let us denote them by $S_1,S_2$. The first party then sends a bucket of a mixture of $P,S_1$. Similarly, the second party sends a bucket containing a mixture of $P,S_2$. Finally, each side adds his private color to the mixture he received, and now both parties have a mixture of $P,S_1,S_2$, which (by our assumption) remains secret from any eavesdroppers. A formal version of this is the Diffie-Hellman key exchange protocol, which relies on the hardness of discrete log.

Now, my understanding of the bitcoin protocol is limited, but when talking to your parents about it, I see no reason to go into cryptography. Most of the popular explanations I have seen unnecessarily delve into implementation details, and start talking about finding a preimage of a hash such that the result would have $x$ number of zeros, loosing sight of the actual problem. As before, I suggest to keep the talk conceptual. What problem is the bitcoin trying to solve, and why isn't this trivial? To my understanding, the bitcoin solves the problem of maintaining a distributed ledger, specifically avoiding the double spending problem. The motivation is to avoid having a central authority, and this can be achieved by allowing each participant to approve a transaction (instead of giving this authority to the bank). To avoid adversarial participants approving their own invalid transactions, the concept of proof of work is introduced. POW uses the hash as a black box, so you can avoid mentioning specific candidates.

Ariel
  • 13,614
  • 1
  • 22
  • 39
15

A common metaphor I hear used is manufacturing a bunch of padlocks, keeping all the keys, and sending out open padlocks to anyone who wants one. Then anyone with such a padlock can send you secret messages by putting them in a box and then using one of your padlocks to lock it before sending it to you. No-one but you has the keys, so even the sender can't unlock the box after it's locked – in particular, the postal service can't snoop on your message at all. They might even have a padlock from you too, but that doesn't help them unlock the box.

(I provide this example to answer your question as stated, without any particular opinion on whether it's actually useful for the bitcoin explanation.)

Ben Millwood
  • 530
  • 2
  • 12
7

The problem with explaining asymmetric cyphers (and the reason why most pop explanations actually fail to explain anything) is that they are entwined with the idea that there exist problems that are (supposedly) intractable, which is one of the ideas behind computational complexity.

Once you get that point across, an asymmetric cypher is "just" a function that is easy to compute but thought to be hard to invert. You could even make your own, see the Diffie-Hellman key exchange original implementation as a reference.

quicksort
  • 4,272
  • 1
  • 10
  • 21
4

I don't think there is an easily demonstrable asymmetric encryption system. Instead, describe what it does, not how it does it. In fact, I've had to do this recently, to describe how PGP works. For BitCoin, concentrate on the second part, signing messages.

I can create two related numbers. One is called the private key, the other the public key. I keep the first secret, and tell everyone the second. Anyone who wants to send me a message takes my public key, and encrypts their message with it. Once that is done, no one can decrypt the message, not even the sender. When I receive the message, I can decrypt it with my private key.

Or, I can encrypt a message with my private key, and send both the encrypted and non-encrypted message to a second person. If they have my public key, then they can decrypt the encrypted part of the message, and it will be the same as the non-encrypted part. This shows that I was the person who encrypted the message.

If they ask how the keys are generated, then say

I think of two very large prime numbers, and then transform them through a mathematical function. It spits out the private and public keys.

This is of course, glossing over the fact the asymmetrical encryption normally doesn't work on the message itself, instead on a session key (for encryption), or on a hash (signature verification). It also ignores the very important requirement that you must keep your private key private - anyone with access it to can pretend to be you.

CSM
  • 179
  • 2