Skip to content

Commit

Permalink
Upgrade to crypto-bigint rc.8 (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm authored Jan 23, 2025
1 parent d87bcdc commit 8221c5c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
rust:
- 1.81.0 # MSRV
- 1.83.0 # MSRV
- stable
target:
- wasm32-unknown-unknown
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
matrix:
include:
- target: x86_64-unknown-linux-gnu
rust: 1.81.0 # MSRV
rust: 1.83.0 # MSRV
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
Expand All @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.81.0 # MSRV
toolchain: 1.83.0 # MSRV
components: clippy
override: true
profile: minimal
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.3.0] - in development

- Switch the protocol framework to `manul`. ([#156])

- Bumped MSRV to 1.83 ([#176])

[#156]: https://github.com/entropyxyz/synedrion/pull/156


## [0.2.0] - 2024-11-17

- Signature and elliptic curve dependencies reset back to stable versions. (#[154])
- Signature and elliptic curve dependencies reset back to stable versions. ([#154])


[#154]: https://github.com/entropyxyz/synedrion/pull/154
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions synedrion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "synedrion"
authors = ['Entropy Cryptography <[email protected]>']
version = "0.3.0-dev"
edition = "2021"
rust-version = "1.81"
rust-version = "1.83"
license = "AGPL-3.0-or-later"
description = "Threshold signing library based on Canetti-Gennaro-Goldfeder-Makriyannis-Peled '21 scheme"
repository = "https://github.com/entropyxyz/synedrion"
Expand All @@ -26,7 +26,7 @@ tracing = { version = "0.1.41", default-features = false }

# Note: `alloc` is needed for `crytpto-bigint`'s dependency `serdect` to be able
# to serialize Uints in human-readable formats.
crypto-bigint = { version = "0.6.0-rc.6", default-features = false, features = [
crypto-bigint = { version = "0.6.0-rc.8", default-features = false, features = [
"serde",
"alloc",
"rand_core",
Expand Down
8 changes: 4 additions & 4 deletions synedrion/src/paillier/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,16 @@ mod tests {
Token::Field("p"),
Token::Str(
concat![
"cf4ee6be31dbfa5fe153ec138abb8a8d8271386e6e359dd18f0ef4b8f7301391",
"2f58867d5d8fb0f30b1d96f215100ff97097b3baac10c8cc3aac969e7df3ac8e"
"e3b7608d5c3161cca23711e75436575251f55e9c3b34412388f592f71c638c73",
"edf68a6af97aab03faff8c42357a8c50fb2110f1c12d8628debd5eefb0f676f3"
]
.to_string(),
),
Token::Field("q"),
Token::Str(
concat![
"732bbb2b9a150d2797ab52dde9dd00f467b6608d5c3161cca23711e754365752",
"51f55e9c3b34412388f592f71c638c73edf68a6af97aab03faff8c42357a8cd0"
"17ea88a0e3187f0353c7c092f708369f5c6267e30c2a4c23a2eae9b524ffe0ed",
"227fc2a20e965b6f697f913fcc281e5bde33fc435391bd3650d5950d5407db92"
]
.to_string(),
),
Expand Down
8 changes: 2 additions & 6 deletions synedrion/src/paillier/params.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use core::ops::RemAssign;

use crypto_bigint::{
modular::Retrieve,
subtle::{ConditionallyNegatable, ConditionallySelectable, ConstantTimeGreater, CtOption},
Bounded, Encoding, Gcd, Integer, InvMod, Invert, Monty, NonZero, PowBoundedExp, RandomMod,
Bounded, Encoding, Gcd, Integer, InvMod, Invert, Monty, PowBoundedExp, RandomMod,
};
use crypto_primes::RandomPrimeWithRng;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -53,9 +51,7 @@ pub trait PaillierParams: core::fmt::Debug + PartialEq + Eq + Clone + Send + Syn
+ Encoding<Repr: Zeroize>
+ Hashable
+ HasWide<Wide = Self::WideUint>
// TODO: remove when https://github.com/RustCrypto/crypto-bigint/pull/709 is merged
+ for<'a> RemAssign<&'a NonZero<Self::Uint>>
+ InvMod
+ InvMod<Output = Self::Uint>
+ RandomMod
+ RandomPrimeWithRng
+ Serialize
Expand Down

0 comments on commit 8221c5c

Please sign in to comment.