mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-06 20:20:34 +00:00
commit
682a0e65b8
9 changed files with 24 additions and 20 deletions
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- name: Add target
|
- name: Add target
|
||||||
run: rustup target add ${{ matrix.target }}
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
@ -55,7 +55,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
# Build benchmarks to prevent bitrot
|
# Build benchmarks to prevent bitrot
|
||||||
- name: Build benchmarks
|
- name: Build benchmarks
|
||||||
|
|
@ -71,7 +71,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- name: cargo build
|
- name: cargo build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|
@ -85,7 +85,7 @@ jobs:
|
||||||
run: mdbook test -L target/debug/deps book/
|
run: mdbook test -L target/debug/deps book/
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Clippy (1.51.0)
|
name: Clippy (1.56.0)
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|
@ -93,13 +93,13 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
components: clippy
|
components: clippy
|
||||||
override: true
|
override: true
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
uses: actions-rs/clippy-check@v1
|
uses: actions-rs/clippy-check@v1
|
||||||
with:
|
with:
|
||||||
name: Clippy (1.51.0)
|
name: Clippy (1.56.0)
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
args: --all-features --all-targets -- -D warnings
|
args: --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
|
|
@ -158,7 +158,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- name: cargo fetch
|
- name: cargo fetch
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|
@ -181,7 +181,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.51.0
|
toolchain: 1.56.0
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@ and this project adheres to Rust's notion of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.4.0] - 2022-05-05
|
||||||
|
### Changed
|
||||||
|
- MSRV is now 1.56.0.
|
||||||
|
- Migrated to `ff 0.12`, `group 0.12`.
|
||||||
|
|
||||||
## [0.3.1] - 2022-04-20
|
## [0.3.1] - 2022-04-20
|
||||||
### Added
|
### Added
|
||||||
- `gpu` feature flag, which exposes implementations of the `GpuField` trait from
|
- `gpu` feature flag, which exposes implementations of the `GpuField` trait from
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pasta_curves"
|
name = "pasta_curves"
|
||||||
description = "Implementation of the Pallas and Vesta (Pasta) curve cycle"
|
description = "Implementation of the Pallas and Vesta (Pasta) curve cycle"
|
||||||
version = "0.3.1"
|
version = "0.4.0"
|
||||||
authors = [
|
authors = [
|
||||||
"Sean Bowe <sean@electriccoin.co>",
|
"Sean Bowe <sean@electriccoin.co>",
|
||||||
"Ying Tong Lai <yingtong@electriccoin.co>",
|
"Ying Tong Lai <yingtong@electriccoin.co>",
|
||||||
"Daira Hopwood <daira@electriccoin.co>",
|
"Daira Hopwood <daira@electriccoin.co>",
|
||||||
"Jack Grigg <jack@electriccoin.co>",
|
"Jack Grigg <jack@electriccoin.co>",
|
||||||
]
|
]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
rust-version = "1.56"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
repository = "https://github.com/zcash/pasta_curves"
|
repository = "https://github.com/zcash/pasta_curves"
|
||||||
documentation = "https://docs.rs/pasta_curves"
|
documentation = "https://docs.rs/pasta_curves"
|
||||||
|
|
@ -41,8 +42,8 @@ harness = false
|
||||||
required-features = ["alloc"]
|
required-features = ["alloc"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ff = { version = "0.11", default-features = false }
|
ff = { version = "0.12", default-features = false }
|
||||||
group = { version = "0.11", default-features = false }
|
group = { version = "0.12", default-features = false }
|
||||||
rand = { version = "0.8", default-features = false }
|
rand = { version = "0.8", default-features = false }
|
||||||
static_assertions = "1.1.0"
|
static_assertions = "1.1.0"
|
||||||
subtle = { version = "2.3", default-features = false }
|
subtle = { version = "2.3", default-features = false }
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Pallas and Vesta. More details about the Pasta curves can be found
|
||||||
|
|
||||||
## Minimum Supported Rust Version
|
## Minimum Supported Rust Version
|
||||||
|
|
||||||
Requires Rust **1.51** or higher.
|
Requires Rust **1.56** or higher.
|
||||||
|
|
||||||
Minimum supported Rust version can be changed in the future, but it will be done with a
|
Minimum supported Rust version can be changed in the future, but it will be done with a
|
||||||
minor version bump.
|
minor version bump.
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
1.51.0
|
1.56.0
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use core::assert;
|
||||||
#[cfg(feature = "sqrt-table")]
|
#[cfg(feature = "sqrt-table")]
|
||||||
use alloc::{boxed::Box, vec::Vec};
|
use alloc::{boxed::Box, vec::Vec};
|
||||||
#[cfg(feature = "sqrt-table")]
|
#[cfg(feature = "sqrt-table")]
|
||||||
use core::{convert::TryInto, marker::PhantomData};
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
const_assert!(size_of::<usize>() >= 4);
|
const_assert!(size_of::<usize>() >= 4);
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ pub trait SqrtRatio: ff::PrimeField {
|
||||||
///
|
///
|
||||||
/// Field implementations may override this to use an efficient addition chain.
|
/// Field implementations may override this to use an efficient addition chain.
|
||||||
fn pow_by_t_minus1_over2(&self) -> Self {
|
fn pow_by_t_minus1_over2(&self) -> Self {
|
||||||
ff::Field::pow_vartime(&self, &Self::T_MINUS1_OVER2)
|
ff::Field::pow_vartime(self, &Self::T_MINUS1_OVER2)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the lower 32 bits of this field element when expressed
|
/// Gets the lower 32 bits of this field element when expressed
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
use core::convert::TryInto;
|
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::ops::{Add, Mul, Neg, Sub};
|
use core::ops::{Add, Mul, Neg, Sub};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
use core::convert::TryInto;
|
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::ops::{Add, Mul, Neg, Sub};
|
use core::ops::{Add, Mul, Neg, Sub};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
#![allow(unknown_lints)]
|
#![allow(unknown_lints)]
|
||||||
#![allow(clippy::op_ref, clippy::same_item_push, clippy::upper_case_acronyms)]
|
#![allow(clippy::op_ref, clippy::same_item_push, clippy::upper_case_acronyms)]
|
||||||
#![deny(broken_intra_doc_links)]
|
#![deny(rustdoc::broken_intra_doc_links)]
|
||||||
#![deny(missing_debug_implementations)]
|
#![deny(missing_debug_implementations)]
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue