Skip to content

Commit

Permalink
Merge rust-bitcoin#643: Update docs to mention ECDSA
Browse files Browse the repository at this point in the history
aa4489c key: Improve docs (Tobin C. Harding)

Pull request description:

  `PublicKey` types are for verifying ECDSA signatures, when these docs where written there were no other types of signatures. With the addition of taproot these docs have become stale.

ACKs for top commit:
  apoelstra:
    ACK aa4489c

Tree-SHA512: bb24d82f2bf316f8907b1bf02132d454d21f0b13d57f06f09f9985bc7fbf7b36e6972a0fdaf3a68967577dbe1995f2a14fd06fddd38eb46718f04bca1c50a445
  • Loading branch information
apoelstra committed Aug 20, 2023
2 parents d9aadc6 + aa4489c commit 83a2245
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ use crate::{
#[cfg(feature = "hashes")]
use crate::{hashes, ThirtyTwoByteHash};

/// Secret 256-bit key used as `x` in an ECDSA signature.
/// Secret key - a 256-bit key used to create ECDSA and Taproot signatures.
///
/// This value should be generated using a [cryptographically secure pseudorandom number generator].
///
/// # Side channel attacks
///
Expand Down Expand Up @@ -50,6 +52,7 @@ use crate::{hashes, ThirtyTwoByteHash};
/// ```
/// [`bincode`]: https://docs.rs/bincode
/// [`cbor`]: https://docs.rs/cbor
/// [cryptographically secure pseudorandom number generator]: https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator
#[derive(Copy, Clone)]
pub struct SecretKey([u8; constants::SECRET_KEY_SIZE]);
impl_display_secret!(SecretKey);
Expand Down Expand Up @@ -117,7 +120,7 @@ impl str::FromStr for SecretKey {
}
}

/// A Secp256k1 public key, used for verification of signatures.
/// Public key - used to verify ECDSA signatures and to do Taproot tweaks.
///
/// # Serde support
///
Expand Down Expand Up @@ -1082,7 +1085,7 @@ impl CPtr for Keypair {
fn as_mut_c_ptr(&mut self) -> *mut Self::Target { &mut self.0 }
}

/// An x-only public key, used for verification of schnorr signatures and serialized according to BIP-340.
/// An x-only public key, used for verification of Taproot signatures and serialized according to BIP-340.
///
/// # Serde support
///
Expand Down

0 comments on commit 83a2245

Please sign in to comment.