halo2 icon indicating copy to clipboard operation
halo2 copied to clipboard

`FromUniformBytes<64>` may not be fitting for large fields.

Open davidnevadoc opened this issue 1 year ago • 0 comments
trafficstars

ATM FromUniformBytes<64> is required in several parts of the codebase, mainly in the backend.

The trait description states:

/// For security, `N` must be chosen so that `N * 8 >= Self::NUM_BITS + 128`. A larger
/// value of `N` may be chosen for convenience; for example, for a field with a 255-bit
/// modulus, `N = 64` is convenient as it matches the output length of several common
/// cryptographic hash functions (such as SHA-512 and BLAKE2b).

Consequently, this is fine for most fields but may be an issue for large ones. see: https://github.com/privacy-scaling-explorations/halo2curves/pull/146#discussion_r1562381113

davidnevadoc avatar May 10 '24 08:05 davidnevadoc