john icon indicating copy to clipboard operation
john copied to clipboard

Astra Linux variants (streebog) fail on BE

Open claudioandre-br opened this issue 1 year ago • 4 comments

We can fix or disable them on BE.

Testing: streebog256crypt, Astra Linux $gost12256hash$ (rounds=5000) [GOST R 34.11-2012 64/64]... (4xOMP) FAILED (cmp_all(64))
Testing: streebog512crypt, Astra Linux $gost12512hash$ (rounds=5000) [GOST R 34.11-2012 64/64]... (4xOMP) FAILED (cmp_all(64))
Testing: gost94crypt, Astra Linux $gost94hash$ (rounds=5000) [GOST R 34.11-94 32/64]... (4xOMP) PASS
[...]
Testing: crypt, generic crypt(3) [?/64]... (4xOMP) PASS
2 out of 410 tests have FAILED
 FAILED: -test-full=0 --format=cpu
Target CPU ......................................... s390x, 64-bit BE
AES-NI support ..................................... no
Target OS .......................................... linux-gnu
Cross compiling .................................... no
Legacy arch header ................................. autoconf_arch.h
Version: 1.9.0-jumbo-1+bleeding-07aef97db6 2024-09-13 18:57:07 +0200
Build: linux-gnu 64-bit s390x  AC OMP
System-wide exec: /snap/john-the-ripper/current/bin
System-wide home: /snap/john-the-ripper/current/bin
Private home: ~/.john
OMP fallback binary: john-s390x
$JOHN is /snap/john-the-ripper/current/bin/

claudioandre-br avatar Sep 14 '24 14:09 claudioandre-br

I used our existing GOST 2012 code - do other formats using it work on BE?

The rest (of non GPU stuff) is based on old (unoptimized and close to RFC) sha(256|512)crypt code also from our own repo, that I would think should work fine on BE but we might want to investigate Git history for that.

magnumripper avatar Sep 21 '24 15:09 magnumripper

The GOST results are:

$ grep -i gost < tmpkr98r4tc.buildlog 
:: Testing: gost, GOST R 34.11-94 [32/64]... (4xOMP) PASS
:: Testing: streebog256crypt, Astra Linux $gost12256hash$ (rounds=5000) [GOST R 34.11-2012 64/64]... (4xOMP) FAILED (cmp_all(64))
:: Testing: streebog512crypt, Astra Linux $gost12512hash$ (rounds=5000) [GOST R 34.11-2012 64/64]... (4xOMP) FAILED (cmp_all(64))
:: Testing: gost94crypt, Astra Linux $gost94hash$ (rounds=5000) [GOST R 34.11-94 32/64]... (4xOMP) PASS
:: Testing: dynamic_90 [gost($p) 32/64]... PASS
:: Testing: dynamic_1031 [gost($p) (hash truncated to length 32) 32/64]... PASS

ghost avatar Sep 21 '24 15:09 ghost

Found it: 9fe8768fc22

magnumripper avatar Sep 21 '24 15:09 magnumripper

Found it: 9fe8768

Yes, so we should either disable the Streebog-based crypts on BE or fix the underlying issue. @magnumripper Are you going to send a PR doing at least the former, please? Thank you!

solardiz avatar Sep 22 '24 14:09 solardiz