Skip to content

Generalized Poseidon Constant Generation #44

@bhgomes

Description

@bhgomes

/// Poseidon Prime Field Modulus Bit Count
///
/// This constant is denoted `n` in the Poseidon paper where `n = ceil(log2(p))`.
pub const MODULUS_BITS: usize = 255;
/// Security Level in Bits
///
/// This constant is denoted `M` in the Poseidon paper.
pub const SECURITY_LEVEL: usize = 128;

@SupremoUGH: Can these two be general?

@GhostOfGauss: I agree, it would make more sense for them to be general. Though in light of this note it seems that maybe there's a restriction on which curves this algorithm applies to

/// # Safety
///
/// The constants that are specified to be "secure" in this `struct` have only been guaranteed to
/// work for BLS12-381.

Originally posted by @SupremoUGH in #34 (comment)

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