obscura
Obscura - Privacy-Preserving Smart Contract ImplementationThis module contains the main implementation of the Obscura privacy-preserving smart contract for Starknet. The contract enables private transactions using zero-knowledge proofs and Merkle trees, allowing users to transfer tokens without revealing transaction details. ## OverviewThe Obscura contract implements a privacy-preserving transaction system that provides: - Private Deposits: Users can deposit tokens without revealing their identity - Private Withdrawals: Users can withdraw tokens to specific addresses - Private Transfers: Internal transfers between users remain completely private - Zero-Knowledge Proofs: Cryptographic proofs ensure transaction validity - Merkle Tree Management: Efficient commitment storage and verification ## ArchitectureThe contract uses several key cryptographic primitives: - Commitments: Cryptographic commitments to transaction outputs - Nullifiers: One-time use values that prevent double-spending - Merkle Trees: Efficient storage and verification of commitments - Zero-Knowledge Proofs: Prove transaction validity without revealing details ## Security ModelThe system maintains privacy through: - Cryptographic commitments that hide transaction amounts - Nullifiers that prevent double-spending without revealing inputs - Zero-knowledge proofs that validate transactions cryptographically - Encrypted outputs that only recipients can decrypt ## Usage FlowRegistration: Users register their public key for encrypted communication 2. Deposits: Users deposit tokens and receive commitments 3. Transfers: Users transfer tokens privately using zero-knowledge proofs 4. Withdrawals: Users withdraw tokens to external addresses ## DependenciesThe contract integrates with: - OpenZeppelin Cairo contracts for access control - External zero-knowledge proof verifier - STRK token contract for token transfers
Fully qualified path: obscura::obscura