# 生成公钥

### 生成公钥步骤：

#### 方法一：

1. 把下面这句话发送给你的 AI Agent

> 帮我用 OpenSSL 生成一个 Ed25519 密钥对，并分别显示给我

***

#### 方法二：

1. 点击下方链接前往非对称加密密钥生成网站，根据你的系统选择对应红框内的文件，下载并安装最新版本的密钥生成器

> 下载生成器：<https://github.com/binance/asymmetric-key-generator/releases>

注：若密钥生成器无法正确运行，请下载绿框内“.CHECKSUM”文件验证生成器包的完整性。请将两个文件下载到同一目录下

<figure><img src="https://1305672697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FivH0y4hvvQWQlOnFKiAg%2Fuploads%2FeNX4qdV5IfPviOcezopk%2Fimage.png?alt=media&#x26;token=332c636d-be1a-4047-867d-5a4f95ee4c67" alt=""><figcaption></figcaption></figure>

***

2. 打开密钥生成器，直接点击“Generate 1 Key Pair”生成密钥，你将得到私钥\*1、公钥\*1

⚠️ 请注意：

* <mark style="color:$danger;">**请勿分享你的API Key、Ed25519或RSA私钥！**</mark>以免造成资产损失
* 请点击“SAVE PAIR”或者"SAVE"，本地保存你的密钥

<figure><img src="https://1305672697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FivH0y4hvvQWQlOnFKiAg%2Fuploads%2FU0QkI5SSHnciGXaMlJGv%2Fimage.png?alt=media&#x26;token=68db81a9-4cf4-42a8-a0f3-4debde140128" alt=""><figcaption></figcaption></figure>

***

3. 点击“COPY”复制公钥并粘贴到上传公钥输入框中，即可继续创建GMGN API Key

<figure><img src="https://1305672697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FivH0y4hvvQWQlOnFKiAg%2Fuploads%2Fo76sI1S1EKoNFl6hCPMV%2Fimage.png?alt=media&#x26;token=fc1384e3-3d87-4cb7-ba08-7a3e9f15ac50" alt="" width="563"><figcaption></figcaption></figure>

***

### 非对称密钥对简介（Ed25519推荐）

在接入API接口时，我们使用非对称加密密钥对（asymmetric key pair）进行安全认证。这种方式的核心是“一对密钥，两把钥匙”：公钥（Public Key）和私钥（Private Key）。它们通过严格的数学关系生成，但设计原则确保**公钥可以安全公开，私钥必须绝对保密**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gmgn.ai/cn/sheng-cheng-gong-yao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
