Identity, proof, and encryption
I’m clearing space on my drive for an upcoming project, just a revision but a seven-disk set requiring plenty of space. So things are stop-and-go this morning, flurries of activity as I line up a disk alternating with spaces of “writing time” while the disk burns and verifies.
Yesterday, I was quite proud of myself because I was able to give a contractor shell access to our webserver without sending him a password. (Send a password to a user account on our server? In unencrypted email? Are you nuts?) I had him create an RSA key pair on his machine, then he sent me the public part of the pair while he kept the private part. I installed the public key in his ~/.ssh/authorized_keys file (chowned and chmoded appropriately, of course,) and he was able to log in with the private key.
Now, I realize that’s probably a pretty opaque explanation if you’re not already up on asymmetric keys and authentication. I think the biggest hurdle faced by most encryption systems is lack of understanding of how they work; when we talk about “keys,” it’s a pretty poor metaphor.
Think about how a physical key works. You have a lock which can be opened with a sliver of metal cut to a certain shape. It’s simple to copy those slivers of metal (though it requires some specialized tools, so there’s an inconvenience level.) In theory you can distribute the keys easily, but it’s hard to take a known key and easily produce (and propagate) locks to match it. This isn’t the way digital keys work; it’s more like how passwords work. The key is a physical manifestation of a password.
There’s a better metaphor for digital keys. On my desk I have a curious little chunk of stone, a gift from a friend who visited China some years ago. It’s a chop, a sort of stamp with a carved lion on one end and my name (with a whimsical phonetic representation in chop-script, another story entirely) cut in the business end. Ink it and press it to a page, and it leaves a unique mark that is meant to be a verification of my identity: this is me, it asserts, and I prove it because nobody else has the chop which makes this mark.
Chops are far from simple to forge. You’d think it would be easy, because the marks they make can be quite widespread, and probably could be reproduced with a photocopier, but it’s not that simple. Any number of factors can change the appearance of the mark, from the surface under the paper being chopped to how well I ink it, and yet the mark is still recognizably from my chop. Try forging that.
Asymmetric keys are more like chops. The private key is like the chop itself, unique to the holder and impossible to fake. The public key is the basic form of the chop-mark; it allows the general public to confidently confirm that the signer is the person who owns this key without needing a copy of the key itself. The public key can (and should) be widely, publicly distributed; the private key is just that, private. (Note that using a private key also requires a passphrase, so just having a copy of the key isn’t enough; it’s a “multi-factor authentication.”)
So my contractor sent me, in essence, a method for recognizing his chop-mark. And I told the server, “Allow access to this user account for anyone who signs with this chop-mark.” If the email message was intercepted, so what? The black-hat doesn’t have the chop, just its mark. They can’t fake the mark to gain access.
PGP/GPG mail signing works the same way: the sender’s private key is used to create a hash of the message (I won’t get into hashes) which is like the unique mark of a chop. A holder of the public key can verify that the message as read is unchanged since it was signed, but they can’t change the message or re-sign it. (Those who exchange e-mail with me regularly know that I sign even the most routine messages, perhaps to an annoying degree; however, my users know that if they get email purporting to be from “mycompany.com IT staff” which doesn’t have my signature, it’s not from me.)
Actual encryption with these keys is an entirely different bird which goes beyond this metaphor, and this post is too long already. But I’ll note one thing: I’ve already got three different private keys, and I work from at least two different locations. Do I produce multiple copies of these keys? If you’re Julie, hopefully at this point you’re raising your hand and saying, “Why not put them on a USB flash drive on your keychain?”
There’s some interesting discussion of the uses of this sort of technology in the October ;login:. It’s an interview with the CIO of the University of Texas system, which has to verify thousands of identities daily, while protecting the privacy of identifying details.
Now Playing: Faded Dress from Cherry Marmalade by Kay Hanley
Comments
Posted by: JM | December 2, 2004 12:50 PM
In a business environment, where compliance can be a requirement for continued employment, its easy to get people to authenticate reliably. But kids who like to [mess] with people’s minds, and play with their identities in an online environment, are going to be a much harder sell. What’s to stop any given teen from swapping drives and passwords and pretending to be someone else?
And the chop metaphor is quite apt, Pu-ka. (snort)
Posted by: Ms. F | December 2, 2004 9:23 PM
Actually, I’d like to be able to carry my whole ~/ directory, keys and all, on a USB keychain drive. I’d need to back up regularly, though. And I’d need to keep the iTunes and iPhoto libraries outside my home directory.
Posted by: pjm | December 2, 2004 9:58 PM
Posted by: JM | December 3, 2004 11:10 AM