Take a look at the Nostr protocol. It can help us to shape both encryption and global identity to achieve your idea.
https://github.com/nostr-protocol/nips