Security

What is a Key Pair?

A key pair consists of a mathematically linked public key and private key used in asymmetric cryptography for secure communication, authentication, and data encryption. The public key can be freely shared while the private key must be kept secret, and data encrypted with one key can only be decrypted with the other.

How Does Key Pair Work?

Key pairs are generated using cryptographic algorithms such as RSA, ECDSA, or Ed25519. The public key is distributed to servers or other parties, while the private key remains securely stored on the owner's device. This asymmetric relationship enables two critical functions: encryption (anyone can encrypt data with your public key that only you can decrypt) and authentication (you can prove your identity by signing data with your private key that others verify with your public key).

In web hosting, key pairs are most commonly used for SSH authentication, which provides a more secure alternative to password-based logins. They are also fundamental to SSL/TLS certificates that enable HTTPS connections. When setting up a server, generating and properly managing SSH key pairs is one of the first security steps, allowing administrators to disable password authentication entirely and significantly reduce the risk of brute-force attacks.