[package]
name = "spake2"
version = "0.1.2-alpha.0"
+edition = "2018"
authors = ["Brian Warner <warner@lothar.com>"]
description = "The SPAKE2 password-authenticated key-exchange algorithm."
documentation = "https://docs.rs/spake2"
-#[macro_use]
-extern crate bencher;
-
-extern crate spake2;
-
use bencher::Bencher;
+use bencher::{benchmark_group, benchmark_main};
use spake2::{Ed25519Group, Identity, Password, SPAKE2};
fn spake2_start(bench: &mut Bencher) {
#![deny(warnings)]
#![forbid(unsafe_code)]
-extern crate curve25519_dalek;
-extern crate hex;
-extern crate hkdf;
-extern crate num_bigint;
-extern crate rand;
-extern crate sha2;
-
use curve25519_dalek::constants::ED25519_BASEPOINT_POINT;
use curve25519_dalek::edwards::CompressedEdwardsY;
use curve25519_dalek::edwards::EdwardsPoint as c2_Element;
use curve25519_dalek::scalar::Scalar as c2_Scalar;
-
use hkdf::Hkdf;
use rand::{rngs::OsRng, CryptoRng, Rng};
use sha2::{Digest, Sha256};
}
impl<G: Group> fmt::Debug for SPAKE2<G> {
- fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("SPAKE2")
.field("group", &G::name())
.field("side", &self.side)