diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c
index e9cf4e3..d439fc3 100644
--- a/libbb/pw_encrypt.c
+++ b/libbb/pw_encrypt.c
@@ -8,11 +8,52 @@
  */
 
 #include "libbb.h"
-#include <crypt.h>
 
-char *pw_encrypt(const char *clear, const char *salt)
+/*
+ * DES and MD5 crypt implementations are taken from uclibc.
+ * They were modified to not use static buffers.
+ * Comparison with uclibc (before uclibc had 70k staic buffers reinstated):
+ *   text    data     bss     dec     hex filename
+ * 759909     604    6684  767197   bb4dd busybox_old
+ * 759579     604    6684  766867   bb393 busybox_unstripped
+ */
+/* Common for them */
+static const uint8_t ascii64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+#include "pw_encrypt_des.c"
+#include "pw_encrypt_md5.c"
+
+
+static struct const_des_ctx *des_cctx;
+static struct des_ctx *des_ctx;
+
+/* my_crypt returns malloc'ed data */
+static char *my_crypt(const char *key, const char *salt)
 {
-	/* Was static char[BIGNUM]. Malloced thing works as well */
+	/* First, check if we are supposed to be using the MD5 replacement
+	 * instead of DES...  */
+	if (salt[0] == '$' && salt[1] == '1' && salt[2] == '$') {
+		return md5_crypt(xzalloc(MD5_OUT_BUFSIZE), (unsigned char*)key, (unsigned char*)salt);
+	}
+
+	{
+		if (!des_cctx)
+			des_cctx = const_des_init();
+		des_ctx = des_init(des_ctx, des_cctx);
+		return des_crypt(des_ctx, xzalloc(DES_OUT_BUFSIZE), (unsigned char*)key, (unsigned char*)salt);
+	}
+}
+
+/* So far nobody wants to have it public */
+static void my_crypt_cleanup(void)
+{
+	free(des_cctx);
+	free(des_ctx);
+	des_cctx = NULL;
+	des_ctx = NULL;
+}
+
+char *pw_encrypt(const char *clear, const char *salt, int cleanup)
+{
 	static char *cipher;
 
 #if 0 /* was CONFIG_FEATURE_SHA1_PASSWORDS, but there is no such thing??? */
@@ -22,6 +63,10 @@
 #endif
 
 	free(cipher);
-	cipher = xstrdup(crypt(clear, salt));
+	cipher = my_crypt(clear, salt);
+
+	if (cleanup)
+		my_crypt_cleanup();
+
 	return cipher;
 }
