🔬
DMTP Docs
  • About DMTP
    • The problems DMTP solves
    • About DMTP Token
    • $DMTP Allocation
    • $DMTP Staking
    • Governance
    • DMTP Protocol
    • DMTP Product
  • How-to-use
    • Guidance
      • Linking Wallet
      • Group chats
      • Chat
  • DMTP System
    • Generation of DMTP key pairs
    • Encryption & Decryption
      • Peer to Peer
        • Pattern α : Bob and Alice have already done the initial DMTP setup.
        • Pattern β : Bob hasn't done the initial DMTP setup
      • Public Unlimited
      • Public Limited
      • Private Group
    • Message data storage
    • Cryptographic algorithm
    • Wide-compatibility
  • Builders Guides
    • 📎SDK Quick Start
    • How to get DMTP API Key
Powered by GitBook
On this page
  1. DMTP System
  2. Encryption & Decryption

Public Limited

PreviousPublic UnlimitedNextPrivate Group

Last updated 2 years ago

This chat is open and anyone can search and find it but only who limited people like designated NFT holder can join.

Encryption & Decryption

In the public limited chat, users encrypt their messages with shared key of the group. Every time when the group member is changed, we re-generate new shard key and distribute it to all participants using DHKE. In case of the user leave or banned the group, the user has the shared key up to that point and can see the message, but after that point the key is changed and the message cannot be seen.

What's happening inside

  • When members changed

    1. DMTP server generates shared key()

    2. DMTP server encrypt shared key with combined key of each participants. () and sends to all participants

    Every time the members change, repeat these process and store all keys in DB.

  • Send messages

    1. Users encrypt messages with the shared key and send to DMTP server

    2. DMTP server send encrypted messages to the all participants.

AES
ECDH