diff --git a/.github/workflows/aucpace.yml b/.github/workflows/aucpace.yml index c14532b..4448889 100644 --- a/.github/workflows/aucpace.yml +++ b/.github/workflows/aucpace.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: rust: - - 1.61 # MSRV + - 1.85 # MSRV - stable target: - thumbv7em-none-eabi @@ -42,7 +42,7 @@ jobs: strategy: matrix: rust: - - 1.61 # MSRV + - 1.85 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/spake2.yml b/.github/workflows/spake2.yml index ad5db38..377b477 100644 --- a/.github/workflows/spake2.yml +++ b/.github/workflows/spake2.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -40,7 +40,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/srp.yml b/.github/workflows/srp.yml index 6a27fbd..f2a677f 100644 --- a/.github/workflows/srp.yml +++ b/.github/workflows/srp.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: rust: - - 1.61 # MSRV + - 1.85 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index fcacb63..a814573 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.85.1 + toolchain: 1.91.0 components: clippy - run: cargo clippy --all -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index f1ec3f2..64a0ca2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "atomic-polyfill" @@ -476,7 +476,7 @@ dependencies = [ [[package]] name = "spake2" -version = "0.4.0" +version = "0.5.0-pre" dependencies = [ "bencher", "curve25519-dalek", diff --git a/aucpace/Cargo.toml b/aucpace/Cargo.toml index e64e8c4..8071312 100644 --- a/aucpace/Cargo.toml +++ b/aucpace/Cargo.toml @@ -11,8 +11,8 @@ keywords = ["crypto", "pake", "authentication"] categories = ["cryptography", "authentication"] exclude = [".gitignore"] readme = "README.md" -edition = "2021" -rust-version = "1.61" +edition = "2024" +rust-version = "1.85" [dependencies] curve25519-dalek = { version = "4", default-features = false, features = [ diff --git a/aucpace/README.md b/aucpace/README.md index 76f1e0f..b9af0f5 100644 --- a/aucpace/README.md +++ b/aucpace/README.md @@ -56,7 +56,7 @@ USE AT YOUR OWN RISK! ## Minimum Supported Rust Version -Rust **1.61** or higher. +Rust **1.85** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. @@ -85,7 +85,7 @@ dual licensed as above, without any additional terms or conditions. [build-image]: https://github.com/RustCrypto/PAKEs/actions/workflows/aucpace.yml/badge.svg [build-link]: https://github.com/RustCrypto/PAKEs/actions/workflows/aucpace.yml [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260045-PAKEs diff --git a/aucpace/examples/key_agreement.rs b/aucpace/examples/key_agreement.rs index 3c1fff3..735f437 100644 --- a/aucpace/examples/key_agreement.rs +++ b/aucpace/examples/key_agreement.rs @@ -3,8 +3,8 @@ use curve25519_dalek::ristretto::RistrettoPoint; use password_hash::{ParamsString, SaltString}; use rand_core::OsRng; use scrypt::{Params, Scrypt}; -use sha2::digest::Output; use sha2::Sha512; +use sha2::digest::Output; use std::io::{Read, Write}; use std::net::{IpAddr, Ipv4Addr, SocketAddr, TcpListener, TcpStream}; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/aucpace/examples/key_agreement_no_std.rs b/aucpace/examples/key_agreement_no_std.rs index d0217c7..e930c53 100644 --- a/aucpace/examples/key_agreement_no_std.rs +++ b/aucpace/examples/key_agreement_no_std.rs @@ -21,9 +21,7 @@ macro_rules! send { /// function like macro to wrap receiving data over a tcp stream, returns the message received macro_rules! recv { - ($buf:ident) => {{ - postcard::from_bytes(&$buf).unwrap() - }}; + ($buf:ident) => {{ postcard::from_bytes(&$buf).unwrap() }}; } fn main() -> Result<()> { diff --git a/aucpace/examples/key_agreement_partial_aug.rs b/aucpace/examples/key_agreement_partial_aug.rs index da2b41e..08bf9fd 100644 --- a/aucpace/examples/key_agreement_partial_aug.rs +++ b/aucpace/examples/key_agreement_partial_aug.rs @@ -6,8 +6,8 @@ use curve25519_dalek::scalar::Scalar; use password_hash::{ParamsString, SaltString}; use rand_core::OsRng; use scrypt::{Params, Scrypt}; -use sha2::digest::Output; use sha2::Sha512; +use sha2::digest::Output; use std::io::{Read, Write}; use std::net::{IpAddr, Ipv4Addr, SocketAddr, TcpListener, TcpStream}; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/aucpace/examples/key_agreement_strong.rs b/aucpace/examples/key_agreement_strong.rs index 3422eb1..1ae06ee 100644 --- a/aucpace/examples/key_agreement_strong.rs +++ b/aucpace/examples/key_agreement_strong.rs @@ -4,8 +4,8 @@ use curve25519_dalek::scalar::Scalar; use password_hash::ParamsString; use rand_core::OsRng; use scrypt::{Params, Scrypt}; -use sha2::digest::Output; use sha2::Sha512; +use sha2::digest::Output; use std::io::{Read, Write}; use std::net::{IpAddr, Ipv4Addr, SocketAddr, TcpListener, TcpStream}; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/aucpace/src/client.rs b/aucpace/src/client.rs index d28c6e1..83f3707 100644 --- a/aucpace/src/client.rs +++ b/aucpace/src/client.rs @@ -1,8 +1,8 @@ use crate::{ errors::{Error, Result}, utils::{ - compute_authenticator_messages, compute_first_session_key, compute_session_key, - compute_ssid, generate_keypair, generate_nonce, scalar_from_hash, H0, + H0, compute_authenticator_messages, compute_first_session_key, compute_session_key, + compute_ssid, generate_keypair, generate_nonce, scalar_from_hash, }, }; @@ -944,11 +944,9 @@ where buf[u] = b':'; buf[(u + 1)..=(u + p)].copy_from_slice(pass); - let hash = hasher + hasher .hash_password_customized(&buf[0..=(u + p)], None, None, params, salt) - .map_err(Error::PasswordHashing); - - hash + .map_err(Error::PasswordHashing) } /// Hash a username and password with the given password hasher diff --git a/aucpace/src/server.rs b/aucpace/src/server.rs index 7d2b021..c421d92 100644 --- a/aucpace/src/server.rs +++ b/aucpace/src/server.rs @@ -1,9 +1,9 @@ +use crate::Database; use crate::constants::MIN_SSID_LEN; use crate::utils::{ - compute_authenticator_messages, compute_first_session_key, compute_session_key, compute_ssid, - generate_keypair, generate_nonce, generate_server_keypair, H0, + H0, compute_authenticator_messages, compute_first_session_key, compute_session_key, + compute_ssid, generate_keypair, generate_nonce, generate_server_keypair, }; -use crate::Database; use crate::{Error, Result}; use core::marker::PhantomData; use curve25519_dalek::traits::IsIdentity; diff --git a/spake2/Cargo.toml b/spake2/Cargo.toml index dbab323..587eb78 100644 --- a/spake2/Cargo.toml +++ b/spake2/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spake2" -version = "0.4.0" +version = "0.5.0-pre" authors = ["Brian Warner "] description = "The SPAKE2 password-authenticated key-exchange algorithm." documentation = "https://docs.rs/spake2" @@ -11,8 +11,8 @@ keywords = ["crypto", "pake", "authentication"] categories = ["cryptography", "authentication"] exclude = [".gitignore"] readme = "README.md" -edition = "2021" -rust-version = "1.60" +edition = "2024" +rust-version = "1.85" [dependencies] curve25519-dalek = { version = "4.1.3", default-features = false, features = ["rand_core"] } diff --git a/spake2/README.md b/spake2/README.md index 2463254..86f09d6 100644 --- a/spake2/README.md +++ b/spake2/README.md @@ -76,7 +76,7 @@ USE AT YOUR OWN RISK! ## Minimum Supported Rust Version -Rust **1.60** or higher. +Rust **1.85** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. @@ -103,7 +103,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/spake2/badge.svg [docs-link]: https://docs.rs/spake2/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260045-PAKEs [build-image]: https://github.com/RustCrypto/PAKEs/actions/workflows/spake2.yml/badge.svg diff --git a/spake2/src/ed25519.rs b/spake2/src/ed25519.rs index 7c311b0..74caac9 100644 --- a/spake2/src/ed25519.rs +++ b/spake2/src/ed25519.rs @@ -1,6 +1,6 @@ //! "Edwards25519" elliptic curve group. -use crate::{c2_Element, c2_Scalar, Group}; +use crate::{Group, c2_Element, c2_Scalar}; use alloc::vec::Vec; use curve25519_dalek::{constants::ED25519_BASEPOINT_POINT, edwards::CompressedEdwardsY}; use hkdf::Hkdf; diff --git a/srp/Cargo.toml b/srp/Cargo.toml index 09a4ebb..ff9c35d 100644 --- a/srp/Cargo.toml +++ b/srp/Cargo.toml @@ -9,8 +9,8 @@ repository = "https://github.com/RustCrypto/PAKEs" keywords = ["crypto", "pake", "authentication"] categories = ["cryptography", "authentication"] readme = "README.md" -edition = "2021" -rust-version = "1.61" +edition = "2024" +rust-version = "1.85" [dependencies] num-bigint = "0.4" diff --git a/srp/README.md b/srp/README.md index 27630e4..fec5a56 100644 --- a/srp/README.md +++ b/srp/README.md @@ -32,7 +32,7 @@ USE AT YOUR OWN RISK! ## Minimum Supported Rust Version -Rust **1.61** or higher. +Rust **1.85** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. @@ -59,7 +59,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/srp/badge.svg [docs-link]: https://docs.rs/srp/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260045-PAKEs [build-image]: https://github.com/RustCrypto/PAKEs/actions/workflows/srp.yml/badge.svg