This change introduces the possibility to use either the classical OpenACS password hash algorithm "sa…
Show more
Stronger password hashes for OpenACSThis change introduces the possibility to use either the classicalOpenACS password hash algorithm "salted-sha1" or the SCRAM passordfunction "scram-sha-256". The latter can be used by (a) using themost recent version of NaviServer (from Sept 28, 2021 or newer) and(b) by configuring the password hash preferences via Kernel packageparameter "PasswordHashAlgorithm". The package parameter can contain alist of multiple hash algorithms in preference order. The mostpreferred available algorithm is chosen.By default, the "PasswordHashAlgorithm" is "salted-sha1", and thebehavior is as before. After upgrading to the new version of acs-tcland acs-kernel, the preference list can be configured. When a userlogs in and the preferred available algorithm is different from thepreviously used algorithm, the upgrade is performed for the userautomatically.The usage of SHA1 in OpenACS is easily target of security audits (see[1]). The biggest danger is that if somebody gets full access to the"users" table (e.g. when decommissioning a hard disk). In this casethe hashes can be attacked with dictionaries by using some cryptohardware (when someone gets raw access to the DB, one has usually someother big problems). However, by using the "scram-sha-256" hashfunction this danger is substantially reduced. This function computesa password hash using PBKDF2 (Password-Based Key Derivation Function2). This function is used to reduce vulnerabilities of brute-forceattacks against password hashes. The hash function of SCRAM is PBKDF2[RFC2898] with HMAC as the pseudorandom function (PRF) and with dkLen== output length of HMAC == output length of the digest function. So,it uses a better hash algorithm (sha-256 vs. sha1) and applies this ahigh number of times (15K times for a password hash computation).NaviServer supports as well the even better SCRYPT algorithm, but thisis only available when NaviServer is compiled with OpenSSL 3.0 ornewer. On the contrary, scram-sha-256 (actually PKCS5_PBKDF2_HMAC) isavailable since OpenSSL 1.0.0 (2015).All the improved hash functions require NaviServer with its tightintegration to the crypto functions of OpenSSL.[1] https://openacs.org/forums/message-view?message_id=5522562Show less