11 Commits

Author SHA1 Message Date
Tony Arcieri
2aade9ddcb 2021 edition upgrade; MSRV 1.56
Upgrades the edition, with changes primarily performed by
`cargo fix --edition`.

In order to keep the changes to a minimum, this doesn't include
automated idiom fixes (i.e. `cargo fix --edition-idioms`).

This is needed to unblock the edition upgrade for the RSA crate:
https://github.com/RustCrypto/RSA/pull/135
2022-02-01 16:24:03 -07:00
Friedel Ziegelmayer
3042607c90
feat: update dependencies 2019-12-11 00:48:19 +01:00
Robin Lambertz
874ab0fbaa feat: no_std support
* no_std support

* Use integer log2 when possible to estimate allocations

* Remove std features from a few dependencies

* Use libm for missing funcs in nostd environment

* Use autocfg to detect presence of i128

* Better CI test for nostd environment

* Move benchmark to a separate crate

* Make the tests pass in no_std builds

* Use thumbv7m target for nostd build test

* Add documentation about the no-std compatibility

* Make zeroize and prime features no_std-compatible

* Test each feature in nostd context

* Fix mac test to work in no_std environment

* Avoid using thread_rng in nostd tests

* Fix prime tests in nostd mode

* Fix all warnings and errors

* Only test nostd builds on nightly on travis

* Travis: Only do nostd builds on nightly
2019-10-13 15:14:14 +02:00
goldenMetteyya
58fd3e4024 Fixing 2019-04-29 00:52:12 +03:00
Josh Stone
90531ea643 cargo fmt 2019-01-22 12:52:52 +01:00
Josh Stone
07a22d447b Use better initial guesses for Roots 2019-01-22 12:52:34 +01:00
dignifiedquire
fb29d3cd80 update names 2018-12-12 14:14:34 +01:00
dignifiedquire
f7e8af05a4 chore: run rustfmt on all code 2018-08-06 15:13:09 -07:00
Thom Wiggers
5fe8a5fbdf
Get rid of num_traits::pow usage
See also #56
2018-07-19 17:12:38 +02:00
Manca Bizjak
2b473e9403 Implement optimized sqrt, cbrt methods
This commit overrides default implementations of
Roots::sqrt and Roots::cbrt for BigInt and BigUint
with optimized ones. It also improves tests and
resolves minor inconsistencies.

Signed-off-by: Manca Bizjak <manca.bizjak@xlab.si>
2018-07-13 12:52:40 +02:00
Manca Bizjak
1f2590656b Implement Roots for BigInt and BigUint
This commit implements num-integer::Roots trait
for BigInt and BigUint types, and also adds sqrt,
cbrt, nth_root as inherent methods to allow access
to them without importing Roots trait. For each
type tests were added as submodules in the roots
test module.

Signed-off-by: Manca Bizjak <manca.bizjak@xlab.si>
2018-07-11 12:14:46 +02:00