[][src]Struct nubls::PublicKey

pub struct PublicKey(_);

A PublicKey represents an Affine element of the G_1 group on the BLS12-381 curve.

Implementations

impl PublicKey[src]

pub fn verify(
    &self,
    message_element: &G2Affine,
    signature: &Signature
) -> VerificationResult
[src]

Attempts to verify a signature given a message_element and a signature.

The verify API presently only works with messages already mapped to the G_2 group on BLS12-381 (see https://github.com/nucypher/NuBLS/issues/1).

TODO: Implement hash_to_curve per the IETF hash_to_curve specification.

pub fn to_bytes(&self) -> [u8; 48][src]

Serializes the PublicKey to an array of 48 bytes.

pub fn from_bytes(bytes: &[u8; 48]) -> PublicKey[src]

Deserializes from a &[u8; 48] to a PublicKey. This will panic if the input is not valid.

Trait Implementations

impl Clone for PublicKey[src]

impl Copy for PublicKey[src]

impl Debug for PublicKey[src]

impl Eq for PublicKey[src]

impl From<PrivateKey> for PublicKey[src]

Allows the ability to use std::convert::From to get a PublicKey from the corresponding PrivateKey.

impl PartialEq<PublicKey> for PublicKey[src]

impl StructuralEq for PublicKey[src]

impl StructuralPartialEq for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.