This commit defines a Scalar to hold an integer representing an element of
Z/lZ. Applications like X/Ed25519 that care about the bit-patterns of the
scalars they use can set a specific bit-pattern using the `from_bits`
constructor. Applications that want to treat scalars as integers mod l can use
the `from_bytes_mod_order` constructor. Either way, the constructor ensures
that the integer representing each Scalar is bounded by 2^255 so that the high
bit is set. This means that any Scalar object is always safe to use for scalar
multiplication, while maintaining compatibility with both the Ristretto
use-case and the X/Ed25519 usecase.
compress_edwards() is now named compress() and works only on points
which are in Edwards form. Similarly, compress_montgomery() is now
also called compress(), and it only works on point already in
Mongomery form.
To switch between forms, use to_montgomery().
Conversion from Montgomery directly to Edwards is not yet implemented.
* CHANGE the API requested in
https://github.com/isislovecruft/curve25519-dalek/issues/47,
hopefully for the better.
Having _BASEPOINT_TABLE and _BASEPOINT_POINT means that it's not possible to
use the slow, generic scalar mult in place of the fast, precomputed scalar
mults.