A public key is the openly distributable half of an asymmetric key pair. Anyone can use it to encrypt a message that only the matching private key can decrypt, or to verify a signature that only the private key could have produced.
Why it matters
Public keys let people and systems establish trust without a prior secret. Websites present theirs inside an X.509 certificate, and a certificate authority vouches that the key really belongs to that domain. SSH servers, code-signing and email encryption tools like PGP work the same way. Because it is not secret, a public key can be published, but you must be sure it genuinely belongs to the claimed owner.
Example
In your ~/.ssh/authorized_keys file on a server you place a line beginning ssh-ed25519 AAAA.... That is your public key. The server uses it to challenge you, and only your private key can answer correctly.
Common mistakes
- Trusting a public key found anywhere without verifying its owner, which allows impersonation.
- Confusing the public key with the certificate, which also contains identity and expiry details.
- Assuming a leaked public key is a breach. It is meant to be shared.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.