They have a standard for encrypted messages. You can start here: https://github.com/nostr-protocol/nostr. It's more of a 'why' than a 'how' but it's a good starting point then I'd join the telegram and ask questions.