Mailing List Archive

svn commit: r1916749 - in /httpd/httpd/branches/2.4.x: ./ docs/manual/programs/htpasswd.xml
Author: jorton
Date: Tue Apr 2 14:33:45 2024
New Revision: 1916749

URL: http://svn.apache.org/viewvc?rev=1916749&view=rev
Log:
Merge r1916129 from trunk (htpasswd docs):

Document SHA-2 support.


Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/docs/manual/programs/htpasswd.xml

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1916129

Modified: httpd/httpd/branches/2.4.x/docs/manual/programs/htpasswd.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/programs/htpasswd.xml?rev=1916749&r1=1916748&r2=1916749&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/programs/htpasswd.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/programs/htpasswd.xml Tue Apr 2 14:33:45 2024
@@ -39,13 +39,6 @@
stores, though. To use a DBM database see <program>dbmmanage</program> or
<program>htdbm</program>.</p>

- <p><code>htpasswd</code> encrypts passwords using either bcrypt,
- a version of MD5 modified for Apache, SHA1, or the system's
- <code>crypt()</code> routine. Files
- managed by <code>htpasswd</code> may contain a mixture of different encoding
- types of passwords; some
- user records may have bcrypt or MD5-encrypted passwords while others in the
- same file may have passwords encrypted with <code>crypt()</code>.</p>
<p><code>htpasswd</code> hashes passwords using either bcrypt, a
version of MD5 modified for Apache, SHA-1, or the system's
<code>crypt()</code> routine. SHA-2-based hashes (SHA-256 and
@@ -72,9 +65,12 @@ distribution.</seealso>
[ -<strong>i</strong> ]
[. -<strong>m</strong> |
-<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ]
[ -<strong>D</strong> ]
[ -<strong>v</strong> ] <var>passwdfile</var> <var>username</var></code></p>
@@ -83,9 +79,12 @@ distribution.</seealso>
[ -<strong>c</strong> ]
[. -<strong>m</strong> |
-<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ]
[ -<strong>D</strong> ]
[ -<strong>v</strong> ] <var>passwdfile</var> <var>username</var>
@@ -95,17 +94,23 @@ distribution.</seealso>
[ -<strong>i</strong> ]
[. -<strong>m</strong> |
-<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ] <var>username</var></code></p>

<p><code><strong>htpasswd</strong> -<strong>nb</strong>
[. -<strong>m</strong> |
- -<strong>B</strong> |
+ -<strong>B</strong> |
+ -<strong>2</strong> |
+ -<strong>5</strong> |
-<strong>d</strong> |
-<strong>s</strong> |
-<strong>p</strong> ]
+ [ -<strong>r</strong> <var>rounds</var> ]
[ -<strong>C</strong> <var>cost</var> ] <var>username</var>
<var>password</var></code></p>
</section>
@@ -138,6 +143,14 @@ distribution.</seealso>
<dd>Use MD5 hashing for passwords. This is the default (since version
2.2.18).</dd>

+ <dt><code>-2</code></dt>
+ <dd>Use SHA-256 <code>crypt()</code> based hashes for passwords. This is
+ supported on most Unix platforms.</dd>
+
+ <dt><code>-5</code></dt>
+ <dd>Use SHA-512 <code>crypt()</code> based hashes for passwords. This is
+ supported on most Unix platforms.</dd>
+
<dt><code>-B</code></dt>
<dd>Use bcrypt hashing for passwords. This is currently considered to
be very secure.</dd>
@@ -147,6 +160,12 @@ distribution.</seealso>
hashing). It sets the computing time used for the bcrypt algorithm
(higher is more secure but slower, default: 5, valid: 4 to 17).</dd>

+ <dt><code>-r</code></dt>
+ <dd>This flag is only allowed in combination with <code>-2</code>
+ or <code>-5</code>. It sets the number of hash rounds used for the
+ SHA-2 algorithms (higher is more secure but slower; the default is
+ 5,000).</dd>
+
<dt><code>-d</code></dt>
<dd>Use <code>crypt()</code> hashing for passwords. This is not
supported by the <program>httpd</program> server on Windows and
@@ -253,8 +272,14 @@ distribution.</seealso>
prepending a random salt string, to make dictionary attacks
against the passwords more difficult.</p>

- <p>The SHA and <code>crypt()</code> formats are insecure by today's
- standards.</p>
+ <p>The SHA-1 and <code>crypt()</code> formats are insecure by
+ today's standards.</p>
+
+ <p>The SHA-2-based <code>crypt()</code> formats (SHA-256 and
+ SHA-512) are supported on most modern Unix systems, and follow the
+ specification at <a
+ href="https://www.akkadia.org/drepper/SHA-crypt.txt">https://www.akkadia.org/drepper/SHA-crypt.txt</a>.</p>
+
</section>

<section id="restrictions"><title>Restrictions</title>