diff --git a/run/dynamic.conf b/run/dynamic.conf index b0838ed..f891aa9 100644 --- a/run/dynamic.conf +++ b/run/dynamic.conf @@ -173,7 +173,7 @@ Test=$dynamic_1006$e9d38522b5eeec753332e576e2e0fe5d:test3 #################################################################### [List.Generic:dynamic_1007] # expression shown will be the string: dynamic_1007 md5(md5($p).$s) [vBulletin] -Expression=md5(md5($p).$s) [vBulletin] +Expression=md5(md5($p).$s) (vBulletin) # Flag needed here, is Salt. There is no 'fixed' saltlen. Flag=MGF_SALTED Flag=MGF_ColonNOTValid @@ -200,7 +200,7 @@ Test=$dynamic_1007$fb685c6f469f6e549c85e4c1fb5a65a6$\\H:;test3 #################################################################### [List.Generic:dynamic_1008] # expression shown will be this string: -Expression=md5($p.$s) [RADIUS User-Password] +Expression=md5($p.$s) (RADIUS User-Password) # Flag needed here, is Salt Flag=MGF_SALTED # The salt has a fixed length of 16 bytes @@ -219,7 +219,7 @@ Test=$dynamic_1008$658bbf9f04538d6bede09a4a52a77504$HEX$626c61680036373839303132 # Dynamic Type for algorithm used in RADIUS Responses md5($s.$p) ###################################################################### [List.Generic:dynamic_1009] -Expression=md5($s.$p) [RADIUS Responses] +Expression=md5($s.$p) (RADIUS Responses) Flag=MGF_SALTED Func=DynamicFunc__clean_input Func=DynamicFunc__append_salt diff --git a/src/BFEgg_fmt_plug.c b/src/BFEgg_fmt_plug.c index ea08acf..74c3943 100644 --- a/src/BFEgg_fmt_plug.c +++ b/src/BFEgg_fmt_plug.c @@ -12,8 +12,8 @@ #include "blowfish.c" #define FORMAT_LABEL "bfegg" -#define FORMAT_NAME "Eggdrop" -#define ALG_NAME "blowfish" +#define FORMAT_NAME "Eggdrop Blowfish" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 @@ -83,7 +83,7 @@ struct fmt_main fmt_BFEgg = { { FORMAT_LABEL, FORMAT_NAME, - ALG_NAME, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/DMD5_fmt_plug.c b/src/DMD5_fmt_plug.c index 6886c01..a38b5d4 100644 --- a/src/DMD5_fmt_plug.c +++ b/src/DMD5_fmt_plug.c @@ -23,8 +23,8 @@ #include "formats.h" #define FORMAT_LABEL "dmd5" -#define FORMAT_NAME "DIGEST-MD5" -#define ALGORITHM_NAME "DIGEST-MD5 authentication" +#define FORMAT_NAME "DIGEST-MD5 C/R" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/DOMINOSEC_fmt_plug.c b/src/DOMINOSEC_fmt_plug.c index dd93955..ef911fb 100644 --- a/src/DOMINOSEC_fmt_plug.c +++ b/src/DOMINOSEC_fmt_plug.c @@ -25,8 +25,8 @@ #include "common.h" #define FORMAT_LABEL "dominosec" -#define FORMAT_NAME "More Secure Internet Password" -#define ALGORITHM_NAME "RSA MD defined by BSAFE 1.x - Lotus v6" +#define FORMAT_NAME "Lotus Notes/Domino 6 More Secure Internet Password" +#define ALGORITHM_NAME "8/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/EPI_fmt_plug.c b/src/EPI_fmt_plug.c index bd87e76..455bd28 100644 --- a/src/EPI_fmt_plug.c +++ b/src/EPI_fmt_plug.c @@ -53,8 +53,8 @@ struct fmt_main fmt_EPI = { { // fmt_params "epi", - "EPiServer SID Hashes", - "SHA-1", + "EPiServer SID salted SHA-1", + "32/" ARCH_BITS_STR, "", // benchmark comment 0, // benchmark length PLAINTEXT_LENGTH, diff --git a/src/HDAA_fmt_plug.c b/src/HDAA_fmt_plug.c index f81ea44..7f1f1f2 100644 --- a/src/HDAA_fmt_plug.c +++ b/src/HDAA_fmt_plug.c @@ -30,24 +30,15 @@ #ifdef MD5_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * MD5_SSE_PARA) -#define ALGORITHM_NAME "SSE2i " MD5_N_STR #elif defined(MMX_COEF) #define NBKEYS MMX_COEF -#if MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#endif -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif +#include "sse-intrinsics.h" +#define ALGORITHM_NAME MD5_ALGORITHM_NAME #define FORMAT_LABEL "hdaa" -#define FORMAT_NAME "HTTP Digest access authentication" +#define FORMAT_NAME "HTTP Digest access authentication MD5" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/IPB2_fmt_plug.c b/src/IPB2_fmt_plug.c index 968081b..303c1dc 100644 --- a/src/IPB2_fmt_plug.c +++ b/src/IPB2_fmt_plug.c @@ -24,21 +24,12 @@ #ifdef MD5_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * MD5_SSE_PARA) -#define ALGORITHM_NAME "SSE2i " MD5_N_STR #elif defined(MMX_COEF) #define NBKEYS MMX_COEF -#if MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#endif -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif +#include "sse-intrinsics.h" +#define ALGORITHM_NAME MD5_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/KRB4_fmt_plug.c b/src/KRB4_fmt_plug.c index b01d4fc..49da15d 100644 --- a/src/KRB4_fmt_plug.c +++ b/src/KRB4_fmt_plug.c @@ -46,8 +46,8 @@ #define TGT_LENGTH 16 /* 2 des_cblock's */ #define FORMAT_LABEL "krb4" -#define FORMAT_NAME "Kerberos v4 TGT" -#define ALGORITHM_NAME "krb4 DES" +#define FORMAT_NAME "Kerberos v4 TGT DES" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 32 diff --git a/src/KRB5_fmt_plug.c b/src/KRB5_fmt_plug.c index 97773a5..a936145 100644 --- a/src/KRB5_fmt_plug.c +++ b/src/KRB5_fmt_plug.c @@ -47,8 +47,8 @@ #define MAX_PASS_LEN 64 #define FORMAT_LABEL "krb5" -#define FORMAT_NAME "Kerberos v5 TGT" -#define ALGORITHM_NAME "krb5 3DES (des3-cbc-sha1)" +#define FORMAT_NAME "Kerberos v5 TGT 3DES" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 32 diff --git a/src/MD5_fmt.c b/src/MD5_fmt.c index 1d15011..c86a8ea 100644 --- a/src/MD5_fmt.c +++ b/src/MD5_fmt.c @@ -9,13 +9,11 @@ #include "arch.h" #include "misc.h" -#include "MD5_std.h" #include "common.h" #include "formats.h" -#ifdef MD5_SSE_PARA #include "sse-intrinsics.h" -#endif +#include "MD5_std.h" #if defined(_OPENMP) && defined(MD5_SSE_PARA) #define OMP_SCALE 4 diff --git a/src/MD5_std.h b/src/MD5_std.h index 21f323c..1e077cf 100644 --- a/src/MD5_std.h +++ b/src/MD5_std.h @@ -63,8 +63,8 @@ typedef struct { # define MMX_COEF 4 # endif # define MD5_N (MD5_SSE_PARA*MMX_COEF) -# define MD5_ALGORITHM_NAME "SSE2i " MD5_N_STR #else +# undef MD5_ALGORITHM_NAME # if MD5_X2 # define MD5_N 2 # define MD5_ALGORITHM_NAME "32/" ARCH_BITS_STR " X2" diff --git a/src/MSCHAPv2_fmt_plug.c b/src/MSCHAPv2_fmt_plug.c index 6f45556..420aebe 100644 --- a/src/MSCHAPv2_fmt_plug.c +++ b/src/MSCHAPv2_fmt_plug.c @@ -44,7 +44,7 @@ #define FORMAT_LABEL "mschapv2" #define FORMAT_NAME "MSCHAPv2 C/R MD4 DES" -#define ALGORITHM_NAME "mschapv2" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 /* lmcons.h - PWLEN (256) ? 127 ? */ diff --git a/src/MYSQL_fast_fmt_plug.c b/src/MYSQL_fast_fmt_plug.c index 8dd6664..d34129a 100644 --- a/src/MYSQL_fast_fmt_plug.c +++ b/src/MYSQL_fast_fmt_plug.c @@ -26,8 +26,8 @@ #include "formats.h" #define FORMAT_LABEL "mysql-fast" -#define FORMAT_NAME "MYSQL_fast" -#define ALGORITHM_NAME "mysql-fast" +#define FORMAT_NAME "MySQL" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR " (label mysql-fast)" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 @@ -50,6 +50,12 @@ static struct fmt_tests mysql_tests[] = { {"1b38cd9c2f809809", "hacktivity2008"}, {"1b38cd9c2f809809", "hacktivity 2008"}, {"6fc81597422015a8", "johnmodule"}, + {"30f098972cc8924d", "http://guh.nu"}, + {"3fc56f6037218993", "Andrew Hintz"}, + {"697a7de87c5390b2", "drew"}, + {"1eb71cf460712b3e", "http://4tphi.net"}, + {"28ff8d49159ffbaf", "http://violating.us"}, + {"5d2e19393cc5ef67", "password"}, {NULL} }; diff --git a/src/MYSQL_fmt_plug.c b/src/MYSQL_fmt_plug.c index f661d5d..d6c369a 100644 --- a/src/MYSQL_fmt_plug.c +++ b/src/MYSQL_fmt_plug.c @@ -31,8 +31,8 @@ //johntr defines #define FORMAT_LABEL "mysql" -#define FORMAT_NAME "MYSQL" -#define ALGORITHM_NAME "mysql" +#define FORMAT_NAME "MySQL" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR " (label mysql)" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/NETLM_fmt_plug.c b/src/NETLM_fmt_plug.c index e2c2f00..5901253 100644 --- a/src/NETLM_fmt_plug.c +++ b/src/NETLM_fmt_plug.c @@ -51,7 +51,7 @@ #define FORMAT_LABEL "netlm" #define FORMAT_NAME "LM C/R DES" -#define ALGORITHM_NAME "netlm" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 14 diff --git a/src/NETLMv2_fmt_plug.c b/src/NETLMv2_fmt_plug.c index d5129b0..de0e8bb 100644 --- a/src/NETLMv2_fmt_plug.c +++ b/src/NETLMv2_fmt_plug.c @@ -59,7 +59,7 @@ #define FORMAT_LABEL "netlmv2" #define FORMAT_NAME "LMv2 C/R MD4 HMAC-MD5" -#define ALGORITHM_NAME "netlmv2" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 /* lmcons.h - PWLEN (256) ? 127 ? */ diff --git a/src/NETNTLM_fmt_plug.c b/src/NETNTLM_fmt_plug.c index 30997f1..bf9f84b 100644 --- a/src/NETNTLM_fmt_plug.c +++ b/src/NETNTLM_fmt_plug.c @@ -60,7 +60,7 @@ #define FORMAT_LABEL "netntlm" #define FORMAT_NAME "NTLMv1 C/R MD4 DES [ESS MD5]" -#define ALGORITHM_NAME "netntlm" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/NETNTLMv2_fmt_plug.c b/src/NETNTLMv2_fmt_plug.c index 19ef4df..58393d8 100644 --- a/src/NETNTLMv2_fmt_plug.c +++ b/src/NETNTLMv2_fmt_plug.c @@ -59,7 +59,7 @@ #define FORMAT_LABEL "netntlmv2" #define FORMAT_NAME "NTLMv2 C/R MD4 HMAC-MD5" -#define ALGORITHM_NAME "netntlmv2" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 /* lmcons.h - PWLEN (256) ? 127 ? */ diff --git a/src/NETSPLITLM_fmt_plug.c b/src/NETSPLITLM_fmt_plug.c index 1fbbe59..804155f 100644 --- a/src/NETSPLITLM_fmt_plug.c +++ b/src/NETSPLITLM_fmt_plug.c @@ -32,7 +32,7 @@ #define FORMAT_LABEL "nethalflm" #define FORMAT_NAME "HalfLM C/R DES" -#define ALGORITHM_NAME "nethalflm" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 7 diff --git a/src/NS_fmt_plug.c b/src/NS_fmt_plug.c index 8314700..dba6c12 100644 --- a/src/NS_fmt_plug.c +++ b/src/NS_fmt_plug.c @@ -40,7 +40,7 @@ #define FORMAT_LABEL "md5ns" #define FORMAT_NAME "Netscreen MD5" -#define NS_ALGORITHM_NAME "NS MD5" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 @@ -264,7 +264,7 @@ struct fmt_main fmt_NS = { { FORMAT_LABEL, FORMAT_NAME, - NS_ALGORITHM_NAME, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/NT_fmt_plug.c b/src/NT_fmt_plug.c index ad1cb83..47db136 100644 --- a/src/NT_fmt_plug.c +++ b/src/NT_fmt_plug.c @@ -141,7 +141,7 @@ static void swap(unsigned int *x, unsigned int *y, int count) unsigned int nt_buffer1x[16*NT_NUM_KEYS1]; unsigned int output1x[4*NT_NUM_KEYS1]; - #define ALGORITHM_NAME "128/128 SSE2 + 32/32" + #define ALGORITHM_NAME "128/128 SSE2 + 32/" ARCH_BITS_STR #define NT_CRYPT_FUN nt_crypt_all_sse2 extern void nt_crypt_all_sse2(int count); #else @@ -149,7 +149,7 @@ static void swap(unsigned int *x, unsigned int *y, int count) unsigned int nt_buffer1x[16*NT_NUM_KEYS]; unsigned int output1x[4*NT_NUM_KEYS]; - #define ALGORITHM_NAME "32/32" + #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define NT_CRYPT_FUN nt_crypt_all_generic static void nt_crypt_all_generic(int count) { diff --git a/src/PHPS_fmt_plug.c b/src/PHPS_fmt_plug.c index 83f9bb8..dd36640 100644 --- a/src/PHPS_fmt_plug.c +++ b/src/PHPS_fmt_plug.c @@ -38,7 +38,7 @@ #include "options.h" #define FORMAT_LABEL "phps" -#define FORMAT_NAME "PHPS -- md5(md5($pass).$salt)" +#define FORMAT_NAME "PHPS md5(md5($pass).$salt)" #define ALGORITHM_NAME "?" /* filled in by md5-gen */ #define BENCHMARK_COMMENT "" diff --git a/src/PO_fmt_plug.c b/src/PO_fmt_plug.c index 923c246..e6e9d44 100644 --- a/src/PO_fmt_plug.c +++ b/src/PO_fmt_plug.c @@ -42,6 +42,7 @@ extern MD5_binary MD5_out; #define FORMAT_LABEL "po" #define FORMAT_NAME "Post.Office MD5" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 @@ -208,7 +209,7 @@ struct fmt_main fmt_PO = { { FORMAT_LABEL, FORMAT_NAME, - "STD", + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/SKEY_fmt.c b/src/SKEY_fmt.c index 50f7552..a4eb368 100644 --- a/src/SKEY_fmt.c +++ b/src/SKEY_fmt.c @@ -46,8 +46,8 @@ #include "formats.h" #define FORMAT_LABEL "skey" -#define FORMAT_NAME "S/Key" -#define ALGORITHM_NAME "MD4/MD5/SHA1/RMD160" +#define FORMAT_NAME "S/Key MD4/MD5/SHA-1/RMD160" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 32 diff --git a/src/SybaseASE_fmt.c b/src/SybaseASE_fmt.c index f6dcc1c..a35882b 100644 --- a/src/SybaseASE_fmt.c +++ b/src/SybaseASE_fmt.c @@ -54,7 +54,7 @@ #include "unicode.h" #define FORMAT_LABEL "sybasease" -#define FORMAT_NAME "sybasease" +#define FORMAT_NAME "Sybase ASE salted SHA-256" #define ALGORITHM_NAME "32/" ARCH_BITS_STR diff --git a/src/XSHA512_fmt.c b/src/XSHA512_fmt.c index 6746e2d..0ab915e 100644 --- a/src/XSHA512_fmt.c +++ b/src/XSHA512_fmt.c @@ -30,7 +30,11 @@ #define FORMAT_LABEL "xsha512" #define FORMAT_NAME "Mac OS X 10.7+ salted SHA-512" +#if ARCH_BITS >= 64 #define ALGORITHM_NAME "64/" ARCH_BITS_STR +#else +#define ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/XSHA_fmt_plug.c b/src/XSHA_fmt_plug.c index d91f17c..76350cc 100644 --- a/src/XSHA_fmt_plug.c +++ b/src/XSHA_fmt_plug.c @@ -11,7 +11,6 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #ifdef _OPENMP @@ -23,6 +22,7 @@ static unsigned int omp_t = 1; #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "params.h" #include "common.h" @@ -33,17 +33,7 @@ static unsigned int omp_t = 1; #define FORMAT_LABEL "xsha" #define FORMAT_NAME "Mac OS X 10.4 - 10.6 salted SHA-1" -#ifdef SHA1_SSE_PARA -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/cryptsha256_fmt.c b/src/cryptsha256_fmt.c index 4be7460..276f06a 100644 --- a/src/cryptsha256_fmt.c +++ b/src/cryptsha256_fmt.c @@ -28,7 +28,7 @@ #define FORMAT_LABEL "cryptsha256" #define FORMAT_NAME "crypt SHA-256" -#define ALGORITHM_NAME "OpenSSL 32/" ARCH_BITS_STR +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT " (rounds=5000)" #define BENCHMARK_LENGTH -1 diff --git a/src/cryptsha512_fmt.c b/src/cryptsha512_fmt.c index 13a2cbf..0e99db4 100644 --- a/src/cryptsha512_fmt.c +++ b/src/cryptsha512_fmt.c @@ -43,9 +43,9 @@ #define FORMAT_LABEL "cryptsha512" #define FORMAT_NAME "crypt SHA-512" #if ARCH_BITS >= 64 -#define ALGORITHM_NAME "OpenSSL 64/" ARCH_BITS_STR +#define ALGORITHM_NAME "64/" ARCH_BITS_STR #else -#define ALGORITHM_NAME "OpenSSL 32/" ARCH_BITS_STR +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif #define BENCHMARK_COMMENT " (rounds=5000)" diff --git a/src/cuda_mscash2_fmt.c b/src/cuda_mscash2_fmt.c index 9f606cb..bf4fcee 100644 --- a/src/cuda_mscash2_fmt.c +++ b/src/cuda_mscash2_fmt.c @@ -13,8 +13,8 @@ #include "cuda_common.h" #define FORMAT_LABEL "mscash2-cuda" -#define FORMAT_NAME FORMAT_LABEL -#define ALGORITHM_NAME "GPU" +#define FORMAT_NAME "M$ Cache Hash 2 (DCC2) PBKDF2-HMAC-SHA-1" +#define ALGORITHM_NAME "CUDA" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/cuda_mscash_fmt.c b/src/cuda_mscash_fmt.c index 5527536..aef1918 100644 --- a/src/cuda_mscash_fmt.c +++ b/src/cuda_mscash_fmt.c @@ -14,7 +14,8 @@ #include "cuda_common.h" #define FORMAT_LABEL "mscash-cuda" -#define ALGORITHM_NAME "" +#define FORMAT_NAME "M$ Cache Hash MD4" +#define ALGORITHM_NAME "CUDA" #define BENCHMARK_COMMENT " len(pass)=8, len(salt)=13" #define BENCHMARK_LENGTH -1 @@ -204,7 +205,7 @@ static int cmp_exact(char *source, int count) struct fmt_main fmt_cuda_mscash = { { FORMAT_LABEL, - FORMAT_LABEL, + FORMAT_NAME, ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, diff --git a/src/cuda_phpass_fmt.c b/src/cuda_phpass_fmt.c index c91ad66..a20b091 100644 --- a/src/cuda_phpass_fmt.c +++ b/src/cuda_phpass_fmt.c @@ -11,12 +11,12 @@ #include "cuda_phpass.h" #include "cuda_common.h" -#define FORMAT_LABEL "phpass-cuda" -#define FORMAT_NAME FORMAT_LABEL +#define FORMAT_LABEL "phpass-opencl" +#define FORMAT_NAME "phpass MD5" -#define PHPASS_TYPE "PORTABLE-MD5" +#define ALGORITHM_NAME "OpenCL" -#define BENCHMARK_COMMENT "" +#define BENCHMARK_COMMENT " ($P$9 lengths 1 to 15)" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 15 @@ -286,7 +286,7 @@ struct fmt_main fmt_cuda_phpass = { { FORMAT_LABEL, FORMAT_NAME, - PHPASS_TYPE, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/cuda_rawsha256_fmt.c b/src/cuda_rawsha256_fmt.c index 4b4a79b..e904335 100644 --- a/src/cuda_rawsha256_fmt.c +++ b/src/cuda_rawsha256_fmt.c @@ -23,8 +23,8 @@ #define MAX_KEYS_PER_CRYPT KEYS_PER_CRYPT #ifdef SHA256 - #define FORMAT_NAME "raw-sha256-cuda" - #define SHA_TYPE "SHA256" + #define FORMAT_LABEL "raw-sha256-cuda" + #define FORMAT_NAME "Raw SHA-256" #define CIPHERTEXT_LENGTH 64 ///256bit #define BINARY_SIZE 32 #define SHA_HASH sha256_hash @@ -36,8 +36,8 @@ }; #endif #ifdef SHA224 - #define FORMAT_NAME "raw-sha224-cuda" - #define SHA_TYPE "SHA224" + #define FORMAT_LABEL "raw-sha224-cuda" + #define FORMAT_NAME "Raw SHA-224" #define CIPHERTEXT_LENGTH 56 ///224bit #define BINARY_SIZE 32 #define SHA_HASH sha224_hash @@ -48,6 +48,8 @@ {NULL} }; #endif +#define ALGORITHM_NAME "CUDA" + extern void gpu_rawsha256(sha256_password *,SHA_HASH*); extern void gpu_rawsha224(sha256_password *,SHA_HASH*); static char saved_keys[MAX_KEYS_PER_CRYPT][PLAINTEXT_LENGTH+1]; /** plaintext ciphertexts **/ @@ -207,9 +209,9 @@ static int cmp_exact(char *source,int count){ struct fmt_main FMT_MAIN={ { + FORMAT_LABEL, FORMAT_NAME, - FORMAT_NAME, - SHA_TYPE, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, @@ -255,4 +257,4 @@ struct fmt_main FMT_MAIN={ cmp_one, cmp_exact } -}; \ No newline at end of file +}; diff --git a/src/cuda_wpapsk_fmt.c b/src/cuda_wpapsk_fmt.c index 6b04966..e037c11 100644 --- a/src/cuda_wpapsk_fmt.c +++ b/src/cuda_wpapsk_fmt.c @@ -14,8 +14,8 @@ #define FORMAT_LABEL "wpapsk-cuda" -#define FORMAT_NAME FORMAT_LABEL -#define ALGORITHM_NAME "GPU" +#define FORMAT_NAME "WPA-PSK" +#define ALGORITHM_NAME "CUDA" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/django_fmt.c b/src/django_fmt.c index 963787f..a7d47dc 100644 --- a/src/django_fmt.c +++ b/src/django_fmt.c @@ -34,10 +34,10 @@ #endif #define FORMAT_LABEL "django" -#define FORMAT_NAME "Django" +#define FORMAT_NAME "Django PBKDF2-HMAC-SHA-256" #define ALGORITHM_NAME "32/" ARCH_BITS_STR -#define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_COMMENT " (x10000)" +#define BENCHMARK_LENGTH -1 /* XXX: change to 0 once we have multiple test vectors */ #define PLAINTEXT_LENGTH 32 #define BINARY_SIZE 16 #define SALT_SIZE sizeof(struct custom_salt) @@ -45,6 +45,7 @@ #define MAX_KEYS_PER_CRYPT 1 static struct fmt_tests django_tests[] = { +/* XXX: need more test vectors */ {"$django$*1*pbkdf2_sha256$10000$qPmFbibfAY06$x/geVEkdZSlJMqvIYJ7G6i5l/6KJ0UpvLUU6cfj83VM=", "openwall"}, {NULL} }; @@ -98,7 +99,7 @@ static void *get_salt(char *ciphertext) t = strtok(NULL, "$"); strcpy((char*)cs.salt, t); t = strtok(NULL, "$"); - base64_decode(t, strlen(t), (char*)cs.hash); + base64_decode(t, strlen(t), (char*)cs.hash); /* XXX: actually use it */ free(keeptr); return (void *)&cs; @@ -126,11 +127,12 @@ static void crypt_all(int count) unsigned char out[32]; if(PKCS5_PBKDF2_HMAC(saved_key[index], strlen(saved_key[index]), salt_struct->salt, strlen((char*)salt_struct->salt), salt_struct->iterations, EVP_sha256(), 32, out) != 0 ) { +/* XXX: this is broken (assumes exactly one hash per salt) */ if(!memcmp(out, salt_struct->hash, 32)) any_cracked = cracked[index] = 1; } else { - fprintf(stderr, "PKCS5_PBKDF2_HMAC_SHA1 failed\n"); + fprintf(stderr, "PKCS5_PBKDF2_HMAC failed\n"); exit(-1); } } @@ -203,4 +205,4 @@ struct fmt_main fmt_django = { cmp_exact } }; -#endif \ No newline at end of file +#endif diff --git a/src/dragonfly3_fmt.c b/src/dragonfly3_fmt.c index 4c0f298..55d618f 100644 --- a/src/dragonfly3_fmt.c +++ b/src/dragonfly3_fmt.c @@ -31,7 +31,7 @@ #define FORMAT_LABEL_64 "dragonfly3-64" #define FORMAT_NAME_32 "DragonFly BSD $3$ SHA-256 w/ bug, 32-bit" #define FORMAT_NAME_64 "DragonFly BSD $3$ SHA-256 w/ bug, 64-bit" -#define ALGORITHM_NAME "OpenSSL 32/" ARCH_BITS_STR +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/dragonfly4_fmt.c b/src/dragonfly4_fmt.c index 0bd769f..03f325b 100644 --- a/src/dragonfly4_fmt.c +++ b/src/dragonfly4_fmt.c @@ -32,9 +32,9 @@ #define FORMAT_NAME_32 "DragonFly BSD $4$ SHA-512 w/ bugs, 32-bit" #define FORMAT_NAME_64 "DragonFly BSD $4$ SHA-512 w/ bugs, 64-bit" #if ARCH_BITS >= 64 -#define ALGORITHM_NAME "OpenSSL 64/" ARCH_BITS_STR +#define ALGORITHM_NAME "64/" ARCH_BITS_STR #else -#define ALGORITHM_NAME "OpenSSL 32/" ARCH_BITS_STR +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif #define BENCHMARK_COMMENT "" diff --git a/src/drupal7_fmt.c b/src/drupal7_fmt.c index f8dc5af..a4deb43 100644 --- a/src/drupal7_fmt.c +++ b/src/drupal7_fmt.c @@ -40,14 +40,14 @@ #endif #define FORMAT_LABEL "drupal7" -#define FORMAT_NAME "Drupal 7 $S$" +#define FORMAT_NAME "Drupal 7 $S$ SHA-512" #if ARCH_BITS >= 64 #define ALGORITHM_NAME "64/" ARCH_BITS_STR #else #define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif -#define BENCHMARK_COMMENT " (SHA-512 x 16385)" +#define BENCHMARK_COMMENT " (x16385)" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 63 diff --git a/src/dynamic_fmt.c b/src/dynamic_fmt.c index 32500b3..699e5b7 100644 --- a/src/dynamic_fmt.c +++ b/src/dynamic_fmt.c @@ -254,31 +254,39 @@ static void __SSE_gen_BenchLowLevelFunctions(); #define BSD_BLKS 1 #endif +#include "sse-intrinsics.h" #if (MMX_COEF == 2) #define BLOCK_LOOPS 64 -#define ALGORITHM_NAME "MMX 64x2" -#else // MMX_COEF != 2 +#define ALGORITHM_NAME "64/64 " SSE_type " 64x2" +#elif MMX_COEF == 4 #define BLOCK_LOOPS 32 #ifdef MD5_SSE_PARA -#include "sse-intrinsics.h" #if (MD5_SSE_PARA==1) -#define ALGORITHM_NAME "SSE2i 32x4x1" +#define ALGORITHM_NAME "128/128 " SSE_type " 32x4x1" #elif (MD5_SSE_PARA==2) -#define ALGORITHM_NAME "SSE2i 16x4x2" +#define ALGORITHM_NAME "128/128 " SSE_type " 16x4x2" #elif (MD5_SSE_PARA==3) -#define ALGORITHM_NAME "SSE2i 10x4x3" +#define ALGORITHM_NAME "128/128 " SSE_type " 10x4x3" #elif (MD5_SSE_PARA==4) -#define ALGORITHM_NAME "SSE2i 8x4x4" +#define ALGORITHM_NAME "128/128 " SSE_type " 8x4x4" #elif (MD5_SSE_PARA==5) -#define ALGORITHM_NAME "SSE2i 6x4x5" +#define ALGORITHM_NAME "128/128 " SSE_type " 6x4x5" #elif (MD5_SSE_PARA==6) -#define ALGORITHM_NAME "SSE2i 5x4x6" -#else //if (MD5_SSE_PARA==8) -#define ALGORITHM_NAME "SSE2i 4x4x8" +#define ALGORITHM_NAME "128/128 " SSE_type " 5x4x6" +#elif (MD5_SSE_PARA==8) +#define ALGORITHM_NAME "128/128 " SSE_type " 4x4x8" +#else +#define ALGORITHM_NAME "128/128 " SSE_type #endif // MD5_SSE_PARA #else // !MD5_SSE_PARA -#define ALGORITHM_NAME "SSE2 32x4" +#define ALGORITHM_NAME "128/128 " SSE_type " 32x4" #endif // PARA +#else // MMX_COEF == 4 +#if MMX_COEF != 1 +#error Unsupported value of MMX_COEF +#endif +#define BLOCK_LOOPS 64 +#define ALGORITHM_NAME "32/" ARCH_BITS_STR " 64x1" #endif // MMX_COEF == 4 #define PLAINTEXT_LENGTH (27*3+1) // for worst-case UTF-8 @@ -308,7 +316,7 @@ extern void MD5_body_for_thread(int t, MD5_word x[15], MD5_word x2[15], MD5_word #else extern void MD5_body(MD5_word x[15], MD5_word x2[15], MD5_word out[4], MD5_word out2[4]); #endif -#define ALGORITHM_NAME_X86 "64x2 (MD5_Body)" +#define ALGORITHM_NAME_X86 "32/" ARCH_BITS_STR " 64x2 (MD5_Body)" #define DoMD5(A,L,C) do{if(!force_md5_ctx&&(L[0])<55&&(L[1])<55) {A.x1.b[L[0]]=0x80;A.x2.b2[L[1]]=0x80;A.x1.w[14]=(L[0]<<3);A.x2.w2[14]=(L[1]<<3);MD5_swap(A.x1.w,A.x1.w,(L[0]+4)>>2);MD5_swap(A.x2.w2,A.x2.w2,(L[1]+4)>>2);MD5_body(A.x1.w,A.x2.w2,C.x1.w,C.x2.w2);MD5_swap2(C.x1.w,C.x2.w2,C.x1.w,C.x2.w2,4);} else {MD5_Go2(A.x1.B,L[0],C.x1.B); MD5_Go2(A.x2.B2,L[1],C.x2.B2);} }while(0) #define DoMD5o(A,L,C) do{if((L[0])<55&&(L[1])<55) {MD5_body(A.x1.w,A.x2.w2,C.x1.w,C.x2.w2);} else {MD5_Go2(A.x1.B,L[0],C.x1.B); MD5_Go2(A.x2.B2,L[1],C.x2.B2);} }while(0) #if ARCH_LITTLE_ENDIAN @@ -326,7 +334,7 @@ extern void MD5_body_for_thread(int t, ARCH_WORD_32 x[15], ARCH_WORD_32 out[4]); #else extern void MD5_body(ARCH_WORD_32 x[15], ARCH_WORD_32 out[4]); #endif -#define ALGORITHM_NAME_X86 "128x1 (MD5_Body)" +#define ALGORITHM_NAME_X86 "32/" ARCH_BITS_STR " 128x1 (MD5_Body)" #define DoMD5(A,L,C) do{if(!force_md5_ctx&&(L)<55) {A.x1.b[L]=0x80;A.x1.w[14]=(L<<3);MD5_swap(A.x1.w,A.x1.w,((L+4)>>2));MD5_body(A.x1.w,C.x1.w);MD5_swap(C.x1.w,C.x1.w,4);} else MD5_Go2(A.x1.B,L,C.x1.B); }while(0) #define DoMD5o(A,L,C) do{if((L)<55) {MD5_body(A.x1.w,C.x1.w);} else MD5_Go2(A.x1.B,L,C.x1.B); }while(0) #if ARCH_LITTLE_ENDIAN @@ -350,7 +358,7 @@ extern void MD5_body_for_thread(int t, ARCH_WORD_32 x1[15], ARCH_WORD_32 x2[15], #else extern void MD5_body(ARCH_WORD_32 x1[15], ARCH_WORD_32 x2[15], ARCH_WORD_32 out1[4], ARCH_WORD_32 out2[4]); #endif -#define ALGORITHM_NAME_X86 "64x2 (MD5_body)" +#define ALGORITHM_NAME_X86 "32/" ARCH_BITS_STR " 64x2 (MD5_body)" #define DoMD5(A,L,C) do{if(!force_md5_ctx&&(L[0])<55&&(L[1])<55) {A.x1.b[L[0]]=0x80;A.x2.b2[L[1]]=0x80;A.x1.w[14]=(L[0]<<3);A.x2.w2[14]=(L[1]<<3);MD5_swap(A.x1.w,A.x1.w,(L[0]+4)>>2);MD5_swap(A.x2.w2,A.x2.w2,(L[1]+4)>>2);MD5_body(A.x1.w,A.x2.w2,C.x1.w,C.x2.w2);MD5_swap2(C.x1.w,C.x2.w2,C.x1.w,C.x2.w2,4);} else {MD5_CTX ctx; MD5_Init(&ctx); MD5_Update(&ctx,A.x1.b,L[0]); MD5_Final((unsigned char *)(C.x1.b),&ctx); MD5_Init(&ctx); MD5_Update(&ctx,A.x2.b2,L[1]); MD5_Final((unsigned char *)(C.x2.b2),&ctx);} }while(0) #define DoMD5o(A,L,C) do{if((L[0])<55&&(L[1])<55) {MD5_body(A.x1.w,A.x2.w2,C.x1.w,C.x2.w2);} else {MD5_CTX ctx; MD5_Init(&ctx); MD5_Update(&ctx,A.x1.b,L[0]); MD5_Final((unsigned char *)(C.x1.b),&ctx); MD5_Init(&ctx); MD5_Update(&ctx,A.x2.b2,L[1]); MD5_Final((unsigned char *)(C.x2.b2),&ctx);} }while(0) #define DoMD5a(A,L,C) do{MD5_body(A->x1.w,A->x2.w2,C->x1.w,C->x2.w2);}while(0) @@ -363,7 +371,7 @@ extern void MD5_body_for_thread(int t, MD5_word x[15],MD5_word out[4]); #else extern void MD5_body(MD5_word x[15],MD5_word out[4]); #endif -#define ALGORITHM_NAME_X86 "128x1 (MD5_body)" +#define ALGORITHM_NAME_X86 "32/" ARCH_BITS_STR " 128x1 (MD5_body)" #define DoMD5(A,L,C) do{if(!force_md5_ctx&&(L)<55) {A.x1.b[L]=0x80;A.x1.w[14]=(L<<3);MD5_swap(A.x1.w,A.x1.w,((L+4)>>2));MD5_body(A.x1.w,C.x1.w);MD5_swap(C.x1.w,C.x1.w,4);} else {MD5_CTX ctx; MD5_Init(&ctx); MD5_Update(&ctx,A.x1.b,L); MD5_Final((unsigned char *)(C.x1.b),&ctx); } }while(0) #define DoMD5o(A,L,C) do{if((L)<55) {MD5_body(A.x1.w,C.x1.w);} else {MD5_CTX ctx; MD5_Init(&ctx); MD5_Update(&ctx,A.x1.b,L); MD5_Final((unsigned char *)(C.x1.b),&ctx); } }while(0) #define DoMD5a(A,L,C) do{MD5_body(A->x1.w,C->x1.w);}while(0) @@ -7138,28 +7146,28 @@ int dynamic_SETUP(DYNAMIC_Setup *Setup, struct fmt_main *pFmt) { #ifdef MMX_COEF #if (MMX_COEF==2) - pFmt->params.algorithm_name = "MMX 2x1"; + pFmt->params.algorithm_name = SSE_type " 2x1"; pFmt->params.max_keys_per_crypt = 2; #elif (MD5_SSE_PARA==1) - pFmt->params.algorithm_name = "SSE2i 4x1"; + pFmt->params.algorithm_name = SSE_type " 4x1"; pFmt->params.max_keys_per_crypt = 4; #elif (MD5_SSE_PARA==2) - pFmt->params.algorithm_name = "SSE2i 4x2"; + pFmt->params.algorithm_name = SSE_type " 4x2"; pFmt->params.max_keys_per_crypt = 8; #elif (MD5_SSE_PARA==3) - pFmt->params.algorithm_name = "SSE2i 4x3"; + pFmt->params.algorithm_name = SSE_type " 4x3"; pFmt->params.max_keys_per_crypt = 12; #elif (MD5_SSE_PARA==4) - pFmt->params.algorithm_name = "SSE2i 4x4"; + pFmt->params.algorithm_name = SSE_type " 4x4"; pFmt->params.max_keys_per_crypt = 16; #elif (MD5_SSE_PARA==5) - pFmt->params.algorithm_name = "SSE2i 4x5"; + pFmt->params.algorithm_name = SSE_type " 4x5"; pFmt->params.max_keys_per_crypt = 20; #elif (MD5_SSE_PARA==6) - pFmt->params.algorithm_name = "SSE2i 4x6"; + pFmt->params.algorithm_name = SSE_type " 4x6"; pFmt->params.max_keys_per_crypt = 24; #else - pFmt->params.algorithm_name = "SSE2 4x1"; + pFmt->params.algorithm_name = SSE_type " 4x1"; pFmt->params.max_keys_per_crypt = 4; #endif #else @@ -7187,24 +7195,24 @@ int dynamic_SETUP(DYNAMIC_Setup *Setup, struct fmt_main *pFmt) // by doing more than simple 1 set of MMX_COEF pFmt->params.max_keys_per_crypt = 16; #if (MMX_COEF==2) - pFmt->params.algorithm_name = "MMX 8x2"; + pFmt->params.algorithm_name = SSE_type " 8x2"; #elif (MD5_SSE_PARA==1) - pFmt->params.algorithm_name = "SSE2i 4x4x1"; + pFmt->params.algorithm_name = SSE_type " 4x4x1"; #elif (MD5_SSE_PARA==2) - pFmt->params.algorithm_name = "SSE2i 2x4x2"; + pFmt->params.algorithm_name = SSE_type " 2x4x2"; #elif (MD5_SSE_PARA==3) - pFmt->params.algorithm_name = "SSE2i 2x4x3"; + pFmt->params.algorithm_name = SSE_type " 2x4x3"; pFmt->params.max_keys_per_crypt = 24; #elif (MD5_SSE_PARA==4) - pFmt->params.algorithm_name = "SSE2i 1x4x4"; + pFmt->params.algorithm_name = SSE_type " 1x4x4"; #elif (MD5_SSE_PARA==5) - pFmt->params.algorithm_name = "SSE2i 1x4x5"; + pFmt->params.algorithm_name = SSE_type " 1x4x5"; pFmt->params.max_keys_per_crypt = 20; #elif (MD5_SSE_PARA==6) - pFmt->params.algorithm_name = "SSE2i 1x4x6"; + pFmt->params.algorithm_name = SSE_type " 1x4x6"; pFmt->params.max_keys_per_crypt = 24; #else - pFmt->params.algorithm_name = "SSE2 4x4"; + pFmt->params.algorithm_name = SSE_type " 4x4"; #endif #else // In non-sse mode, 1 test runs as fast as 128. But validity checking is MUCH faster if diff --git a/src/episerver_fmt_plug.c b/src/episerver_fmt_plug.c index 1bb24e6..f75064b 100644 --- a/src/episerver_fmt_plug.c +++ b/src/episerver_fmt_plug.c @@ -60,10 +60,10 @@ #endif #define FORMAT_LABEL "episerver" -#define FORMAT_NAME "EPiServer" +#define FORMAT_NAME "EPiServer salted SHA-1/SHA-256" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 32 #define BINARY_SIZE 16 #define SALT_SIZE sizeof(*salt_struct) @@ -156,6 +156,7 @@ static void crypt_all(int count) SHA1_Update(&ctx, salt_struct->esalt, 16); SHA1_Update(&ctx, passwordBuf, passwordBufSize); SHA1_Final((unsigned char *)sha1hash, &ctx); +/* XXX: this is broken (assumes exactly one hash per salt) */ if(!memcmp(sha1hash, salt_struct->hash, 20)) cracked[index] = 1; else @@ -168,6 +169,7 @@ static void crypt_all(int count) SHA256_Update(&ctx, salt_struct->esalt, 16); SHA256_Update(&ctx, passwordBuf, passwordBufSize); SHA256_Final((unsigned char *)sha256hash, &ctx); +/* XXX: this is broken (assumes exactly one hash per salt) */ if(!memcmp(sha256hash, salt_struct->hash, 32)) cracked[index] = 1; else diff --git a/src/gost.h b/src/gost.h index 29baa01..7ba8686 100644 --- a/src/gost.h +++ b/src/gost.h @@ -29,6 +29,11 @@ extern "C" { # endif #endif +#if defined(__GNUC__) && defined(CPU_IA32) && !defined(RHASH_NO_ASM) +# define USE_GCC_ASM_IA32 +#elif defined(__GNUC__) && defined(CPU_X64) && !defined(RHASH_NO_ASM) +# define USE_GCC_ASM_X64 +#endif /* detect CPU endianness */ #if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \ diff --git a/src/gost_fmt_plug.c b/src/gost_fmt_plug.c index 6e4240f..257aec0 100644 --- a/src/gost_fmt_plug.c +++ b/src/gost_fmt_plug.c @@ -37,7 +37,12 @@ #define FORMAT_TAG_CP "$gost-cp$" #define TAG_CP_LENGTH 9 +#if !defined(USE_GCC_ASM_IA32) && defined(USE_GCC_ASM_X64) +#define ALGORITHM_NAME "64/64" +#else #define ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif + #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 64 diff --git a/src/gost_plug.c b/src/gost_plug.c index 26fe5cf..a550f8b 100644 --- a/src/gost_plug.c +++ b/src/gost_plug.c @@ -41,12 +41,6 @@ void john_gost_cryptopro_init(gost_ctx *ctx) ctx->cryptpro = 1; } -#if defined(__GNUC__) && defined(CPU_IA32) && !defined(RHASH_NO_ASM) -# define USE_GCC_ASM_IA32 -#elif defined(__GNUC__) && defined(CPU_X64) && !defined(RHASH_NO_ASM) -# define USE_GCC_ASM_X64 -#endif - /* * A macro that performs a full encryption round of GOST 28147-89. * Temporary variables tmp assumed and variables r and l for left and right diff --git a/src/hmacMD5_fmt.c b/src/hmacMD5_fmt.c index 83b68c1..19664da 100644 --- a/src/hmacMD5_fmt.c +++ b/src/hmacMD5_fmt.c @@ -19,26 +19,16 @@ #ifdef MD5_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define MD5_N (MD5_SSE_PARA*MMX_COEF) #else #define MD5_N MMX_COEF #endif +#include "sse-intrinsics.h" -#ifdef MD5_SSE_PARA -#define ALGORITHM_NAME "SSE2i " MD5_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME MD5_ALGORITHM_NAME #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/hmacSHA1_fmt.c b/src/hmacSHA1_fmt.c index e698f13..ed30f56 100644 --- a/src/hmacSHA1_fmt.c +++ b/src/hmacSHA1_fmt.c @@ -20,26 +20,16 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define SHA1_N (SHA1_SSE_PARA*MMX_COEF) #else #define SHA1_N MMX_COEF #endif +#include "sse-intrinsics.h" -#ifdef SHA1_SSE_PARA -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/hmacSHA224_fmt.c b/src/hmacSHA224_fmt.c index 6452427..f6ccf6f 100644 --- a/src/hmacSHA224_fmt.c +++ b/src/hmacSHA224_fmt.c @@ -18,12 +18,12 @@ #include #define FORMAT_LABEL "hmac-sha224" -#define FORMAT_NAME "HMAC SHA224" +#define FORMAT_NAME "HMAC SHA-224" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/hmacSHA256_fmt.c b/src/hmacSHA256_fmt.c index f342e80..7ca2b74 100644 --- a/src/hmacSHA256_fmt.c +++ b/src/hmacSHA256_fmt.c @@ -18,12 +18,12 @@ #include #define FORMAT_LABEL "hmac-sha256" -#define FORMAT_NAME "HMAC SHA256" +#define FORMAT_NAME "HMAC SHA-256" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/hmacSHA384_fmt.c b/src/hmacSHA384_fmt.c index b164693..00bd563 100644 --- a/src/hmacSHA384_fmt.c +++ b/src/hmacSHA384_fmt.c @@ -18,12 +18,16 @@ #include #define FORMAT_LABEL "hmac-sha384" -#define FORMAT_NAME "HMAC SHA384" +#define FORMAT_NAME "HMAC SHA-384" +#if ARCH_BITS >= 64 #define ALGORITHM_NAME "64/" ARCH_BITS_STR +#else +#define ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/hmacSHA512_fmt.c b/src/hmacSHA512_fmt.c index 5cbe771..b985c92 100644 --- a/src/hmacSHA512_fmt.c +++ b/src/hmacSHA512_fmt.c @@ -31,12 +31,16 @@ #endif #define FORMAT_LABEL "hmac-sha512" -#define FORMAT_NAME "HMAC SHA512" +#define FORMAT_NAME "HMAC SHA-512" +#if ARCH_BITS >= 64 #define ALGORITHM_NAME "64/" ARCH_BITS_STR +#else +#define ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/hmailserver_fmt.c b/src/hmailserver_fmt.c index b189ad7..135970d 100644 --- a/src/hmailserver_fmt.c +++ b/src/hmailserver_fmt.c @@ -48,7 +48,7 @@ #include "formats.h" #define FORMAT_LABEL "hmailserver" -#define FORMAT_NAME "hmailserver" +#define FORMAT_NAME "hMailServer salted SHA-256" #define ALGORITHM_NAME "32/" ARCH_BITS_STR diff --git a/src/keychain_fmt_plug.c b/src/keychain_fmt_plug.c index 6396248..12a93a2 100644 --- a/src/keychain_fmt_plug.c +++ b/src/keychain_fmt_plug.c @@ -26,7 +26,7 @@ #endif #define FORMAT_LABEL "keychain" -#define FORMAT_NAME "Mac OS X Keychain" +#define FORMAT_NAME "Mac OS X Keychain PBKDF2-HMAC-SHA-1 3DES" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/lotus5_fmt_plug.c b/src/lotus5_fmt_plug.c index 7074a14..7c25dc1 100644 --- a/src/lotus5_fmt_plug.c +++ b/src/lotus5_fmt_plug.c @@ -11,8 +11,8 @@ /*preprocessor constants that John The Ripper likes*/ #define FORMAT_LABEL "lotus5" -#define FORMAT_NAME "Lotus5" -#define ALGORITHM_NAME "Lotus v5 Proprietary" +#define FORMAT_NAME "Lotus Notes/Domino 5" +#define ALGORITHM_NAME "8/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 16 diff --git a/src/mediawiki_fmt_plug.c b/src/mediawiki_fmt_plug.c index 5a469b6..54a2997 100644 --- a/src/mediawiki_fmt_plug.c +++ b/src/mediawiki_fmt_plug.c @@ -48,7 +48,7 @@ userName2:$B$107$dd494cb03ac1c5b8f8d2dddafca2f7a6:1552:0::emailaddress@gmail.com #include "options.h" #define FORMAT_LABEL "mediawiki" -#define FORMAT_NAME "MediaWiki -- md5($s.'-'.md5($p))" +#define FORMAT_NAME "MediaWiki md5($s.'-'.md5($p))" #define ALGORITHM_NAME "?" /* filled in by md5-gen */ #define BENCHMARK_COMMENT "" diff --git a/src/mozilla_fmt.c b/src/mozilla_fmt.c index 98f7746..48ac9e9 100644 --- a/src/mozilla_fmt.c +++ b/src/mozilla_fmt.c @@ -23,7 +23,7 @@ #endif #define FORMAT_LABEL "mozilla" -#define FORMAT_NAME "Mozilla" +#define FORMAT_NAME "Mozilla SHA-1 3DES" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/mscash1_fmt_plug.c b/src/mscash1_fmt_plug.c index bf2b13e..3e53368 100644 --- a/src/mscash1_fmt_plug.c +++ b/src/mscash1_fmt_plug.c @@ -27,7 +27,7 @@ #include "options.h" #define FORMAT_LABEL "mscash" -#define FORMAT_NAME "M$ Cache Hash" +#define FORMAT_NAME "M$ Cache Hash MD4" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 @@ -53,7 +53,7 @@ static struct fmt_tests tests[] = { {NULL} }; -#define ALGORITHM_NAME "Generic 1x" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BINARY_SIZE 16 #define SALT_SIZE (11*4) diff --git a/src/mscash2_fmt_plug.c b/src/mscash2_fmt_plug.c index 755337c..52b380e 100644 --- a/src/mscash2_fmt_plug.c +++ b/src/mscash2_fmt_plug.c @@ -49,10 +49,6 @@ #include #include "arch.h" -#ifdef SHA1_SSE_PARA -#define MMX_COEF 4 -#include "sse-intrinsics.h" -#endif #include "misc.h" #include "memory.h" #include "common.h" @@ -68,6 +64,11 @@ #endif #include "unicode.h" +#ifdef SHA1_SSE_PARA +#define MMX_COEF 4 +#endif +#include "sse-intrinsics.h" + #if (!defined(SHA1_SSE_PARA) && defined(MMX_COEF)) #undef _OPENMP #undef FMT_OMP @@ -99,7 +100,7 @@ static struct fmt_tests tests[] = { }; #define FORMAT_LABEL "mscash2" -#define FORMAT_NAME "M$ Cache Hash 2 (DCC2)" +#define FORMAT_NAME "M$ Cache Hash 2 (DCC2) PBKDF2-HMAC-SHA-1" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 @@ -110,18 +111,13 @@ static struct fmt_tests tests[] = { #define BINARY_SIZE 16 #define SALT_SIZE (11*4+4) -#ifdef MMX_COEF +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME +#ifdef MMX_COEF # ifdef SHA1_SSE_PARA -# define ALGORITHM_NAME "SSE2i " SHA1_N_STR # define MS_NUM_KEYS (MMX_COEF*SHA1_SSE_PARA) # else # define MS_NUM_KEYS MMX_COEF -# if MMX_COEF==4 -# define ALGORITHM_NAME "SSE2 4x" -# else -# define ALGORITHM_NAME "MMX 2x" -# endif # endif // Ok, now we have our MMX/SSE2/intr buffer. // this version works properly for MMX, SSE2 (.S) and SSE2 intrinsic. @@ -132,7 +128,6 @@ static unsigned char (*sse_crypt2); static unsigned char (*sse_crypt); #else -# define ALGORITHM_NAME "Generic 1x" # define MS_NUM_KEYS 1 #endif diff --git a/src/mskrb5_fmt_plug.c b/src/mskrb5_fmt_plug.c index 75f8486..90a068e 100644 --- a/src/mskrb5_fmt_plug.c +++ b/src/mskrb5_fmt_plug.c @@ -55,8 +55,8 @@ #include "rc4.h" #define FORMAT_LABEL "mskrb5" -#define FORMAT_NAME "MS Kerberos 5 AS-REQ Pre-Auth" -#define ALGORITHM_NAME "mskrb5" +#define FORMAT_NAME "MS Kerberos 5 AS-REQ Pre-Auth MD4 MD5 RC4" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 125 diff --git a/src/mssql-old_fmt_plug.c b/src/mssql-old_fmt_plug.c index f5ca93f..22ee3a5 100644 --- a/src/mssql-old_fmt_plug.c +++ b/src/mssql-old_fmt_plug.c @@ -14,11 +14,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "params.h" @@ -29,19 +29,9 @@ #include "sha.h" #define FORMAT_LABEL "mssql" -#define FORMAT_NAME "MS-SQL" - -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define FORMAT_NAME "MS SQL SHA-1" + +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/mssql05_fmt_plug.c b/src/mssql05_fmt_plug.c index 28b118a..ace02b2 100644 --- a/src/mssql05_fmt_plug.c +++ b/src/mssql05_fmt_plug.c @@ -15,11 +15,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "params.h" @@ -31,19 +31,9 @@ #include "johnswap.h" #define FORMAT_LABEL "mssql05" -#define FORMAT_NAME "MS-SQL05" - -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define FORMAT_NAME "MS SQL 2005 SHA-1" + +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/mysqlSHA1_fmt_plug.c b/src/mysqlSHA1_fmt_plug.c index 42777b5..a58f0cb 100644 --- a/src/mysqlSHA1_fmt_plug.c +++ b/src/mysqlSHA1_fmt_plug.c @@ -32,11 +32,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "common.h" @@ -46,17 +46,7 @@ #define FORMAT_LABEL "mysql-sha1" #define FORMAT_NAME "MySQL 4.1 double-SHA-1" -#ifdef SHA1_SSE_PARA -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/nsldap_fmt_plug.c b/src/nsldap_fmt_plug.c index 2efa6f7..2030af4 100644 --- a/src/nsldap_fmt_plug.c +++ b/src/nsldap_fmt_plug.c @@ -12,11 +12,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "johnswap.h" #include "misc.h" @@ -26,19 +26,9 @@ #include "base64.h" #define FORMAT_LABEL "nsldap" -#define FORMAT_NAME "Netscape LDAP SHA" - -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define FORMAT_NAME "Netscape LDAP SHA-1" + +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/nt2_fmt_plug.c b/src/nt2_fmt_plug.c index 1caa353..c94bb96 100644 --- a/src/nt2_fmt_plug.c +++ b/src/nt2_fmt_plug.c @@ -16,11 +16,11 @@ #ifdef MD4_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * MD4_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "md4.h" #include "misc.h" @@ -32,19 +32,9 @@ #include "johnswap.h" #define FORMAT_LABEL "nt2" -#define FORMAT_NAME "NT v2" +#define FORMAT_NAME "NT MD4" -#ifdef MD4_SSE_PARA -#define ALGORITHM_NAME "SSE2i " MD4_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME MD4_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/odf_fmt_plug.c b/src/odf_fmt_plug.c index 2d6ab00..ea2abae 100644 --- a/src/odf_fmt_plug.c +++ b/src/odf_fmt_plug.c @@ -26,7 +26,7 @@ #endif #define FORMAT_LABEL "odf" -#define FORMAT_NAME "ODF" +#define FORMAT_NAME "ODF SHA-1 Blowfish" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/office_fmt_plug.c b/src/office_fmt_plug.c index 06b993a..da3671b 100644 --- a/src/office_fmt_plug.c +++ b/src/office_fmt_plug.c @@ -22,7 +22,7 @@ #endif #define FORMAT_LABEL "office" -#define FORMAT_NAME "Office" +#define FORMAT_NAME "Office 2007/2010 SHA-1/AES" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/opencl_bf_fmt.c b/src/opencl_bf_fmt.c index 0c1f5d1..9fc157f 100644 --- a/src/opencl_bf_fmt.c +++ b/src/opencl_bf_fmt.c @@ -15,9 +15,11 @@ #include "formats.h" #define FORMAT_LABEL "bf-opencl" -#define FORMAT_NAME "OpenBSD Blowfish OpenCL" +#define FORMAT_NAME "OpenBSD Blowfish" -#define BENCHMARK_COMMENT "" +#define ALGORITHM_NAME "OpenCL" + +#define BENCHMARK_COMMENT " (x32)" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 72 @@ -29,8 +31,6 @@ #define MIN_KEYS_PER_CRYPT BF_N #define MAX_KEYS_PER_CRYPT BF_N -#define OPENCL_BF_ALGORITHM_NAME "BF_OPENCL" - static struct fmt_tests tests[] = { {"$2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW", "U*U"}, @@ -249,7 +249,7 @@ struct fmt_main fmt_opencl_bf = { { FORMAT_LABEL, FORMAT_NAME, - OPENCL_BF_ALGORITHM_NAME, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/opencl_cryptsha512_fmt.c b/src/opencl_cryptsha512_fmt.c index 73d833e..7435f73 100644 --- a/src/opencl_cryptsha512_fmt.c +++ b/src/opencl_cryptsha512_fmt.c @@ -21,7 +21,6 @@ #define FORMAT_LABEL "cryptsha512-opencl" #define FORMAT_NAME "crypt SHA-512" #define ALGORITHM_NAME "OpenCL" -#define SHA_TYPE "SHA512" #define BENCHMARK_COMMENT " (rounds=5000)" #define BENCHMARK_LENGTH -1 diff --git a/src/opencl_mscash2_fmt.c b/src/opencl_mscash2_fmt.c index 4f8ed39..b34ea8e 100644 --- a/src/opencl_mscash2_fmt.c +++ b/src/opencl_mscash2_fmt.c @@ -33,12 +33,11 @@ #define FORMAT_LABEL "mscash2-opencl" - -#define FORMAT_NAME "MSCASH2-OPENCL" +#define FORMAT_NAME "M$ Cache Hash 2 (DCC2) PBKDF2-HMAC-SHA-1" #define KERNEL_NAME "PBKDF2" -#define ALGORITHM_NAME "PBKDF2_HMAC_SHA1" +#define ALGORITHM_NAME "OpenCL" #define BENCHMARK_COMMENT "" diff --git a/src/opencl_mysqlsha1_fmt.c b/src/opencl_mysqlsha1_fmt.c index ddd8934..b8d5085 100644 --- a/src/opencl_mysqlsha1_fmt.c +++ b/src/opencl_mysqlsha1_fmt.c @@ -20,8 +20,8 @@ #define FORMAT_LABEL "mysql-sha1-opencl" #define FORMAT_NAME "MySQL 4.1 double-SHA-1" -#define ALGORITHM_NAME "mysql-sha1-opencl" -#define SHA_TYPE "SHA-1" +#define ALGORITHM_NAME "OpenCL" + #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/opencl_nsldaps_fmt.c b/src/opencl_nsldaps_fmt.c index ebb5bd3..f0971ac 100644 --- a/src/opencl_nsldaps_fmt.c +++ b/src/opencl_nsldaps_fmt.c @@ -30,8 +30,8 @@ #include "common-opencl.h" #define FORMAT_LABEL "ssha-opencl" -#define FORMAT_NAME "Netscape LDAP SSHA OPENCL" -#define SHA_TYPE "salted SHA-1" +#define FORMAT_NAME "Netscape LDAP salted SHA-1" +#define ALGORITHM_NAME "OpenCL" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 @@ -472,7 +472,7 @@ struct fmt_main fmt_opencl_NSLDAPS = { { FORMAT_LABEL, FORMAT_NAME, - SHA_TYPE, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/opencl_nt_fmt.c b/src/opencl_nt_fmt.c index ac19c57..3bf8d48 100644 --- a/src/opencl_nt_fmt.c +++ b/src/opencl_nt_fmt.c @@ -121,7 +121,7 @@ static int have_full_hashes; static int max_keys_per_crypt = NT_NUM_KEYS; -#define ALGORITHM_NAME "OpenCL 1.0" +#define ALGORITHM_NAME "OpenCL" #define NT_CRYPT_FUN nt_crypt_all_opencl static void release_all(void) diff --git a/src/opencl_phpass_fmt.c b/src/opencl_phpass_fmt.c index 2e1bb45..9566ce1 100644 --- a/src/opencl_phpass_fmt.c +++ b/src/opencl_phpass_fmt.c @@ -15,9 +15,12 @@ #define uint32_t unsigned int #define uint8_t unsigned char -#define PHPASS_TYPE "PORTABLE-MD5" +#define FORMAT_LABEL "phpass-opencl" +#define FORMAT_NAME "phpass MD5" + +#define ALGORITHM_NAME "OpenCL" -#define BENCHMARK_COMMENT "" +#define BENCHMARK_COMMENT " ($P$9 length 8)" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 15 @@ -28,8 +31,6 @@ #define KEYS_PER_CRYPT 1024*9*4 #define MIN_KEYS_PER_CRYPT KEYS_PER_CRYPT #define MAX_KEYS_PER_CRYPT KEYS_PER_CRYPT -#define FORMAT_LABEL "phpass-opencl" -#define FORMAT_NAME "PHPASS-OPENCL" //#define _PHPASS_DEBUG @@ -393,7 +394,7 @@ struct fmt_main fmt_opencl_phpass = { { FORMAT_LABEL, FORMAT_NAME, - PHPASS_TYPE, + ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, PLAINTEXT_LENGTH, diff --git a/src/opencl_rawmd5_fmt.c b/src/opencl_rawmd5_fmt.c index 0047a6b..b4f8367 100644 --- a/src/opencl_rawmd5_fmt.c +++ b/src/opencl_rawmd5_fmt.c @@ -19,7 +19,7 @@ #define PLAINTEXT_LENGTH 31 #define FORMAT_LABEL "raw-md5-opencl" #define FORMAT_NAME "Raw MD5" -#define ALGORITHM_NAME "raw-md5-opencl" +#define ALGORITHM_NAME "OpenCL" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 #define CIPHERTEXT_LENGTH 32 diff --git a/src/opencl_rawsha1_fmt.c b/src/opencl_rawsha1_fmt.c index 588f550..8f14782 100644 --- a/src/opencl_rawsha1_fmt.c +++ b/src/opencl_rawsha1_fmt.c @@ -20,8 +20,8 @@ #define FORMAT_LABEL "raw-sha1-opencl" #define FORMAT_NAME "Raw SHA-1 OpenCL" -#define ALGORITHM_NAME "raw-sha1-opencl" -#define SHA_TYPE "SHA-1" +#define ALGORITHM_NAME "OpenCL" + #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/opencl_rawsha512_fmt.c b/src/opencl_rawsha512_fmt.c index fda5bb7..db7d4a2 100644 --- a/src/opencl_rawsha512_fmt.c +++ b/src/opencl_rawsha512_fmt.c @@ -27,7 +27,7 @@ #include "formats.h" #define FORMAT_LABEL "raw-sha512-opencl" -#define FORMAT_NAME "SHA-512" +#define FORMAT_NAME "Raw SHA-512" #define ALGORITHM_NAME "OpenCL" #define BENCHMARK_COMMENT "" diff --git a/src/opencl_wpapsk_fmt.c b/src/opencl_wpapsk_fmt.c index 9525b8b..7fef317 100644 --- a/src/opencl_wpapsk_fmt.c +++ b/src/opencl_wpapsk_fmt.c @@ -15,8 +15,8 @@ #include "wpapsk.h" #define FORMAT_LABEL "wpapsk-opencl" -#define FORMAT_NAME FORMAT_LABEL -#define ALGORITHM_NAME "GPU - OpenCL" +#define FORMAT_NAME "WPA-PSK" +#define ALGORITHM_NAME "OpenCL" #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/oracle11_fmt_plug.c b/src/oracle11_fmt_plug.c index 189dbb1..f21ba59 100644 --- a/src/oracle11_fmt_plug.c +++ b/src/oracle11_fmt_plug.c @@ -55,11 +55,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "common.h" @@ -69,19 +69,9 @@ #include #define FORMAT_LABEL "oracle11" -#define FORMAT_NAME "Oracle 11g" - -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define FORMAT_NAME "Oracle 11g SHA-1" + +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/oracle_fmt_plug.c b/src/oracle_fmt_plug.c index ebd9e2f..ab51326 100644 --- a/src/oracle_fmt_plug.c +++ b/src/oracle_fmt_plug.c @@ -19,8 +19,8 @@ #include "unicode.h" #define FORMAT_LABEL "oracle" -#define FORMAT_NAME "Oracle" -#define ALGORITHM_NAME "oracle" +#define FORMAT_NAME "Oracle 10 DES" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/osc_fmt_plug.c b/src/osc_fmt_plug.c index e90443c..f2395f0 100644 --- a/src/osc_fmt_plug.c +++ b/src/osc_fmt_plug.c @@ -28,7 +28,7 @@ #include "options.h" #define FORMAT_LABEL "osc" -#define FORMAT_NAME "OSC -- md5($salt.$pass)" +#define FORMAT_NAME "osCommerce md5($salt.$pass)" #define ALGORITHM_NAME "?" /* filled in by md5-gen */ #define BENCHMARK_COMMENT "" diff --git a/src/pdf_fmt.c b/src/pdf_fmt.c index 01b31bf..315a2bf 100644 --- a/src/pdf_fmt.c +++ b/src/pdf_fmt.c @@ -41,7 +41,7 @@ #include "pdfparser.h" #define FORMAT_LABEL "pdf" -#define FORMAT_NAME "pdf" +#define FORMAT_NAME "PDF MD5 RC4" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1000 diff --git a/src/phpassMD5_fmt_plug.c b/src/phpassMD5_fmt_plug.c index 65d9dad..99e1ae7 100644 --- a/src/phpassMD5_fmt_plug.c +++ b/src/phpassMD5_fmt_plug.c @@ -37,11 +37,11 @@ #include "formats.h" #include "dynamic.h" -#define FORMAT_LABEL "phpass-md5" -#define FORMAT_NAME "PHPass MD5" +#define FORMAT_LABEL "phpass" +#define FORMAT_NAME "phpass MD5" #define ALGORITHM_NAME "?" /* filled in by md5-gen */ -#define BENCHMARK_COMMENT "" +#define BENCHMARK_COMMENT " ($P$9)" #define BENCHMARK_LENGTH -1 #define PLAINTEXT_LENGTH 38 @@ -51,23 +51,27 @@ #define SALT_SIZE 8 static struct fmt_tests phpassmd5_tests[] = { - {"$H$9aaaaaSXBjgypwqm.JsMssPLiS8YQ00", "test1"}, - {"$H$9PE8jEklgZhgLmZl5.HYJAzfGCQtzi1", "123456"}, - {"$H$9pdx7dbOW3Nnt32sikrjAxYFjX8XoK1", "123456"}, - {"$P$912345678LIjjb6PhecupozNBmDndU0", "thisisalongertestPW"}, - {"$H$9A5she.OeEiU583vYsRXZ5m2XIpI68/", "123456"}, - {"$P$917UOZtDi6ksoFt.y2wUYvgUI6ZXIK/", "test1"}, - {"$P$91234567AQwVI09JXzrV1hEC6MSQ8I0", "thisisalongertest"}, - {"$P$9234560A8hN6sXs5ir0NfozijdqT6f0", "test2"}, - {"$P$9234560A86ySwM77n2VA/Ey35fwkfP0", "test3"}, - {"$P$9234560A8RZBZDBzO5ygETHXeUZX5b1", "test4"}, - {"$P$612345678si5M0DDyPpmRCmcltU/YW/", "JohnRipper"}, // note smaller loop count - {"$H$712345678WhEyvy1YWzT4647jzeOmo0", "JohnRipper"}, // note smaller loop count (phpbb w/older PHP version) - {"$P$B12345678L6Lpt4BxNotVIMILOa9u81", "JohnRipper"}, // note larber loop count (Wordpress) - {"$P$91234567xogA.H64Lkk8Cx8vlWBVzH0", "thisisalongertst"}, - {NULL} + {"$H$9aaaaaSXBjgypwqm.JsMssPLiS8YQ00", "test1"}, + {"$H$9PE8jEklgZhgLmZl5.HYJAzfGCQtzi1", "123456"}, + {"$H$9pdx7dbOW3Nnt32sikrjAxYFjX8XoK1", "123456"}, + {"$P$912345678LIjjb6PhecupozNBmDndU0", "thisisalongertestPW"}, + {"$H$9A5she.OeEiU583vYsRXZ5m2XIpI68/", "123456"}, + {"$P$917UOZtDi6ksoFt.y2wUYvgUI6ZXIK/", "test1"}, + {"$P$91234567AQwVI09JXzrV1hEC6MSQ8I0", "thisisalongertest"}, + {"$P$9234560A8hN6sXs5ir0NfozijdqT6f0", "test2"}, + {"$P$9234560A86ySwM77n2VA/Ey35fwkfP0", "test3"}, + {"$P$9234560A8RZBZDBzO5ygETHXeUZX5b1", "test4"}, + {"$P$612345678si5M0DDyPpmRCmcltU/YW/", "JohnRipper"}, // 256 + {"$P$6T4Krr44HLrUqGkL8Lu67lzZVbvHLC1", "test12345"}, // 256 + {"$H$712345678WhEyvy1YWzT4647jzeOmo0", "JohnRipper"}, // 512 (phpBB w/older PHP version) + {"$P$8DkV/nqeaQNTdp4NvWjCkgN48AK69X.", "test12345"}, // 1024 + {"$P$B12345678L6Lpt4BxNotVIMILOa9u81", "JohnRipper"}, // 8192 (WordPress) + {"$P$91234567xogA.H64Lkk8Cx8vlWBVzH0", "thisisalongertst"}, + {NULL} }; +/* (256+256+512+1024+8192)/5 = 2048 */ + static char Conv_Buf[80]; static struct fmt_main *pFmt_Dynamic_17; static void phpassmd5_init(struct fmt_main *pFmt); diff --git a/src/pkzip_fmt_plug.c b/src/pkzip_fmt_plug.c index 2ed5676..ede3a09 100644 --- a/src/pkzip_fmt_plug.c +++ b/src/pkzip_fmt_plug.c @@ -31,8 +31,8 @@ #endif #define FORMAT_LABEL "pkzip" -#define FORMAT_NAME "pkzip" -#define ALGORITHM_NAME "N/A" +#define FORMAT_NAME "PKZIP" +#define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1000 diff --git a/src/racf_fmt_plug.c b/src/racf_fmt_plug.c index 5751a90..83619f9 100644 --- a/src/racf_fmt_plug.c +++ b/src/racf_fmt_plug.c @@ -33,10 +33,10 @@ static int omp_t = 1; #endif #define FORMAT_LABEL "racf" -#define FORMAT_NAME "RACF" +#define FORMAT_NAME "RACF DES" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH 0 #define PLAINTEXT_LENGTH 8 #define BINARY_SIZE 16 #define SALT_SIZE sizeof(*salt_struct) @@ -204,6 +204,7 @@ static void crypt_all(int count) DES_set_key_checked(&des_key, &schedule); /* do encryption */ DES_cbc_encrypt(salt_struct->userid, encrypted, 8, &schedule, &ivec, DES_ENCRYPT); +/* XXX: this is broken (assumes exactly one hash per salt) */ if(!memcmp(salt_struct->hash, encrypted, 8)) cracked[index] = 1; else diff --git a/src/rar_fmt.c b/src/rar_fmt.c index 22d3a11..defeb8e 100644 --- a/src/rar_fmt.c +++ b/src/rar_fmt.c @@ -90,7 +90,7 @@ #include "config.h" #define FORMAT_LABEL "rar" -#define FORMAT_NAME "RAR3" +#define FORMAT_NAME "RAR3 SHA-1 AES" #ifdef CL_VERSION_1_0 #define ALGORITHM_NAME "OpenCL" #else diff --git a/src/rawMD4_fmt_plug.c b/src/rawMD4_fmt_plug.c index 05bd31a..7e8c40c 100644 --- a/src/rawMD4_fmt_plug.c +++ b/src/rawMD4_fmt_plug.c @@ -13,11 +13,11 @@ #ifdef MD4_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * MD4_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "md4.h" #include "common.h" @@ -27,17 +27,7 @@ #define FORMAT_LABEL "raw-md4" #define FORMAT_NAME "Raw MD4" -#ifdef MD4_SSE_PARA -#define ALGORITHM_NAME "SSE2i " MD4_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME MD4_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/rawMD5_fmt_plug.c b/src/rawMD5_fmt_plug.c index 997b5f7..ad492fd 100644 --- a/src/rawMD5_fmt_plug.c +++ b/src/rawMD5_fmt_plug.c @@ -19,23 +19,14 @@ #ifdef MD5_SSE_PARA # define MMX_COEF 4 -# include "sse-intrinsics.h" # define NBKEYS (MMX_COEF * MD5_SSE_PARA) # define DO_MMX_MD5(in, out) SSEmd5body(in, (unsigned int*)out, 1) -# define ALGORITHM_NAME "SSE2i " MD5_N_STR #elif defined(MMX_COEF) # define NBKEYS MMX_COEF # define DO_MMX_MD5(in, out) mdfivemmx_nosizeupdate(out, in, 1) -# if MMX_COEF == 4 -# define ALGORITHM_NAME "SSE2 4x" -# elif MMX_COEF == 2 -# define ALGORITHM_NAME "MMX 2x" -# elif defined(MMX_COEF) -# define ALGORITHM_NAME "?" -# endif -#else -# define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif +#include "sse-intrinsics.h" +#define ALGORITHM_NAME MD5_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/rawSHA0_fmt.c b/src/rawSHA0_fmt.c index 5cb6fdd..cf2ef07 100644 --- a/src/rawSHA0_fmt.c +++ b/src/rawSHA0_fmt.c @@ -15,7 +15,7 @@ #include "formats.h" #define FORMAT_LABEL "raw-sha" -#define FORMAT_NAME "Raw SHA0" +#define FORMAT_NAME "Raw SHA-0" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" diff --git a/src/rawSHA1_fmt_plug.c b/src/rawSHA1_fmt_plug.c index 9263f99..8216bad 100644 --- a/src/rawSHA1_fmt_plug.c +++ b/src/rawSHA1_fmt_plug.c @@ -10,11 +10,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "common.h" @@ -25,17 +25,7 @@ #define FORMAT_LABEL "raw-sha1" #define FORMAT_NAME "Raw SHA-1" -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/rawSHA1_linkedIn_fmt_plug.c b/src/rawSHA1_linkedIn_fmt_plug.c index cb3e09c..4c404e4 100644 --- a/src/rawSHA1_linkedIn_fmt_plug.c +++ b/src/rawSHA1_linkedIn_fmt_plug.c @@ -16,11 +16,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "common.h" @@ -29,20 +29,10 @@ #include "johnswap.h" #include "loader.h" -#define FORMAT_LABEL "raw-sha1_li" -#define FORMAT_NAME "Raw SHA-1-LI" - -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define FORMAT_LABEL "raw-sha1-linkedin" +#define FORMAT_NAME "Raw SHA-1 LinkedIn" + +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/rawSHA1_ng_fmt.c b/src/rawSHA1_ng_fmt.c index 22d40ba..2739270 100644 --- a/src/rawSHA1_ng_fmt.c +++ b/src/rawSHA1_ng_fmt.c @@ -594,7 +594,18 @@ struct fmt_main sha1_fmt_ng = { .params = { .label = "raw-sha1-ng", .format_name = "Raw SHA-1", - .algorithm_name = "taviso sse4", + .algorithm_name = + "128/128 " +#if defined(__XOP__) + "XOP" +#elif defined(__AVX__) + "AVX" +#elif defined(__SSE4_1__) + "SSE4.1" +#else + "SSE2" +#endif + " intrinsics 4x", .benchmark_comment = "", .benchmark_length = -1, .plaintext_length = sizeof(__m128i) - 1, diff --git a/src/rawmd5u_fmt_plug.c b/src/rawmd5u_fmt_plug.c index 5fe1eaf..53b5731 100644 --- a/src/rawmd5u_fmt_plug.c +++ b/src/rawmd5u_fmt_plug.c @@ -13,11 +13,11 @@ #ifdef MD5_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * MD5_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "md5.h" #include "misc.h" @@ -31,17 +31,7 @@ #define FORMAT_LABEL "raw-md5u" #define FORMAT_NAME "md5(unicode($p))" -#ifdef MD5_SSE_PARA -#define ALGORITHM_NAME "SSE2i " MD5_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME MD5_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 diff --git a/src/salted_sha1_fmt_plug.c b/src/salted_sha1_fmt_plug.c index 95d8a52..3cae3e9 100644 --- a/src/salted_sha1_fmt_plug.c +++ b/src/salted_sha1_fmt_plug.c @@ -22,11 +22,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "common.h" @@ -36,17 +36,7 @@ #define FORMAT_LABEL "salted-sha1" #define FORMAT_NAME "Salted SHA-1" -#ifdef SHA1_N_STR -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0 diff --git a/src/sapB_fmt_plug.c b/src/sapB_fmt_plug.c index fc7d6d2..496942a 100644 --- a/src/sapB_fmt_plug.c +++ b/src/sapB_fmt_plug.c @@ -28,23 +28,14 @@ #ifdef MD5_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * MD5_SSE_PARA) #define DO_MMX_MD5(in, out) SSEmd5body(in, (unsigned int*)out, 1) -#define ALGORITHM_NAME "SSE2i " MD5_N_STR #elif defined(MMX_COEF) #define NBKEYS MMX_COEF #define DO_MMX_MD5(in, out) mdfivemmx_nosizeupdate(out, (unsigned char*)in, 1) -#if MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#endif -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR #endif +#include "sse-intrinsics.h" +#define ALGORITHM_NAME MD5_ALGORITHM_NAME #if defined(_OPENMP) && (defined (MD5_SSE_PARA) || !defined(MMX_COEF)) #include diff --git a/src/sapG_fmt_plug.c b/src/sapG_fmt_plug.c index 1e5f525..98fd558 100644 --- a/src/sapG_fmt_plug.c +++ b/src/sapG_fmt_plug.c @@ -20,11 +20,11 @@ #ifdef SHA1_SSE_PARA #define MMX_COEF 4 -#include "sse-intrinsics.h" #define NBKEYS (MMX_COEF * SHA1_SSE_PARA) #elif MMX_COEF #define NBKEYS MMX_COEF #endif +#include "sse-intrinsics.h" #include "misc.h" #include "common.h" @@ -37,17 +37,7 @@ #define FORMAT_LABEL "sapg" #define FORMAT_NAME "SAP CODVN F/G (PASSCODE)" -#ifdef SHA1_SSE_PARA -#define ALGORITHM_NAME "SSE2i " SHA1_N_STR -#elif defined(MMX_COEF) && MMX_COEF == 4 -#define ALGORITHM_NAME "SSE2 4x" -#elif defined(MMX_COEF) && MMX_COEF == 2 -#define ALGORITHM_NAME "MMX 2x" -#elif defined(MMX_COEF) -#define ALGORITHM_NAME "?" -#else -#define ALGORITHM_NAME "32/" ARCH_BITS_STR -#endif +#define ALGORITHM_NAME SHA1_ALGORITHM_NAME #if defined(_OPENMP) && (defined (SHA1_SSE_PARA) || !defined(MMX_COEF)) #include diff --git a/src/sip_fmt_plug.c b/src/sip_fmt_plug.c index a31656a..2c93fce 100644 --- a/src/sip_fmt_plug.c +++ b/src/sip_fmt_plug.c @@ -30,7 +30,7 @@ #define FORMAT_LABEL "sip" -#define FORMAT_NAME "SIP" +#define FORMAT_NAME "SIP MD5" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 @@ -41,6 +41,7 @@ #define MAX_KEYS_PER_CRYPT 1 static struct fmt_tests sip_tests[] = { +/* XXX: need more test vectors, then try benchmarking for "many salts" */ {"$sip$*192.168.1.111*192.168.1.104*200*asterisk*REGISTER*sip*192.168.1.104*46cce857****MD5*4dfc7515936a667565228dbaa0293dfc", "123456"}, {NULL} }; diff --git a/src/sse-intrinsics.h b/src/sse-intrinsics.h index 11370f8..2b4236e 100644 --- a/src/sse-intrinsics.h +++ b/src/sse-intrinsics.h @@ -6,7 +6,65 @@ #define __m128i void #endif +#if defined(__XOP__) +#define SSE_type "XOP intrinsics" +#elif defined(__AVX__) +#define SSE_type "AVX intrinsics" +#else +#define SSE_type "SSE2 intrinsics" +#endif + +#ifdef MD5_SSE_PARA void md5cryptsse(unsigned char * buf, unsigned char * salt, char * out, int md5_type); void SSEmd5body(__m128i* data, unsigned int * out, int init); +#define MD5_SSE_type SSE_type +#define MD5_ALGORITHM_NAME "128/128 " MD5_SSE_type " " MD5_N_STR +#elif defined(MMX_COEF) && MMX_COEF == 4 +#define MD5_SSE_type "SSE2" +#define MD5_ALGORITHM_NAME "128/128 " MD5_SSE_type " 4x" +#elif defined(MMX_COEF) && MMX_COEF == 2 +#define MD5_SSE_type "MMX" +#define MD5_ALGORITHM_NAME "64/64 " MD5_SSE_type " 2x" +#elif defined(MMX_COEF) +#define MD5_SSE_type "?" +#define MD5_ALGORITHM_NAME MD5_SSE_type +#else +#define MD5_SSE_type "1x" +#define MD5_ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif + +#ifdef MD4_SSE_PARA void SSEmd4body(__m128i* data, unsigned int * out, int init); +#define MD4_SSE_type SSE_type +#define MD4_ALGORITHM_NAME "128/128 " MD4_SSE_type " " MD4_N_STR +#elif defined(MMX_COEF) && MMX_COEF == 4 +#define MD4_SSE_type "SSE2" +#define MD4_ALGORITHM_NAME "128/128 " MD4_SSE_type " 4x" +#elif defined(MMX_COEF) && MMX_COEF == 2 +#define MD4_SSE_type "MMX" +#define MD4_ALGORITHM_NAME "64/64 " MD4_SSE_type " 2x" +#elif defined(MMX_COEF) +#define MD4_SSE_type "?" +#define MD4_ALGORITHM_NAME MD4_SSE_type +#else +#define MD4_SSE_type "1x" +#define MD4_ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif + +#ifdef SHA1_SSE_PARA void SSESHA1body(__m128i* data, unsigned int * out, unsigned int * reload_state, int input_layout_output); // if reload_state null, then 'normal' init performed. +#define SHA1_SSE_type SSE_type +#define SHA1_ALGORITHM_NAME "128/128 " SHA1_SSE_type " " SHA1_N_STR +#elif defined(MMX_COEF) && MMX_COEF == 4 +#define SHA1_SSE_type "SSE2" +#define SHA1_ALGORITHM_NAME "128/128 " SHA1_SSE_type " 4x" +#elif defined(MMX_COEF) && MMX_COEF == 2 +#define SHA1_SSE_type "MMX" +#define SHA1_ALGORITHM_NAME "64/64 " SHA1_SSE_type " 2x" +#elif defined(MMX_COEF) +#define SHA1_SSE_type "?" +#define SHA1_ALGORITHM_NAME SHA1_SSE_type +#else +#define SHA1_SSE_type "1x" +#define SHA1_ALGORITHM_NAME "32/" ARCH_BITS_STR +#endif diff --git a/src/ssh_fmt.c b/src/ssh_fmt.c index 9f293e4..b26fa9a 100644 --- a/src/ssh_fmt.c +++ b/src/ssh_fmt.c @@ -34,9 +34,9 @@ #include "misc.h" #define FORMAT_LABEL "ssh" -#define FORMAT_NAME "SSH" +#define FORMAT_NAME "SSH RSA/DSA" #define ALGORITHM_NAME "32/" ARCH_BITS_STR -#define BENCHMARK_COMMENT " - one 2048-bit and one 1024-bit key" +#define BENCHMARK_COMMENT " (one 2048-bit RSA and one 1024-bit DSA key)" #define BENCHMARK_LENGTH -1001 #define PLAINTEXT_LENGTH 32 #define BINARY_SIZE 0 diff --git a/src/vnc_fmt_plug.c b/src/vnc_fmt_plug.c index 95e66f8..ac91890 100644 --- a/src/vnc_fmt_plug.c +++ b/src/vnc_fmt_plug.c @@ -33,7 +33,7 @@ static int omp_t = 1; #endif #define FORMAT_LABEL "vnc" -#define FORMAT_NAME "VNC" +#define FORMAT_NAME "VNC DES" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1 @@ -79,6 +79,7 @@ static void print_hex(unsigned char *str, int len) #endif static struct fmt_tests vnc_tests[] = { +/* XXX: need more test vectors, then try benchmarking for "many salts" */ {"$vnc$*ADDC021F444F999B8E27144C0DCE7389*AFAF1BB57588784333962A124668A2C6", "openwall"}, {NULL} }; diff --git a/src/wbb3_fmt_plug.c b/src/wbb3_fmt_plug.c index eb1e23c..e15ff1d 100644 --- a/src/wbb3_fmt_plug.c +++ b/src/wbb3_fmt_plug.c @@ -37,10 +37,10 @@ #endif #define FORMAT_LABEL "wbb3" -#define FORMAT_NAME "WoltLab BB3 SHA-1" +#define FORMAT_NAME "WoltLab BB3 salted SHA-1" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" -#define BENCHMARK_LENGTH -1 +#define BENCHMARK_LENGTH -1 /* change to 0 once there's any speedup for "many salts" */ #define PLAINTEXT_LENGTH 32 #define BINARY_SIZE 16 #define SALT_SIZE sizeof(struct custom_salt) @@ -49,6 +49,11 @@ static struct fmt_tests wbb3_tests[] = { {"$wbb3$*1*0b053db07dc02bc6f6e24e00462f17e3c550afa9*e2063f7c629d852302d3020599376016ff340399", "123456"}, + {"$wbb3$*1*a710463f75bf4568d398db32a53f9803007388a3*2c56d23b44eb122bb176dfa2a1452afaf89f1143", "123456"}, + {"$wbb3$*1*1039145e9e785ddb2ac7ccca89ac1b159b595cc1*2596b5f8e7cdaf4b15604ad336b810e8e2935b1d", "12345678"}, + {"$wbb3$*1*db763342e23f8ccdbd9c90d1cc7896d80b7e0a44*26496a87c1a7dd68f7beceb2fc40b6fc4223a453", "12345678"}, + {"$wbb3$*1*bf2c7d0c8fb6cb146adf8933e32da012d31b5bbb*d945c02cf85738b7db4f4f05edd676283280a513", "123456789"}, + {"$wbb3$*1*d132b22d3f1d942b99cc1f5fbd5cc3eb0824d608*e3e03fe02223c5030e834f81997f614b43441853", "1234567890"}, {NULL} }; @@ -117,6 +122,7 @@ static void *get_salt(char *ciphertext) static void set_salt(void *salt) { +/* may pre-populate ctx with salt here */ salt_struct = (struct custom_salt *)salt; if (any_cracked) { memset(cracked, 0, @@ -149,6 +155,7 @@ static void crypt_all(int count) SHA1_Update(&ctx, salt_struct->salt, 40); SHA1_Update(&ctx, hexhash, 40); SHA1_Final(hash, &ctx); +/* XXX: this is broken (assumes exactly one hash per salt) */ if(!memcmp(hash, salt_struct->hash, 20)) any_cracked = cracked[index] = 1; } diff --git a/src/zip_fmt.c b/src/zip_fmt.c index 83b62dc..f47e874 100644 --- a/src/zip_fmt.c +++ b/src/zip_fmt.c @@ -29,7 +29,7 @@ #include "gladman_fileenc.h" #define FORMAT_LABEL "zip" -#define FORMAT_NAME "zip" +#define FORMAT_NAME "WinZip PBKDF2-HMAC-SHA-1" #define ALGORITHM_NAME "32/" ARCH_BITS_STR #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH -1