Skip to content

Signether/Whitepaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

DEHR: Decentralized Hash Registry

A Blockchain-Based Document Integrity and Provenance System

Version 1.0
May 2025


Abstract

The Decentralized Hash Registry (DEHR) is a smart contract protocol deployed on the Optimism network that provides immutable, timestamped proof of document existence and ownership. By combining cryptographic hashing with blockchain transparency, DEHR creates a decentralized notarization system that links document integrity to verified registrant identities. This whitepaper outlines the technical architecture, security model, and practical applications of DEHR as a foundational infrastructure for digital document attestation.

1. Introduction

1.1 Problem Statement

Traditional document verification systems suffer from several critical limitations:

  • Centralized Control: Reliance on trusted third parties creates single points of failure
  • Lack of Transparency: Verification processes are often opaque and non-auditable
  • High Costs: Traditional notarization and verification services incur significant fees
  • Limited Accessibility: Geographic and temporal constraints restrict access to verification services
  • Identity Dissociation: Document proofs lack verifiable links to registrant identities

1.2 Solution Overview

DEHR addresses these challenges through a decentralized registry that:

  • Provides immutable proof of existence for any digital document
  • Links registrations to verified registrant identities through wallet registration
  • Operates transparently on public blockchain infrastructure
  • Eliminates intermediaries while maintaining cryptographic security
  • Offers global accessibility with 24/7 availability

2. Technical Architecture

2.1 Core Components

2.1.1 Registrant Management System

DEHR implements a two-tier registration model:

struct Registrant {
    string name;
    uint256 registrationTimestamp;
    bool isActive;
}

mapping(address => Registrant) private registrants;

Wallet Registration Requirements:

  • Unique registrant name (non-empty string)
  • One-time registration per wallet address
  • Immutable association between wallet and registrant identity

2.1.2 Hash Registry Core

The registry maps SHA-256 file hashes to comprehensive registration metadata:

struct Registration {
    address registrant;
    string registrantName;
    string filename;
    uint256 timestamp;
}

mapping(bytes32 => Registration) private registry;

2.2 State Management

DEHR maintains several data structures for efficient querying:

  • Primary Registry: Hash-to-registration mapping
  • User Enumeration: Per-user hash collections for portfolio management
  • Global Enumeration: Complete hash inventory for ecosystem analytics

2.3 Event Architecture

The contract emits structured events for off-chain indexing and real-time monitoring:

event HashRegistered(
    bytes32 indexed fileHash,
    address indexed registrant,
    string indexed registrantName,
    string filename,
    uint256 timestamp
);

event RegistrantRegistered(
    address indexed wallet,
    string indexed registrantName,
    uint256 timestamp
);

3. Security Model

3.1 Access Control

DEHR implements a permissioned registration model where:

  • Only registered wallets can register document hashes
  • Wallet registration is a prerequisite for all hash operations
  • Each wallet maintains a unique, immutable registrant identity

3.2 Attack Vector Mitigation

3.2.1 Reentrancy Protection

All state-changing functions utilize OpenZeppelin's ReentrancyGuard:

function registerHash(
    bytes32 fileHash,
    string calldata filename
) external nonReentrant onlyRegisteredWallet {
    // Protected state changes
}

3.2.2 Input Validation

Comprehensive validation prevents malformed registrations:

  • Hash Validation: Rejects zero hashes (bytes32(0))
  • Filename Validation: Requires non-empty filename strings
  • Duplicate Prevention: Blocks re-registration of existing hashes
  • Name Validation: Ensures registrant names are non-empty

3.2.3 Immutability Guarantees

Once registered, hash-to-registrant associations are permanent and cannot be modified, ensuring data integrity over time.

4. Operational Workflows

4.1 Registrant Onboarding

sequenceDiagram
    participant User as User Wallet
    participant DEHR as DEHR Contract
    
    User->>DEHR: registerWallet("John Doe")
    DEHR->>DEHR: Validate name & wallet status
    DEHR->>DEHR: Store registrant mapping
    DEHR->>User: Emit RegistrantRegistered event
Loading

4.2 Document Hash Registration

sequenceDiagram
    participant User as Registered User
    participant DEHR as DEHR Contract
    
    User->>User: Generate SHA-256 hash off-chain
    User->>DEHR: registerHash(hash, "document.pdf")
    DEHR->>DEHR: Verify wallet registration
    DEHR->>DEHR: Validate hash uniqueness
    DEHR->>DEHR: Store registration with timestamp
    DEHR->>User: Emit HashRegistered event
Loading

4.3 Verification Process

sequenceDiagram
    participant Verifier as Anyone
    participant DEHR as DEHR Contract
    
    Verifier->>DEHR: isRegistered(hash)
    DEHR->>Verifier: Returns boolean
    Verifier->>DEHR: getRegistration(hash)
    DEHR->>Verifier: Returns (registrant, name, filename, timestamp)
Loading

5. Gas Optimization

5.1 Optimism Layer 2 Benefits

Deployment on Optimism provides:

  • Reduced Gas Costs: ~10-100x lower than Ethereum mainnet
  • Faster Confirmations: Sub-second transaction finality
  • Ethereum Security: Inherits Ethereum's battle-tested security model

5.2 Efficient Data Structures

  • Packed Structs: Optimized storage layout minimizes storage slots
  • Minimal State Changes: Single storage write per registration
  • Event-Driven Architecture: Heavy data stored in events, not state

6. Integration Patterns

6.1 Frontend Integration (Signether)

DEHR integrates seamlessly with the Signether web application:

// Wallet registration
await dehrContract.registerWallet(registrantName);

// Hash registration
const fileHash = await generateSHA256(file);
await dehrContract.registerHash(fileHash, file.name);

// Verification
const registration = await dehrContract.getRegistration(fileHash);

6.2 API Integration

Standard Web3 libraries provide direct contract interaction:

const { ethers } = require('ethers');

const provider = new ethers.providers.JsonRpcProvider('https://mainnet.optimism.io');
const contract = new ethers.Contract(contractAddress, abi, provider);

// Query operations
const isRegistered = await contract.isRegistered(fileHash);
const registration = await contract.getRegistration(fileHash);

7. Economic Model

7.1 Cost Structure

DEHR operates on a pay-per-use model with transparent pricing:

  • Wallet Registration: ~$0.01-0.10 USD (one-time)
  • Hash Registration: ~$0.001-0.01 USD per document
  • Verification: Free (read operations)

7.2 Value Proposition

  • Cost Efficiency: 99%+ cost reduction vs. traditional notarization
  • Global Scale: No geographic limitations or business hours
  • Permanent Availability: 24/7 verification capability
  • Cryptographic Integrity: Mathematical proof of document authenticity

8. Use Cases

8.1 Legal Documentation

  • Contract Execution: Timestamped proof of agreement versions
  • Intellectual Property: Prior art establishment for patents/copyrights
  • Compliance Records: Regulatory filing verification

8.2 Academic & Research

  • Thesis Defense: Submission timestamp verification
  • Research Data: Dataset integrity and provenance tracking
  • Publication Priority: Establish research priority claims

8.3 Business Operations

  • Version Control: Document revision tracking
  • Audit Trails: Compliance documentation
  • Supply Chain: Certificate of authenticity verification

8.4 Personal Documentation

  • Identity Documents: Backup verification for important papers
  • Medical Records: Health document integrity
  • Financial Records: Tax document verification

9. Security Considerations

9.1 Threat Model

Mitigated Threats:

  • Document tampering (cryptographic hashing)
  • Registration forgery (wallet-based authentication)
  • Timestamp manipulation (blockchain consensus)
  • Centralized censorship (decentralized infrastructure)

Residual Risks:

  • Private key compromise (user responsibility)
  • Off-chain document availability (orthogonal concern)
  • Quantum computing (future cryptographic concern)

9.2 Best Practices

  • Key Management: Users must secure private keys properly
  • Hash Verification: Always verify document hashes before registration
  • Network Verification: Confirm correct Optimism network connection
  • Backup Storage: Maintain secure document copies independently

10. Future Developments

10.1 Protocol Enhancements

  • Multi-Hash Support: SHA-3, BLAKE2 algorithm compatibility
  • Batch Registration: Gas-efficient bulk document processing
  • Metadata Extensions: Enhanced document categorization
  • Cross-Chain Compatibility: Multi-network registration support

10.2 Ecosystem Integration

  • IPFS Integration: Decentralized document storage linking
  • ENS Support: Human-readable registrant naming
  • Oracle Integration: Real-world event triggering
  • Layer 3 Deployment: Application-specific blockchain optimization

11. Conclusion

The Decentralized Hash Registry represents a paradigm shift toward trustless document verification infrastructure. By combining cryptographic integrity with blockchain transparency, DEHR creates a globally accessible, cost-effective alternative to traditional notarization services.

The protocol's dual-registration model (wallets + hashes) provides verifiable identity linkage while maintaining user privacy and system security. Deployment on Optimism ensures economic viability while preserving the security guarantees of Ethereum's consensus mechanism.

As digital transformation accelerates across industries, DEHR provides the foundational infrastructure for next-generation document attestation systems, enabling new business models built on cryptographic proof rather than institutional trust.


Technical Specifications

Contract Address: TBD (Optimism Mainnet)
Compiler Version: Solidity ^0.8.28
Dependencies: OpenZeppelin Contracts v5.0+
Network: Optimism (Layer 2)
License: MIT

References

  1. Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System
  2. Buterin, V. (2014). Ethereum Whitepaper
  3. Optimism Collective. (2021). Optimistic Rollup Protocol Specification
  4. OpenZeppelin. (2024). Smart Contract Security Patterns
  5. NIST. (2015). SHA-256 Cryptographic Hash Algorithm Standard

For technical support and implementation guidance, visit the Signether Documentation or contact the development team.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks