diff --git a/rust-k256/src/lib.rs b/rust-k256/src/lib.rs index f25dc1b..f0e66dc 100644 --- a/rust-k256/src/lib.rs +++ b/rust-k256/src/lib.rs @@ -45,7 +45,7 @@ pub use k256::{AffinePoint, NonZeroScalar, SecretKey}; /// This allows it to be used from the current module. pub use rand_core::CryptoRngCore; #[cfg(feature = "serde")] -/// Provides the ability to serialize and deserialize data using the Serde library. +/// Provides the ability to serialize and deserialize data using the Serde library. /// The `Serialize` and `Deserialize` traits from the Serde library are re-exported for convenience. pub use serde::{Deserialize, Serialize}; @@ -63,7 +63,7 @@ pub const DST: &[u8] = b"QUUX-V01-CS02-with-secp256k1_XMD:SHA-256_SSWU_RO_"; // /// Struct holding signature data for a PLUME signature. /// /// `v1specific` field differintiate whether V1 or V2 protocol will be used. -#[cfg_attr(feature="serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct PlumeSignature { /// The message that was signed. pub message: Vec, @@ -80,7 +80,7 @@ pub struct PlumeSignature { } /// Nested struct holding additional signature data used in variant 1 of the protocol. #[derive(Debug)] -#[cfg_attr(feature="serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct PlumeSignatureV1Fields { /// Part of the signature data, a curve point. pub r_point: AffinePoint, diff --git a/rust-k256/src/randomizedsigner.rs b/rust-k256/src/randomizedsigner.rs index 539b0c2..e066467 100644 --- a/rust-k256/src/randomizedsigner.rs +++ b/rust-k256/src/randomizedsigner.rs @@ -15,12 +15,12 @@ use k256::{ use signature::{Error, RandomizedSigner}; /// `PlumeSigner` is a `struct` that contains a reference to a secret key and a -/// boolean defining output [`PlumeSignature`] variant. -/// +/// boolean defining output [`PlumeSignature`] variant. +/// /// It implements the `RandomizedSigner` trait to generate signatures using the provided secret /// key. The struct is generic over the lifetime of the secret key reference so that the key can be borrowed immutably. -/// -/// `serde` traits aren't added to this struct on purpose. It's a wrapper around [`SecretKey`] which provides variety of serialization formats (SEC1, bytes, ...). +/// +/// `serde` traits aren't added to this struct on purpose. It's a wrapper around [`SecretKey`] which provides variety of serialization formats (SEC1, bytes, ...). /// Also it uses just a reference to the secret key itself, so the choices for handling the key is kept open here. pub struct PlumeSigner<'signing> { /// The secret key to use for signing. This is borrowed immutably.