Chuyển đến nội dung
Skillpedia
Bảo mật35k · #8140

implementing-zero-knowledge-proof-for-authentication

Skill này làm gì

Công cụ này cho phép bạn chứng minh mình biết một mật khẩu hoặc bí mật mà không thực sự đưa nó ra. Giống như dùng một chìa khóa bí mật để chứng minh bạn là ai, mà không bao giờ phải trao chìa khóa đó.

Khi nào nên dùng

  • ✓Khi tạo hệ thống đăng nhập không dùng mật khẩu.
  • ✓Khi máy chủ cần xác nhận danh tính của bạn mà không biết bí mật của bạn.
  • ✓Khi xây dựng hệ thống bảo mật nâng cao hơn.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-zero-knowledge-proof-for-authentication/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-zero-knowledge-proof-for-authentication/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn đăng nhập bằng chứng minh không tiết lộ kiến thức (zero-knowledge proof).”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn cung cấp một bí mật (như mật khẩu) để công cụ tạo ra một bằng chứng. Bằng chứng này được gửi đến máy chủ, máy chủ xác minh nó mà không bao giờ thấy bí mật gốc của bạn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Implementing Zero-Knowledge Proof for Authentication

Overview

Zero-Knowledge Proofs (ZKPs) allow a prover to demonstrate knowledge of a secret (such as a password or private key) without revealing the secret itself. This skill implements the Schnorr identification protocol and a simplified ZKPP (Zero-Knowledge Password Proof) using the discrete logarithm problem, enabling authentication where the server never learns the user's password.

When to Use

  • When deploying or configuring implementing zero knowledge proof for authentication capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Familiarity with cryptography concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Objectives

  • Implement Schnorr's identification protocol for ZKP authentication
  • Build a non-interactive ZKP using Fiat-Shamir heuristic
  • Implement zero-knowledge password proof (ZKPP)
  • Demonstrate completeness, soundness, and zero-knowledge properties
  • Compare ZKP authentication with traditional password verification

Key Concepts

ZKP Properties

Property Description
Completeness Honest prover always convinces honest verifier
Soundness Dishonest prover cannot convince verifier (except negligible probability)
Zero-Knowledge Verifier learns nothing beyond the statement's truth

Schnorr Protocol

  1. Setup: Public generator g, prime p, q (order of g)
  2. Registration: Prover computes y = g^x mod p (public key from secret x)
  3. Commitment: Prover sends t = g^r mod p (random r)
  4. Challenge: Verifier sends random c
  5. Response: Prover sends s = r + c*x mod q
  6. Verify: Check g^s == t * y^c mod p

Security Considerations

  • Use cryptographically secure random number generators
  • Challenge must be unpredictable (from verifier's perspective)
  • For non-interactive proofs, use Fiat-Shamir with collision-resistant hash
  • ZKP alone does not provide forward secrecy; combine with TLS

Validation Criteria

  • Honest prover always verifies successfully (completeness)
  • Random response without secret does not verify (soundness)
  • Server never receives the secret value
  • Non-interactive proof is verifiable offline
  • Multiple authentications produce different transcripts
  • Protocol resists replay attacks
Câu hỏi thường gặp

Zero-Knowledge Proof là gì?

Đó là cách chứng minh bạn biết một điều gì đó (như mật khẩu) mà không tiết lộ thông tin đó cho bên xác minh.

Lợi ích là gì?

Lợi ích chính là bảo mật: bí mật của bạn không bao giờ bị lộ, ngay cả khi máy chủ bị xâm nhập.

Tôi có cần kiến thức nâng cao để dùng công cụ này không?

Công cụ đơn giản hóa quy trình, nhưng nên có hiểu biết cơ bản về mật mã để hiểu cách nó hoạt động.

Chi tiết

Mô tả gốc của tác giả

Implements the Schnorr identification protocol and a simplified Zero-Knowledge Password Proof (ZKPP) over the discrete logarithm problem, letting a prover authenticate by demonstrating knowledge of a secret without ever revealing it to the server. Use when designing or building password-less or password-secret-free authentication, or when a server must verify a user's credential without learning o

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8140
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự