Skip to content

k256: FieldElement::batch_invert test failure #1522

@tarcieri

Description

@tarcieri

This seems concerning:

https://github.com/RustCrypto/elliptic-curves/actions/runs/19215294706/job/54923702169

---- arithmetic::field::tests::batch_invert stdout ----

thread 'arithmetic::field::tests::batch_invert' panicked at k256/src/arithmetic/field.rs:707:9:
assertion `left == right` failed
  left: [FieldElement(FieldElement10x26([38682863, 5301787, 1528, 28470270, 51296658, 64620082, 49629673, 18189550, 33043284, 911401])), FieldElement(FieldElement10x26([40376658, 14801732, 51458278, 33056876, 33771543, 2466442, 20169771, 5514585, 23943877, 2291087]))]
 right: [FieldElement(FieldElement10x26([38682863, 5301787, 67110392, 28470269, 51296658, 64620082, 49629673, 18189550, 33043284, 911401])), FieldElement(FieldElement10x26([40376658, 14801732, 51458278, 33056876, 33771543, 2466442, 20169771, 5514585, 23943877, 2291087]))]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Unfortunately it's using random inputs from OsRng, which we can't see to be able to reproduce the problem.

This is where proptest is nice, because it will output the RNG seed used to generate the failing test case, and then you can easily reproduce the failure locally.

cc @daxpedda @fjarri @ycscaly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions