pub trait Curve:
'static
+ Copy
+ Clone
+ Debug
+ Default
+ Eq
+ Ord
+ Send
+ Sync {
type FieldBytesSize: ArraySize<ArrayType<u8>: Copy> + Add<Output: Add<U1, Output: ArraySize<ArrayType<u8>: Copy>>> + Add<U1, Output: ArraySize<ArrayType<u8>: Copy>> + Eq;
type Uint: ArrayEncoding + Encoding + FixedInteger + Random + RandomMod + Unsigned + Zeroize + ShrAssign<usize>;
const ORDER: Odd<Self::Uint>;
const FIELD_ENDIANNESS: ByteOrder = ByteOrder::BigEndian;
}Expand description
Required Associated Constants§
Provided Associated Constants§
Sourceconst FIELD_ENDIANNESS: ByteOrder = ByteOrder::BigEndian
const FIELD_ENDIANNESS: ByteOrder = ByteOrder::BigEndian
Endianness used for serializing field elements of this curve.
Required Associated Types§
Sourcetype FieldBytesSize: ArraySize<ArrayType<u8>: Copy> + Add<Output: Add<U1, Output: ArraySize<ArrayType<u8>: Copy>>> + Add<U1, Output: ArraySize<ArrayType<u8>: Copy>> + Eq
type FieldBytesSize: ArraySize<ArrayType<u8>: Copy> + Add<Output: Add<U1, Output: ArraySize<ArrayType<u8>: Copy>>> + Add<U1, Output: ArraySize<ArrayType<u8>: Copy>> + Eq
Size of a serialized field element in bytes (base field or scalar).
This currently assumes that the base and scalar fields have the same-sized modulus in bytes, though that isn’t strictly true and will eventually need to be fixed.
This is typically the same as Self::Uint::ByteSize but for curves with an unusual field
modulus (e.g. P-224, P-521) it may be different.
The bounds cover common sizes for tables based on precomputed scalars, and is also useful for serialized point sizes for e.g. SEC1 where relevant.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.