> For the complete documentation index, see [llms.txt](https://docs.0x0.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0x0.ai/0x0-ecosystem/arcane-privacy-wallet/calculating-the-shared-secret.md).

# Calculating the Shared Secret

The shared secret SS facilitates secure communication between Bob and Alice:

1. An ephemeral key pair is created for the transaction.
2. Using Elliptic Curve Diffie-Hellman (ECDH), the shared secret SS is calculated as:

S=ePrivK⋅vpk

Where:

* ePrivK represents the ephemeral private key generated for the transaction.
* vpk is the recipient’s viewing public key.
