---
title: "RSA 工具 - 免費線上工具 - AllTools - 全能工具箱"
description: "產生 1024/2048/4096 位 RSA 金鑰對，支援公鑰加密、私鑰解密與簽章驗證，便於 API 加密除錯。AllTools 提供免費線上工具，開啟網頁即可使用，無需安裝或登入，資料在瀏覽器本機處理。"
canonical_url: "https://tool.warmday.wang/zh-Hant/crypto/rsa"
meta:
  author: AllTools
  keywords: "線上工具箱, AllTools, 實用工具, 生活常用, 數學計算, 文字處理, 圖片處理, 開發者工具, PDF 工具, 單位換算, 免費工具, 免登入工具"
  "og:description": "產生 1024/2048/4096 位 RSA 金鑰對，支援公鑰加密、私鑰解密與簽章驗證，便於 API 加密除錯。AllTools 提供免費線上工具，開啟網頁即可使用，無需安裝或登入，資料在瀏覽器本機處理。"
  "og:image": "https://tool.warmday.wang/img/og-cover.png"
  "og:image:alt": "AllTools - 全能工具箱 Logo"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "RSA 工具 - 免費線上工具"
  "twitter:image": "https://tool.warmday.wang/img/og-cover.png"
---

> Index of every page on this site: [llms.txt](https://tool.warmday.wang/llms.txt)

# **RSA 金鑰與加解密**

RSA 非對稱加密工具，支援金鑰產生、公私鑰加解密、數位簽章與驗證。

### **金鑰產生 (Key Generation)**

**私鑰 (Private Key - PEM)**

**公鑰 (Public Key - PEM)**

### **格式轉換 (PEM ↔ Hex)**

## **使用說明**

#### **演算法介紹**

RSA 是一種非對稱加密演算法，廣泛用於安全資料傳輸，其安全性基於大整數分解的數學難題。公鑰（Public Key）：用於加密資料或驗證簽章，可公開分享；私鑰（Private Key）：用於解密資料或產生簽章，必須嚴格保密；加密／解密：以公鑰加密的資料只能用私鑰解密，確保只有持有私鑰的人能讀取資訊；簽章／驗證：以私鑰產生的簽章可用公鑰驗證，證明訊息確實由私鑰持有者送出且未被竄改。

#### **使用步驟**

1\. 金鑰管理：選擇金鑰長度（1024/2048/4096），點擊「產生金鑰對」建立 PEM 格式金鑰；2. 加密／解密：先選擇填充方案（建議 RSA-OAEP，或選 PKCS#1 v1.5 相容），在加密區輸入明文，使用公鑰加密取得 Hex 密文；在解密區輸入 Hex 密文，使用私鑰解密還原明文（加密與解密需使用相同填充方案）；3. 簽章／驗證：選擇雜湊演算法（SHA-1/SHA-256/SHA-384/SHA-512），輸入原文，使用私鑰產生 Hex 簽章；在驗證區輸入原文與 Hex 簽章，使用公鑰驗證簽章有效性（簽章與驗證需使用相同雜湊演算法）。

#### **注意事項**

產生的金鑰預設為 PEM 格式（Base64 編碼的 DER 資料，包含標頭與結尾）；加密結果通常較長，且受金鑰長度限制（無法加密過長的資料），通常會搭配對稱式加密使用（也就是用 RSA 加密對稱金鑰）；1024 位元金鑰已不安全，建議使用 2048 位元以上；本工具完全在瀏覽器端執行，金鑰不會上傳到伺服器；產生 4096 位元金鑰可能耗時較久；PKCS#1 v1.5 填充方案存在已知攻擊（例如 Bleichenbacher 攻擊），僅建議用於相容舊系統，新專案請使用 RSA-OAEP；密文與簽章皆採用 Hex 編碼（非 Base64）。

## **同類工具**

同一個分類下還有這些 · 加密解密

[**MD5 雜湊計算**計算文字與任意檔案的 MD5 32 位摘要，一鍵比對內容差異與校驗檔案完整性，運算在瀏覽器本機完成。](https://tool.warmday.wang/zh-Hant/crypto/md5) [**雜湊計算**雜湊計算工具，支援 MD5、SHA-1、SHA-256、SHA-512 等多種演算法對文字與檔案產生摘要，可一次比對多演算法結果用於校驗。](https://tool.warmday.wang/zh-Hant/crypto/hash) [**Base64 轉換**Base64 編碼解碼工具，支援文字字串與圖片檔案的雙向轉換，正確處理 UTF-8 中文與二進位資料，可產生 Data URL 用於內嵌圖片與 API 傳輸。](https://tool.warmday.wang/zh-Hant/crypto/base64) [**對稱式加密工具箱**整合 AES、DES、3DES、RC4、SM4 等對稱演算法，可自訂金鑰、初始向量與分組模式，適用於 API 資料加密與敏感資訊保護。](https://tool.warmday.wang/zh-Hant/crypto/symmetric) [**PGP 工具**產生 OpenPGP/GnuPG 金鑰對，對文字與檔案加密、解密與簽章，相容 ASCII Armor 輸出。](https://tool.warmday.wang/zh-Hant/crypto/pgp) [**憑證工具**X.509 憑證解析工具，支援 PEM/DER 格式檢視欄位、擴充、OID 與 ASN.1 結構，便於排查憑證鏈、網域比對與有效期限問題。](https://tool.warmday.wang/zh-Hant/crypto/cert)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://tool.warmday.wang/#organization","name":"AllTools","alternateName":"AllTools - 全能工具箱","url":"https://tool.warmday.wang/","logo":{"@type":"ImageObject","url":"https://tool.warmday.wang/img/logo.png","width":512,"height":512}},{"@type":"WebSite","@id":"https://tool.warmday.wang/zh-Hant#website","url":"https://tool.warmday.wang/zh-Hant","name":"AllTools - 全能工具箱","inLanguage":"zh-Hant","publisher":{"@id":"https://tool.warmday.wang/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://tool.warmday.wang/zh-Hant?q={search_term_string}"},"query-input":"required name=search_term_string"}},{"@type":"WebPage","@id":"https://tool.warmday.wang/zh-Hant/crypto/rsa#webpage","url":"https://tool.warmday.wang/zh-Hant/crypto/rsa","isPartOf":{"@id":"https://tool.warmday.wang/zh-Hant#website"},"inLanguage":"zh-Hant","name":"RSA 工具 - 免費線上工具","description":"產生 1024/2048/4096 位 RSA 金鑰對，支援公鑰加密、私鑰解密與簽章驗證，便於 API 加密除錯。AllTools 提供免費線上工具，開啟網頁即可使用，無需安裝或登入，資料在瀏覽器本機處理。"},{"@type":"SoftwareApplication","@id":"https://tool.warmday.wang/zh-Hant/crypto/rsa#app","name":"RSA 工具 - 免費線上工具","description":"產生 1024/2048/4096 位 RSA 金鑰對，支援公鑰加密、私鑰解密與簽章驗證，便於 API 加密除錯。AllTools 提供免費線上工具，開啟網頁即可使用，無需安裝或登入，資料在瀏覽器本機處理。","url":"https://tool.warmday.wang/zh-Hant/crypto/rsa","applicationCategory":"SecurityApplication","operatingSystem":"Web","inLanguage":"zh-Hant","isPartOf":{"@id":"https://tool.warmday.wang/zh-Hant/crypto/rsa#webpage"},"offers":{"@type":"Offer","price":"0","priceCurrency":"CNY"}},{"@type":"BreadcrumbList","@id":"https://tool.warmday.wang/zh-Hant/crypto/rsa#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"首頁","item":"https://tool.warmday.wang/zh-Hant"},{"@type":"ListItem","position":2,"name":"加密解密","item":"https://tool.warmday.wang/zh-Hant/crypto"},{"@type":"ListItem","position":3,"name":"RSA 工具","item":"https://tool.warmday.wang/zh-Hant/crypto/rsa"}]}]}
```

## Sitemap

See the full [sitemap](https://tool.warmday.wang/sitemap.md) for all pages.
