Skip to content

Gutslabs/blockmsg-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

blockmsg

blockmsg logo

End-to-end encrypted messaging powered by Fully Homomorphic Encryption (FHE)

App β€’ Documentation β€’ Twitter β€’ Powered by Zama


πŸ” What is blockmsg?

blockmsg is the first fully homomorphic encrypted (FHE) messaging platform built on blockchain. Your messages are encrypted end-to-end, and not even our servers can read them – because we literally have no servers storing your data.

Unlike apps that say "we don't read your messages," blockmsg is mathematically designed so that reading your messages is impossible.


✨ Features

Feature Description
πŸ” FHE Encryption Messages encrypted in your browser using Fully Homomorphic Encryption before being stored on-chain
πŸ’₯ Self-Destruct Messages Set messages to auto-delete after a set time – guaranteed by smart contract
πŸ‘› Wallet Identity No phone numbers or emails – just connect your wallet and start messaging
πŸ›‘οΈ Zero Access We have no servers, no database, no access to your messages
⛓️ On-Chain Storage All messages stored on the Ethereum Sepolia blockchain
πŸ”’ Permissionless No one can ban you or censor your messages

πŸ“Š How It Compares

Feature Web2 (WhatsApp, Telegram) Standard Web3 blockmsg (FHE)
Message Privacy ❌ Company can read ❌ Everyone can read on-chain βœ… Only sender & recipient
Encryption Server-side (breakable) None (plaintext) Fully Homomorphic (unbreakable)
Data Storage Centralized servers Decentralized but public Decentralized & encrypted
Censorship Platform can ban you Permissionless Permissionless
Self-Destruct Server-dependent Not possible βœ… On-chain guaranteed
Government Access βœ… Backdoors possible βœ… Public chain explorer ❌ Cryptographically impossible

πŸ—οΈ Architecture

Encryption Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               SENDER                       β”‚
β”‚                                            β”‚
β”‚  Plaintext ───▢ FHE Encrypt (in browser)   β”‚
β”‚  "Hello!"                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚ Encrypted
                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              BLOCKCHAIN                    β”‚
β”‚                                            β”‚
β”‚  [0x3f8a...] [0x9c2b...] [0x1d4e...]      β”‚
β”‚                                            β”‚
β”‚  β€’ Everyone can see this data              β”‚
β”‚  β€’ NO ONE can read it without wallet key   β”‚
β”‚  β€’ Protected by FHE encryption             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        RECIPIENT (wallet signature)        β”‚
β”‚                                            β”‚
β”‚  Ciphertext ──▢ Decrypt ──▢ "Hello!"       β”‚
β”‚                                            β”‚
β”‚  Only possible with recipient's wallet key β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Self-Destruct Flow

sequenceDiagram
    participant Sender
    participant Contract
    participant Recipient
    
    Sender->>Contract: Send encrypted message + expiry time
    Contract->>Contract: Store message with expiry timestamp
    Recipient->>Contract: Request message decryption
    Contract->>Contract: Check if expired
    alt Not Expired
        Contract->>Recipient: Return encrypted data
        Recipient->>Recipient: Decrypt message
    else Expired
        Contract->>Recipient: Return empty (destructed)
    end
Loading

πŸ” Who Can Read Your Messages?

Actor Access Level
πŸ” Block Explorers ❌ See only encrypted gibberish
⛏️ Miners / Validators ❌ See only encrypted gibberish
πŸ‘¨β€πŸ’» blockmsg Team ❌ Zero access - no keys, no servers
πŸ›οΈ Governments ❌ Cryptographically impossible
πŸ“€ You (Sender) βœ… Full access with your wallet
πŸ“₯ Recipient βœ… Full access with their wallet

πŸ—„οΈ Zero-Database Architecture

blockmsg has NO backend database. Your data lives in two places only:

1. Your Browser (localStorage)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           YOUR BROWSER ONLY             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β€’ Decrypted messages (after reveal)    β”‚
β”‚  β€’ Contact nicknames                    β”‚
β”‚  β€’ Read/unread status                   β”‚
β”‚  β€’ DM preferences (allow/block lists)   β”‚
β”‚  β€’ Transaction history cache            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         ⬆️ Only YOU can access this
         ❌ We have ZERO access
         ❌ No server stores this

2. Blockchain (FHE Encrypted)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           ETHEREUM BLOCKCHAIN           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β€’ Encrypted message content (FHE)      β”‚
β”‚  β€’ Sender/recipient addresses           β”‚
β”‚  β€’ Timestamps                           β”‚
β”‚  β€’ Self-destruct expiry times           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         πŸ‘€ Anyone can see this data
         πŸ”’ NO ONE can read it (encrypted)
         βœ… Only sender & recipient can decrypt

What This Means

Data Type Storage Who Can Access
Your preferences Your browser Only you
Decrypted messages Your browser Only you
Encrypted messages Blockchain No one (until decrypted)
Contact names Your browser Only you

⚠️ Important: If you clear your browser data, your local preferences are lost forever. We cannot recover them because we never had them.


πŸ› οΈ Tech Stack

Technology Purpose
fhEVM by Zama Fully Homomorphic Encryption virtual machine
Solidity Smart contracts for encrypted message management
Next.js Frontend application framework
fhevmjs Client-side FHE encryption library
RainbowKit Wallet connection and management
Tailwind CSS Utility-first styling

πŸš€ Quick Start

Prerequisites

  • Node.js (v18 or higher)
  • pnpm package manager
  • MetaMask browser extension

Installation

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

# Initialize submodules
git submodule update --init --recursive

# Install dependencies
pnpm install

Development

# Start the development server
pnpm start

Visit http://localhost:3000 in your browser.

Production Deployment

Set the following environment variables:

NEXT_PUBLIC_ALCHEMY_API_KEY=your_alchemy_key
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=your_walletconnect_id  # optional

πŸ“ Project Structure

blockmsg/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ fhevm-hardhat-template/    # Smart contracts & deployment
β”‚   β”œβ”€β”€ fhevm-sdk/                 # FHEVM SDK package
β”‚   └── nextjs/                    # React frontend application
β”œβ”€β”€ docs/                          # Mintlify documentation
└── scripts/                       # Build and deployment scripts

πŸ“š Documentation

Full documentation available at docs.blockmsg.xyz


πŸ”— Links

Resource Link
🌐 Live App blockmsg.xyz
πŸ“– Documentation docs.blockmsg.xyz
🐦 Twitter @Gutslab
πŸ”’ Zama FHE zama.ai
πŸ“„ fhEVM Docs docs.zama.ai

πŸ† Built With

Zama

Powered by Zama – Fully Homomorphic Encryption for Web3


⚠️ Disclaimer

This software is experimental and unaudited. The smart contracts have NOT been formally audited by a third-party security firm. Use at your own risk.

By using blockmsg, you acknowledge that:

  • Smart contracts may contain bugs or vulnerabilities
  • You are solely responsible for your wallet security
  • This is beta software deployed on testnet (Sepolia)
  • No guarantees are made regarding the security or reliability of the protocol

πŸ“„ License

This project is licensed under the BSD-3-Clause-Clear License. See the LICENSE file for details.


πŸ” Your messages. Your keys. Your privacy.