1005 Commits

Author SHA1 Message Date
e0ff3fcf8e alnyan/yggdrasil: patch rand dependency 2024-11-01 12:49:27 +02:00
dignifiedquire
075cf5777d (cargo-release) version 0.8.2 2022-11-18 18:02:21 +01:00
Friedel Ziegelmayer
0aa3ca3ad4
deps: update smallvec (#47) 2022-11-18 17:54:15 +01:00
aumetra
4e3ff9884c
feat: add arbitrary support
adds arbitrary support to BigInt and BigUint
2022-11-18 17:47:25 +01:00
Tony Arcieri
f6b46ffe32
Improved Zeroize impl for BigInt's Sign (#39)
The `zeroize` crate defines a blanket impl of `Zeroize` for any type
with the `DefaultIsZeroes` marker trait, which replaces the value with
its `Default` using volatile writes with a memory fence.

This does require defining `Default` on `Sign`, but it seems like
`Sign::NoSign` is a fairly reasonable choice for a default.
2022-03-03 09:08:36 +01:00
dignifiedquire
158aea7d50 (cargo-release) version 0.8.1 2022-03-01 15:07:12 +01:00
Paolo Barbolini
fa8ce2dfc3
fix: enable the alloc feature of serde 2022-03-01 15:05:05 +01:00
Friedel Ziegelmayer
9c7fbac52c
Merge pull request #37 from dignifiedquire/bump-zeroize 2022-02-18 12:42:32 +01:00
dignifiedquire
0aa0679720 fix: update zeroize explicitlyg 2022-02-18 12:37:39 +01:00
dignifiedquire
e65d2d4c11 (cargo-release) version 0.8.0 2022-02-18 12:35:49 +01:00
dignifiedquire
d4b31995d2 remove outdated cargo-release file 2022-02-18 12:35:32 +01:00
Friedel Ziegelmayer
05cefd7448
Merge pull request #32 from tangramdotdev/remove-i128-feature
Unconditionally set has_i128
2022-02-02 12:29:24 +01:00
Friedel Ziegelmayer
c64439f509
Merge pull request #34 from tarcieri/2021-edition
2021 edition upgrade; MSRV 1.56
2022-02-02 12:28:38 +01:00
Friedel Ziegelmayer
24137e8fcc
Merge pull request #35 from tarcieri/zeroize-without-derive
Impl `zeroize` without using `zeroize_derive`
2022-02-02 12:27:32 +01:00
Tony Arcieri
679172c093 Impl zeroize without using zeroize_derive
The `zeroize_derive` crate has quite a few dependencies, and in
particular `syn` is a fairly large one with not-insignificant compile
times.

The usages of `zeroize` are fairly trivial with two impls zeroing a
total of three fields, which makes them easy to write by hand.

It takes more crate dependencies for the proc macro to do that
(`proc-macro2`, `quote`, `syn`, `synstructure`, and `zeroize_derive`
itself) than there are fields being zeroized, so I think it makes sense
to ditch the additional dependencies and write these impls by hand.
2022-02-01 16:36:50 -07:00
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
Ben Lovy
3ff6d82a77
Unconditionally set has_i128 2021-11-03 11:24:09 -04:00
Friedel Ziegelmayer
56576b592f
Merge pull request #28 from nicholasbishop/bishop-no-128-panic
Don't panic if autocfg probe fails
2021-07-29 10:43:29 +02:00
Nicholas Bishop
a2dc57562d Don't panic if autocfg probe fails
Motivation: [autocfg panics when building with `-Zbuild-std`][1].

Instead of panicking when the `i128` feature is requested but
`probe_type("i128")` fails, just go ahead and enable the feature. If
`i128` truly isn't available then compilation will still fail, just
later on. This is unlikely to be an issue in practice since [`i128`
was stabilized in Rust 1.26.0][2].

Tested by building with:

    cargo +nightly build --target=x86_64-unknown-uefi \
        -Zbuild-std=core,alloc --no-default-features \
        --features=i128

[1]: https://github.com/cuviper/autocfg/issues/34
[2]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1260-2018-05-10
2021-06-02 11:49:09 -04:00
Boris-Chengbiao Zhou
41264ca629
chore(deps): bump autocfg to 1.0 2021-05-13 11:44:10 +02:00
dignifiedquire
221ac0fba0 chore(num-bigint-dig): release 0.7.0 2021-03-09 14:33:58 +01:00
dignifiedquire
4cb458e9c5 docs(readme): update version 2021-03-09 14:33:37 +01:00
Friedel Ziegelmayer
e88a3f8a5c
Merge pull request #25 from phayes/master 2021-03-05 13:36:26 +01:00
phayes
1f333af1e6
Updating the version of rand used in the benchmarch crate 2021-02-18 08:03:28 -08:00
phayes
8b3f25a305
Making sure to use std_rng when using prime, not that this does not require the standard library 2021-02-17 10:59:46 -08:00
phayes
58be206fa7
Updating rand dependency to 0.8 2021-02-15 07:37:51 -08:00
dignifiedquire
f49304708c chore(num-bigint-dig): release 0.6.1 2020-12-02 17:46:49 +01:00
Friedel Ziegelmayer
d82880dcc6
Merge pull request #22 from dignifiedquire/fix-nightly
fix: disable rand/nightly to compile again on rust nightly
2020-12-02 17:46:32 +01:00
dignifiedquire
bb59029131 fix: disable rand/nightly to compile again on rust nightly 2020-12-02 17:39:19 +01:00
dignifiedquire
6f17ec8059 chore(num-bigint-dig): release 0.6.0 2019-12-11 00:48:46 +01:00
Friedel Ziegelmayer
3042607c90
feat: update dependencies 2019-12-11 00:48:19 +01:00
Friedel Ziegelmayer
f220490a7a
Merge pull request #14 from tarcieri/zeroize/1.1
feat(deps): update zeroize to 1.1.0
2019-12-09 23:44:19 +01:00
Tony Arcieri
266f1b0652 feat(deps): update zeroize to 1.1 2019-12-09 09:01:55 -08:00
dignifiedquire
5b3de9b0bb chore(num-bigint-dig): release 0.5.0 2019-10-13 16:29:37 +02:00
Friedel Ziegelmayer
4afb3f0c2a
New deps (#13)
New deps
2019-10-13 16:29:21 +02:00
dignifiedquire
7a587a8ecf chore: fix crate version 2019-10-13 15:33:38 +02:00
dignifiedquire
7e7b231071 feat(deps): update zeroize 2019-10-13 15:30:50 +02:00
dignifiedquire
bb167d4a9a refactor: fix compiler warnings 2019-10-13 15:21:56 +02:00
dignifiedquire
91dd6fcc8b chore: add release config 2019-10-13 15:16:19 +02:00
dignifiedquire
6ab1d089d9 chore: remove unused bors.toml 2019-10-13 15:15:29 +02: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
Friedel Ziegelmayer
688ad829e5
fix(gcd): handle edge cases around zero 2019-06-20 13:51:54 +02:00
goldenMetteyya
438dffbf71
Update lib.rs 2019-05-25 15:27:55 +03:00
goldenMetteyya
5f6c95d3d1 remove console logs 2019-04-29 17:03:30 +03:00
goldenMetteyya
02d4206dd6 bug fix 2019-04-29 16:59:41 +03:00
goldenMetteyya
607338e5af condition bug fix 2019-04-29 01:49:18 +03:00
goldenMetteyya
603c200bce lighten test case computational hardness 2019-04-29 01:10:34 +03:00
goldenMetteyya
58fd3e4024 Fixing 2019-04-29 00:52:12 +03:00
goldenMetteyya
fee800e2ac travis 2019-04-28 21:42:41 +03:00
goldenMetteyya
67e93777e4 all tests pass locally but travis not happy 2019-04-28 21:40:44 +03:00