In NaCl and libsodium, the crypto_scalarmult
function implements the operation $Q = kP$ (scalar/point multiplication). There doesn't seem to be a function for point addition $K = P + Q$ though.
Something like point addition must be implemented somewhere I think, as part of the implementation of scalar multiplication. It would be useful to be able to access this for developing some protocols on top of Curve25519.
- Is it deliberate that point addition isn't mentioned anywhere in the API or documentation? (Don't the authors want people implementing research-level protocols using their library?)
crypto_scalarmult
delegates tocrypto_scalarmult_curve25519
declared (in libsodium) incrypto_scalarmult_curve25519.h
but I can't seem to find the definition in a.c
file anywhere (in the latest version on GitHub)?- Is there a safe way to implement, or reuse an internal implementation, of point addition in libsodium?