public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypt.3: The library is "libcrypt", not "libcrypto"
@ 2023-07-15 18:41 Xi Ruoyao
  2023-07-16  0:59 ` Alejandro Colomar
  0 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2023-07-15 18:41 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man, Xi Ruoyao

libcrypt is the password hashing library, and libcrypto is a completely
different library (OpenSSL cryptography library).

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
 man3/crypt.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man3/crypt.3 b/man3/crypt.3
index 1f3e4792e..ad14cb4f7 100644
--- a/man3/crypt.3
+++ b/man3/crypt.3
@@ -20,7 +20,7 @@
 crypt, crypt_r \- password and data encryption
 .SH LIBRARY
 Encryption and decryption library
-.RI ( libcrypto ", " \-lcrypto )
+.RI ( libcrypt ", " \-lcrypt )
 .SH SYNOPSIS
 .nf
 .B #include <unistd.h>
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypt.3: The library is "libcrypt", not "libcrypto"
  2023-07-15 18:41 [PATCH] crypt.3: The library is "libcrypt", not "libcrypto" Xi Ruoyao
@ 2023-07-16  0:59 ` Alejandro Colomar
  2023-07-16  1:18   ` Xi Ruoyao
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2023-07-16  0:59 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: linux-man


[-- Attachment #1.1: Type: text/plain, Size: 1147 bytes --]

Hi Xi!

On 2023-07-15 20:41, Xi Ruoyao wrote:
> libcrypt is the password hashing library, and libcrypto is a completely
> different library (OpenSSL cryptography library).

Thanks!  My mistake.

> 
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
>  man3/crypt.3 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man3/crypt.3 b/man3/crypt.3
> index 1f3e4792e..ad14cb4f7 100644
> --- a/man3/crypt.3
> +++ b/man3/crypt.3
> @@ -20,7 +20,7 @@
>  crypt, crypt_r \- password and data encryption
>  .SH LIBRARY
>  Encryption and decryption library

Is the above line accurate, or should we improve it?

> -.RI ( libcrypto ", " \-lcrypto )
> +.RI ( libcrypt ", " \-lcrypt )

I see that another page probably also needs to be fixed.
Would you mind fixing it too,if appropriate, in this patch?

$ grep -rn libcrypt
man3/encrypt.3:17:.RI ( libcrypto ", " \-lcrypto )
man3/crypt.3:23:.RI ( libcrypto ", " \-lcrypto )

Cheers,
Alex


>  .SH SYNOPSIS
>  .nf
>  .B #include <unistd.h>

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypt.3: The library is "libcrypt", not "libcrypto"
  2023-07-16  0:59 ` Alejandro Colomar
@ 2023-07-16  1:18   ` Xi Ruoyao
  2023-07-16  1:37     ` Alejandro Colomar
  0 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2023-07-16  1:18 UTC (permalink / raw)
  To: alx; +Cc: linux-man

On Sun, 2023-07-16 at 02:59 +0200, Alejandro Colomar wrote:
> Hi Xi!
> 
> On 2023-07-15 20:41, Xi Ruoyao wrote:
> > libcrypt is the password hashing library, and libcrypto is a
> > completely
> > different library (OpenSSL cryptography library).
> 
> Thanks!  My mistake.
> 
> > 
> > Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> > ---
> >  man3/crypt.3 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/man3/crypt.3 b/man3/crypt.3
> > index 1f3e4792e..ad14cb4f7 100644
> > --- a/man3/crypt.3
> > +++ b/man3/crypt.3
> > @@ -20,7 +20,7 @@
> >  crypt, crypt_r \- password and data encryption
> >  .SH LIBRARY
> >  Encryption and decryption library
> 
> Is the above line accurate, or should we improve it?

Hmm, I'm not sure.

This library is only a password hashing library today (and also in UNIX
6 :), but when it provided encrypt() function (from UNIX 7 to Glibc
2.27) it can really do "encryption and decryption" (in a broken way
though).

But I guess we can change "password and data encryption" to "password
hashing", at least.

> > -.RI ( libcrypto ", " \-lcrypto )
> > +.RI ( libcrypt ", " \-lcrypt )
> 
> I see that another page probably also needs to be fixed.
> Would you mind fixing it too,if appropriate, in this patch?

Ah indeed, I didn't catch it.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypt.3: The library is "libcrypt", not "libcrypto"
  2023-07-16  1:18   ` Xi Ruoyao
@ 2023-07-16  1:37     ` Alejandro Colomar
  2023-07-16  1:56       ` Xi Ruoyao
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2023-07-16  1:37 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: linux-man


[-- Attachment #1.1: Type: text/plain, Size: 1957 bytes --]

On 2023-07-16 03:18, Xi Ruoyao wrote:
> On Sun, 2023-07-16 at 02:59 +0200, Alejandro Colomar wrote:
>> Hi Xi!
>>
>> On 2023-07-15 20:41, Xi Ruoyao wrote:
>>> libcrypt is the password hashing library, and libcrypto is a
>>> completely
>>> different library (OpenSSL cryptography library).
>>
>> Thanks!  My mistake.
>>
>>>
>>> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
>>> ---
>>>  man3/crypt.3 | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/man3/crypt.3 b/man3/crypt.3
>>> index 1f3e4792e..ad14cb4f7 100644
>>> --- a/man3/crypt.3
>>> +++ b/man3/crypt.3
>>> @@ -20,7 +20,7 @@
>>>  crypt, crypt_r \- password and data encryption
>>>  .SH LIBRARY
>>>  Encryption and decryption library
>>
>> Is the above line accurate, or should we improve it?
> 
> Hmm, I'm not sure.
> 
> This library is only a password hashing library today (and also in UNIX
> 6 :), but when it provided encrypt() function (from UNIX 7 to Glibc
> 2.27) it can really do "encryption and decryption" (in a broken way
> though).

Thanks!

I prefer to be on the safe side when it's about crypto stuff.  Calling
it an encryption library when it should be considered as such, and it's
unsafe as such, is hurting our readers.  I prefer to call it "Hashing
library", after your response.  Feel free to send a patch, or tell me
if you're busy and I'll prepare this one.

> 
> But I guess we can change "password and data encryption" to "password
> hashing", at least.

Agree.  Please send a patch, or ask me to do it myself.

Thanks again!
Alex

> 
>>> -.RI ( libcrypto ", " \-lcrypto )
>>> +.RI ( libcrypt ", " \-lcrypt )
>>
>> I see that another page probably also needs to be fixed.
>> Would you mind fixing it too,if appropriate, in this patch?
> 
> Ah indeed, I didn't catch it.
> 

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] crypt.3: The library is "libcrypt", not "libcrypto"
  2023-07-16  1:37     ` Alejandro Colomar
@ 2023-07-16  1:56       ` Xi Ruoyao
  0 siblings, 0 replies; 5+ messages in thread
From: Xi Ruoyao @ 2023-07-16  1:56 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

On Sun, 2023-07-16 at 03:37 +0200, Alejandro Colomar wrote:
> On 2023-07-16 03:18, Xi Ruoyao wrote:
> > On Sun, 2023-07-16 at 02:59 +0200, Alejandro Colomar wrote:
> > > Hi Xi!
> > > 
> > > On 2023-07-15 20:41, Xi Ruoyao wrote:
> > > > libcrypt is the password hashing library, and libcrypto is a
> > > > completely
> > > > different library (OpenSSL cryptography library).
> > > 
> > > Thanks!  My mistake.
> > > 
> > > > 
> > > > Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> > > > ---
> > > >  man3/crypt.3 | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/man3/crypt.3 b/man3/crypt.3
> > > > index 1f3e4792e..ad14cb4f7 100644
> > > > --- a/man3/crypt.3
> > > > +++ b/man3/crypt.3
> > > > @@ -20,7 +20,7 @@
> > > >  crypt, crypt_r \- password and data encryption
> > > >  .SH LIBRARY
> > > >  Encryption and decryption library
> > > 
> > > Is the above line accurate, or should we improve it?
> > 
> > Hmm, I'm not sure.
> > 
> > This library is only a password hashing library today (and also in
> > UNIX
> > 6 :), but when it provided encrypt() function (from UNIX 7 to Glibc
> > 2.27) it can really do "encryption and decryption" (in a broken way
> > though).
> 
> Thanks!
> 
> I prefer to be on the safe side when it's about crypto stuff.  Calling
> it an encryption library when it should be considered as such, and
> it's
> unsafe as such, is hurting our readers.  I prefer to call it "Hashing
> library", after your response.  Feel free to send a patch, or tell me
> if you're busy and I'll prepare this one.
> 
> > 
> > But I guess we can change "password and data encryption" to
> > "password
> > hashing", at least.
> 
> Agree.  Please send a patch, or ask me to do it myself.

I've sent v2.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-16  1:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-15 18:41 [PATCH] crypt.3: The library is "libcrypt", not "libcrypto" Xi Ruoyao
2023-07-16  0:59 ` Alejandro Colomar
2023-07-16  1:18   ` Xi Ruoyao
2023-07-16  1:37     ` Alejandro Colomar
2023-07-16  1:56       ` Xi Ruoyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox