Conversation
alv-around
reviewed
Feb 3, 2023
This reverts commit a741f9e.
Add Jubjub to ECC stdlib
|
@dark64 rebasing the source branch should solve the failing check |
alv-around
approved these changes
Oct 5, 2023
alv-around
left a comment
There was a problem hiding this comment.
I keep in mind format and changelog for next time ✍️ everything else looks good to me
alv-around
approved these changes
Oct 5, 2023
|
@Schaeff can you please review the branch? 👾 |
dark64
commented
Nov 9, 2023
| def main(field i) -> bool[256] { | ||
| bool[254] b = unpack_unchecked(i); | ||
| return [false, false, ...b]; | ||
| def main(field i, u32 bit_size) -> bool[256] { |
Member
Author
There was a problem hiding this comment.
TODO: After a second look, I figure this function should have better documentation
cc @alvaro-alonso
There was a problem hiding this comment.
@dark64 good point!
What about:
import "./unpack_unchecked";
// Unpack a field element as 256 big-endian bits.
// Since the size of p can differ among different fields,
// p_size has to be given to derive the correct padding.
// For example, for bn128 |p|=254, for bls12-381 |p|=255.
// Note: uniqueness of the output is not guaranteed
// For example, `0` can map to `[0, 0, ..., 0]` or to `bits(p)`
def main(field i, u32 p_size) -> bool[256] {
assert(p_size <= 256);
u32 padding_size = 256 - p_size;
bool[p_size] b = unpack_unchecked(i);
return [...[false; padding_size], ...b];
}I can not push the changes to the branch. And I think a PR is overkill 💀
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1251