Skip to content

Move some of the methods and constants from PrimeField to Field #138

@carloskiki

Description

@carloskiki

I feel like the split between Field and PrimeField is wrong. Field should encompass as much as possible what a field element is, while PrimeField should only contains things specific to prime fields.

Here is how I would like PrimeField to look like:

pub trait PrimeField: Field {
    const MULTIPLICATIVE_GENERATOR: Self;
    const S: u32;
    const ROOT_OF_UNITY: Self;
    const ROOT_OF_UNITY_INV: Self;
    const DELTA: Self;
}

Every method provided by PrimeField could sensibly be moved to Field, and constants like MODULUS, and CAPACITY could also be moved.

Is there a reason why this is not already the case?

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