ingonyama-zk / icicle

A hardware acceleration library for compute intensive cryptography :ice_cube:
https://dev.ingonyama.com/icicle/overview
MIT License
329 stars 97 forks source link

feat: add `num_bits()` function #570

Closed Ethan-000 closed 2 months ago

Ethan-000 commented 2 months ago

Describe the changes

adding a num_bits() function similar to https://github.com/arkworks-rs/algebra/blob/dcf73a5f9610ba9d16a3c8e0de0b3835e5e5d5e4/ff/src/biginteger/mod.rs#L482

this could be useful for small field optimizations

Linked Issues

Resolves #

LeonHibnik commented 2 months ago

Thank you for your contribution @Ethan-000! Can you format your code according to https://github.com/ingonyama-zk/icicle?tab=readme-ov-file#development-contributions