Updated on 2025-06-23 GMT+08:00

Overview

A key pair, including a public key and a private key, is usually used in asymmetric encryption scenarios, also called public key encryption. A public key can be publicly allocated to any user to encrypt data or verify signatures, while a private key must be kept securely and available only for the owner to decrypt data or generate signatures.

Working Principles

  • Encryption and decryption
    • When you use a public key to encrypt data, only the corresponding private key can be used to decrypt the data. For example, user A hopes to send messages to user B securely. In this case, A can use B's public key to encrypt the messages, and B can use its private key to decrypt the messages.
    • If you use a private key to encrypt data, the public key can be used to decrypt data. This method is mainly used for digital signature to verify the information source and integrity.
  • Digital signature
    • A uses its private key generate a signature for data, and then sends the data and signature to B.
    • B uses A's public key to verify the signature. If the verification is successful, the data is not tampered with and is from A.

Usage Process

Operation

Description

Creating a Key Pair

Describes how to create and delete a key pair.

Using a Key Pair

Describes how to bind a key pair to an ECS, use a private key to log in to Linux ECS, and use a private key to obtain the password for logging in to Windows ECS.

Managing Key Pairs

Describes how to: