What does "revoking" a key actually do?
Think of revoking a key as a comment added to the key file. This comment, if present, will tell others users of your key (someone that send you encrypted gpg emails for exemple) that the key have been revoked and that they shouldn't use it !
Revoking a key is only useful when you send it on key servers, to make others know it's revoked.
Gnupg is open source (yeah!) and hence it can be looked up what happens. When you create a revocation certificate for a key i.e. via `gpg --gen-revoke name"
it internally moves through the following functions/key steps
main()
in gpg.c (the gpg command line tool) is called, then- parameters parsed and then
gen_revoce( const char *uname)
in revoce.c is called, - inside then it retrieves the secret and public key for the uname
- it then calls
make_keysig_packet
in sign.c like thisrc = make_keysig_packet( &sig, pk, NULL, NULL, sk, 0x20, 0, opt.force_v4_certs?4:0, 0, 0, revocation_reason_build_cb, reason );
with the keypair (publicpk
and secretsk
) and provides additionally a functionpointer torevocation_reason_build_cb
and a string with the revocationreason
). - internally
make_keysig_packet
then uses a hash_algo to create a message digest md, which is eventually provided tocomplete_sig( sig, sk, md );
that internally callesdo_sign
and uses assymetric encryption on themd
. - the created revocation certificate (which is sort of a type of signed with the secret/private key message) is created.
Then in this certificate provided to a keyserver will allow for this (as @WayToDoor phrased) it the comment to the key on the server.
Only the person in possession of the secret private key can sign messsages to be verified with the public key and hence, a revocation is a "sending of a private key signed message, hash of message generated and assymetrically encrypted" kind of thing.
My take on the further thing is that once revoked, the keypair is burned (trustwise worthless).
Therefore it would be smart to have used a subkey to a safer (air gapped) master encryption key, allowing the reissuing of a new working subkey to replace the revoked key, without the need to safe channel wise verify the public key of the new subkey-keypair.