Skip to content

Additional Ideas for BLS Sigverify Optimization #453

@samkim-crypto

Description

@samkim-crypto
Caching Message Hash

The BLS signature verification requires 1. hashing messages and 2. applying the pairing.

From the stats, it seems like the average distinct messages per batch is about 1.2. This means that the number of distinct messages are very small and 1 for a majority of batches. This means that we will be hashing the same messages redundantly, so we should cache these hashes.

Optimized Aggregation

Right now, when we aggregate public keys and signatures together, we have to convert these to projective coordinates first. It should actually be possible to add points together efficiently without conversion as long as at least one point is on projective coordinates. Avoiding this conversion should give some savings.

Use sequential execution for small inputs

Since the number of distinct messages are quite small (1 or 2 in most cases), use of the parallel function par_verify_distinct might introduce more overhead than the sequential verify_distinct function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions