From f68b50a63d4f4e614f3bb342c01ad5bc942ca2a8 Mon Sep 17 00:00:00 2001 From: Jason Owen Date: Wed, 12 Aug 2026 16:39:27 -0700 Subject: [PATCH 1/2] cipher: fix warning docs on `StreamCipher` In commit 8e54074360e0fcf4082c8666e10c98f009985081, the warnings on several `StreamCipher` methods were changed into sections that should have had the `warning` CSS class. Unfortunately, the HTML was malformed, and the resulting documentation rendered the sections as all-bold instead of with the rustdoc warning style. Fix the HTML in the `StreamCipher::unchecked_*` methods. --- cipher/src/stream.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cipher/src/stream.rs b/cipher/src/stream.rs index 33902bb19..88feb8703 100644 --- a/cipher/src/stream.rs +++ b/cipher/src/stream.rs @@ -49,8 +49,8 @@ pub trait StreamCipher { /// Apply keystream to `inout` without checking for keystream repetition. /// - ///
- /// WARNING + ///
+ /// WARNING /// /// This method should be used with extreme caution! Triggering keystream repetition can expose /// the stream cipher to chosen plaintext attacks. @@ -59,8 +59,8 @@ pub trait StreamCipher { /// Apply keystream to `buf` without checking for keystream repetition. /// - ///
- /// WARNING + ///
+ /// WARNING /// /// This method should be used with extreme caution! Triggering keystream repetition can expose /// the stream cipher to chosen plaintext attacks. @@ -69,8 +69,8 @@ pub trait StreamCipher { /// Apply keystream to data behind `buf` without checking for keystream repetition. /// - ///
- /// WARNING + ///
+ /// WARNING /// /// This method should be used with extreme caution! Triggering keystream repetition can expose /// the stream cipher to chosen plaintext attacks. @@ -88,8 +88,8 @@ pub trait StreamCipher { /// # Errors /// Returns [`NotEqualError`] if the `input` and `output` buffers have different lengths. /// - ///
- /// WARNING + ///
+ /// WARNING /// /// This method should be used with extreme caution! Triggering keystream repetition can expose /// the stream cipher to chosen plaintext attacks. From 3932fa483884b1c2784c1dd2ab2b649cdad7ea3f Mon Sep 17 00:00:00 2001 From: Jason Owen Date: Wed, 12 Aug 2026 16:49:40 -0700 Subject: [PATCH 2/2] elliptic-curve: fix warning doc HTML tags Resolve rustdoc warnings about unopened HTML tags and unclosed HTML tags by replacing the former with the correct closing tags for the latter. Also add additional spacing between markdown and HTML, as suggested in the rustdoc book[1]. [1] https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#adding-a-warning-block --- elliptic-curve/src/ops.rs | 4 +++- elliptic-curve/src/point.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/elliptic-curve/src/ops.rs b/elliptic-curve/src/ops.rs index 7892663be..75eeb26d2 100644 --- a/elliptic-curve/src/ops.rs +++ b/elliptic-curve/src/ops.rs @@ -36,7 +36,8 @@ pub trait BatchInvert: Field { /// Security Warning /// /// This should NOT be used on secret values! - /// + /// + ///
fn batch_invert_in_place_vartime(elements: &mut [Self], scratch_space: &mut [Self]) -> Self { // Call the constant-time implementation by default Self::batch_invert_in_place(elements, scratch_space) @@ -95,6 +96,7 @@ where /// /// Variable-time operations should only be used on non-secret values, and may potentially leak /// secret values! +/// ///
pub trait MulVartime: Mul { /// Multiply `self` by `rhs` in variable-time. diff --git a/elliptic-curve/src/point.rs b/elliptic-curve/src/point.rs index 7cf66006f..7ed3e2d07 100644 --- a/elliptic-curve/src/point.rs +++ b/elliptic-curve/src/point.rs @@ -60,7 +60,8 @@ pub trait BatchNormalize { /// Security Warning /// /// This should NOT be used on points which represent secrets! - /// + /// + ///
fn batch_normalize_vartime(points: &Points) -> Self::Output { // Call the constant-time implementation by default Self::batch_normalize(points)