Skip to content

Introduce NonIdentityPoint #1170

@daxpedda

Description

@daxpedda

This is similar to NonZeroScalar.

I often found myself handrolling custom serde implementations to make sure that a ProjectivePoint is not an identity element.

Additionally it could be useful to allow arithmetic that can guarantee some outputs without having to constantly check for identity elements. For example multiplying a NonIdentityElement with a NonZeroScalar should yield a NonIdentityElement without having to do any checks or returning an (Ct)Option.

Interactions with PublicKey could be similar to whats done between NonZeroScalar and SecretKey, enabling non-fallible conversions.

Happy to make a PR of course.

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