Skip to contentSkip to conversation

Small error in crypt() manpage

PATCH In review Marcel Moreaux 3 participants 3 messages Apr 18, 2010 – May 24, 2010 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hey,

The Linux manpage for crypt()[1] contains the following statement as the last sentence of the NOTES section:

In the SHA implementation the entire key is significant (instead of only the first 8 bytes in MD5).

It should probably say "DES" where it says "MD5" (and maybe "MD5/SHA" where it says "SHA"), because in MD5 password hashing, the entire key is significant, not just the first 8 bytes.

Quoting the glibc documentation[2]:

For the MD5-based algorithm, [...] Every character in the key is significant.

Best regards,

Marcel Moreaux

[1] http://www.kernel.org/doc/man-pages/online/pages/man3/crypt.3.html
[2] http://www.gnu.org/s/libc/manual/html_node/crypt.html#crypt
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 man3/crypt.3: Correct note on key portion significance

As Marcel Moreaux notes:

Quoted 9 lines

The Linux manpage for crypt()[1] contains the following statement as the last sentence of the NOTES section:

In the SHA implementation the entire key is significant (instead of only the first 8 bytes in MD5).

It should probably say "DES" where it says "MD5" (and maybe "MD5/SHA" where it says "SHA"), because in MD5 password hashing, the entire key is significant, not just the first 8 bytes.

This patch fixes the wording.

---

man3/crypt.3 +2 -2
index 1139792..aeaf873 100644
@@ -217,10 +217,10 @@ SHA-512 | 86 characters
 
 The characters in "\fIsalt\fP" and "\fIencrypted\fP" are drawn from the set
 [\fBa\fP\(en\fBzA\fP\(en\fBZ0\fP\(en\fB9./\fP].
-In the SHA implementation the entire
+In the MD5 and SHA implementations the entire
 .I key
 is significant (instead of only the first
-8 bytes in MD5).
+8 bytes in DES).
 .SH "SEE ALSO"
 .BR login (1),
 .BR passwd (1),

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [PATCH] man3/crypt.3: Correct note on key portion significance

Hello Petr,

Quoted 5 lines · Petr Baudis

As Marcel Moreaux notes:

Quoted 3 lines

The Linux manpage for crypt()[1] contains the following statement as the last sentence of the NOTES section:

Quoted 8 lines
Quoted 6 lines

    In the SHA implementation the entire key is significant (instead of only the first 8 bytes in MD5).

It should probably say "DES" where it says "MD5" (and maybe "MD5/SHA" where it says "SHA"), because in MD5 password hashing, the entire key is significant, not just the first 8 bytes.

This patch fixes the wording.

Thanks. Applied for 3.25.

Cheers,

Michael

Quoted 22 lines

---

man3/crypt.3 +0 -0
index 1139792..aeaf873 100644
@@ -217,10 +217,10 @@ SHA-512 | 86 characters
 

 The characters in "\fIsalt\fP" and "\fIencrypted\fP" are drawn from the set [\fBa\fP\(en\fBzA\fP\(en\fBZ0\fP\(en\fB9./\fP].

man3/crypt.3 +1 -1
-In the SHA implementation the entire
+In the MD5 and SHA implementations the entire

 .I key
 is significant (instead of only the first
-8 bytes in MD5).
+8 bytes in DES).
 .SH "SEE ALSO"
 .BR login (1),
 .BR passwd (1),

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface" http://blog.man7.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html