aboutsummaryrefslogtreecommitdiff
path: root/srp/src
diff options
context:
space:
mode:
authorАртём Павлов [Artyom Pavlov] <newpavlov@gmail.com>2017-08-18 01:29:21 +0300
committerАртём Павлов [Artyom Pavlov] <newpavlov@gmail.com>2017-08-18 01:29:21 +0300
commitd4bd00cd5466cf2472c13868104c8c18741cf82d (patch)
tree62fc518bf9058a960190b3817a43896b7d86bfc4 /srp/src
parente40be34281ad7afe1976529a0e4a961153f9b6dc (diff)
downloadPAKEs-d4bd00cd5466cf2472c13868104c8c18741cf82d.tar.xz
Clippy updates
Diffstat (limited to 'srp/src')
-rw-r--r--srp/src/client.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/srp/src/client.rs b/srp/src/client.rs
index 4348f4f..a47bb28 100644
--- a/srp/src/client.rs
+++ b/srp/src/client.rs
@@ -48,8 +48,8 @@
//!
//! For user registration on the server first generate salt (e.g. 32 bytes long)
//! and get password verifier which depends on private key. Send useranme, salt
-//! and password verifier over protected channel to protect against MitM for
-//! registration.
+//! and password verifier over protected channel to protect against
+//! Man-in-the-middle (MITM) attack for registration.
//!
//! ```ignore
//! let pwd_verifier = client.get_password_verifier(&private_key);
@@ -112,7 +112,7 @@ impl<'a, D: Digest> SrpClient<'a, D> {
/// Get password verfier for user registration on the server
pub fn get_password_verifier(&self, private_key: &[u8]) -> Vec<u8> {
- let x = BigUint::from_bytes_be(&private_key);
+ let x = BigUint::from_bytes_be(private_key);
let v = self.params.powm(&x);
v.to_bytes_be()
}
@@ -152,7 +152,7 @@ impl<'a, D: Digest> SrpClient<'a, D> {
return Err(SrpAuthError{ description: "Malicious b_pub value" })
}
- let x = BigUint::from_bytes_be(&private_key);
+ let x = BigUint::from_bytes_be(private_key);
let key = self.calc_key(&b_pub, &x, &u);
// M1 = H(A, B, K)
let proof = {