Identity-based Sharing with IOTA/Shimmer

TanglePay
3 min readFeb 15, 2023

--

Web3 Messaging with the Tangle

Goal

  1. Users can share messages, or any other form of binary data, with targeted identities on a crypto network (could be Tangle, or any other crypto network with following criteria)
  2. uses <public key, private key> pair for authentication
  3. Persistence support of non-transactional data
  4. Indexation support of messages
  5. Privacy
  6. Only targeted users would have access to the data (unencrypted).
  7. Targeted users cannot decipher arbitrary messages shared by the same sender except the shared ones
  8. Security
  9. The authenticity of identities cannot be fabricated.

Why

  • Why is Shimmer/IOTA a fit?
  1. Free for transaction on ledger
  2. Low cost for data persistence? 100 glow per byte (if 0.28$ = 1 MIOTA = 100 SMR, 1$ can cover ~25000 tweets as of 8/31/2022. It could be more if leveraging other distributed techniques like ipfs)
  • Why is identity based sharing important?

Decentralized solutions for data sharing can solve problems in existing centralized solutions, e.g. censorship, privacy, information silos, etc.

What cannot be done

  1. Users cannot revoke the sharing of data, when receivers lost the eligibility, or privileges.

NFT collection oriented messaging as an example

Introduction

Owners of NFTs under same collection form a natural group of identities with common interests.

As the owner identities are public on the crypto network, any users can post targeted messages to the crypto network that (1) tagged with the NFT collection id (2) only decipherable by the targeted identities.

MVP

Given identity Px, who owns NFTs under collection NCy together with a group of identities PA= {P1, P2, P3, … Pn}, Px can share messages with PA with the following steps.

Shared

  1. Topic/Group discovery

Given the list of current owned NFTs for Px, show the virtual group for each NFT collection.

For each collection, show preview of the very recent message.

Hide collections without messages.

  1. Group membership discovery

Given the NFT collection, locate the current identities (addresses) of owners, as {P1, …, Pn} with {{PubKey1, PriKey1}, … {PubKeyn, PriKeyn}} as their crypto keys.

Sender

  1. Message m provided by Px
  2. Data encryption key preparation.

An encryption key Ks is randomly generated by Px.

  1. Message payload construction
  2. Payload_PartA = {schema_version, type, recipients_count}
  3. Payload_PartB = [(P1, encrypt(Ks, PubKey1)), …, (Pn, encrypt(Ks, PubKeyn))]
  4. Payload_PartC = encrypt(Ks, m)
  5. Payload=Payload_PartA+PayloadPartB+PayloadPartC
  6. Message is posted to crypto network
  7. sign by Px
  8. tagged with {magic_prefix, unique-nft-collection-id}

Receiver

  1. Subscribe to events
  2. Listen to messages with {magic_prefix, unique-nft-collection-id} tag
  3. Decrypt message
  4. Locate (Px, encrypt(Ks, PubKeyx)) and decrypt Ks with PriKeyx
  5. Decrypt encrypt(Ks, m) with Ks

Other features

  • Data retention/purge on network
  • Private chat (1 to 1 message)
  • Images, Videos
  • Friendly names of identities by cross checking with external <twitter/discord → address> mapping data
  • On-chain user preferences (forbidden list, friends, etc)

Derived thoughts

  • For data sharing, instead of messages, could also be other binary data valuable for persistence, similar as file-coin
  • For discovery, it could be extended to owners of specific L1/L2 tokens, addresses on rich list
  • web3 / dotfiles

--

--

TanglePay

TanglePay is the #IOTA Wallet currently available for iOS, Android and browser. #Staking #SMR #ASMB Community & Download Links: http://linktr.ee/tanglepay