From f026e7cd38919451b100e01df18e4d8047a0107b Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Wed, 20 Oct 2021 14:43:02 +0900 Subject: [PATCH] auth: Add a disclaimer around the argon hash Some people initially thought that the fixed salt was a security flaw. This comment clarifies the role of the Argon hash and justifies the fixed salt. --- auth/src/opaque.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/auth/src/opaque.rs b/auth/src/opaque.rs index 7648d58..571c3b8 100644 --- a/auth/src/opaque.rs +++ b/auth/src/opaque.rs @@ -15,6 +15,11 @@ pub type KeyPair = opaque_ke::keypair::KeyPair<::Gr /// A wrapper around argon2 to provide the [`opaque_ke::slow_hash::SlowHash`] trait. pub struct ArgonHasher; +/// The Argon hasher used for bruteforce protection. +/// +/// Note that it isn't used to "hash the passwords", so it doesn't need a variable salt. Instead, +/// it's used as part of the OPAQUE protocol to add a slow hashing method, making bruteforce +/// attacks prohibitively more expensive. impl ArgonHasher { /// Fixed salt, doesn't affect the security. It is only used to make attacks more /// computationally intensive, it doesn't serve any security purpose.