Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANO7a6wNPrPp_nPLaPn=suOi8AYcDqXub3TWh8xH_p_qqLn8-w@mail.gmail.com>
Date: Tue, 30 Oct 2012 10:10:09 +0530
From: Dhiru Kholia <dhiru.kholia@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: new fastssh format, please test and review

On Tue, Oct 30, 2012 at 12:23 AM, magnum <john.magnum@...hmail.com> wrote:
> On 29 Oct, 2012, at 16:14 , Dhiru Kholia <dhiru.kholia@...il.com> wrote:
>
>> By using the attached fastssh format, it is possible to get > 3X
>> speedup over existing code (speedup is currently only for AES-128-CBC
>> encrypted keys which are default these days on many systems).
>>
>> For some reason, benchmarking speed is very low. Actual cracking speed
>> is nice :-)
>
> You have a similar "problem" with the Office format. The benchmark includes both AES and DES test vectors. If you comment the DES ones out, the speed will probably be accurate.

I tried doing so. No luck.

Maybe my verification checks are very expensive. If verification
succeeds fully and too often (like it does in benchmarking) then the
cracking speed might be too slow.

>> You can increase "#define SAFETY_FACTOR    32" parameter to reduce
>> false positives at the cost of speed. This factor controls the number
>> of bytes we decrypt.
>
> Why compromise between speed and accuracy when you can have both? You can allow for a fair share of false positives in crypt_all() / cmp_all() but then you need to sort them out fully in cmp_exact(). Just implement a full check in cmp_exact() and then tune that SAFETY_FACTOR for best speed in crypt_all().

The problem is in my verification function (wrongly named
check_padding_3des). Even if the SAFETY_FACTOR is maximum, the
verification function allows false positives. We could use existing
OpenSSL functions (as used in existing SSH format) for guaranteed
verification in cmp_exact but I can't figure out how to do so without
introducing redundant / duplicate data in input "hash".

Attached revision of fastssh format has another "strong" check added
into it. So far, I haven't been able to generate a single false
positive with the attached code.

-- 
Cheers,
Dhiru

View attachment "fastssh_fmt_plug.c" of type "text/x-csrc" (20233 bytes)

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.