[−][src]Struct k256::ecdsa::recoverable::Signature
feature="ecdsa-core"
only.Ethereum-style "recoverable signatures" which allow for the recovery of
the signer's PublicKey
from the signature itself.
This format consists of Signature
followed by a 1-byte recovery Id
(65-bytes total):
r
: 32-byte integer, big endians
: 32-byte integer, big endianv
: 1-byte recoveryId
Implementations
impl Signature
[src]
pub fn new(signature: &Signature, recovery_id: Id) -> Self
[src]
feature="ecdsa-core"
only.Create a new recoverable ECDSA/secp256k1 signature from a regular
fixed-size signature and an associated recovery Id
.
This is an "unchecked" conversion and assumes the provided Id
is valid for this signature.
pub fn from_trial_recovery(
public_key: &PublicKey,
msg: &[u8],
signature: &Signature
) -> Result<Self, Error>
[src]
public_key: &PublicKey,
msg: &[u8],
signature: &Signature
) -> Result<Self, Error>
feature="ecdsa-core"
only.Given a public key, message, and signature, use trial recovery for both possible recovery IDs in an attempt to determine if a suitable recovery ID exists, or return an error otherwise.
pub fn recovery_id(self) -> Id
[src]
feature="ecdsa-core"
only.Get the recovery Id
for this signature
pub fn recover_pubkey(&self, msg: &[u8]) -> Result<PublicKey, Error>
[src]
feature="ecdsa-core"
and feature="ecdsa"
only.Recover the PublicKey
used to create the given signature
Trait Implementations
impl AsRef<[u8]> for Signature
[src]
impl Clone for Signature
[src]
impl Copy for Signature
[src]
impl Debug for Signature
[src]
impl Eq for Signature
[src]
impl From<Signature> for Signature
[src]
impl PartialEq<Signature> for Signature
[src]
impl RandomizedSigner<Signature> for Signer
[src]
fn try_sign_with_rng(
&self,
rng: impl CryptoRng + RngCore,
msg: &[u8]
) -> Result<Signature, Error>
[src]
&self,
rng: impl CryptoRng + RngCore,
msg: &[u8]
) -> Result<Signature, Error>
fn sign_with_rng(&self, rng: impl RngCore + CryptoRng, msg: &[u8]) -> S
[src]
impl Signature for Signature
[src]
impl<'_> TryFrom<&'_ [u8]> for Signature
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(bytes: &[u8]) -> Result<Self, Error>
[src]
impl Verifier<Signature> for Verifier
[src]
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,