Say that a friend of mine and I have both generated new PGP keys, and we want to use a video call to verify each other's new keys because we live on opposite sides of the planet. While we could both somehow share our public key and then read back the fingerprint, reading a fingerprint is a bit cumbersome, especially given that we both have to do it.
After I came across this "problem", a potential solution dawned on me, but I wanted to check here whether it will actually securely verify the new keys.
- I download what purports to be my friend's new key from somewhere.
- I encrypt and sign a message containing two random English words using my friend's alleged new key.
- We start the video call, and I tell my friend the first word in the email.
- My friend decrypts the message and checks that the word was indeed the first word.
- My friend then tells me the second word in the email (which I can verify since I sent the email).
I believe that if we both get our words "right" according to what was in my original mail, I can now trust that the key I have is my friend's new key. Furthermore, my friend can now trust that the key that signed that email is my new key.
While this may seem like a very roundabout way of achieving this, it is actually very simple to do if you're on a UNIX box:
shuf -n2 /usr/share/dict/words | tee /dev/stderr | gpg -sear <friends-key> | mail -s "Key verification keywords" <friends-email>
My question (finally) is now whether this scheme truly does verify our new keys, or whether there is some gaping hole I've missed?
Update 1: Come to think of it, the signature here can easily be forged as an attacker can just re-sign the encrypted blob with their own key. However, if the fingerprint is also included inside the encrypted part of the message, I believe it would still be secure.. The new command would be:
(shuf -n2 /usr/share/dict/words; gpg --fingerprint <my-key>) | tee /dev/stderr | gpg -sear <friends-key> | mail -s "Key verification keywords" <friends-email>
The friend would then check that the signing key has the same fingerprint as the one contained in the message before trusting it.
EDIT: I only say video call because it would be easier for someone to pretend they're my friend if all I had to go on was the voice.