I am working on implementing ECDH with some HSM. According to the theory behind ECDH, the generated shared secret is a point on the elliptic curve (x, y) which is exactly what is returned by the HSM.
But when I test with SoftHSM via PKCS#11 library, the ECDH function returns a symmetric key directly even with KDF parameter set to null. I did some research and found that some bytes of the shared secret is returned as the value of the symmetric key: https://github.com/google/boringssl/blob/master/include/openssl/ecdh.h#L82
However, I am confused how such operation can be performed on the shared secret if it is represented in the form of a EC point (x, y).
Does anyone know how SoftHSM handles ECDH with KDF parameter as null? Especially, what form is the shared secret in after being generated in SoftHSM but before being processed and put in a key object?