LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How would you choose different ciphers, modes of operation, etc. in libcrypt? (https://www.linuxquestions.org/questions/linux-security-4/how-would-you-choose-different-ciphers-modes-of-operation-etc-in-libcrypt-4175695124/)

Erentigionation 05-14-2021 09:51 AM

How would you choose different ciphers, modes of operation, etc. in libcrypt?
 
I'm confused about this. I've been looking at the man page for the Linux crypt library as well as crypt.h and a hexdump of libcrypt.so. The Wikipedia article says libcrypt provides for several different ciphers and modes of operation, but I don't see any way of specifying these in the library. There's a generic crypt() function as well as a couple thread-safe versions and some functions for working with salts. How would you use hashing algorithms like bcrypt, MD5-Crypt, and SHA2-Crypt using this library? Am I misunderstanding what Linux crypt is? I thought Linux crypt provided those three hashing algorithms?

Ser Olmy 05-14-2021 01:18 PM

I was under the impression that libcrypt (part of glibc) dealt with password encryption (hashing).

Are you sure you're not looking for libcrypto, which is part of OpenSSL?

Erentigionation 05-24-2021 05:55 AM

Quote:

Originally Posted by Ser Olmy (Post 6250807)
I was under the impression that libcrypt (part of glibc) dealt with password encryption (hashing).

Are you sure you're not looking for libcrypto, which is part of OpenSSL?

Yes, I am aware of the difference between libcrypt and libcrypto. My system has both files.

EDIT: I looked at the Wikipedia article I had up and it was actually for libgcrypt, which is part of GnuPG. I seem to have missed the G in the name. I don't know why DuckDuckGo would give me an article on libgcrypt when I searched for libcrypt.


All times are GMT -5. The time now is 10:56 AM.