Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 25 Jun 2015 15:24:02 +0300
From: Aleksey Cherepanov <lyosha@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: light way to make extensions to format interface

As I understand, any change to format interface means code updates in
all formats (200+). I propose an idea of solution for easy extending.

In addition to current structure, there may be an optional array with
pairs: string literal for method name and pointer to method
implementation. The array is of variable length and finished by NULL,
just like test vector. So it would be possible for a format to
announce only implemented methods.

To support that, ./configure should collect such arrays like formats'
structures. At start, john could repack them into structures like
formats' structures for easy access (most probably only array of
chosen format should be repacked).

To save space, string literals can be replaced with constants. Anyway,
addition to set of constants and changes to john's internal structure
for extensions do not affect formats' code.

For example, something like the following can be added only in formats
that support rainbow tables:

struct fmt_extensions raw_md5_format_extensions = {
  { "get_hash_for_rainbow_tables", raw_md5_get_hash_for_rainbow_tables },
  NULL
};

I think such feature can boost experiments with format interface. What
do you think?

Thanks!

-- 
Regards,
Aleksey Cherepanov

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ