diff --git a/guides/encrypt-messages-version-1.md b/guides/encrypt-messages-version-1.md index 1587261ad2..eb4e7dc22e 100644 --- a/guides/encrypt-messages-version-1.md +++ b/guides/encrypt-messages-version-1.md @@ -262,3 +262,18 @@ waku.relay.addObserver((message) => { console.log(message.payload); // This payload is decrypted }, [contentTopic]); ``` + + +## Code Example + +The [Eth-PM](https://github.com/status-im/js-waku/tree/main/examples/eth-pm) Web App example demonstrates both the use of symmetric and asymmetric encryption. + +Asymmetric encryption is used for private messages so that only the intended recipient can read said messages. + +Symmetric encryption is used for the public key messages. +In this instance, the same key is used for all users: the Keccak-256 hash of the content topic (which results in 32 bytes array). +While this does not add functional value, it does demonstrate the usage of symmetric encryption in a web app. + +A live version of Eth-PM can be found at https://status-im.github.io/js-waku/eth-pm/. + +The specifications of the protocol it implements can be found at [20/TOY-ETH-PM](https://rfc.vac.dev/spec/20/).