|
Message-ID: <20130609163939.GA10569@openwall.com> Date: Sun, 9 Jun 2013 20:39:39 +0400 From: Solar Designer <solar@...nwall.com> To: john-users@...ts.openwall.com Subject: Re: Extra functions/datatypes for external mode? On Sun, Jun 09, 2013 at 04:35:49PM +1000, Michael Samuel wrote: > I currently have some C code that emulates a random password generator, > which I was looking at porting to a john external mode. > > While most of the code works as 32-bit signed integers, I need to do the > cast as double, then multiply by (1.0/2^32) trick, which I'm not really > sure how to do in integer-only arithmatic (I'm guessing it's technically > possible). Can you post the relevant excerpt from your C code (along with the relevant variable declarations)? Did the original password generator use the "double" data type too? > Is there a way to define C functions that external mode can call, or just > add more data types to external mode? Currently, no. Also, having an external mode call a custom C function would defeat the purpose of using an external mode in the first place - you could instead implement the entire thing in C as an extra cracking mode (would be a JtR source code patch then). I think that in your case it'd be best to go with emulating the one conversion via "double" in 32-bit integer arithmetic in an external mode, if having to implement that conversion is not easily avoidable. Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.