Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
legion — Legion 是一个为隐私而构建的零知识认证结构 | Kitploit
工具/GitHubGitHub/deadends/legion
Web安全密码学隐私保护硬件安全身份与访问管理 (IAM)身份验证
GitHubdeadends/legion

legion

Legion 是一个为隐私而构建的零知识认证结构

查看仓库
10520年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Legion ZK Auth 🛡️

真正的零知识认证,采用硬件绑定的设备环签名

License: MIT Rust Security Version

🎯 Legion 是什么?

Legion 是一个零知识认证系统,它能在不泄露你的身份的情况下证明你已获得授权。 你基于公开数据证明某些事情,而不会将你当前的操作关联回你的公开地址。

核心特性

  • ✅ 真正的零知识:服务器永远不会知道你的身份(100 万用户中的 1 个)
  • ✅ 设备匿名性:通过环签名实现硬件绑定(1000 台设备中的 1 台)
  • ✅ 无需可信设置:Halo2 PLONK(透明设置)
  • ✅ 硬件安全:WebAuthn TPM/Secure Enclave 绑定
  • ✅ 重放保护:Nullifier + 时间戳
  • ✅ 会话安全:可链接性标签防止盗用
  • ✅ 速率限制:每小时 5 次尝试(通用错误防止枚举)
  • ✅ 设备吊销:即时封禁被盗设备
  • ✅ 开箱即用:包含 Docker、systemd、监控

🔒 安全保证(v1.1.0)

属性保证
用户匿名性2^20 中的 1(1,048,576)
设备匿名性2^10 中的 1(1,024)
可靠性误差2^-128
证明系统Halo2 PLONK
密码哈希Argon2id
硬件绑定WebAuthn Level 2
速率限制每小时 5 次尝试
设备吊销即时黑名单

🚀 快速开始(一条命令!)

前置条件

  • Docker(包含 Docker Compose)

安装并运行

# Clone and run
git clone https://github.com/deadends/legion.git
cd legion

# Linux/macOS
chmod +x install.sh && ./install.sh

# Windows
install.bat

就这样! 在浏览器中打开 http://localhost。

安装内容

  • ✅ Redis(会话存储)
  • ✅ Legion Server(ZK 证明验证器)
  • ✅ 前端(WASM 客户端)
  • ✅ Nginx(反向代理)

性能:注册约 10 秒,认证约 4 分钟(k=16 证明生成)


手动设置(不使用 Docker)

点击展开手动安装
# 1. Install Redis
# macOS: brew install redis && redis-server
# Ubuntu: sudo apt install redis && redis-server
# Windows: https://redis.io/docs/install/install-redis/install-redis-on-windows/

# 2. Run server (terminal 1)
cd legion-server
cargo run --release --features redis

# 3. Build frontend (terminal 2)
cd wasm-client
wasm-pack build --target web --release
python3 -m http.server 8000

# 4. Open http://localhost:8000

对于生产环境部署,请参阅 DEPLOYMENT.md

📊 性能

安全级别k证明时间证明大小使用场景
测试12~10秒2.5 KB开发
标准14~60秒3.0 KB预发布
生产16~4分钟3.5 KB推荐
高安全18~15分钟4.0 KB企业

🏗️ 架构

📖 有关包含加密细节的详细分步身份验证流程,请参阅 ARCHITECTURE_FLOW.md

系统组件

┌──────────────────────────────────────────────────────────────────────────┐
│                            CLIENT (Browser)                              │
├──────────────────────────────────────────────────────────────────────────┤
│  ┌────────────────┐  ┌─────────────────┐  ┌──────────────────────────┐   │
│  │  UI Layer      │  │  WASM Module    │  │  Hardware Security       │   │
│  │  (Vanilla JS)  │  │  (Rust→WASM)    │  │  (WebAuthn Level 2)      │   │
│  ├────────────────┤  ├─────────────────┤  ├──────────────────────────┤   │
│  │ • Registration │  │ • Blake3 Hash   │  │ • TPM 2.0                │   │
│  │ • Login Form   │  │ • Argon2id KDF  │  │ • Secure Enclave         │   │
│  │ • Session UI   │  │ • Halo2 Prover  │  │ • FIDO2 Authenticator    │   │
│  │ • Error Handle │  │ • Merkle Proof  │  │ • Device Private Key     │   │
│  └────────────────┘  └─────────────────┘  └──────────────────────────┘   │
└────────────────────────────────┬─────────────────────────────────────────┘
                                 │ HTTPS/TLS 1.3
                                 │ (Encrypted Channel)
                                 ▼
┌──────────────────────────────────────────────────────────────────────────┐
│                         REVERSE PROXY (Nginx)                            │
├──────────────────────────────────────────────────────────────────────────┤
│  • TLS Termination          • Rate Limiting (100 req/min)                │
│  • Load Balancing           • Request Logging                            │
│  • Static File Serving      • Security Headers (CSP, HSTS)               │
└────────────────────────────────┬─────────────────────────────────────────┘
                                 │ HTTP (Internal Network)
                                 ▼
┌──────────────────────────────────────────────────────────────────────────┐
│                    LEGION SERVER (Rust/Axum)                             │
├──────────────────────────────────────────────────────────────────────────┤
│  ┌─────────────────────────────────────────────────────────────────┐     │
│  │                      API Layer (Axum)                           │     │
│  ├─────────────────────────────────────────────────────────────────┤     │
│  │ POST /register        │ POST /auth/challenge │ POST /auth/verify│     │
│  │ POST /auth/session    │ GET  /health         │ POST /logout     │     │
│  └─────────────────────────────────────────────────────────────────┘     │
│                                   │                                      │
│  ┌─────────────────────────────────────────────────────────────────┐     │
│  │                   Business Logic Layer                          │     │
│  ├─────────────────────────────────────────────────────────────────┤     │
│  │ • Credential Manager    │ • Challenge Generator (32-byte random)│     │
│  │ • Merkle Tree Builder   │ • Nullifier Tracker (replay protection)│    │
│  │ • ZK Proof Verifier     │ • Session Manager (linkability tags)  │     │
│  │ • Device Tree Manager   │ • Timestamp Validator (±5min window)  │     │
│  └─────────────────────────────────────────────────────────────────┘     │
│                                   │                                      │
│  ┌─────────────────────────────────────────────────────────────────┐     │
│  │                   Cryptographic Layer                           │     │
│  ├─────────────────────────────────────────────────────────────────┤     │
│  │ • Halo2 Verifier (PLONK) │ • Poseidon Hash (ZK-friendly)        │     │
│  │ • Blake3 (credential hash)│ • Argon2id (password KDF)           │     │
│  │ • Merkle Tree (2^20 users)│ • Device Tree (2^10 devices/user)   │     │
│  └─────────────────────────────────────────────────────────────────┘     │
└────────────────────────┬──────────────────────┬──────────────────────────┘
                         │                      │
                         ▼                      ▼
        ┌────────────────────────┐  ┌───────────────────────────┐
        │   Redis (In-Memory)    │  │  RocksDB (Persistent)     │
        ├────────────────────────┤  ├───────────────────────────┤
        │ • Session Tokens       │  │ • User Credentials        │
        │ • Linkability Tags     │  │ • Merkle Tree Nodes       │
        │ • Active Challenges    │  │ • Device Trees            │
        │ • Nullifier Cache      │  │ • Nullifier History       │
        │ TTL: 1 hour            │  │ Persistent Storage        │
        └────────────────────────┘  └───────────────────────────┘

认证流程(简化版)

下载工具