You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2020/12/08 14:06:17 UTC

svn commit: r1884207 - in /httpd/httpd/trunk: docs/man/ docs/manual/programs/ support/

Author: ylavic
Date: Tue Dec  8 14:06:16 2020
New Revision: 1884207

URL: http://svn.apache.org/viewvc?rev=1884207&view=rev
Log:
Fix misleading crypt vs hash terminology in ht* and dbmmanage tools.

What the htpasswd, htdbm and dbmmanage tools do is hashing passwords, not
encrypting them, so fix the terminology in manpages, docs, --help, comments
and function names.

Submitted by: Michele Preziuso <mpreziuso kaosdynamics.com>
Reviewed by: ylavic
Github: closes #153

Modified:
    httpd/httpd/trunk/docs/man/dbmmanage.1
    httpd/httpd/trunk/docs/man/htdbm.1
    httpd/httpd/trunk/docs/man/htpasswd.1
    httpd/httpd/trunk/docs/manual/programs/dbmmanage.xml
    httpd/httpd/trunk/docs/manual/programs/htdbm.xml
    httpd/httpd/trunk/docs/manual/programs/htpasswd.xml
    httpd/httpd/trunk/support/dbmmanage.in
    httpd/httpd/trunk/support/htdbm.c
    httpd/httpd/trunk/support/htpasswd.c

Modified: httpd/httpd/trunk/docs/man/dbmmanage.1
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/man/dbmmanage.1?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/man/dbmmanage.1 (original)
+++ httpd/httpd/trunk/docs/man/dbmmanage.1 Tue Dec  8 14:06:16 2020
@@ -59,7 +59,7 @@ The filename of the DBM format file\&. U
 The user for which the operations are performed\&. The \fIusername\fR may not contain a colon (\fB:\fR)\&.  
 .TP
 \fB\fIencpasswd\fR\fR
-This is the already encrypted password to use for the \fBupdate\fR and \fBadd\fR commands\&. You may use a hyphen (\fB-\fR) if you want to get prompted for the password, but fill in the fields afterwards\&. Additionally when using the \fBupdate\fR command, a period (\fB\&.\fR) keeps the original password untouched\&.  
+This is the already hashed password to use for the \fBupdate\fR and \fBadd\fR commands\&. You may use a hyphen (\fB-\fR) if you want to get prompted for the password, but fill in the fields afterwards\&. Additionally when using the \fBupdate\fR command, a period (\fB\&.\fR) keeps the original password untouched\&.  
 .TP
 \fB\fIgroup\fR\fR
 A group, which the user is member of\&. A groupname may not contain a colon (\fB:\fR)\&. You may use a hyphen (\fB-\fR) if you don't want to assign the user to a group, but fill in the comment field\&. Additionally when using the \fBupdate\fR command, a period (\fB\&.\fR) keeps the original groups untouched\&.  
@@ -72,13 +72,13 @@ This is the place for your opaque commen
  
 .TP
 \fB-d\fR
-crypt encryption (default, except on Win32, Netware)  
+crypt hashing (default, except on Win32, Netware)  
 .TP
 \fB-m\fR
-MD5 encryption (default on Win32, Netware)  
+MD5 hashing (default on Win32, Netware)  
 .TP
 \fB-s\fR
-SHA1 encryption  
+SHA1 hashing  
 .TP
 \fB-p\fR
 plaintext (\fInot recommended\fR)  
@@ -88,7 +88,7 @@ plaintext (\fInot recommended\fR)
  
 .TP
 \fBadd\fR
-Adds an entry for \fIusername\fR to \fIfilename\fR using the encrypted password \fIencpasswd\fR\&. dbmmanage passwords\&.dat add rbowen foKntnEF3KSXA  
+Adds an entry for \fIusername\fR to \fIfilename\fR using the hashed password \fIencpasswd\fR\&. dbmmanage passwords\&.dat add rbowen foKntnEF3KSXA  
 .TP
 \fBadduser\fR
 Asks for a password and then adds an entry for \fIusername\fR to \fIfilename\fR\&. dbmmanage passwords\&.dat adduser krietz  

Modified: httpd/httpd/trunk/docs/man/htdbm.1
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/man/htdbm.1?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/man/htdbm.1 (original)
+++ httpd/httpd/trunk/docs/man/htdbm.1 Tue Dec  8 14:06:16 2020
@@ -74,19 +74,19 @@ Create the \fIpasswdfile\fR\&. If \fIpas
 Display the results on standard output rather than updating a database\&. This option changes the syntax of the command line, since the \fIpasswdfile\fR argument (usually the first one) is omitted\&. It cannot be combined with the \fB-c\fR option\&.  
 .TP
 \fB-m\fR
-Use MD5 encryption for passwords\&. On Windows and Netware, this is the default\&.  
+Use MD5 hashing for passwords\&. On Windows and Netware, this is the default\&.  
 .TP
 \fB-B\fR
-Use bcrypt encryption for passwords\&. This is currently considered to be very secure\&.  
+Use bcrypt hashing for passwords\&. This is currently considered to be very secure\&.  
 .TP
 \fB-C\fR
-This flag is only allowed in combination with \fB-B\fR (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 31)\&.  
+This flag is only allowed in combination with \fB-B\fR (bcrypt hashing)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 31)\&.  
 .TP
 \fB-d\fR
-Use \fBcrypt()\fR encryption for passwords\&. The default on all platforms but Windows and Netware\&. Though possibly supported by \fBhtdbm\fR on all platforms, it is not supported by the httpd server on Windows and Netware\&. This algorithm is \fBinsecure\fR by today's standards\&.  
+Use \fBcrypt()\fR hashing for passwords\&. The default on all platforms but Windows and Netware\&. Though possibly supported by \fBhtdbm\fR on all platforms, it is not supported by the httpd server on Windows and Netware\&. This algorithm is \fBinsecure\fR by today's standards\&.  
 .TP
 \fB-s\fR
-Use SHA encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&.  
+Use SHA hashing for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&.  
 .TP
 \fB-p\fR
 Use plaintext passwords\&. Though \fBhtdbm\fR will support creation on all platforms, the httpd daemon will only accept plain text passwords on Windows and Netware\&.  
@@ -110,7 +110,7 @@ The filename of the DBM format file\&. U
 The username to create or update in \fIpasswdfile\fR\&. If \fIusername\fR does not exist in this file, an entry is added\&. If it does exist, the password is changed\&.  
 .TP
 \fB\fIpassword\fR\fR
-The plaintext password to be encrypted and stored in the DBM file\&. Used only with the \fB-b\fR flag\&.  
+The plaintext password to be hashed and stored in the DBM file\&. Used only with the \fB-b\fR flag\&.  
 .TP
 \fB-T\fIDBTYPE\fR\fR
 Type of DBM file (SDBM, GDBM, DB, or "default")\&.  
@@ -137,7 +137,7 @@ One can usually use the \fBfile\fR progr
 .fi
  
 .PP
-Adds or modifies the password for user \fBjsmith\fR\&. The user is prompted for the password\&. If executed on a Windows system, the password will be encrypted using the modified Apache MD5 algorithm; otherwise, the system's \fBcrypt()\fR routine will be used\&. If the file does not exist, \fBhtdbm\fR will do nothing except return an error\&.
+Adds or modifies the password for user \fBjsmith\fR\&. The user is prompted for the password\&. If executed on a Windows system, the password will be hashed using the modified Apache MD5 algorithm; otherwise, the system's \fBcrypt()\fR routine will be used\&. If the file does not exist, \fBhtdbm\fR will do nothing except return an error\&.
  
 .nf
 
@@ -177,13 +177,13 @@ The first line creates a new password da
 Web password files such as those managed by \fBhtdbm\fR should \fInot\fR be within the Web server's URI space -- that is, they should not be fetchable with a browser\&.
  
 .PP
-The use of the \fB-b\fR option is discouraged, since when it is used the unencrypted password appears on the command line\&.
+The use of the \fB-b\fR option is discouraged, since when it is used the plaintext password appears on the command line\&.
  
 .PP
 When using the \fBcrypt()\fR algorithm, note that only the first 8 characters of the password are used to form the password\&. If the supplied password is longer, the extra characters will be silently discarded\&.
  
 .PP
-The SHA encryption format does not use salting: for a given password, there is only one encrypted representation\&. The \fBcrypt()\fR and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&.
+The SHA hashing format does not use salting: for a given password, there is only one hashed representation\&. The \fBcrypt()\fR and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&.
  
 .PP
 The SHA and \fBcrypt()\fR formats are insecure by today's standards\&.
@@ -191,10 +191,10 @@ The SHA and \fBcrypt()\fR formats are in
 .SH "RESTRICTIONS"
  
 .PP
-On the Windows platform, passwords encrypted with \fBhtdbm\fR are limited to no more than \fB255\fR characters in length\&. Longer passwords will be truncated to 255 characters\&.
+On the Windows platform, passwords hashed with \fBhtdbm\fR are limited to no more than \fB255\fR characters in length\&. Longer passwords will be truncated to 255 characters\&.
  
 .PP
-The MD5 algorithm used by \fBhtdbm\fR is specific to the Apache software; passwords encrypted using it will not be usable with other Web servers\&.
+The MD5 algorithm used by \fBhtdbm\fR is specific to the Apache software; passwords hashed using it will not be usable with other Web servers\&.
  
 .PP
 Usernames are limited to \fB255\fR bytes and may not include the character \fB:\fR\&.

Modified: httpd/httpd/trunk/docs/man/htpasswd.1
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/man/htpasswd.1?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/man/htpasswd.1 (original)
+++ httpd/httpd/trunk/docs/man/htpasswd.1 Tue Dec  8 14:06:16 2020
@@ -45,10 +45,10 @@ htpasswd \- Manage user files for basic
 \fBhtpasswd\fR is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users\&. If \fBhtpasswd\fR cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error status and makes no changes\&.
  
 .PP
-Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by \fBhtpasswd\fR\&. This program can only manage usernames and passwords stored in a flat-file\&. It can encrypt and display password information for use in other types of data stores, though\&. To use a DBM database see dbmmanage or htdbm\&.
+Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by \fBhtpasswd\fR\&. This program can only manage usernames and passwords stored in a flat-file\&. It can hash and display password information for use in other types of data stores, though\&. To use a DBM database see dbmmanage or htdbm\&.
  
 .PP
-\fBhtpasswd\fR encrypts passwords using either bcrypt, a version of MD5 modified for Apache, SHA-1, or the system's \fBcrypt()\fR routine\&. SHA-2-based hashes (SHA-256 and SHA-512) are supported for \fBcrypt()\fR\&. Files managed by \fBhtpasswd\fR 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 \fBcrypt()\fR\&.
+\fBhtpasswd\fR hashes passwords using either bcrypt, a version of MD5 modified for Apache, SHA-1, or the system's \fBcrypt()\fR routine\&. SHA-2-based hashes (SHA-256 and SHA-512) are supported for \fBcrypt()\fR\&. Files managed by \fBhtpasswd\fR may contain a mixture of different encoding types of passwords; some user records may have bcrypt or MD5-hashed passwords while others in the same file may have passwords hashed with \fBcrypt()\fR\&.
  
 .PP
 This manual page only lists the command line arguments\&. For details of the directives necessary to configure user authentication in httpd see the Apache manual, which is part of the Apache distribution or can be found at http://httpd\&.apache\&.org/\&.
@@ -71,7 +71,7 @@ Create the \fIpasswdfile\fR\&. If \fIpas
 Display the results on standard output rather than updating a file\&. This is useful for generating password records acceptable to Apache for inclusion in non-text data stores\&. This option changes the syntax of the command line, since the \fIpasswdfile\fR argument (usually the first one) is omitted\&. It cannot be combined with the \fB-c\fR option\&.  
 .TP
 \fB-m\fR
-Use MD5 encryption for passwords\&. This is the default (since version 2\&.2\&.18)\&.  
+Use MD5 hashing for passwords\&. This is the default (since version 2\&.2\&.18)\&.  
 .TP
 \fB-2\fR
 Use SHA-256 \fBcrypt()\fR based hashes for passwords\&. This is supported on most Unix platforms\&.  
@@ -80,19 +80,19 @@ Use SHA-256 \fBcrypt()\fR based hashes f
 Use SHA-512 \fBcrypt()\fR based hashes for passwords\&. This is supported on most Unix platforms\&.  
 .TP
 \fB-B\fR
-Use bcrypt encryption for passwords\&. This is currently considered to be very secure\&.  
+Use bcrypt hashing for passwords\&. This is currently considered to be very secure\&.  
 .TP
 \fB-C\fR
-This flag is only allowed in combination with \fB-B\fR (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 17)\&.  
+This flag is only allowed in combination with \fB-B\fR (bcrypt hashing)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 17)\&.  
 .TP
 \fB-r\fR
 This flag is only allowed in combination with \fB-2\fR or \fB-5\fR\&. It sets the number of hash rounds used for the SHA-2 algorithms (higher is more secure but slower; the default is 5,000)\&.  
 .TP
 \fB-d\fR
-Use \fBcrypt()\fR encryption for passwords\&. This is not supported by the httpd server on Windows and Netware\&. This algorithm limits the password length to 8 characters\&. This algorithm is \fBinsecure\fR by today's standards\&. It used to be the default algorithm until version 2\&.2\&.17\&.  
+Use \fBcrypt()\fR hashing for passwords\&. This is not supported by the httpd server on Windows and Netware\&. This algorithm limits the password length to 8 characters\&. This algorithm is \fBinsecure\fR by today's standards\&. It used to be the default algorithm until version 2\&.2\&.17\&.  
 .TP
 \fB-s\fR
-Use SHA-1 (160-bit) encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&.  
+Use SHA-1 (160-bit) hashing for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&.  
 .TP
 \fB-p\fR
 Use plaintext passwords\&. Though \fBhtpasswd\fR will support creation on all platforms, the httpd daemon will only accept plain text passwords on Windows and Netware\&.  
@@ -110,7 +110,7 @@ Name of the file to contain the user nam
 The username to create or update in \fIpasswdfile\fR\&. If \fIusername\fR does not exist in this file, an entry is added\&. If it does exist, the password is changed\&.  
 .TP
 \fB\fIpassword\fR\fR
-The plaintext password to be encrypted and stored in the file\&. Only used with the \fB-b\fR flag\&.  
+The plaintext password to be hashed and stored in the file\&. Only used with the \fB-b\fR flag\&.  
  
 .SH "EXIT STATUS"
  
@@ -126,7 +126,7 @@ The plaintext password to be encrypted a
 .fi
  
 .PP
-Adds or modifies the password for user \fBjsmith\fR\&. The user is prompted for the password\&. The password will be encrypted using the modified Apache MD5 algorithm\&. If the file does not exist, \fBhtpasswd\fR will do nothing except return an error\&.
+Adds or modifies the password for user \fBjsmith\fR\&. The user is prompted for the password\&. The password will be hashed using the modified Apache MD5 algorithm\&. If the file does not exist, \fBhtpasswd\fR will do nothing except return an error\&.
  
 .nf
 
@@ -155,13 +155,13 @@ Web password files such as those managed
 This program is not safe as a setuid executable\&. Do \fInot\fR make it setuid\&.
  
 .PP
-The use of the \fB-b\fR option is discouraged, since when it is used the unencrypted password appears on the command line\&.
+The use of the \fB-b\fR option is discouraged, since when it is used the plaintext password appears on the command line\&.
  
 .PP
 When using the \fBcrypt()\fR algorithm, note that only the first 8 characters of the password are used to form the password\&. If the supplied password is longer, the extra characters will be silently discarded\&.
  
 .PP
-The SHA-1 encryption format does not use salting: for a given password, there is only one encrypted representation\&. The \fBcrypt()\fR and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&.
+The SHA-1 hashing option does not use salting: for a given password, there is only one hashed representation\&. The \fBcrypt()\fR and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&.
  
 .PP
 The SHA-1 and \fBcrypt()\fR formats are insecure by today's standards\&.
@@ -172,10 +172,10 @@ The SHA-2-based \fBcrypt()\fR formats (S
 .SH "RESTRICTIONS"
  
 .PP
-On the Windows platform, passwords encrypted with \fBhtpasswd\fR are limited to no more than \fB255\fR characters in length\&. Longer passwords will be truncated to 255 characters\&.
+On the Windows platform, passwords hashed with \fBhtpasswd\fR are limited to no more than \fB255\fR characters in length\&. Longer passwords will be truncated to 255 characters\&.
  
 .PP
-The MD5 algorithm used by \fBhtpasswd\fR is specific to the Apache software; passwords encrypted using it will not be usable with other Web servers\&.
+The MD5 algorithm used by \fBhtpasswd\fR is specific to the Apache software; passwords hashed using it will not be usable with other Web servers\&.
  
 .PP
 Usernames are limited to \fB255\fR bytes and may not include the character \fB:\fR\&.

Modified: httpd/httpd/trunk/docs/manual/programs/dbmmanage.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/programs/dbmmanage.xml?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/programs/dbmmanage.xml (original)
+++ httpd/httpd/trunk/docs/manual/programs/dbmmanage.xml Tue Dec  8 14:06:16 2020
@@ -73,7 +73,7 @@
     may not contain a colon (<code>:</code>).</dd>
 
     <dt><code><var>encpasswd</var></code></dt>
-    <dd>This is the already encrypted password to use for the
+    <dd>This is the already hashed password to use for the
     <code>update</code> and <code>add</code> commands. You may use a hyphen
     (<code>-</code>) if you want to get prompted for the password, but fill
     in the fields afterwards. Additionally when using the <code>update</code>
@@ -96,13 +96,13 @@
     <section id="options.encodings"><title>Encodings</title>
       <dl>
       <dt><code>-d</code></dt>
-      <dd>crypt encryption (default, except on Win32, Netware)</dd>
+      <dd>crypt hashing (default, except on Win32, Netware)</dd>
 
       <dt><code>-m</code></dt>
-      <dd>MD5 encryption (default on Win32, Netware)</dd>
+      <dd>MD5 hashing (default on Win32, Netware)</dd>
 
       <dt><code>-s</code></dt>
-      <dd>SHA1 encryption</dd>
+      <dd>SHA1 hashing</dd>
 
       <dt><code>-p</code></dt>
       <dd>plaintext (<em>not recommended</em>)</dd>
@@ -113,7 +113,7 @@
       <dl>
       <dt><code>add</code></dt>
       <dd>Adds an entry for <var>username</var> to <var>filename</var> using the
-      encrypted password <var>encpasswd</var>.
+      hashed password <var>encpasswd</var>.
 
       <example>dbmmanage passwords.dat add rbowen foKntnEF3KSXA</example>
       </dd>

Modified: httpd/httpd/trunk/docs/manual/programs/htdbm.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/programs/htdbm.xml?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/programs/htdbm.xml (original)
+++ httpd/httpd/trunk/docs/manual/programs/htdbm.xml Tue Dec  8 14:06:16 2020
@@ -147,27 +147,27 @@
     cannot be combined with the <code>-c</code> option.</dd>
 
     <dt><code>-m</code></dt>
-    <dd>Use MD5 encryption for passwords. On Windows and Netware, this is
+    <dd>Use MD5 hashing for passwords. On Windows and Netware, this is
     the default.</dd>
 
     <dt><code>-B</code></dt>
-    <dd>Use bcrypt encryption for passwords. This is currently considered to
+    <dd>Use bcrypt hashing for passwords. This is currently considered to
     be very secure.</dd>
 
     <dt><code>-C</code></dt>
     <dd>This flag is only allowed in combination with <code>-B</code> (bcrypt
-    encryption). It sets the computing time used for the bcrypt algorithm
+    hashing). It sets the computing time used for the bcrypt algorithm
     (higher is more secure but slower, default: 5, valid: 4 to 31).</dd>
 
     <dt><code>-d</code></dt>
-    <dd>Use <code>crypt()</code> encryption for passwords. The default on all
+    <dd>Use <code>crypt()</code> hashing for passwords. The default on all
     platforms but Windows and Netware. Though possibly supported by
     <code>htdbm</code> on all platforms, it is not supported by the
     <program>httpd</program> server on Windows and Netware.
     This algorithm is <strong>insecure</strong> by today's standards.</dd>
 
     <dt><code>-s</code></dt>
-    <dd>Use SHA encryption for passwords. Facilitates migration from/to Netscape
+    <dd>Use SHA hashing for passwords. Facilitates migration from/to Netscape
     servers using the LDAP Directory Interchange Format (ldif).
     This algorithm is <strong>insecure</strong> by today's standards.</dd>
 
@@ -207,7 +207,7 @@
     does exist, the password is changed.</dd>
 
     <dt><code><var>password</var></code></dt>
-    <dd>The plaintext password to be encrypted and stored in the DBM file.
+    <dd>The plaintext password to be hashed and stored in the DBM file.
     Used only with the <code>-b</code> flag.</dd>
 
     <dt><code>-T<var>DBTYPE</var></code></dt>
@@ -253,7 +253,7 @@
 
     <p>Adds or modifies the password for user <code>jsmith</code>. The user
     is prompted for the password. If executed on a Windows system, the password
-    will be encrypted using the  modified Apache MD5 algorithm; otherwise, the
+    will be hashed using the  modified Apache MD5 algorithm; otherwise, the
     system's <code>crypt()</code> routine will be used. If the file does not
     exist, <code>htdbm</code> will do nothing except return an error.</p>
 
@@ -294,14 +294,14 @@
     not be fetchable with a browser.</p>
 
     <p>The use of the <code>-b</code> option is discouraged, since when it is
-    used the unencrypted password appears on the command line.</p>
+    used the plaintext password appears on the command line.</p>
 
     <p>When using the <code>crypt()</code> algorithm, note that only the first
     8 characters of the password are used  to form the password. If the supplied
     password is longer, the extra characters will be silently discarded.</p>
 
-    <p>The SHA encryption format does not use salting: for a given password,
-    there is only one encrypted representation. The <code>crypt()</code> and
+    <p>The SHA hashing option does not use salting: for a given password,
+    there is only one hashed representation. The <code>crypt()</code> and
     MD5 formats permute the representation by prepending a random salt string,
     to make dictionary attacks against the passwords more difficult.</p>
 
@@ -310,13 +310,13 @@
 </section>
 
 <section id="restrictions"><title>Restrictions</title>
-    <p>On the Windows platform, passwords encrypted with
+    <p>On the Windows platform, passwords hashed with
     <code>htdbm</code> are limited to no more than <code>255</code>
     characters in length. Longer passwords will be truncated to 255
     characters.</p>
 
     <p>The MD5 algorithm used by <code>htdbm</code> is specific to the Apache
-    software; passwords encrypted using it will not be usable with other Web
+    software; passwords hashed using it will not be usable with other Web
     servers.</p>
 
     <p>Usernames are limited to <code>255</code> bytes and may not include the

Modified: httpd/httpd/trunk/docs/manual/programs/htpasswd.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/programs/htpasswd.xml?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/programs/htpasswd.xml (original)
+++ httpd/httpd/trunk/docs/manual/programs/htpasswd.xml Tue Dec  8 14:06:16 2020
@@ -35,18 +35,18 @@
     <p>Resources available from the Apache HTTP server can be restricted to
     just the users listed in the files created by <code>htpasswd</code>. This
     program can only manage usernames and passwords stored in a flat-file. It
-    can encrypt and display password information for use in other types of data
+    can hash and display password information for use in other types of data
     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
+    <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
     SHA-512) are supported for <code>crypt()</code>.  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>
+    MD5-hashed passwords while others in the same file may have
+    passwords hashed with <code>crypt()</code>.</p>
 
     <p>This manual page only lists the command line arguments. For details of
     the directives necessary to configure user authentication in
@@ -140,7 +140,7 @@ distribution.</seealso>
     one) is omitted. It cannot be combined with the <code>-c</code> option.</dd>
 
     <dt><code>-m</code></dt>
-    <dd>Use MD5 encryption for passwords. This is the default (since version
+    <dd>Use MD5 hashing for passwords. This is the default (since version
     2.2.18).</dd>
 
     <dt><code>-2</code></dt>
@@ -152,12 +152,12 @@ distribution.</seealso>
     supported on most Unix platforms.</dd>
 
     <dt><code>-B</code></dt>
-    <dd>Use bcrypt encryption for passwords. This is currently considered to
+    <dd>Use bcrypt hashing for passwords. This is currently considered to
     be very secure.</dd>
 
     <dt><code>-C</code></dt>
     <dd>This flag is only allowed in combination with <code>-B</code> (bcrypt
-    encryption). It sets the computing time used for the bcrypt algorithm
+    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>
@@ -167,14 +167,14 @@ distribution.</seealso>
     5,000).</dd>
 
     <dt><code>-d</code></dt>
-    <dd>Use <code>crypt()</code> encryption for passwords. This is not
+    <dd>Use <code>crypt()</code> hashing for passwords. This is not
     supported by the <program>httpd</program> server on Windows and
     Netware. This algorithm limits the password length to 8 characters.
     This algorithm is <strong>insecure</strong> by today's standards.
     It used to be the default algorithm until version 2.2.17.</dd>
 
     <dt><code>-s</code></dt>
-    <dd>Use SHA-1 (160-bit) encryption for passwords. Facilitates migration
+    <dd>Use SHA-1 (160-bit) hashing for passwords. Facilitates migration
     from/to Netscape servers using the LDAP Directory Interchange
     Format (ldif).  This algorithm is <strong>insecure</strong> by
     today's standards.</dd>
@@ -204,7 +204,7 @@ distribution.</seealso>
     does exist, the password is changed.</dd>
 
     <dt><code><var>password</var></code></dt>
-    <dd>The plaintext password to be encrypted and stored  in the file. Only
+    <dd>The plaintext password to be hashed and stored  in the file. Only
     used with the <code>-b</code> flag.</dd>
     </dl>
 </section>
@@ -229,7 +229,7 @@ distribution.</seealso>
     </example>
 
     <p>Adds or modifies the password for user <code>jsmith</code>. The user
-    is prompted for the password. The password will be encrypted using the
+    is prompted for the password. The password will be hashed using the
     modified Apache MD5 algorithm. If the file does not exist,
     <code>htpasswd</code> will do nothing except return an error.</p>
 
@@ -260,14 +260,14 @@ distribution.</seealso>
     setuid.</p>
 
     <p>The use of the <code>-b</code> option is discouraged, since when it is
-    used the unencrypted password appears on the command line.</p>
+    used the plaintext password appears on the command line.</p>
 
     <p>When using the <code>crypt()</code> algorithm, note that only the first
     8 characters of the password are used  to form the password. If the supplied
     password is longer, the extra characters will be silently discarded.</p>
 
-    <p>The SHA-1 encryption format does not use salting: for a given
-    password, there is only one encrypted representation. The
+    <p>The SHA-1 hashing format does not use salting: for a given
+    password, there is only one hashed representation. The
     <code>crypt()</code> and MD5 formats permute the representation by
     prepending a random salt string, to make dictionary attacks
     against the passwords more difficult.</p>
@@ -283,13 +283,13 @@ distribution.</seealso>
 </section>
 
 <section id="restrictions"><title>Restrictions</title>
-    <p>On the Windows platform, passwords encrypted with
+    <p>On the Windows platform, passwords hashed with
     <code>htpasswd</code> are limited to no more than <code>255</code>
     characters in length. Longer passwords will be truncated to 255
     characters.</p>
 
     <p>The MD5 algorithm used by <code>htpasswd</code> is specific to the Apache
-    software; passwords encrypted using it will not be usable with other Web
+    software; passwords hashed using it will not be usable with other Web
     servers.</p>
 
     <p>Usernames are limited to <code>255</code> bytes and may not include the

Modified: httpd/httpd/trunk/support/dbmmanage.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/dbmmanage.in?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/support/dbmmanage.in (original)
+++ httpd/httpd/trunk/support/dbmmanage.in Tue Dec  8 14:06:16 2020
@@ -32,9 +32,9 @@ sub usage {
     die <<SYNTAX;
 Usage: dbmmanage [enc] dbname command [username [pw [group[,group] [comment]]]]
 
-    where enc is  -d for crypt encryption (default except on Win32, Netware)
-                  -m for MD5 encryption (default on Win32, Netware)
-                  -s for SHA1 encryption
+    where enc is  -d for crypt hashing (default except on Win32, Netware)
+                  -m for MD5 hashing (default on Win32, Netware)
+                  -s for SHA1 hashing
                   -p for plaintext
 
     command is one of: $cmds
@@ -48,7 +48,7 @@ Usage: dbmmanage [enc] dbname command [u
 SYNTAX
 }
 
-sub need_sha1_crypt {
+sub need_sha1_hash {
     if (!eval ('require "Digest/SHA1.pm";')) {
         print STDERR <<SHAERR;
 dbmmanage SHA1 passwords require the interface or the module Digest::SHA1
@@ -56,21 +56,21 @@ available from CPAN:
 
     http://www.cpan.org/modules/by-module/Digest/Digest-MD5-2.12.tar.gz
 
-Please install Digest::SHA1 and try again, or use a different crypt option:
+Please install Digest::SHA1 and try again, or use a different hashing option:
 
 SHAERR
         usage();
     }
 }
 
-sub need_md5_crypt {
+sub need_md5_hash {
     if (!eval ('require "Crypt/PasswdMD5.pm";')) {
         print STDERR <<MD5ERR;
 dbmmanage MD5 passwords require the module Crypt::PasswdMD5 available from CPAN
 
     http://www.cpan.org/modules/by-module/Crypt/Crypt-PasswdMD5-1.1.tar.gz
 
-Please install Crypt::PasswdMD5 and try again, or use a different crypt option:
+Please install Crypt::PasswdMD5 and try again, or use a different hashing option:
 
 MD5ERR
         usage();
@@ -93,10 +93,10 @@ my $newstyle_salt = $^O =~ /(?:$newstyle
 my $crypt_not_supported_platforms = join '|', qw{MSWin32 NetWare}; #others?
 my $crypt_not_supported = $^O =~ /(?:$crypt_not_supported_platforms)/;
 
-my $crypt_method = "crypt";
+my $hash_method = "crypt";
 
 if ($crypt_not_supported) {
-    $crypt_method = "md5";
+    $hash_method = "md5";
 }
 
 # Some platforms won't jump through our favorite hoops
@@ -105,7 +105,7 @@ my $not_unix_platforms = join '|', qw{MS
 my $not_unix = $^O =~ /(?:$not_unix_platforms)/;
 
 if ($crypt_not_supported) {
-    $crypt_method = "md5";
+    $hash_method = "md5";
 }
 
 if (@ARGV[0] eq "-d") {
@@ -114,12 +114,12 @@ if (@ARGV[0] eq "-d") {
         print STDERR
               "Warning: Apache/$^O does not support crypt()ed passwords!\n\n";
     }
-    $crypt_method = "crypt";
+    $hash_method = "crypt";
 }
 
 if (@ARGV[0] eq "-m") {
     shift @ARGV;
-    $crypt_method = "md5";
+    $hash_method = "md5";
 }
 
 if (@ARGV[0] eq "-p") {
@@ -128,20 +128,20 @@ if (@ARGV[0] eq "-p") {
         print STDERR
               "Warning: Apache/$^O does not support plaintext passwords!\n\n";
     }
-    $crypt_method = "plain";
+    $hash_method = "plain";
 }
 
 if (@ARGV[0] eq "-s") {
     shift @ARGV;
-    need_sha1_crypt();
-    $crypt_method = "sha1";
+    need_sha1_hash();
+    $hash_method = "sha1";
 }
 
-if ($crypt_method eq "md5") {
-    need_md5_crypt();
+if ($hash_method eq "md5") {
+    need_md5_hash();
 }
 
-my($file,$command,$key,$crypted_pwd,$groups,$comment) = @ARGV;
+my($file,$command,$key,$hashed_pwd,$groups,$comment) = @ARGV;
 
 usage() unless $file and $command and defined &{$dbmc::{$command}};
 
@@ -188,7 +188,7 @@ sub saltpw_crypt {
         randchar(2);
 }
 
-sub cryptpw_crypt {
+sub hashpw_crypt {
     my ($pw, $salt) = @_;
     $salt = saltpw_crypt unless $salt;
     crypt $pw, $salt;
@@ -199,24 +199,24 @@ sub saltpw_md5 {
     randchar(8);
 }
 
-sub cryptpw_md5 {
+sub hashpw_md5 {
     my($pw, $salt) = @_;
     $salt = saltpw_md5 unless $salt;
     Crypt::PasswdMD5::apache_md5_crypt($pw, $salt);
 }
 
-sub cryptpw_sha1 {
+sub hashpw_sha1 {
     my($pw, $salt) = @_;
     '{SHA}' . Digest::SHA1::sha1_base64($pw) . "=";
 }
 
-sub cryptpw {
-    if ($crypt_method eq "md5") {
-        return cryptpw_md5(@_);
-    } elsif ($crypt_method eq "sha1") {
-        return cryptpw_sha1(@_);
-    } elsif ($crypt_method eq "crypt") {
-        return cryptpw_crypt(@_);
+sub hashpw {
+    if ($hash_method eq "md5") {
+        return hashpw_md5(@_);
+    } elsif ($hash_method eq "sha1") {
+        return hashpw_sha1(@_);
+    } elsif ($hash_method eq "crypt") {
+        return hashpw_crypt(@_);
     }
     @_[0]; # otherwise return plaintext
 }
@@ -243,10 +243,10 @@ sub getpass {
 
 sub dbmc::update {
     die "Sorry, user `$key' doesn't exist!\n" unless $DB{$key};
-    $crypted_pwd = (split /:/, $DB{$key}, 3)[0] if $crypted_pwd eq '.';
+    $hashed_pwd = (split /:/, $DB{$key}, 3)[0] if $hashed_pwd eq '.';
     $groups = (split /:/, $DB{$key}, 3)[1] if !$groups || $groups eq '.';
     $comment = (split /:/, $DB{$key}, 3)[2] if !$comment || $comment eq '.';
-    if (!$crypted_pwd || $crypted_pwd eq '-') {
+    if (!$hashed_pwd || $hashed_pwd eq '-') {
         dbmc->adduser;
     }
     else {
@@ -255,23 +255,23 @@ sub dbmc::update {
 }
 
 sub dbmc::add {
-    die "Can't use empty password!\n" unless $crypted_pwd;
+    die "Can't use empty password!\n" unless $hashed_pwd;
     unless($is_update) {
         die "Sorry, user `$key' already exists!\n" if $DB{$key};
     }
     $groups = '' if $groups eq '-';
     $comment = '' if $comment eq '-';
     $groups .= ":" . $comment if $comment;
-    $crypted_pwd .= ":" . $groups if $groups;
-    $DB{$key} = $crypted_pwd;
+    $hashed_pwd .= ":" . $groups if $groups;
+    $DB{$key} = $hashed_pwd;
     my $action = $is_update ? "updated" : "added";
-    print "User $key $action with password encrypted to $DB{$key} using $crypt_method\n";
+    print "User $key $action with password hashed to $DB{$key} using $hash_method\n";
 }
 
 sub dbmc::adduser {
     my $value = getpass "New password:";
     die "They don't match, sorry.\n" unless getpass("Re-type new password:") eq $value;
-    $crypted_pwd = cryptpw $value;
+    $hashed_pwd = hashpw $value;
     dbmc->add;
 }
 
@@ -289,23 +289,23 @@ sub dbmc::check {
     my $chkpass = (split /:/, $DB{$key}, 3)[0];
     my $testpass = getpass();
     if (substr($chkpass, 0, 6) eq '$apr1$') {
-        need_md5_crypt;
-        $crypt_method = "md5";
+        need_md5_hash;
+        $hash_method = "md5";
     } elsif (substr($chkpass, 0, 5) eq '{SHA}') {
-        need_sha1_crypt;
-        $crypt_method = "sha1";
+        need_sha1_hash;
+        $hash_method = "sha1";
     } elsif (length($chkpass) == 13 && $chkpass ne $testpass) {
-        $crypt_method = "crypt";
+        $hash_method = "crypt";
     } else {
-        $crypt_method = "plain";
+        $hash_method = "plain";
     }
-    print $crypt_method . (cryptpw($testpass, $chkpass) eq $chkpass
-                           ? " password ok\n" : " password mismatch\n");
+    print $hash_method . (hashpw($testpass, $chkpass) eq $chkpass
+                          ? " password ok\n" : " password mismatch\n");
 }
 
 sub dbmc::import {
     while(defined($_ = <STDIN>) and chomp) {
-        ($key,$crypted_pwd,$groups,$comment) = split /:/, $_, 4;
+        ($key,$hashed_pwd,$groups,$comment) = split /:/, $_, 4;
         dbmc->add;
     }
 }

Modified: httpd/httpd/trunk/support/htdbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htdbm.c?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htdbm.c (original)
+++ httpd/httpd/trunk/support/htdbm.c Tue Dec  8 14:06:16 2020
@@ -290,13 +290,13 @@ static void htdbm_usage(void)
         "   -n   Don't update database; display results on stdout.\n"
         "   -b   Use the password from the command line rather than prompting for it.\n"
         "   -i   Read password from stdin without verification (for script usage).\n"
-        "   -m   Force MD5 encryption of the password (default).\n"
-        "   -B   Force BCRYPT encryption of the password (very secure).\n"
+        "   -m   Force MD5 hashing of the password (default).\n"
+        "   -B   Force BCRYPT hashing of the password (very secure).\n"
         "   -C   Set the computing time used for the bcrypt algorithm\n"
         "        (higher is more secure but slower, default: %d, valid: 4 to 31).\n"
-        "   -d   Force CRYPT encryption of the password (8 chars max, insecure).\n"
-        "   -s   Force SHA encryption of the password (insecure).\n"
-        "   -p   Do not encrypt the password (plaintext, insecure).\n"
+        "   -d   Force CRYPT hashing of the password (8 chars max, insecure).\n"
+        "   -s   Force SHA hashing of the password (insecure).\n"
+        "   -p   Do not hash the password (plaintext, insecure).\n"
         "   -T   DBM Type (SDBM|GDBM|DB|default).\n"
         "   -l   Display usernames from database on stdout.\n"
         "   -v   Verify the username/password.\n"

Modified: httpd/httpd/trunk/support/htpasswd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htpasswd.c?rev=1884207&r1=1884206&r2=1884207&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htpasswd.c (original)
+++ httpd/httpd/trunk/support/htpasswd.c Tue Dec  8 14:06:16 2020
@@ -108,17 +108,17 @@ static void usage(void)
         " -b  Use the password from the command line rather than prompting "
             "for it." NL
         " -i  Read password from stdin without verification (for script usage)." NL
-        " -m  Force MD5 encryption of the password (default)." NL
-        " -2  Force SHA-256 crypt() hash of the password (secure)." NL
-        " -5  Force SHA-512 crypt() hash of the password (secure)." NL
-        " -B  Force bcrypt encryption of the password (very secure)." NL
+        " -m  Force MD5 hashing of the password (default)." NL
+        " -2  Force SHA-256 hashing of the password (secure)." NL
+        " -5  Force SHA-512 hashing of the password (secure)." NL
+        " -B  Force bcrypt hashing of the password (very secure)." NL
         " -C  Set the computing time used for the bcrypt algorithm" NL
         "     (higher is more secure but slower, default: %d, valid: 4 to 17)." NL
         " -r  Set the number of rounds used for the SHA-256, SHA-512 algorithms" NL
         "     (higher is more secure but slower, default: 5000)." NL
-        " -d  Force CRYPT encryption of the password (8 chars max, insecure)." NL
-        " -s  Force SHA-1 encryption of the password (insecure)." NL
-        " -p  Do not encrypt the password (plaintext, insecure)." NL
+        " -d  Force CRYPT hashing of the password (8 chars max, insecure)." NL
+        " -s  Force SHA-1 hashing of the password (insecure)." NL
+        " -p  Do not hash the password (plaintext, insecure)." NL
         " -D  Delete the specified user." NL
         " -v  Verify password for the specified user." NL
         "On other systems than Windows and NetWare the '-p' flag will "