elliptic_curve/scalar.rs
1//! Scalar types.
2
3pub(crate) mod bytes;
4
5#[cfg(feature = "arithmetic")]
6use crate::ScalarArithmetic;
7
8#[cfg(feature = "arithmetic")]
9pub(crate) mod non_zero;
10
11/// Scalar field element for a particular elliptic curve.
12#[cfg(feature = "arithmetic")]
13#[cfg_attr(docsrs, doc(cfg(feature = "arithmetic")))]
14pub type Scalar<C> = <C as ScalarArithmetic>::Scalar;
15
16/// Bit representation of a scalar field element of a given curve.
17#[cfg(feature = "bits")]
18#[cfg_attr(docsrs, doc(cfg(feature = "bits")))]
19pub type ScalarBits<C> = ff::FieldBits<<Scalar<C> as ff::PrimeFieldBits>::ReprBits>;