Skip to content

AggregateSignatures::from_signatures and MultiSignature::from_signatures should accept a single signature #10

Description

@JamesHinshelwood

Currently, the input is validated to be at least 2 in length:
https://github.com/hyperledger-labs/agora-blsful/blob/49827e21b98902e686dcb39aa2c64a1716988257/src/aggregate_signature.rs#L84

However, I don't see why we shouldn't be able to generate aggregate signatures consisting of a single signature (even if that is effectively the identity function). I think this also aligns with the spec which states:

Inputs:

  • signature_1, ..., signature_n, octet strings output by
    either CoreSign or Aggregate.

Outputs:

  • signature, an octet string encoding a aggregated signature
    that combines all inputs; or INVALID.

Precondition: n >= 1, otherwise return INVALID.

It is slightly confusing, but I think the correct interpretation is that when n = 1, inputs = signature_1, ..., signature_1 which represents a single signature as the input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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