> bool l_ecdh_generate_key_pair(const struct l_ecc_curve *curve,
> struct l_ecc_point *out_public,
> struct l_ecc_constant *out_private);
Yes it is just a point on the curve, but I don't think that most users
of this API need or care to know to that level of detail. Also,
But if we pass in void * and a length, don't they have to care even to a
greater degree? I mean they need to know how many bytes they should
pass in for example. And then they must somehow *know* that they want a
compressed point or uncompressed and pass in the appropriate number of
bytes. And then do the conversion to network order.
You could just make ecc_point take care of all these details.
generating the shared secret supports compressed coordinates where
the X coordinate is given. In this case the half public key is coming
from the network, so its much more convenient just feeding it that raw
data that converting it to a point.
You still need to validate what is coming over the network and convert
it from network byte order. The constructor for ecc_point could do this