Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidnevadoc opened this issue May 10, 2024 · 0 comments
Open

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

davidnevadoc opened this issue May 10, 2024 · 0 comments

Comments

@davidnevadoc
Copy link

davidnevadoc commented May 10, 2024

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: privacy-scaling-explorations/halo2curves#146 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant