]> git.lizzy.rs Git - PAKEs.git/blobdiff - srp/src/lib.rs
2021 edition bump + doc improvements; MSRV 1.56 (#80)
[PAKEs.git] / srp / src / lib.rs
index 8e2f1f75e419fa0354bd5edc465132c83306e4d6..375dfb3605bc045b8c7d48b5331bc4b8c4ac3638 100644 (file)
@@ -1,20 +1,13 @@
-//! [Secure Remote Password][1] (SRP) protocol implementation.
-//!
-//! This implementation is generic over hash functions using
-//! [`Digest`](https://docs.rs/digest) trait, so you will need to choose a hash
-//! function, e.g. `Sha256` from [`sha2`](https://crates.io/crates/sha2) crate.
-//! Additionally this crate allows to use a specialized password hashing
-//! algorithm for private key computation instead of method described in the
-//! SRP literature.
-//!
-//! Compatibility with over implementations was not yet tested.
-//!
+#![allow(clippy::many_single_char_names)]
+#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
+#![doc = include_str!("../README.md")]
+
 //! # Usage
-//! Add `srp` dependecy to your `Cargo.toml`:
+//! Add `srp` dependency to your `Cargo.toml`:
 //!
 //! ```toml
 //! [dependencies]
-//! rand = "0.3"
+//! srp = "0.4"
 //! ```
 //!
 //! and this to your crate root:
@@ -27,7 +20,7 @@
 //! [`server`](server/index.html) modules.
 //!
 //! # Algorithm description
-//! Here we briefly describe implemented algroithm. For additionall information
+//! Here we briefly describe implemented algorithm. For additional information
 //! refer to SRP literature. All arithmetic is done modulo `N`, where `N` is a
 //! large safe prime (`N = 2q+1`, where `q` is prime). Additionally `g` MUST be
 //! a generator modulo `N`. It's STRONGLY recommended to use SRP parameters
@@ -43,8 +36,7 @@
 //! |`M1 = H(A ‖ B ‖ K)`     |     — `M1` —>     | (verify `M1`)                   |
 //! |(verify `M2`)           |    <— `M2` —      | `M2 = H(A ‖ M1 ‖ K)`            |
 //!
-//! Variables and notations have the following
-//! meaning:
+//! Variables and notations have the following meaning:
 //!
 //! - `I` — user identity (username)
 //! - `P` — user password
 //!
 //! [1]: https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
 //! [2]: https://tools.ietf.org/html/rfc5054
-extern crate digest;
-extern crate generic_array;
-extern crate num;
-#[macro_use]
-extern crate lazy_static;
-
-#[cfg(test)]
-extern crate sha_1;
 
 pub mod client;
 pub mod groups;
 pub mod server;
-mod tools;
 pub mod types;