crypto / org.apache.tuweni.crypto / SECP256K1 / calculateKeyAgreement

calculateKeyAgreement

static fun calculateKeyAgreement(privKey: SecretKey, theirPubKey: PublicKey): Bytes32 (source)

Calculates an ECDH key agreement between the private and the public key of another party, formatted as a 32 bytes array.

Parameters

privKey - the private key

theirPubKey - the public key

Return
shared secret as 32 bytes