I recently had a conversation with a teacher who argued that in a digital certificate (x509), the public key is used to verify the name of the certificate holder.
From my understanding, there are actually 2 public keys at work in this scheme:
1) There's the public key contained in the certificate, which belongs to the certificate owner, and can be used by others to encrypt things that only the certificate owner can decrypt, or be used to check the signature of things encrypted by the owner (i.e the usual public-private key verification).
2) The public key of the trusted certificate authority which signed that certificate, which is not contained in the certificate itself but can be obtained through other means (i.e local certificate stores) to verify if that certificate is indeed OK (by checking the signature of the certificate).
The first key can in no way be used to verify the name of the certificate holder, because it would be equal to me claiming I am named Bob and having no proof to it.
The second key may be used indirectly to verify the name of the holder, but by verifying the integrity and authenticity of the certificate as a whole (i.e someone else objectively testifying that my name is Bob). But this key is not part of the certificate itself. Through logical assumptions, the only public key in the certificate, which is the first key, cannot be used to verify names.
Am I correct in my assumptions in that there is no way of using the public key in the certificate to verify the name of the holder? Or is the teacher right and I am missing some crucial detail?