Skip to content

Latest commit

 

History

History
195 lines (141 loc) · 6.94 KB

File metadata and controls

195 lines (141 loc) · 6.94 KB

RootlessNet Protocol

A rootless, ownerless substrate for human expression

Tests TypeScript License

Overview

RootlessNet is a decentralized communication protocol designed for censorship-resistant expression. This repository contains the complete TypeScript implementation of the protocol, including cryptographic primitives, identity management, content handling, and end-to-end encrypted messaging.

Features

  • 🔐 End-to-End Encryption - All content and messages are encrypted by default
  • 🆔 Self-Sovereign Identity - Users own their cryptographic identity (DID-based)
  • 📝 Content Addressing - Immutable content with CID-based addressing
  • 💬 Forward-Secret Messaging - Signal protocol (X3DH + Double Ratchet)
  • 🌐 Decentralized - No central authority or single point of failure
  • 🔓 Open Source - Fully transparent and auditable

Quick Start

Installation

# Using bun (recommended)
bun install

# Run tests
bun test

# Build all packages
bun run build

Usage

import { RootlessNet } from '@rootlessnet/sdk';

// Create a new client
const client = new RootlessNet();

// Create your identity
const identity = await client.createIdentity();
console.log('Your DID:', identity.did);

// Post content
const post = await client.post('Hello, RootlessNet!');

// Verify content authenticity
const isValid = await client.verifyContent(post);

Packages

Package Description Version
@rootlessnet/crypto Cryptographic primitives (Ed25519, X25519, XChaCha20-Poly1305, BLAKE3) 2.0.0
@rootlessnet/identity Identity creation, verification, and management 2.0.0
@rootlessnet/content Content creation, signing, and verification 2.0.0
@rootlessnet/messaging E2E encrypted messaging (X3DH, Double Ratchet) 2.0.0
@rootlessnet/sdk Complete SDK combining all packages 2.0.0

Documentation

Document Description
CONTEXT.md Complete protocol specification and philosophy
docs/PROTOCOL_SPEC.md Comprehensive protocol specification
docs/CRYPTO_SPEC.md Cryptographic implementation requirements
docs/SECURITY.md Security model and threat analysis
docs/ARCHITECTURE.md Technical architecture details
docs/DEVELOPER_GUIDE.md Developer getting started guide
docs/FAQ.md Frequently asked questions

Architecture

┌─────────────────────────────────────────────────┐
│                  Application                     │
├─────────────────────────────────────────────────┤
│                   SDK Layer                      │
│  ┌──────────┬──────────┬──────────┬──────────┐ │
│  │ Identity │ Content  │Messaging │  Zones   │ │
│  └──────────┴──────────┴──────────┴──────────┘ │
├─────────────────────────────────────────────────┤
│              Cryptographic Layer                 │
│  ┌──────────────────────────────────────────┐  │
│  │  Ed25519 │ X25519 │ XChaCha20-Poly1305  │  │
│  │  BLAKE3  │  HKDF  │   CID/DID Support   │  │
│  └──────────────────────────────────────────┘  │
├─────────────────────────────────────────────────┤
│              Network/Transport                   │
│         (P2P, DHT, mDNS, WebRTC)                │
└─────────────────────────────────────────────────┘

Security

RootlessNet implements state-of-the-art cryptographic protocols:

  • Signatures: Ed25519 (128-bit security)
  • Key Exchange: X25519 ECDH
  • Encryption: XChaCha20-Poly1305 AEAD
  • Hashing: BLAKE3
  • Key Derivation: HKDF-SHA256
  • Password KDF: Argon2id-like construction
  • Messaging: Signal Protocol (X3DH + Double Ratchet)

All cryptographic operations use constant-time implementations to prevent timing attacks.

Testing

# Run all tests
bun test

# Run tests for specific package
cd packages/crypto && bun test
cd packages/sdk && bun test

Test Results: ✅ 31 tests passing, 51 assertions

Development

Prerequisites

  • Bun >= 1.0
  • TypeScript >= 5.6

Project Structure

RootlessNet/
├── packages/
│   ├── crypto/          # Core cryptographic primitives
│   ├── identity/        # Identity management
│   ├── content/         # Content protocol
│   ├── messaging/       # E2E encrypted messaging
│   └── sdk/             # Complete SDK
├── docs/                # Documentation
├── package.json         # Root workspace config
└── tsconfig.json        # TypeScript configuration

Building

# Install dependencies
bun install

# Build all packages
bun run build

# Type check
bun run typecheck

# Lint
bun run lint

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Governance

This project follows a community-driven governance model. See GOVERNANCE.md for details.

License

MIT License - see LICENSE for details.

Links

Acknowledgments

Built with modern cryptographic libraries:


Status: ✅ Protocol v2.0.0 - Implementation Complete

A protocol for the people, by the people.