test: improve TimingResistantEqual test coverage #271

pull mangoostaa wants to merge 1 commits into bitcoin-core:master from mangoostaa:test/improve-timingresistantequal changing 2 files +30 −0
  1. mangoostaa commented at 12:07 PM on April 13, 2026: contributor

    This improves the test for TimingResistantEqual by adding more relevant edge cases, including:

    • Empty string vs non-empty string
    • Differences at the beginning of the string
    • Additional prefix/suffix length mismatch tests

    These cases help ensure the function properly resists timing attacks when comparing secrets of different lengths

  2. test: improve TimingResistantEqual test coverage 232c2da82b
  3. DrahtBot commented at 12:07 PM on April 13, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. ViniciusCestarii commented at 7:39 PM on April 15, 2026: contributor

    Is there a planned call site for TimingResistantEqual? Is there any place libmultiprocess would need a constant-time comparison?

  5. mangoostaa commented at 9:09 PM on April 15, 2026: contributor

    Is there a planned call site for TimingResistantEqual? Is there any place libmultiprocess would need a constant-time comparison?

    You're right, currently there is no clear call site in libmultiprocess that requires constant-time comparison. This test only improves coverage for the existing function, but I agree that without a concrete use case it might not be justified here.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 17:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me