Familiar key signing over video call 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 &lt;friends-key&gt; | mail -s "Key verification keywords" &lt;friends-email&gt;


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 &lt;my-key&gt;) | tee /dev/stderr | gpg -sear &lt;friends-key&gt; | mail -s "Key verification keywords" &lt;friends-email&gt;


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.
So your protocol goes like this:


Alice generates a key pair $(a_{priv}, a_{pub})$ and sends $a_{pub}$ to Bob.
Bob generates a key pair $(b_{priv}, b_{pub})$ and sends $b_{pub}$ to Alice.
Alice generates a message $m$ and sends $Enc(Sign(m, a_{priv}), b_{pub})$ (or $Sign(Enc(m, b_{pub}), a_{priv})$, I'm not sure which of both is usually used by PGP) to Bob.
Bob decrypts and checks the signature to get a message $m'$.
By a video call both verify that $m' = m$.


Your key verification scheme is based on two ideas:


If Bob did succeed to decrypt some message encrypted by Alice using $b_{pub}$, then Bob must be in possession of the corresponding private key $b_{priv}$.
If Alice knows the content of a signed message which could be verified using $a_{pub}$, then Alice must have been the signer and be in possession of $a_{priv}$.


But this doesn't work in presence of a man-in-the-middle attack for the previous key exchange and the exchanged message.

Assume Eve is able to intercept all messages between Alice and Bob.

Then the attack goes this:


A → E: $a_{pub}$
Eve generates a new key pair $(a'_{priv}, a'_{pub})$.
E → B: $a'_{pub}$
B → E: $b_{pub}$
Eve generates a new key pair $(b'_{priv}, b'_{pub})$.
E → A: $b'_{pub}$
A → E: $Enc(Sign(m, a_{priv}), b'_{pub})$ 
Eve decrypts the message, strips the signature and re-signs and re-encrypts.
E → B: $Enc(Sign(m, a'_{priv}), b_{pub})$
Bob checks signature and decrypts, and gets the same $m$ as sent by Alice.
Video call verification shows that "everything is okay".


If the message also contains parts of the key to be used, that would have to be changed by Eve as well, of course.

So no, you can't get around checking the actual finger print of the keys (or something derived from it).