Skip to content

Repository files navigation

Cryptogram

A decentralized infrastructure for cryptographic identity and document timestamping on Ethereum, enabling secure digital interactions through OpenPGP cryptography.

Products

Cryptogram provides two complementary products for decentralized cryptographic operations:

πŸ” Web3PGP

Decentralized Public Key Infrastructure (PKI)

Web3PGP enables a decentralized public key infrastructure using OpenPGP and Ethereum. It allows:

  • Decentralized Key Registry: Store and retrieve OpenPGP public keys on the blockchain
  • Identity Certification: Establish trust chains by certifying keys on-chain
  • Key Revocation: Revoke compromised or expired keys transparently
  • Transparent Auditing: Immutable record of all key operations via blockchain events
  • Cost Efficiency: Uses event logs for gas-optimized storage instead of contract state

πŸ“– Web3PGP Documentation | βš™οΈ Web3PGP CLI

πŸ“… Web3Sign

Document Timestamping & EDI System

Web3Sign provides decentralized Electronic Data Interchange (EDI) with cryptographic timestamping:

  • Document Timestamping: Create immutable timestamps for any digital document
  • Proof-of-Existence: Cryptographically prove document existence at specific times
  • Certified Copies: Track document provenance with signature workflows
  • Blockchain Verification: Verify document integrity and timestamp authenticity
  • OpenPGP Integration: Leverages Web3PGP keys for cryptographic operations

πŸ“– Web3Sign Documentation | βš™οΈ Web3Sign CLI

Project Structure

This monorepo contains all components of the Cryptogram ecosystem:

cryptogram/
β”œβ”€β”€ contracts/           # Solidity smart contracts (Foundry)
β”‚   β”œβ”€β”€ src/            # Contract source code
β”‚   β”œβ”€β”€ test/           # Contract tests
β”‚   └── scripts/        # Deployment & management scripts
β”œβ”€β”€ clis/               # Command-line interfaces
β”‚   β”œβ”€β”€ web3pgp/        # Web3PGP CLI
β”‚   └── web3sign/       # Web3Sign CLI
β”œβ”€β”€ sdks/               # Software development kits
β”‚   └── typescript/     # TypeScript SDK
β”œβ”€β”€ frontends/          # Web applications
β”‚   β”œβ”€β”€ web3pgp/        # Web3PGP frontend
β”‚   └── timestamp-verification/  # Timestamp verification tool
β”œβ”€β”€ documentation/      # Project documentation
β”‚   β”œβ”€β”€ NETWORKS.md     # Network information
β”‚   └── SETUP.md        # Setup guides
β”œβ”€β”€ examples/           # Usage examples and tutorials
└── scripts/            # Utility scripts

πŸ“š Documentation Links

Quick Start

Prerequisites

  • Node.js 18.x or higher
  • Foundry (for smart contract development)
  • GPG (for cryptographic operations)

Installation

# Clone the repository
git clone https://github.com/cryptogram/cryptogram.git
cd cryptogram

# Install dependencies
npm install

# For contract development
cd contracts && forge install

Basic Usage

# Generate a key and register it
web3pgp blockchain generate-key > key.json
export DEXES_WALLET_PRIVATE_KEY=$(jq -r '.privateKey' key.json)
web3pgp blockchain register --key my-key.asc

# Timestamp a document
web3sign timestamp -e <fingerprint> -H <hash> -s signature.asc

Architecture

Smart Contracts (Ethereum)

  • Web3PGP: Core PKI contract for key registration and management
  • Web3Sign: Timestamping contract for document verification
  • FlatFee: Fee management with access control
  • AccessManager: Role-based access control system

Client Libraries

  • TypeScript SDK: Comprehensive SDK for both Web3PGP and Web3Sign
  • CLIs: Command-line tools for direct interaction
  • Web Frontends: Browser-based interfaces

Key Design Principles

  • Decentralized: No central authority or single point of failure
  • Gas Efficient: Event-based storage for cost optimization
  • Composability: Modular design for integration with other systems
  • OpenPGP Native: Leverages existing cryptographic standards
  • Upgradeable: UUPS proxy pattern for future enhancements

Development

Building

# Build all components
npm run build

# Build contracts
cd contracts && forge build

# Build CLIs
cd clis/web3pgp && npm run build
cd clis/web3sign && npm run build

Testing

# Test contracts
cd contracts && forge test

# Test CLIs
cd clis/web3pgp && npm test
cd clis/web3sign && npm test

# Test SDK
cd sdks/typescript && npm test

Deployment

# Deploy contracts to testnet
cd contracts
forge script script/DeployTestEnvironment.s.sol --rpc-url $SEPOLIA_RPC_URL --broadcast

# Publish CLIs
cd clis/web3pgp && npm publish
cd clis/web3sign && npm publish

Contributing

We welcome contributions to Cryptogram! Here's how to get involved:

Development Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Reporting Issues

Guidelines

  • Follow the existing code style and conventions
  • Write tests for new functionality
  • Update documentation for API changes
  • Ensure all tests pass before submitting PRs

Development Setup

See the Setup Guide for detailed development environment setup.

Security

Cryptogram takes security seriously:

  • Audit Ready: Contracts designed with security best practices
  • OpenPGP Validation: All cryptographic validation performed off-chain
  • Access Control: Role-based permissions for sensitive operations
  • Upgradeable: Secure upgrade mechanisms for bug fixes

For security-related issues, please email security@cryptogram.dev instead of creating public issues.

License

Business Source License 1.1 - see LICENSE file for details.

Community


Cryptogram - Decentralized Cryptography for the Digital Age /home/gbdevw/Projects/cryptogram/README.md

About

DEXES - The Web3 backbone for business processes

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages