Struct elliptic_curve::sec1::EncodedPoint[][src]

pub struct EncodedPoint<C> where
    C: Curve,
    UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
    UncompressedPointSize<C>: ArrayLength<u8>, 
{ /* fields omitted */ }
Expand description

SEC1 encoded curve point.

This type is an enum over the compressed and uncompressed encodings, useful for cases where either encoding can be supported, or conversions between the two forms.

Implementations

Decode elliptic curve point (compressed or uncompressed) from the Elliptic-Curve-Point-to-Octet-String encoding described in SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3 (page 10).

http://www.secg.org/sec1-v2.pdf

Decode elliptic curve point from raw uncompressed coordinates, i.e. encoded as the concatenated x || y coordinates with no leading SEC1 tag byte (which would otherwise be 0x04 for an uncompressed point).

Encode an elliptic curve point from big endian serialized coordinates (with optional point compression)

This is supported on crate features arithmetic and zeroize only.

Compute EncodedPoint representing the public key for the provided SecretKey.

The compress flag requests point compression.

Return EncodedPoint representing the additive identity (a.k.a. point at infinity)

Get the length of the encoded point in bytes

Get byte slice containing the serialized EncodedPoint.

This is supported on crate feature alloc only.

Get boxed byte slice containing the serialized EncodedPoint

This is supported on crate feature arithmetic only.

Serialize point as raw uncompressed coordinates without tag byte, i.e. encoded as the concatenated x || y coordinates.

Is this EncodedPoint compact?

Is this EncodedPoint compressed?

Is this EncodedPoint the additive identity? (a.k.a. point at infinity)

Compress this EncodedPoint, returning a new EncodedPoint.

This is supported on crate feature arithmetic only.

Decompress this EncodedPoint, returning a new EncodedPoint.

Encode an EncodedPoint from the desired type

Decode this EncodedPoint into the desired type

Get the SEC1 tag for this EncodedPoint

Get the Coordinates for this EncodedPoint.

Get the x-coordinate for this EncodedPoint.

Returns None if this point is the identity point.

Get the y-coordinate for this EncodedPoint.

Returns None if this point is compressed or the identity point.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Select a or b according to choice. Read more

Conditionally assign other to self, according to choice. Read more

Conditionally swap self and other if choice == 1; otherwise, reassign both unto themselves. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.