5 ms·
Think about it, the key analogy is just terrible. In the origin domain, losing a key is always bad, and making a key available to all is a non sequitur. It's n
by morsch 17d ago
Think about it, the key analogy is just terrible. In the origin domain, losing a key is always bad, and making a key available to all is a non sequitur.
It's not like non-technical people understand asymmetric cryptography. Or even technical people, for that matter.
Maybe we should refer to the public key as an address, and the private key is just a password again. You can send stuff, securely, to an address. And you can verify the sender when you have their address (ie check the signature).
- fc417fc802 17d agoThe key analogy is perfect for the private key and for symmetric keys. Publishing those is always bad and means you need to rekey immediately just like losing a traditional physical key to a secure building would. The public counterpart is tricky to name but I think attaching "public" to it makes the intended usage plenty clear. There isn't really a physical counterpart unless you consider maybe those machines that check for counterfeit cash but even that's not a great fit because the pubkey is simultaneously analogous to a lock box.
- tialaramex 17d agoNot quite. The analogy works for secret keys (what you're calling "symmetric keys") but a private key is unlike real world key analogies because as you'll quickly discover if you deploy real world keys in a high security environment people can examine the lock to figure out the correct key. The whole point of private keys is that this cannot work in a public key system. That step does not exist. It is true that publishing your private key is bad but you'd hope the name makes that pretty clear. Despite the way I remember (U2's "The Fly" lyrics, "A secret is something that you tell one other person, so I'm telling you, child") people generally do not understand that the whole point of secrets is that at least two parties know, which means you might always be betrayed by somebody you think is keeping your secret. For a private key it's easy, don't tell anybody, nobody knows, you can't be betrayed, done. For example Hacker News learns my password to this web site every single time I sign in because that's just a secret. We've known how to do better for decades but only a handful of systems I use (e.g. Google) do so and all of them have a "traditional" password option which is like discovering your aeroplane still has a smoking section in 2026.
- fc417fc802 16d agoI don't see the issue. Attacking a physical lock as you suggest is analogous here to breaking the cryptography in some way. So the NSA busts out its sooper sekrit quantum computer ... The inability to betray is a sharp observation but I think the analogy still holds flawlessly. It's a physical lock that you haven't handed out the key for so you're the only one with access to it. However the public counterpart still defies easy explanation. Why did you put "symmetric keys" in scare quotes? Is that not the common term in your neck of the woods when speaking about symmetric crypto?
- TeMPOraL 16d agoAgain, the "lock" part is the dumb part. Encryption scrambles the data. Key is the piece of information that lets the information be scrambled in specific way so that it can be unscrambled by someone in possession of the same (symmetric) or complementary (asymmetric) key. The only "lock" in the whole thing is the scrambler (encryption software), and that one is usually publicly known and available. Obvious way to make this clear: if "keys" were a lock, the original data in readable form would be there, accessible if you found a way to bypass or destroy the lock. The whole point of encryption as opposed to locking is that you cannot do this, because the data itself is scrambled - and thus you don't even need to ship any "lock", just the scrambled data, because the "lock" is something everyone already has or can procure.
- vel0city 16d ago> the whole point of secrets is that at least two parties know This isn't true. If I do something privately by myself and never tell anyone it's still a secret. If I have a hidden compartment in my desk to hide things and I'm the only one who knows about it, it's a "secret compartment". A secret doesn't have to involve a second party at all.
- gowld 16d agoAnd in fact, we have a dedicated term for shared secrets
- 16d ago
- TeMPOraL 16d agoIt's not perfect for symmetric keys at all, because the fundamental fact about locks and keys is that a lock sits on the outside of the thing you're protecting, attaching to it or to a container in which the thing is placed. Encryption is about directly scrambling the protected thing.
- yencabulator 16d agoThe mental model is that encryption is a locked box you can only open with the key.
- TeMPOraL 16d agoThat's a dumb mental model, is what I'm saying. The original sin of cryptography/cybersecurity metaphors.
- yencabulator 15d agoBetter than calling encryption "scrambling".
- fc417fc802 15d agoWhat's dumb about it? I'd suggest that it's slightly abstract and argue that there's nothing wrong with that. It fits perfectly and it's readily understandable. For example a VPN connection lends itself to being described as a pipe. That already equates the encapsulating protocol with a physical barrier regardless of the presence of cryptography. I think you're just being overly literal, something which will kill almost any decent analogy regardless of topic.
- TeMPOraL 15d agoYou have a very large subthread debating downstream confusions, which were previously debated in millions of such discussion on-line too. It's a confusion everyone has to learn to live with when first exposed to concept and the metaphor of "keys" and "locks". And it's because it does not fit. Locks and keys are distinct kinds of objects, and are external to the thing being protected, with lock itself being attached to the thing being protected. Only the key can be distributed separately and copied; you come into possession of the security mechanism and the protected object together, they're literally unseparable (that's the point - if you can separate the lock from the thing, you don't need the key anymore). Encryption in contrast is (reversibly) destroying the thing being protected, the "locking mechanism" is public and same for everyone and therefore you already have a copy, and you can't "bypass" it because the very thing being protected has been destroyed (scrambled) and you cannot undo that without having the "key". There's no 1:1 mapping of any concept from physical locks and keys to encryption. It's a fundamentally dumb analogy that people run away with, because at first look it seems to have some semantic similarities.
- fragmede 17d agoOr how about we call it the lock. There's the (private) key, and it fits the lock (public key). You can pass the lock around, but you need the (private) key to be useful.
- danw1979 17d agoI dunno if that works or is any less confusing, to be honest. I don’t think there’s any process or entity in the physical world that is reasonably familiar to most people that is even remotely suitable as an analogy to public key cryptography.
- tialaramex 17d agoI think this is worth highlighting. Public Key Cryptography is a surprising idea. Like Computation, if you'd told a 19th century mathematician about this, they might buy it as a concept but deem it unlikely to ever happen in practice or be of any significance, in the 20th century these were both realised and caused a massive change to our society. These are not analogs to things ordinary people had already seen. For Computation we just got used to it being everywhere and so we don't need to explain it so much.
- raddan 16d agoFor what it’s worth, it’s the analogy I use, and for the twenty or so college sophomores I taught on Tuesday, the analogy is sufficiently understandable that they were able to generate and use SSH key pairs to do their homework. I think the reason we (the HN crowd) don’t like it is that the analogy starts to break down when you start thinking through all of the operations you can do with public keys. But this does not matter much for somebody learning to use them for the first time. I’ve had to grow comfortable with the idea of giving people imperfect explanations so that they can build an intuition. Once that happens I can return with the mathematics so that they can really understand what is going on.
- faxmeyourcode 16d agoThis analogy is exactly what made it click when I was a teenager.
- SilasX 17d agoYeah, that always bothered me about the terminology. My fix would be to call it a lock -- everyone understands that you can share those and it doesn't make them any easier to open.
- morsch 17d agoThat analogy works for encryption but doesn't really work for signature verification
- snmx999 17d agoMaybe we should not use analogies? Just call them secret-text and public-text.
- benjaminjt 16d agoAgree. Even just “secret” would be fine for the private key. Maybe pair it with “identity” or “id”.
- gowld 16d ago"public-text" doesn't describe the purpose of a public key.
- SilasX 16d agoSure, but you generally those are separate conversations in which you don't need to appeal to the duality of encryption and authentication or apply the analogy to the latter.
- deleted 16d ago[deleted]
- VorpalWay 16d agoAn alternative way to think about it would be a padlock and a key. Anyone can close the padlock (assuming the common spring loaded design), but only the key holder can open it. While this works for encryption, it doesn't really work for explaining signatures or however. Maybe someone can come up with a good analogy for that case.
- waltbosz 16d agoThat's the analogy I was taught in college. The public key is really a padlock that had infinite number of copies, but there was only one key that could open all the padlocks. If someone wanted to send a secret message to the person who owned the key, the would obtain a copy of the padlock, put their message in a box and lock it with the padlock, then send the box to the key owner. The key owner was the only person who could unlock the box and read the message.
- TeMPOraL 16d agoCertificate and signature could work as an analogy for public keys, if they weren't already taken by higher level concepts.
- cpburns2009 16d agoThat actually never occurred to me. But it makes sense non-technical people would be skeptical of sharing a public "key". I like public address better than lock (I think lock just adds confusion).
- throw0101c 16d ago> Think about it, the key analogy is just terrible. Because originally it was not really that much of an analogy: we only had what is now called "'symmetrical' encryption", but was just "encryption" back in the day (dating back to even Caesar perhaps). So the 'key idea' made complete sense: don't lose the one thing that could unlock things. It was only more recently (in the relative, historical sense (~1970s)) that public and private "keys" became a thing, and the differentiation between symmetrical and asymmetrical encryption was made/invented.
- TeMPOraL 16d agoThe problem is arguably the symmetry in asymmetrical encryption - namely both "private" and "public" key are the same thing; the labeling "public" vs. "private" reflects your arbitrary choice of which of one you give away, and which one you keep for yourself. It's surprising that we didn't invent any kind of physical padlock that accepts two keys, with the lock mechanism such that, when locked with one of the two keys, can only be unlocked by the other key. I can imagine obvious use cases for that, e.g. in shipping, but I guess this won't adopted because it makes the key management problem immediately obvious. But should such a thing existed, that would be the best (edit: just better - see my other comment explaining why "lock" is the dumb part here) analogy to draw terminology from.
- SoftTalker 16d agoWe did/do have that kind of lock: A safe deposit box at a bank. To open it, you need two keys, one of which you have and one of which the bank has.
- TeMPOraL 16d agoBut that's the "you need two keys at the same time" case, which is different. I'm talking about "each of them can lock alone, but once locked, only the other one can unlock". The real problem is that lock and key is a fundamentally dumb analogy for a process that scrambles something.
- throw0101c 16d ago
- upofadown 16d agoWell most people don't verify identity with some sort of physical key. So it doesn't work as an analogy in the first place for signatures...