lib: merge ecdh and ecdsa