diff --git a/src/lib.rs b/src/lib.rs index 14d65f224..76b6da3cb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -211,7 +211,13 @@ impl ThirtyTwoByteHash for hashes::sha256t::Hash { fn into_32(self) -> [u8; 32] { self.to_byte_array() } } -/// A (hashed) message input to an ECDSA signature. +/// A (hashed) message input to an EC signature algorithm (such as ECDSA or Schnorr). +/// +/// Message is invalid if +/// - Message has no content or has a length of zero. +/// - Message length doesn't match the expected size. +/// - Non hased message is passed as input. +/// #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Message([u8; constants::MESSAGE_SIZE]); impl_array_newtype!(Message, u8, constants::MESSAGE_SIZE);