Module tari_crypto::dhke

source ·
Expand description

The robotic innards of a Diffie-Hellman key exchange (DHKE) producing a shared secret. Even though the result of a DHKE is the same type as a public key, it is typically treated as a secret value. To make this work more safely, we ensure that a DHKE result is cleared after use (but beware of subsequent copies or moves). Because a DHKE shared secret is intended to be used in further key derivation, the only visibility into it is as a byte array; it’s not possible to directly extract the underlying public key type, and you probably shouldn’t clone the byte array without a very good reason. If you need the underlying public key itself, you probably should be using something else.

Structs