|
|
499a3a |
diff -ru a/src/DES_bs.c b/src/DES_bs.c
|
|
|
499a3a |
--- a/src/DES_bs.c 2012-07-14 09:36:44.000000000 -0400
|
|
|
499a3a |
+++ b/src/DES_bs.c 2016-08-07 15:08:48.011369100 -0400
|
|
|
499a3a |
@@ -52,7 +52,7 @@
|
|
|
499a3a |
};
|
|
|
499a3a |
|
|
|
499a3a |
#if DES_BS_ASM
|
|
|
499a3a |
-extern void DES_bs_init_asm(void);
|
|
|
499a3a |
+extern void DES_INTERNAL DES_bs_init_asm(void);
|
|
|
499a3a |
#endif
|
|
|
499a3a |
|
|
|
499a3a |
void DES_bs_init(int LM, int cpt)
|
|
|
499a3a |
--- a/src/DES_bs.h 2013-05-06 02:19:49.000000000 -0400
|
|
|
499a3a |
+++ b/src/DES_bs.h 2019-02-23 12:06:05.913582953 -0500
|
|
|
499a3a |
@@ -35,6 +35,16 @@
|
|
|
499a3a |
#define DES_bs_vector ARCH_WORD
|
|
|
499a3a |
#endif
|
|
|
499a3a |
|
|
|
499a3a |
+#ifndef HAVE_INTERNAL_ATTR
|
|
|
499a3a |
+#define HAVE_INTERNAL_ATTR 0
|
|
|
499a3a |
+#endif
|
|
|
499a3a |
+
|
|
|
499a3a |
+#if HAVE_INTERNAL_ATTR
|
|
|
499a3a |
+#define DES_INTERNAL __attribute__((visibility("internal")))
|
|
|
499a3a |
+#else
|
|
|
499a3a |
+#define DES_INTERNAL
|
|
|
499a3a |
+#endif
|
|
|
499a3a |
+
|
|
|
499a3a |
/*
|
|
|
499a3a |
* All bitslice DES parameters combined into one struct for more efficient
|
|
|
499a3a |
* cache usage. Don't re-order unless you know what you're doing, as there
|
|
|
499a3a |
@@ -112,7 +122,7 @@
|
|
|
499a3a |
#else
|
|
|
499a3a |
#define DES_bs_mt 0
|
|
|
499a3a |
#define DES_bs_cpt 1
|
|
|
499a3a |
-extern DES_bs_combined DES_bs_all;
|
|
|
499a3a |
+extern DES_INTERNAL DES_bs_combined DES_bs_all;
|
|
|
499a3a |
#define for_each_t(n)
|
|
|
499a3a |
#define init_t()
|
|
|
499a3a |
#endif
|
|
|
499a3a |
@@ -120,7 +130,7 @@
|
|
|
499a3a |
/*
|
|
|
499a3a |
* Initializes the internal structures.
|
|
|
499a3a |
*/
|
|
|
499a3a |
-extern void DES_bs_init(int LM, int cpt);
|
|
|
499a3a |
+extern void DES_INTERNAL DES_bs_init(int LM, int cpt);
|
|
|
499a3a |
|
|
|
499a3a |
/*
|
|
|
499a3a |
* Sets a salt for DES_bs_crypt().
|
|
|
499a3a |
@@ -139,17 +149,17 @@
|
|
|
499a3a |
/*
|
|
|
499a3a |
* Almost generic implementation: 24-bit salts, variable iteration count.
|
|
|
499a3a |
*/
|
|
|
499a3a |
-extern void DES_bs_crypt(int count, int keys_count);
|
|
|
499a3a |
+extern void DES_INTERNAL DES_bs_crypt(int count, int keys_count);
|
|
|
499a3a |
|
|
|
499a3a |
/*
|
|
|
499a3a |
* A simplified special-case implementation: 12-bit salts, 25 iterations.
|
|
|
499a3a |
*/
|
|
|
499a3a |
-extern void DES_bs_crypt_25(int keys_count);
|
|
|
499a3a |
+extern void DES_INTERNAL DES_bs_crypt_25(int keys_count);
|
|
|
499a3a |
|
|
|
499a3a |
/*
|
|
|
499a3a |
* Another special-case version: a non-zero IV, no salts, no iterations.
|
|
|
499a3a |
*/
|
|
|
499a3a |
-extern int DES_bs_crypt_LM(int *keys_count, struct db_salt *salt);
|
|
|
499a3a |
+extern int DES_INTERNAL DES_bs_crypt_LM(int *keys_count, struct db_salt *salt);
|
|
|
499a3a |
|
|
|
499a3a |
/*
|
|
|
499a3a |
* Converts an ASCII ciphertext to binary to be used with one of the
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
--- john-1.8.0/src/Makefile.orig 2013-05-29 23:21:25.000000000 +0000
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
+++ john-1.8.0/src/Makefile 2016-09-11 21:19:18.930129331 +0000
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
@@ -32,7 +32,7 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
# CFLAGS for use on the main john.c file only
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
CFLAGS_MAIN = $(CFLAGS)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
ASFLAGS = -c $(OMPFLAGS)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
-LDFLAGS = -s $(OMPFLAGS)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
+LDFLAGS = $(LDFLAGS_DEBUG) $(OMPFLAGS)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
OPT_NORMAL = -funroll-loops
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
# Remove the "-Os" if you're using an ancient version of gcc
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
f41d1e |
OPT_INLINE = -Os -funroll-loops -finline-functions
|
|
|
d8c9cf |
@@ -104,6 +104,13 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
# @echo "linux-ppc64-altivec Linux, PowerPC 64-bit w/AltiVec"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
@echo "linux-ppc64 Linux, PowerPC 64-bit"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
@echo "linux-ia64 Linux, IA-64"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ @echo "midipix-x86-64-avx Midipix, x86-64 with AVX (2011+ Intel CPUs)"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ @echo "midipix-x86-64 Midipix, x86-64 with SSE2 (most common)"
|
|
|
d8c9cf |
+ @echo "midipix-x86-avx Midipix, x86 32-bit with AVX (2011+ Intel CPUs)"
|
|
|
d8c9cf |
+ @echo "midipix-x86-xop Midipix, x86 32-bit with AVX and XOP (2011+ AMD CPUs)"
|
|
|
d8c9cf |
+ @echo "midipix-x86-sse2 Midipix, x86 32-bit with SSE2 (most common, if 32-bit)"
|
|
|
d8c9cf |
+ @echo "midipix-x86-mmx Midipix, x86 32-bit with MMX (for old computers)"
|
|
|
d8c9cf |
+ @echo "midipix-x86-any Midipix, x86 32-bit (for truly ancient computers)"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
@echo "freebsd-x86-64 FreeBSD, x86-64 with SSE2 (best)"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
@echo "freebsd-x86-sse2 FreeBSD, x86 with SSE2 (best if 32-bit)"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
@echo "freebsd-x86-mmx FreeBSD, x86 with MMX"
|
|
|
d8c9cf |
@@ -306,6 +313,64 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
CFLAGS="$(CFLAGS) -DHAVE_CRYPT" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
LDFLAGS="$(LDFLAGS) -lcrypt"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+midipix-x86-64-avx:
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+ $(LN) x86-64.h arch.h
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+ $(MAKE) $(PROJ) \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
|
|
|
499a3a |
+ CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -mavx -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ ASFLAGS="$(ASFLAGS) -mavx" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+ LDFLAGS="$(LDFLAGS) -lcrypt"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+midipix-x86-64:
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ $(LN) x86-64.h arch.h
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+ $(MAKE) $(PROJ) \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+ LDFLAGS="$(LDFLAGS) -lcrypt"
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
+
|
|
|
d8c9cf |
+midipix-x86-avx:
|
|
|
d8c9cf |
+ $(LN) x86-sse.h arch.h
|
|
|
d8c9cf |
+ $(MAKE) $(PROJ) \
|
|
|
d8c9cf |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
|
|
|
ecf18b |
+ CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_AVX -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -m32 -mavx -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ ASFLAGS="$(ASFLAGS) -m32 -mavx -DUNDERSCORES" \
|
|
|
d8c9cf |
+ LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
|
|
|
d8c9cf |
+
|
|
|
d8c9cf |
+midipix-x86-xop:
|
|
|
d8c9cf |
+ $(LN) x86-sse.h arch.h
|
|
|
d8c9cf |
+ $(MAKE) $(PROJ) \
|
|
|
d8c9cf |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
|
|
|
ecf18b |
+ CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_XOP -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -m32 -mxop -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ ASFLAGS="$(ASFLAGS) -m32 -mxop -DUNDERSCORES" \
|
|
|
d8c9cf |
+ LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
|
|
|
d8c9cf |
+
|
|
|
d8c9cf |
+midipix-x86-sse2:
|
|
|
d8c9cf |
+ $(LN) x86-sse.h arch.h
|
|
|
d8c9cf |
+ $(MAKE) $(PROJ) \
|
|
|
d8c9cf |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES" \
|
|
|
d8c9cf |
+ LDFLAGS="$(LDFLAGS) -lcrypt"
|
|
|
d8c9cf |
+
|
|
|
d8c9cf |
+midipix-x86-mmx:
|
|
|
d8c9cf |
+ $(LN) x86-mmx.h arch.h
|
|
|
d8c9cf |
+ $(MAKE) $(PROJ) \
|
|
|
d8c9cf |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-mmx.o" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES" \
|
|
|
d8c9cf |
+ LDFLAGS="$(LDFLAGS) -lcrypt"
|
|
|
d8c9cf |
+
|
|
|
d8c9cf |
+midipix-x86-any:
|
|
|
d8c9cf |
+ $(LN) x86-any.h arch.h
|
|
|
d8c9cf |
+ $(MAKE) $(PROJ) \
|
|
|
d8c9cf |
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
|
|
|
499a3a |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES" \
|
|
|
d8c9cf |
+ LDFLAGS="$(LDFLAGS) -lcrypt"
|
|
|
d8c9cf |
+
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
freebsd-x86-64:
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
$(LN) x86-64.h arch.h
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
cd059d |
$(MAKE) $(PROJ) \
|