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

Implement UInt128 with only BigInteger256 #22

Open
weikengchen opened this issue Nov 23, 2020 · 1 comment
Open

Implement UInt128 with only BigInteger256 #22

weikengchen opened this issue Nov 23, 2020 · 1 comment
Labels
D-easy Difficulty: easy

Comments

@weikengchen
Copy link
Member

The current code adds the implementation of UInt128, which is the constraint version of the primitive type u128.

The current implementation uses num-bigint instead of BigInteger256. However, there is no reason not to use BigInteger256 beside the (slight) code complexity. It should be possible to revise the current implementation to be based on solely BigInteger256.

There is a significant benefit of not using num-bigint because r1cs-std is a fundamental crate that is used by many applications. It is good to just keep it lightweight.

@weikengchen weikengchen added D-easy Difficulty: easy help wanted labels Nov 23, 2020
@Pratyush
Copy link
Member

On the other hand, if nonnative is merged into r1cs-std in the future, then we'll have the num-bigint dependency anyway

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

No branches or pull requests

2 participants