hashcat Forum
scrypt hash format - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: scrypt hash format (/thread-8537.html)



scrypt hash format - arlininger - 08-09-2019

Does hashcat support hashes in the formatĀ 
Code:
scrypt$01zMhhtsm7hd$11$8$1$64$zpJQwicV2twXVpabH8/kCTaKUlx99Xplim50HJY4BA81xJxIG/R2BQ4QHOW3h15AGusc5lhYso3UJjkiTRXXTQ==
?

Note, this particular hash is from the 2019 Crack me if you Can competition, which is the first time I've encountered scrypt hashes.

I don't see hashes of this format on the https://hashcat.net/wiki/doku.php?id=example_hashes page, but possibly this can be trivially transformed in to one that is there?

Adam


RE: scrypt hash format - undeath - 08-12-2019

You have to reformat the hashes for cracking with hascat. Hashcat's format is SCRYPT:n:r:p:salt:hash

salt and hash are base64-encoded. I think hashcat only supports hash lengths of 32 bytes. You have to truncate the hash value to 32 bytes in the case of cmiyc hashes.


RE: scrypt hash format - royce - 08-14-2019

Example method - script by atom.

Code:
#!/usr/bin/perl

use strict;
use warnings;
use MIME::Base64;

while (my $line = <>)
{
  chomp $line;

  my @data = split '\$', $line;

  if ($data[5] ne 64)
  {
    die "invalid\n";
  }

  my ($user, undef) = split '\:', $data[0];

  my $hash_bin = decode_base64($data[6]);

  my $hash_trunc = encode_base64(substr($hash_bin, 0, 32), "");

  my $salt_enc = encode_base64 ($data[1], "");

  printf ("%s:SCRYPT:%d:%d:%d:%s:%s\n", $user, 1<<$data[2], $data[3], $data[4], $salt_enc, $hash_trunc);

}