ERGO
Time Locks & Access Control
Intermediate
1 hour

Sigma OR Access Control (Either-Or Spend)

Spend if key A OR key B or external condition is satisfied

課題

You need flexible access control where multiple conditions can authorize spending, without revealing which condition was satisfied.

解決策

Sigma Protocol OR compositions allow proving disjunctions (A OR B OR C) without revealing which branch is satisfied. This enables privacy-preserving access control.

仕組み

  1. 1Define multiple valid spending conditions (A, B, C...)
  2. 2Combine with || (OR) operator in ErgoScript
  3. 3Prover satisfies one condition but proof doesn't reveal which
  4. 4Verifier confirms one condition is met without learning which
  5. 5Zero-knowledge property preserved - no information leakage

コード例

{
  // Any of three authorities can spend
  // Observer cannot tell which one signed
  
  val authority1 = PK("9f...")
  val authority2 = PK("9g...")  
  val authority3 = PK("9h...")
  
  // OR composition - ZK proof reveals nothing about signer
  proveDlog(authority1) || proveDlog(authority2) || proveDlog(authority3)
}

Three authorities can spend, but the signature doesn't reveal which one. Native Sigma Protocol feature, not a hash-based trick.

ユースケース

  • Anonymous voting systems
  • Whistleblower protection
  • Multi-authority access control
  • Recovery mechanisms with timeout
  • Confidential transactions
  • Privacy-preserving authentication

セキュリティ考慮事項

  • !OR proofs are computationally sound, not information-theoretic
  • !Ring size affects privacy level (larger = more privacy)
  • !Consider timing attacks in implementation
  • !Avoid reusing keys across different rings

実装事例

ErgoMixer

Non-interactive mixing using Sigma protocols

リソース

手数料の考慮事項

OR proofs are slightly larger than single proofs. Expect ~1.5x standard fees.

ErgoScriptスキルを向上させよう

新しいパターン、チュートリアル、開発者リソースの通知を受け取りましょう。

Follow for daily updates