pub trait ToSec1Point<C>{
// Required method
fn to_sec1_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize>;
// Provided methods
fn to_sec1_bytes(&self) -> Box<[u8]>
where C: PointCompression { ... }
fn to_compressed_point(
&self,
) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize> { ... }
fn to_uncompressed_point(
&self,
) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize> { ... }
fn to_encoded_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize> { ... }
}Expand description
Encode curve point using the Elliptic-Curve-Point-to-Octet-String conversion described in
SEC 1: Elliptic Curve Cryptography (Version 2.0)
§2.3.3 (page 10).
Required Methods§
Sourcefn to_sec1_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize>
fn to_sec1_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Serialize curve point as a SEC1 Sec1Point, optionally applying point compression
according to the compress flag.
Provided Methods§
Sourcefn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
fn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
Encode curve point using the Elliptic-Curve-Point-to-Octet-String conversion and the
point compression default for this curve as specified by the PointCompression trait.
Sourcefn to_compressed_point(
&self,
) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>
fn to_compressed_point( &self, ) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>
Serialize curve point as a CompressedPoint.
Sourcefn to_uncompressed_point(
&self,
) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize>
fn to_uncompressed_point( &self, ) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize>
Serialize curve point as a CompressedPoint.
Sourcefn to_encoded_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize>
👎Deprecated since 0.14.0: use ToSec1Point::to_sec1_point instead
fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
use ToSec1Point::to_sec1_point instead
DEPRECATED: legacy name for ToSec1Point::to_sec1_point.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<C> ToSec1Point<C> for AffinePoint<C>where
C: PrimeCurveParams,
impl<C> ToSec1Point<C> for AffinePoint<C>where
C: PrimeCurveParams,
fn to_sec1_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Source§impl<C> ToSec1Point<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> ToSec1Point<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
fn to_sec1_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Implementors§
impl<C> ToSec1Point<C> for PublicKey<C>where
C: CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromSec1Point<C> + ToSec1Point<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
Available on crate feature
sec1 only.