Skip to content

BigInt library for Aztec's noir language

License

Notifications You must be signed in to change notification settings

onurinanc/noir-bigint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noir BigInt

CI MIT License

This library provides a custom BigUint56 data type, allowing for computations on large unsigned integers. The integers are represented with a fixed number of limbs, each of which is a 56-bit unsigned integer.

We utilize u56 limbs for two primary reasons:

  1. 56 is divisible by 8, simplifying conversions to/from bytes.
  2. Multiplication requires a double-width intermediate value and u112 is the maximum double-width value that can be represented in Noir.

This library provides various functionalities such as arithmetic operations (addition, subtraction, multiplication, division), bitwise operations (left shift, right shift), comparisons and conversions (to bytes, to bits).

Installation

In your Nargo.toml file, add the following dependency:

[dependencies]
noir_bigint = { tag = "v0.0.1", git = "https://github.com/shuklaayush/noir-bigint" }

Testing

Tests are run using nargo:

nargo test

All tests are run as part of the CI pipeline test.yaml.

Contributing

Contributions are welcome! Please adhere to the following guidelines:

  • Open a pull request with a clear description of your changes.
  • Changes should aim to improve code efficiency or readability.
  • Add appropriate tests, ensuring all pass before submission.

Acknowledgements

Disclaimer

This is experimental software and is provided on an "as is" and "as available" basis. We do not give any warranties and will not be liable for any losses incurred through any use of this code base.

About

BigInt library for Aztec's noir language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%