Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rust version to 1.70 #313 #431

Merged
merged 11 commits into from
Jun 22, 2023
30 changes: 9 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,22 @@ jobs:
uses: actions/checkout@v3

- name: Install stable toolchain
id: install-rust
uses: actions-rs/toolchain@v1
# This uses the version specified in rust-toolchain.toml by default
uses: IronCoreLabs/rust-toolchain@v1
with:
profile: minimal
# Set Rust version here!
toolchain: 1.69.0
override: true
components: rustfmt, clippy
components: clippy, rust-docs

- name: Install nightly toolchain
id: install-rust-nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: rustfmt
- name: Install nightly toolchain (for rustfmt only)
run: rustup toolchain install nightly --profile minimal --component rustfmt

- name: Install cargo-make (fast!)
uses: davidB/rust-cargo-make@v1

# Caching for Rust files. Must be called after installing Rust toolchain.
# See https://github.com/Swatinem/rust-cache for more information.
- name: Set Up Cache
- name: Cache Rust files
uses: Swatinem/rust-cache@v2

- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: --debug cargo-make

- name: Run full CI (fmt, clippy, build, test, doctest, docs)
run: cargo make ci

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project relies on the `libpaillier` Rust crate using the GMP backend. GMP s

### Rust Dependencies and Versions

The minimum supported stable Rust version is cargo 1.68.
The minimum supported stable Rust version is 1.68 (the library has been tested up to version 1.70).

This library has been tested with GMP version 6.2.1.

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "stable-2023-04-20"
channel = "1.70"
2 changes: 1 addition & 1 deletion src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub enum ProtocolType {
/// all messages generated by participants of a sub-protocol session.
/// for its [`Participant`]. This includes:
/// 1. Initializing a session by calling [`Participant::initialize_message()`].
/// The message returned from that function must be passed back to the
/// The message returned from that function must be passed back to the
/// [`Participant`] in order to begin the protocol execution.
/// 2. Receiving messages sent by other participants, and passing
/// them to the participant by calling
Expand Down
17 changes: 8 additions & 9 deletions src/zkp/piaffg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,8 @@ impl Proof2 for PiAffgProof {
// `p`rover's or the `v`erifier's encryption key. The prover wants to
// prove the following three claims:
//
// 1. `C_v[z] ^ x · C_v[y] = D`, where `C_v[z]` is a public value
// provided by the verifier and `D` is a public value computed by the
// prover.
// 1. `C_v[z] ^ x · C_v[y] = D`, where `C_v[z]` is a public value provided by
// the verifier and `D` is a public value computed by the prover.
//
// 2. `C_p[y] = Y`, where `Y` is a public value provided by the prover.
//
Expand All @@ -246,14 +245,14 @@ impl Proof2 for PiAffgProof {
// following three conditions, using a challenge value `e` produced by
// using Fiat-Shamir:
//
// 1. C_v[z] ^ (ɑ + e x) · C_v[β + e y] = A * D ^ e (note that if `D`
// "encodes" `z x + y` this check will pass)
// 1. C_v[z] ^ (ɑ + e x) · C_v[β + e y] = A * D ^ e (note that if `D` "encodes"
// `z x + y` this check will pass)
//
// 2. g ^ (ɑ + e x) = B_x · X ^ e (note that if `X = g ^ x` this check
// will pass)
// 2. g ^ (ɑ + e x) = B_x · X ^ e (note that if `X = g ^ x` this check will
// pass)
//
// 3. C_p[β + e y] = B_y · Y ^ e (note that if `Y = C_p[y]` this check
// will pass)
// 3. C_p[β + e y] = B_y · Y ^ e (note that if `Y = C_p[y]` this check will
// pass)
//
// This checks the main properties we are going for, however it doesn't
// enforce yet that `ɑ + e x`, `β + e y`, etc. were computed correctly.
Expand Down