Skip to content

🎉 ResQrypt v0.1.0 - 首次發布

Choose a tag to compare

@CXPhoenix CXPhoenix released this 01 Feb 11:15
· 1 commit to main since this release

Note

🔐 安全的檔案/目錄加密工具,結合 AES-256-GCM 認證加密、Argon2id 密鑰派生、zstd 智慧壓縮


✨ 功能亮點

🔒 安全加密

  • AES-256-GCM 認證加密 - 業界標準的對稱加密演算法
  • Argon2id 密鑰派生 - 抗暴力破解的記憶體硬函數
  • 可調整 KDF 參數(記憶體、迭代次數、平行度)

📦 智慧壓縮

  • zstd 高效壓縮,壓縮率可達 90%+
  • 🧠 智慧偵測:已壓縮的 zstd 檔案不會重複壓縮

📁 支援檔案與目錄

  • 單一檔案加密
  • 整個目錄打包加密(使用 tar 封存)

🖥️ 跨平台支援

  • Linux (x86_64, x86_64-musl, aarch64)
  • macOS (x86_64, Apple Silicon)
  • Windows (x86_64)

🐳 Docker 支援

  • Multi-arch image (amd64/arm64)
  • 可從 ghcr.io 取得

📥 安裝方式

從 Release 下載

# macOS (Apple Silicon)
curl -LO [https://github.com/cxphoenix/resqrypt/releases/download/v0.1.0/resqrypt-v0.1.0-aarch64-apple-darwin.tar.gz](https://github.com/cxphoenix/resqrypt/releases/download/v0.1.0/resqrypt-v0.1.0-aarch64-apple-darwin.tar.gz)
tar -xzf resqrypt-v0.1.0-aarch64-apple-darwin.tar.gz
sudo mv resqrypt /usr/local/bin/
# Linux (x86_64)
curl -LO [https://github.com/cxphoenix/resqrypt/releases/download/v0.1.0/resqrypt-v0.1.0-x86_64-unknown-linux-gnu.tar.gz](https://github.com/cxphoenix/resqrypt/releases/download/v0.1.0/resqrypt-v0.1.0-x86_64-unknown-linux-gnu.tar.gz)
tar -xzf resqrypt-v0.1.0-x86_64-unknown-linux-gnu.tar.gz
sudo mv resqrypt /usr/local/bin/

從原始碼編譯

cargo install --git [https://github.com/cxphoenix/resqrypt](https://github.com/cxphoenix/resqrypt) --tag v0.1.0

Docker

docker pull ghcr.io/cxphoenix/resqrypt:v0.1.0
docker run --rm -v $(pwd):/data ghcr.io/cxphoenix/resqrypt:v0.1.0 encrypt -i /data/secret.txt -o /data/secret.resqrypt

🚀 快速開始

加密檔案

resqrypt encrypt -i secret.txt -o secret.resqrypt
# 會提示輸入密碼

# 使用環境變數設定密碼(適合腳本)
RESQRYPT_PASSWORD="mypassword" resqrypt encrypt -i secret.txt -o secret.resqrypt

解密檔案

resqrypt decrypt -i secret.resqrypt -o secret.txt

加密整個目錄

resqrypt encrypt -i ./my-secrets/ -o backup.resqrypt
resqrypt decrypt -i backup.resqrypt -o ./restored/

高安全性參數

resqrypt encrypt -i secret.txt -o secret.resqrypt \
    --argon2-memory 128 \
    --argon2-iterations 5

📊 檔案格式

欄位 大小 說明
Magic 8 bytes RESQRYPT
Version 1 byte 0x01
Flags 1 byte 壓縮/目錄標記
KDF Params 12 bytes Argon2id 參數
Salt 32 bytes 隨機 salt
Nonce 12 bytes AES-GCM nonce
Encrypted Data 可變 payload + 16-byte auth tag

🔧 CLI 參數

參數 預設值 說明
--argon2-memory 64 MB Argon2id 記憶體成本
--argon2-iterations 3 Argon2id 迭代次數
--argon2-parallelism 4 Argon2id 平行度
-v, --verbose - 顯示詳細處理資訊

📜 授權

本專案採用 Ⓒ Educational Community License v2.0 (ECL-2.0)


🙏 致謝

感謝以下開源專案:


Full Changelog: https://github.com/CXPhoenix/ResQrypt/commits/v0.1.0