Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/crypto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.52.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.52.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/elliptic-curve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.52.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.52.0 # MSRV
- stable
- nightly
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # Highest MSRV in repo
toolchain: 1.52.0
components: clippy
override: true
profile: minimal
Expand Down
4 changes: 2 additions & 2 deletions crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ access compatible versions of all traits from the Rust Crypto project.

## Minimum Supported Rust Version

Rust **1.51** or higher.
Rust **1.52** or higher.

Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.
Expand Down Expand Up @@ -46,7 +46,7 @@ dual licensed as above, without any additional terms or conditions.
[docs-image]: https://docs.rs/crypto/badge.svg
[docs-link]: https://docs.rs/crypto/
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.51+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.52+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260050-Traits
[build-image]: https://github.com/RustCrypto/traits/workflows/crypto/badge.svg?branch=master&event=push
Expand Down
4 changes: 2 additions & 2 deletions elliptic-curve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and public/secret keys composed thereof.

## Minimum Supported Rust Version

Requires Rust **1.51** or higher.
Requires Rust **1.52** or higher.

Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.
Expand Down Expand Up @@ -47,7 +47,7 @@ dual licensed as above, without any additional terms or conditions.
[docs-image]: https://docs.rs/elliptic-curve/badge.svg
[docs-link]: https://docs.rs/elliptic-curve/
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.51+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.52+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260040-elliptic-curves
[build-image]: https://github.com/RustCrypto/elliptic-curves/workflows/elliptic-curve%20crate/badge.svg?branch=master&event=push
Expand Down
10 changes: 9 additions & 1 deletion elliptic-curve/src/arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Elliptic curve arithmetic traits.

use crate::{Curve, FieldBytes};
use crate::{Curve, FieldBytes, PrimeCurve};
use core::fmt::Debug;
use subtle::{ConditionallySelectable, ConstantTimeEq};
use zeroize::DefaultIsZeroes;
Expand All @@ -22,6 +22,14 @@ pub trait AffineArithmetic: Curve + ScalarArithmetic {
+ Sync;
}

/// Prime order elliptic curve with projective arithmetic implementation.
pub trait PrimeCurveArithmetic:
PrimeCurve + ProjectiveArithmetic<ProjectivePoint = Self::CurveGroup>
{
/// Prime order elliptic curve group.
type CurveGroup: group::prime::PrimeCurve<Affine = <Self as AffineArithmetic>::AffinePoint>;
}

/// Elliptic curve with projective arithmetic implementation.
#[cfg_attr(docsrs, doc(cfg(feature = "arithmetic")))]
pub trait ProjectiveArithmetic: Curve + AffineArithmetic {
Expand Down
6 changes: 4 additions & 2 deletions elliptic-curve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!
//! ## Minimum Supported Rust Version
//!
//! Rust **1.51** or higher.
//! Rust **1.52** or higher.
//!
//! Minimum supported Rust version can be changed in the future, but it will be
//! done with a minor version bump.
Expand Down Expand Up @@ -70,7 +70,9 @@ pub use zeroize;
#[cfg(feature = "arithmetic")]
pub use {
crate::{
arithmetic::{AffineArithmetic, ProjectiveArithmetic, ScalarArithmetic},
arithmetic::{
AffineArithmetic, PrimeCurveArithmetic, ProjectiveArithmetic, ScalarArithmetic,
},
public_key::PublicKey,
scalar::{non_zero::NonZeroScalar, Scalar},
},
Expand Down