OpenZKP
num
OpenZKP | num | |
---|---|---|
2 | 3 | |
622 | 990 | |
1.0% | 2.3% | |
0.0 | 4.6 | |
about 1 year ago | 9 days ago | |
Rust | Rust | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
OpenZKP
-
Donald Knuth’s Algorithm D, its implementation in Hacker’s Delight and elsewhere
Here is my optimized in-place Rust implementation [1].
It is a very tricky algorithm to get right. There are many edge cases that only happen for ~2^-64 fractions of the input space, so hard to find even with fuzz-testing. Best strategy is to implement it for small limbs first, and fuzz that well.
[1] https://github.com/0xProject/OpenZKP/blob/master/algebra/u25...
-
A single issue with Rust that kills me every time with mathematics (rust repo issue 20671)
I've also hit this issue while writing code generic over prime fields by-reference. I ended up defining traits FieldLike and RefFieldLike and anotating all functions as
num
-
I've been learning Rust for 3 days and this is my first impression
Use num: https://github.com/rust-num/num
- BigInts in std?
-
A single issue with Rust that kills me every time with mathematics (rust repo issue 20671)
The num crate is worth a look - they do implement some of these things via macros. https://github.com/rust-num/num
What are some alternatives?
libtorsion - C crypto library
derive_more - Some more derive(Trait) options
num-bigint - Big integer types for Rust
nim-stint - Stack-based arbitrary-precision integers - Fast and portable with natural syntax for resource-restricted devices.
num-primes - A Rust Library For Generating Large Composite, Prime, and Safe Prime Numbers
style - css for rust
proc-macro-workshop - Learn to write Rust procedural macros [Rust Latam conference, Montevideo Uruguay, March 2019]
pipe-trait - Make it possible to chain regular functions
rfcs - RFCs for changes to Rust