Skip to content

Incorrect comment/assertion in group msm implementation #959

@technovision99

Description

@technovision99

/// Filters out pairs where the point is the identity element (infinity).
/// Returns an error if the lengths of the input slices mismatch.
fn msm(points: &[Self], scalars: &[Scalar]) -> Self {
// Assert input validity
assert_eq!(points.len(), scalars.len(), "mismatched lengths");

Based on the comment it is unclear if the function is supposed to return an error instead of an assertion in case of input mismatch, most likely it seems that the assertion is correct and comment is wrong but we were curious about the intent here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    asymmetric researchaudit blockerClosing these issues is a blocking requirement to kicking off an audit of the Commonware Library.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions