]> git.eshelyaron.com Git - emacs.git/commitdiff
Warn against using the MD4 hash function
authorStefan Kangas <stefan@marxist.se>
Wed, 28 Oct 2020 01:37:18 +0000 (02:37 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 28 Oct 2020 01:45:17 +0000 (02:45 +0100)
* lisp/md4.el (md4): Warn against using it, since its security is
non-existent and it has been declared obsolete.  It should probably
only be used by our NTLM support.  Point users to secure-hash instead.

lisp/md4.el

index 029a125b8ae0e91716eb762b1308b3e1ad6daf25..11c91307afcbcca5cccbcc28296353db83d17d65 100644 (file)
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
 
+;;; Commentary:
+
+;; The MD4 Message-Digest Algorithm.
+;;
+;; The security of the MD4 hashing algorithm is very poor to
+;; non-existent.  It was declared obsolete by RFC 6150 in 2011:
+;; https://tools.ietf.org/html/rfc6150
+;;
+;; You probably want to use `secure-hash' instead.
+
 ;;; Code:
 
 ;;;
 (defun md4 (in n)
   "Return the MD4 hash for a string IN of length N bytes.
 The returned hash is 16 bytes long.  N is required to handle
-strings containing the character 0."
+strings containing the character 0.
+
+The security of the MD4 hashing algorithm is very poor to
+non-existent.  It was declared obsolete by RFC 6150 in 2011.
+
+You probably want to use `secure-hash' instead."
   (let (m
        (b (cons 0 (* n 8)))
        (i 0)