Struct secp256k1_zkp::EcdsaAdaptorSignature [−][src]
pub struct EcdsaAdaptorSignature(_);
Represents an adaptor signature and dleq proof.
Implementations
impl EcdsaAdaptorSignature
[src]
impl EcdsaAdaptorSignature
[src]pub fn from_slice(data: &[u8]) -> Result<EcdsaAdaptorSignature, Error>
[src]
Creates an EcdsaAdaptorSignature
directly from a slice
pub fn as_ptr(&self) -> *const EcdsaAdaptorSignature
[src]
Obtains a raw const pointer suitable for use with FFI functions
pub fn as_mut_ptr(&mut self) -> *mut EcdsaAdaptorSignature
[src]
Obtains a raw mutable pointer suitable for use with FFI functions
impl EcdsaAdaptorSignature
[src]
impl EcdsaAdaptorSignature
[src]pub fn encrypt<C: Signing>(
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey
) -> EcdsaAdaptorSignature
[src]
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey
) -> EcdsaAdaptorSignature
Creates an adaptor signature along with a proof to verify the adaptor signature. This function derives a nonce using a similar process as described in BIP-340. The nonce derivation process is strengthened against side channel attacks by providing auxiliary randomness using the ThreadRng random number generator. Requires compilation with “rand-std” feature.
pub fn encrypt_with_rng<C: Signing, R: Rng + CryptoRng>(
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey,
rng: &mut R
) -> EcdsaAdaptorSignature
[src]
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey,
rng: &mut R
) -> EcdsaAdaptorSignature
Creates an adaptor signature along with a proof to verify the adaptor signature, This function derives a nonce using a similar process as described in BIP-340. The nonce derivation process is strengthened against side channel attacks by providing auxiliary randomness using the provided random number generator. Requires compilation with “rand” feature.
pub fn encrypt_no_aux_rand<C: Signing>(
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey
) -> EcdsaAdaptorSignature
[src]
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey
) -> EcdsaAdaptorSignature
Creates an adaptor signature along with a proof to verify the adaptor signature, without using any auxiliary random data. Note that using this function is still considered safe.
pub fn encrypt_with_aux_rand<C: Signing>(
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey,
aux_rand: &[u8; 32]
) -> EcdsaAdaptorSignature
[src]
secp: &Secp256k1<C>,
msg: &Message,
sk: &SecretKey,
enckey: &PublicKey,
aux_rand: &[u8; 32]
) -> EcdsaAdaptorSignature
Creates an adaptor signature along with a proof to verify the adaptor signature. This function derives a nonce using a similar process as described in BIP-340. The nonce derivation process is strengthened against side channel attacks by using the provided auxiliary random data.
pub fn decrypt(&self, decryption_key: &SecretKey) -> Result<Signature, Error>
[src]
Creates an ECDSA signature from an adaptor signature and an adaptor secret.
pub fn recover<C: Signing>(
&self,
secp: &Secp256k1<C>,
sig: &Signature,
encryption_key: &PublicKey
) -> Result<SecretKey, Error>
[src]
&self,
secp: &Secp256k1<C>,
sig: &Signature,
encryption_key: &PublicKey
) -> Result<SecretKey, Error>
Extracts the adaptor secret from the complete signature and the adaptor signature.
pub fn verify<C: Verification>(
&self,
secp: &Secp256k1<C>,
msg: &Message,
pubkey: &PublicKey,
encryption_key: &PublicKey
) -> Result<(), Error>
[src]
&self,
secp: &Secp256k1<C>,
msg: &Message,
pubkey: &PublicKey,
encryption_key: &PublicKey
) -> Result<(), Error>
Verifies that the adaptor secret can be extracted from the adaptor signature and the completed ECDSA signature.
Trait Implementations
impl CPtr for EcdsaAdaptorSignature
[src]
impl CPtr for EcdsaAdaptorSignature
[src]type Target = EcdsaAdaptorSignature
fn as_c_ptr(&self) -> *const Self::Target
[src]
fn as_mut_c_ptr(&mut self) -> *mut Self::Target
[src]
impl Clone for EcdsaAdaptorSignature
[src]
impl Clone for EcdsaAdaptorSignature
[src]fn clone(&self) -> EcdsaAdaptorSignature
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for EcdsaAdaptorSignature
[src]
impl Copy for EcdsaAdaptorSignature
[src]impl Eq for EcdsaAdaptorSignature
[src]
impl Eq for EcdsaAdaptorSignature
[src]impl FromStr for EcdsaAdaptorSignature
[src]
impl FromStr for EcdsaAdaptorSignature
[src]impl PartialEq<EcdsaAdaptorSignature> for EcdsaAdaptorSignature
[src]
impl PartialEq<EcdsaAdaptorSignature> for EcdsaAdaptorSignature
[src]fn eq(&self, other: &EcdsaAdaptorSignature) -> bool
[src]
fn ne(&self, other: &EcdsaAdaptorSignature) -> bool
[src]
impl StructuralEq for EcdsaAdaptorSignature
[src]
impl StructuralEq for EcdsaAdaptorSignature
[src]Auto Trait Implementations
impl RefUnwindSafe for EcdsaAdaptorSignature
impl RefUnwindSafe for EcdsaAdaptorSignature
impl Send for EcdsaAdaptorSignature
impl Send for EcdsaAdaptorSignature
impl Sync for EcdsaAdaptorSignature
impl Sync for EcdsaAdaptorSignature
impl Unpin for EcdsaAdaptorSignature
impl Unpin for EcdsaAdaptorSignature
impl UnwindSafe for EcdsaAdaptorSignature
impl UnwindSafe for EcdsaAdaptorSignature