|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
diff -ru a/src/DES_bs.c b/src/DES_bs.c
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
@@ -52,7 +52,7 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
};
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#if DES_BS_ASM
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
-extern void DES_bs_init_asm(void);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+extern void DES_INTERNAL_CALL DES_bs_init_asm(void);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#endif
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
void DES_bs_init(int LM, int cpt)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
diff -ru a/src/DES_bs.h b/src/DES_bs.h
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
@@ -35,6 +35,16 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#define DES_bs_vector ARCH_WORD
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#endif
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#ifndef HAVE_INTERNAL_ATTR
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#define HAVE_INTERNAL_ATTR 0
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#endif
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#if HAVE_INTERNAL_ATTR
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#define DES_INTERNAL_CALL __attribute__((visibility("internal")))
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#else
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#define DES_INTERNAL_CALL
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+#endif
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
/*
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* All bitslice DES parameters combined into one struct for more efficient
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* cache usage. Don't re-order unless you know what you're doing, as there
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
@@ -112,7 +122,7 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#else
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#define DES_bs_mt 0
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#define DES_bs_cpt 1
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
-extern DES_bs_combined DES_bs_all;
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+extern DES_INTERNAL_CALL DES_bs_combined DES_bs_all;
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#define for_each_t(n)
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#define init_t()
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
#endif
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
@@ -120,7 +130,7 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
/*
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* Initializes the internal structures.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
*/
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
-extern void DES_bs_init(int LM, int cpt);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+extern void DES_INTERNAL_CALL DES_bs_init(int LM, int cpt);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
/*
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* Sets a salt for DES_bs_crypt().
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
@@ -139,12 +149,12 @@
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
/*
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* Almost generic implementation: 24-bit salts, variable iteration count.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
*/
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
-extern void DES_bs_crypt(int count, int keys_count);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+extern void DES_INTERNAL_CALL DES_bs_crypt(int count, int keys_count);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
/*
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* A simplified special-case implementation: 12-bit salts, 25 iterations.
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
*/
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
-extern void DES_bs_crypt_25(int keys_count);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+extern void DES_INTERNAL_CALL DES_bs_crypt_25(int keys_count);
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
/*
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
* Another special-case version: a non-zero IV, no salts, no iterations.
|
|
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 |
|
|
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 |
|
|
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" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX -DHAVE_CRYPT" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ CFLAGS="$(CFLAGS) -mavx -DHAVE_CRYPT -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" \
|
|
Lucio Andrés Illanes Albornoz (arab, vxp) |
a5962b |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -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" \
|
|
|
d8c9cf |
+ CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_AVX -DHAVE_CRYPT -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ CFLAGS="$(CFLAGS) -m32 -mavx -DHAVE_CRYPT -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" \
|
|
|
d8c9cf |
+ CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_XOP -DHAVE_CRYPT -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
|
|
|
d8c9cf |
+ CFLAGS="$(CFLAGS) -m32 -mxop -DHAVE_CRYPT -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" \
|
|
|
d8c9cf |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -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" \
|
|
|
d8c9cf |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -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" \
|
|
|
d8c9cf |
+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -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) \
|