uECC_shared_secret() function
Compute a shared secret given your secret key and someone else's public key. @warning It is recommended to use the output of uECC_shared_secret() as the input of a recommended Key Derivation Function (see NIST SP 800-108) in order to produce a cryptographically secure symmetric key.
Arguments
p_public_key
IN -- The public key of the remote party.
p_private_key
IN -- Your private key.
p_secret
OUT -- Will be filled in with the shared secret value. Must be the same size as the curve size (for curve secp256r1, secret must be 32 bytes long.
Return value
returns TC_CRYPTO_SUCCESS (1) if the shared secret was computed successfully returns TC_CRYPTO_FAIL (0) otherwise