# Key Pair

A Key Pair is a set of cryptographic keys that provides a secure method for authenticating and accessing Compute Instances.

Based on the principles of Asymmetric Cryptography (also known as Public-key Cryptography), a key pair consists of a **public key** and a **private key** that are generated together. The public key is stored on the system, while the private key is kept securely by the user.

This method provides more than just authentication; it also secures the communication between your device and the Compute Instance. Data sent to the instance is encrypted with the public key, and only the user who possesses the corresponding private key can decrypt and read the information.

Using a key pair is our recommended authentication method as it significantly enhances the security of your Compute Instance.

## Recommendations

{% content-ref url="key-pair/creating-a-new-key-pair" %}
[creating-a-new-key-pair](https://docs-epc.gitbook.io/ncs-documents/ncs-documents-en/compute/key-pair/creating-a-new-key-pair)
{% endcontent-ref %}

{% content-ref url="key-pair/importing-an-existing-key-pair" %}
[importing-an-existing-key-pair](https://docs-epc.gitbook.io/ncs-documents/ncs-documents-en/compute/key-pair/importing-an-existing-key-pair)
{% endcontent-ref %}
