[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 05 Mar 2010 20:11:43 +0100
From: "Magnum, P.I." <rawsmooth@...dband.net>
To: john-users@...ts.openwall.com
Subject: Re: Feedback on the generic crypt(3) patch
> http://www.openwall.com/lists/john-users/2009/11/05/1
Some more thoughts regarding the generic-crypt(3) patch. I always
wondered what was actually measured when benchmarking this "format".
Just DES or a mixture of formats? The code revealed it was DES only.
In case anyone share my curiousity, I enclose a little patch making it
easy to choose which format is tested/benchmarked, as a compile time
option. It's supposed to be applied after the crypt-1 patch.
Here's some example figures, including figures from the optimized
versions of DES and MD5 for comparison:
---8<---------8<---------8<---------8<------
Benchmarking: Traditional DES [128/128 BS SSE2-16]... DONE
Many salts: 4504K c/s real, 4563K c/s virtual
Only one salt: 3884K c/s real, 3884K c/s virtual
Benchmarking: generic crypt(3) OS call (using DES) [?/64]... DONE
Many salts: 421162 c/s real, 425416 c/s virtual
Only one salt: 417396 c/s real, 417396 c/s virtual
Benchmarking: FreeBSD MD5 [32/64 X2]... DONE
Raw: 20248 c/s real, 20640 c/s virtual
Benchmarking: generic crypt(3) OS call (using MD5) [?/64]... DONE
Many salts: 8061 c/s real, 8118 c/s virtual
Only one salt: 8087 c/s real, 8087 c/s virtual
Benchmarking: generic crypt(3) OS call (using SHA-256) [?/64]... DONE
Many salts: 385 c/s real, 387 c/s virtual
Only one salt: 463 c/s real, 463 c/s virtual
Benchmarking: generic crypt(3) OS call (using SHA-512) [?/64]... DONE
Many salts: 383 c/s real, 384 c/s virtual
Only one salt: 461 c/s real, 461 c/s virtual
---8<---------8<---------8<---------8<------
diff --git a/src/crypt_fmt.c b/src/crypt_fmt.c
index b272f43..345a2dc 100644
--- a/src/crypt_fmt.c
+++ b/src/crypt_fmt.c
@@ -12,7 +12,9 @@
#define FORMAT_NAME "generic crypt(3)"
#define ALGORITHM_NAME "?/" ARCH_BITS_STR
-#define BENCHMARK_COMMENT ""
+// Change the below to define the format(s) you want to use when benchmarking
+#define TEST_SHA-512
+#define BENCHMARK_COMMENT " OS call (using SHA-512)"
#define BENCHMARK_LENGTH 0
#define PLAINTEXT_LENGTH 72
@@ -24,11 +26,34 @@
#define MAX_KEYS_PER_CRYPT 1
static struct fmt_tests tests[] = {
+#ifdef TEST_DES
{"CCNf8Sbh3HDfQ", "U*U*U*U*"},
{"CCX.K.MFy4Ois", "U*U***U"},
{"CC4rMpbg9AMZ.", "U*U***U*"},
{"XXxzOu6maQKqQ", "*U*U*U*U"},
{"SDbsugeBiC58A", ""},
+#endif
+#ifdef TEST_MD5
+ {"$1$dXc3I7Rw$ctlgjDdWJLMT.qwHsWhXR1", "U*U*U*U*"},
+ {"$1$dXc3I7Rw$94JPyQc/eAgQ3MFMCoMF.0", "U*U***U"},
+ {"$1$dXc3I7Rw$is1mVIAEtAhIzSdfn5JOO0", "U*U***U*"},
+ {"$1$eQT9Hwbt$XtuElNJD.eW5MN5UCWyTQ0", "*U*U*U*U"},
+ {"$1$Eu.GHtia$CFkL/nE1BYTlEPiVx1VWX0", ""},
+#endif
+#ifdef TEST_SHA-256
+ {"$5$LKO/Ute40T3FNF95$U0prpBQd4PloSGU0pnpM4z9wKn4vZ1.jsrzQfPqxph9", "U*U*U*U*"},
+ {"$5$LKO/Ute40T3FNF95$fdgfoJEBoMajNxCv3Ru9LyQ0xZgv0OBMQoq80LQ/Qd.", "U*U***U"},
+ {"$5$LKO/Ute40T3FNF95$8Ry82xGnnPI/6HtFYnvPBTYgOL23sdMXn8C29aO.x/A", "U*U***U*"},
+ {"$5$9mx1HkCz7G1xho50$O7V7YgleJKLUhcfk9pgzdh3RapEaWqMtEp9UUBAKIPA", "*U*U*U*U"},
+ {"$5$kc7lRD1fpYg0g.IP$d7CMTcEqJyTXyeq8hTdu/jB/I6DGkoo62NXbHIR7S43", ""},
+#endif
+#ifdef TEST_SHA-512
+ {"$6$LKO/Ute40T3FNF95$6S/6T2YuOIHY0N3XpLKABJ3soYcXD9mB7uVbtEZDj/LNscVhZoZ9DEH.sBciDrMsHOWOoASbNLTypH/5X26gN0", "U*U*U*U*"},
+ {"$6$LKO/Ute40T3FNF95$wK80cNqkiAUzFuVGxW6eFe8J.fSVI65MD5yEm8EjYMaJuDrhwe5XXpHDJpwF/kY.afsUs1LlgQAaOapVNbggZ1", "U*U***U"},
+ {"$6$LKO/Ute40T3FNF95$YS81pp1uhOHTgKLhSMtQCr2cDiUiN03Ud3gyD4ameviK1Zqz.w3oXsMgO6LrqmIEcG3hiqaUqHi/WEE2zrZqa/", "U*U***U*"},
+ {"$6$OmBOuxFYBZCYAadG$WCckkSZok9xhp4U1shIZEV7CCVwQUwMVea7L3A77th6SaE9jOPupEMJB.z0vIWCDiN9WLh2m9Oszrj5G.gt330", "*U*U*U*U"},
+ {"$6$ojWH1AiTee9x1peC$QVEnTvRVlPRhcLQCk/HnHaZmlGAAjCfrAN0FtOsOnUk5K5Bn/9eLHHiRzrTzaIKjW9NTLNIBUCtNVOowWS2mN.", ""},
+#endif
{NULL}
};
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux -
Powered by OpenVZ