elliptic_curve::sec1

Trait ModulusSize

Source
pub trait ModulusSize:
    'static
    + ArrayLength<u8>
    + Copy
    + Debug {
    type CompressedPointSize: 'static + ArrayLength<u8> + Copy + Debug;
    type UncompressedPointSize: 'static + ArrayLength<u8> + Copy + Debug;
    type UntaggedPointSize: 'static + ArrayLength<u8> + Copy + Debug;
}
Expand description

Trait for supported modulus sizes which precomputes the typenums for various point encodings so they don’t need to be included as bounds.

Required Associated Types§

Source

type CompressedPointSize: 'static + ArrayLength<u8> + Copy + Debug

Size of a compressed point for the given elliptic curve when encoded using the SEC1 Elliptic-Curve-Point-to-Octet-String algorithm (including leading 0x02 or 0x03 tag byte).

Source

type UncompressedPointSize: 'static + ArrayLength<u8> + Copy + Debug

Size of an uncompressed point for the given elliptic curve when encoded using the SEC1 Elliptic-Curve-Point-to-Octet-String algorithm (including leading 0x04 tag byte).

Source

type UntaggedPointSize: 'static + ArrayLength<u8> + Copy + Debug

Size of an untagged point for given elliptic curve, i.e. size of two serialized base field elements.

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.

Implementations on Foreign Types§

Source§

impl ModulusSize for UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>, B0>

Source§

impl ModulusSize for UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>

Source§

impl ModulusSize for UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>

Source§

impl ModulusSize for UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>

Source§

impl ModulusSize for UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B0>

Implementors§