[−][src]Struct redjubjub::PublicKey
A valid RedJubJub public key.
This type holds decompressed state used in signature verification; if the
public key may not be used immediately, it is probably better to use
PublicKeyBytes
, which is a refinement type for [u8; 32]
.
Consensus properties
The TryFrom<PublicKeyBytes>
conversion performs the following Zcash
consensus rule checks:
- The check that the bytes are a canonical encoding of a public key;
- The check that the public key is not a point of small order.
Methods
impl PublicKey<SpendAuth>
[src]
pub fn randomize(&self, randomizer: &Randomizer) -> PublicKey<SpendAuth>
[src]
Randomize this public key with the given randomizer
.
Randomization is only supported for SpendAuth
keys.
impl<T: SigType> PublicKey<T>
[src]
pub fn verify(&self, msg: &[u8], signature: &Signature<T>) -> Result<(), Error>
[src]
Verify a purported signature
over msg
made by this public key.
Trait Implementations
impl<T: Clone + SigType> Clone for PublicKey<T>
[src]
impl<T: Copy + SigType> Copy for PublicKey<T>
[src]
impl<T: Debug + SigType> Debug for PublicKey<T>
[src]
impl<'de, T: SigType> Deserialize<'de> for PublicKey<T> where
T: SigType,
[src]
T: SigType,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a, T: SigType> From<&'a SecretKey<T>> for PublicKey<T>
[src]
impl<T: SigType> From<PublicKey<T>> for PublicKeyBytes<T>
[src]
fn from(pk: PublicKey<T>) -> PublicKeyBytes<T>
[src]
impl<T: SigType> From<PublicKey<T>> for [u8; 32]
[src]
impl<T: SigType> Serialize for PublicKey<T> where
T: SigType,
[src]
T: SigType,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T: SigType> TryFrom<[u8; 32]> for PublicKey<T>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(bytes: [u8; 32]) -> Result<Self, Self::Error>
[src]
impl<T: SigType> TryFrom<PublicKeyBytes<T>> for PublicKey<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for PublicKey<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for PublicKey<T> where
T: Send,
T: Send,
impl<T> Sync for PublicKey<T> where
T: Sync,
T: Sync,
impl<T> Unpin for PublicKey<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PublicKey<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,