Trait pairing_ce::EncodedPoint [−][src]
pub trait EncodedPoint: Sized + Send + Sync + AsRef<[u8]> + AsMut<[u8]> + Clone + Copy + 'static { type Affine: CurveAffine; fn empty() -> Self; fn size() -> usize; fn into_affine(&self) -> Result<Self::Affine, GroupDecodingError>; fn into_affine_unchecked(&self) -> Result<Self::Affine, GroupDecodingError>; fn from_affine(affine: Self::Affine) -> Self; }
An encoded elliptic curve point, which should essentially wrap a [u8; N]
.
Associated Types
type Affine: CurveAffine
[src]
Required methods
fn empty() -> Self
[src]
Creates an empty representation.
fn size() -> usize
[src]
Returns the number of bytes consumed by this representation.
fn into_affine(&self) -> Result<Self::Affine, GroupDecodingError>
[src]
Converts an EncodedPoint
into a CurveAffine
element,
if the encoding represents a valid element.
fn into_affine_unchecked(&self) -> Result<Self::Affine, GroupDecodingError>
[src]
Converts an EncodedPoint
into a CurveAffine
element,
without guaranteeing that the encoding represents a valid
element. This is useful when the caller knows the encoding is
valid already.
If the encoding is invalid, this can break API invariants, so caution is strongly encouraged.
fn from_affine(affine: Self::Affine) -> Self
[src]
Creates an EncodedPoint
from an affine point, as long as the
point is not the point at infinity.
Implementors
impl EncodedPoint for pairing_ce::bls12_381::G1Compressed
[src]
impl EncodedPoint for pairing_ce::bls12_381::G1Compressed
[src]type Affine = G1Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn from_affine(affine: G1Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bls12_381::G1Uncompressed
[src]
impl EncodedPoint for pairing_ce::bls12_381::G1Uncompressed
[src]type Affine = G1Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn from_affine(affine: G1Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bls12_381::G2Compressed
[src]
impl EncodedPoint for pairing_ce::bls12_381::G2Compressed
[src]type Affine = G2Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn from_affine(affine: G2Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bls12_381::G2Uncompressed
[src]
impl EncodedPoint for pairing_ce::bls12_381::G2Uncompressed
[src]type Affine = G2Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn from_affine(affine: G2Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bn256::G1Compressed
[src]
impl EncodedPoint for pairing_ce::bn256::G1Compressed
[src]type Affine = G1Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn from_affine(affine: G1Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bn256::G1Uncompressed
[src]
impl EncodedPoint for pairing_ce::bn256::G1Uncompressed
[src]type Affine = G1Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn from_affine(affine: G1Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bn256::G2Compressed
[src]
impl EncodedPoint for pairing_ce::bn256::G2Compressed
[src]type Affine = G2Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn from_affine(affine: G2Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::bn256::G2Uncompressed
[src]
impl EncodedPoint for pairing_ce::bn256::G2Uncompressed
[src]type Affine = G2Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn from_affine(affine: G2Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G1Compressed
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G1Compressed
[src]type Affine = G1Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn from_affine(affine: G1Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G1Uncompressed
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G1Uncompressed
[src]type Affine = G1Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G1Affine, GroupDecodingError>
[src]
fn from_affine(affine: G1Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G2Compressed
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G2Compressed
[src]type Affine = G2Affine
fn empty() -> Self
[src]
fn size() -> usize
[src]
fn into_affine(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn into_affine_unchecked(&self) -> Result<G2Affine, GroupDecodingError>
[src]
fn from_affine(affine: G2Affine) -> Self
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G2Uncompressed
[src]
impl EncodedPoint for pairing_ce::compact_bn256::G2Uncompressed
[src]