You can also use the Web Crypto api to add encryption in the p2p message.