pub fn public_share(scalar: &[u8; 32], generator: &[u8; 32]) -> Result<[u8; 32]>Expand description
Computes a public share Y = G.scalar_mult(scalar, generator).
X25519 clamps the scalar, exactly as G_X25519.sample_scalar does, so a scalar drawn from the
CSPRNG is used here unchanged. The generator is public, so the low-order check costs nothing
secret and rejects a degenerate generator instead of returning the neutral element.
ยงErrors
Fails when the group operation yields the neutral element, which only a low-order generator
can cause.