Monday, January 20, 2025

Identity Management Atoms: Symmetric Keys

So far, nothing I have discussed actually encrypts data.  At best, we have hashes, which takes a block of text and produces a short, seemingly random collection characters -- that is specifically designed to prevent discovering the data that produced it!

While all of this is called "cryptography", there is a major reason I like to call this "Identity Management":  these are the tools that allow us to confirm each other's identities, which is a task that transcends the mere sharing of information.

At some point, however, we're going to want to share data with someone we trust, and we don't want anyone else to read what we send!  To do this, we need some sort of way that scrambles data so that, once sent, it can be unscrambled.  Perhaps the oldest of these is the "symmetric key", something shared between the two communicators beforehand, so that they can recover communication.

Perhaps the simplest example is called "Caesar's Cipher", which simply "rotates" letters by 13 -- A becomes "M", B becomes "N", and so forth -- which isn't a particularly difficult algorithm to crack.  It's easy to imagine a more complicated version, where each letter is assigned to another random letter, but even then, the algorithm is simple enough to crack, it's offered in puzzle books as "cryptograms", to be broken for entertainment.

On the other side of this, there's the "one time pad", which is a pad of randomly generated numbers used for cryptography.  For each "block" of a message, the sender uses a page, and the receiver needs to know what page is used.  This method is mathematically proven to be impossible to crack -- if you can trust that your random number generator doesn't produce identifiable patterns, if you don't use a page more than once (because two pages of data that use the same encryption page can be used to decrypt each other), and if you can ensure that only you and your confidant have unique one-time pads that no one else can see.

And this brings us to the weakness of symmetric keys:  how the heck do you get a symmetric key to the people you wish to communicate with, without anyone else getting their dirty little mittens on them, too?  Well, besides meeting up face-to-face with each person you wish to communicate with, and make sure that each person has their own unique pad, and keep track of where you are in each pad in your communications .... well, this isn't exactly the best way to distribute keys when you're trying to reach out to a computer on the other side of the world.

Naturally, there are a number of schemes for generating these random keys, all essentially designed to create things akin to "one time pads" on the fly, AES being a particularly popular one.  To the best of my knowledge, there aren't any concerns about these keys being weak against quantum computers -- they use algorithms that aren't susceptible to the type of parallel processing that quantum computers will theoretically offer.

Nope!  To the degree that these keys are weak against quantum computers, it's because they have to be shared!  And they are typically shared by asymmetrical public/private key cryptographic systems -- which are susceptible to quantum computer algorithms -- and which are also the cornerstone of both computer cryptography and identity management in general.

It seems like public/private key pairs would be better than symmetric keys for sharing data -- so why are symmetric keys still used?  It so happens that symmetric keys are far less computationally intensive than asymmetric ones, so they are used to optimize our information sharing.

No comments:

Post a Comment