Loading

ECDH

crypto

The ECDH function uses the Elliptic-curve Diffie–Hellman key agreement protocol to establish a secret.

The secret is derived from two ECC keys, one public, one private. This secret can be established independently by two parties who only need to share their ECC public keys and combine them with their private keys.

The public and private keys must use the same curve.

ECDH is available since version 2.7.2.

See also

Signatures

Examples

'c2pnb208w1' ECGEN ECPUBLIC 'pub1' STORE ECPRIVATE 'priv1' STORE 'c2pnb208w1' ECGEN ECPUBLIC 'pub2' STORE ECPRIVATE 'priv2' STORE $priv1 $pub2 ECDH $priv2 $pub1 ECDH