From 47f19a78ef906374011520b5343f7f87631b8e27 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 24 Nov 2022 11:16:17 +1100 Subject: [PATCH] Use lowercase for schnorr In docs "schnorr signature" does not need, or deserve, a capital letter. --- src/constants.rs | 4 ++-- src/key.rs | 6 +++--- src/schnorr.rs | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/constants.rs b/src/constants.rs index f456327..4b506f9 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -34,10 +34,10 @@ pub const MAX_SIGNATURE_SIZE: usize = 72; /// The maximum size of a compact signature. pub const COMPACT_SIGNATURE_SIZE: usize = 64; -/// The size of a Schnorr signature. +/// The size of a schnorr signature. pub const SCHNORR_SIGNATURE_SIZE: usize = 64; -/// The size of a Schnorr public key. +/// The size of a schnorr public key. pub const SCHNORR_PUBLIC_KEY_SIZE: usize = 32; /// The size of a key pair. diff --git a/src/key.rs b/src/key.rs index b04b909..8aaf4db 100644 --- a/src/key.rs +++ b/src/key.rs @@ -1078,7 +1078,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 schnorr signatures and serialized according to BIP-340. /// /// # Serde support /// @@ -1165,7 +1165,7 @@ impl XOnlyPublicKey { } } - /// Creates a Schnorr public key directly from a slice. + /// Creates a schnorr public key directly from a slice. /// /// # Errors /// @@ -1472,7 +1472,7 @@ impl CPtr for XOnlyPublicKey { fn as_mut_c_ptr(&mut self) -> *mut Self::Target { &mut self.0 } } -/// Creates a new Schnorr public key from a FFI x-only public key. +/// Creates a new schnorr public key from a FFI x-only public key. impl From for XOnlyPublicKey { #[inline] fn from(pk: ffi::XOnlyPublicKey) -> XOnlyPublicKey { XOnlyPublicKey(pk) } diff --git a/src/schnorr.rs b/src/schnorr.rs index 0f46407..c379308 100644 --- a/src/schnorr.rs +++ b/src/schnorr.rs @@ -1,4 +1,4 @@ -//! Support for Schnorr signatures. +//! Support for schnorr signatures. //! use core::{fmt, ptr, str}; @@ -14,7 +14,7 @@ use crate::{ constants, from_hex, impl_array_newtype, Error, Message, Secp256k1, Signing, Verification, }; -/// Represents a Schnorr signature. +/// Represents a schnorr signature. #[derive(Copy, Clone)] pub struct Signature([u8; constants::SCHNORR_SIGNATURE_SIZE]); impl_array_newtype!(Signature, u8, constants::SCHNORR_SIGNATURE_SIZE); @@ -132,7 +132,7 @@ impl Secp256k1 { self.sign_schnorr_helper(msg, keypair, ptr::null()) } - /// Create a Schnorr signature using the given auxiliary random data. + /// Create a schnorr signature using the given auxiliary random data. pub fn sign_schnorr_with_aux_rand( &self, msg: &Message, @@ -159,7 +159,7 @@ impl Secp256k1 { } impl Secp256k1 { - /// Verify a Schnorr signature. + /// Verify a schnorr signature. pub fn verify_schnorr( &self, sig: &Signature,