pub struct Secp256k1;Expand description
Secp256k1 (a.k.a. k256) Elliptic Curve Digital Signature Algorithm
Trait Implementations§
Source§impl Curve for Secp256k1
impl Curve for Secp256k1
Source§impl RecoverableCurve for Secp256k1
impl RecoverableCurve for Secp256k1
Source§type RecoveryId = RecoveryId
type RecoveryId = RecoveryId
An additional information required to recover
the public key.
Source§fn recover(
prehash: &[u8],
signature: &Self::Signature,
recovery_id: Self::RecoveryId,
) -> Option<Self::PublicKey>
fn recover( prehash: &[u8], signature: &Self::Signature, recovery_id: Self::RecoveryId, ) -> Option<Self::PublicKey>
Try to recover public key which signed given
message and produced given signature along with a
recovery id Read more
Source§impl RecoverableSigner<Secp256k1> for SigningKey
impl RecoverableSigner<Secp256k1> for SigningKey
Source§async fn sign_recoverable(
&self,
prehash: &[u8],
) -> Result<(<Secp256k1 as Curve>::Signature, <Secp256k1 as RecoverableCurve>::RecoveryId), Self::Error>
async fn sign_recoverable( &self, prehash: &[u8], ) -> Result<(<Secp256k1 as Curve>::Signature, <Secp256k1 as RecoverableCurve>::RecoveryId), Self::Error>
Sign 32-byte prehash (i.e. output of cryptographic hash function) and return a signature along with recovery id.
If given prehash is of different length, an error will be returned.
Source§impl Signer<Secp256k1> for SigningKey
impl Signer<Secp256k1> for SigningKey
Source§async fn sign(
&self,
prehash: &[u8],
) -> Result<<Secp256k1 as Curve>::Signature, Self::Error>
async fn sign( &self, prehash: &[u8], ) -> Result<<Secp256k1 as Curve>::Signature, Self::Error>
Sign 32-byte prehash (i.e. output of cryptographic hash function).
If given prehash is of different length, an error will be returned.
fn cache_public_key(self) -> CachePublicKey<C, Self>where
Self: Sized,
Source§impl TypedCurve for Secp256k1
impl TypedCurve for Secp256k1
Source§const CURVE_TYPE: &str = "secp256k1"
const CURVE_TYPE: &str = "secp256k1"
Used as prefix:
<CURVE>:...Source§fn parse_base58<const N: usize>(
s: impl AsRef<str>,
) -> Result<[u8; N], ParseCurveError>
fn parse_base58<const N: usize>( s: impl AsRef<str>, ) -> Result<[u8; N], ParseCurveError>
Decodes bytes from string as
<CURVE>:<base58>Auto Trait Implementations§
impl Freeze for Secp256k1
impl RefUnwindSafe for Secp256k1
impl Send for Secp256k1
impl Sync for Secp256k1
impl Unpin for Secp256k1
impl UnsafeUnpin for Secp256k1
impl UnwindSafe for Secp256k1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more