besser82/libxcrypt

some undefined reference (utils.c)

Closed this issue · 2 comments

Hey

Iv compiled lxcrypt under Ubuntu 20.04 and run make and i am getting the following error:

gcc -pipe -Wall -D_LINUX -D_OPENSSL_MD4 -g3 asleap.c -o asleap common.o utils.o sha1.o -lpcap -lxcrypt -lcrypto
/usr/bin/ld: utils.o: in function DesEncrypt': /home/hx/tmp/asleap/utils.c:179: undefined reference to setkey'
/usr/bin/ld: /home/hx/tmp/asleap/utils.c:182: undefined reference to `encrypt'
collect2: error: ld returned 1 exit status
make: *** [Makefile:32: asleap] Error 1

Oops, wrong project!

zackw commented

@0n1cOn3 FYI, setkey and encrypt implement the obsolete DES block cipher. This cipher is no longer considered secure, as modern computer hardware can crack it by brute force. Also, these functions are awkward to use, slow, and not thread-safe.

I see that asleap is a penetration testing tool, so it may still have legitimate uses for DES, but it should be using the implementation in libcrypto. libcrypto is actually a general-purpose cryptography library, unlike libxcrypt; it has a much nicer API for symmetric encryption.