Merge pull request #1821 from Naufragous/odf-fix

Fix selftest for hash-mode 18400
pull/1822/head
Jens Steube 6 years ago committed by GitHub
commit d6c04c2daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11081,10 +11081,10 @@ int odf12_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUS
if (rc_tokenizer != PARSER_OK) return (rc_tokenizer);
u8 *checksum = token.buf[5];
u8 *iv = token.buf[7];
u8 *salt = token.buf[9];
u8 *encrypted_data = token.buf[11];
const u8 *checksum = token.buf[5];
const u8 *iv = token.buf[7];
const u8 *salt = token.buf[9];
const u8 *encrypted_data = token.buf[11];
const u32 cipher_type = strtol ((const char *) token.buf[1], NULL, 10);
const u32 checksum_type = strtol ((const char *) token.buf[2], NULL, 10);
@ -28605,7 +28605,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->dgst_pos2 = 2;
hashconfig->dgst_pos3 = 3;
hashconfig->st_hash = ST_HASH_18400;
hashconfig->st_pass = ST_HASH_18500;
hashconfig->st_pass = ST_PASS_HASHCAT_PLAIN;
break;
case 18500: hashconfig->hash_type = HASH_TYPE_SHA1;

@ -3211,13 +3211,13 @@ sub verify
(
hash_class => 'HMACSHA1',
iterations => $iter,
output_len => 32,
output_len => 32
);
my $pass_hash = sha256 ($word);
my $derived_key = $kdf->PBKDF2 ($b_salt, $pass_hash);
my $cbc = Crypt::Mode::CBC->new('AES', 0);
my $b_plaintext = $cbc->decrypt($b_ciphertext, $derived_key, $b_iv);
my $cbc = Crypt::Mode::CBC->new ('AES', 0);
my $b_plaintext = $cbc->decrypt ($b_ciphertext, $derived_key, $b_iv);
my $plaintext = unpack ("H*", $b_plaintext);
@ -10716,15 +10716,15 @@ END_CODE
(
hash_class => 'HMACSHA1',
iterations => $iterations,
output_len => 32,
output_len => 32
);
my $checksum = sha256_hex ($b_plaintext);
my $pass_hash = sha256 ($word_buf);
my $derived_key = $kdf->PBKDF2 ($b_salt, $pass_hash);
my $cbc = Crypt::Mode::CBC->new('AES', 0);
my $b_ciphertext = $cbc->encrypt($b_plaintext, $derived_key, $b_iv);
my $cbc = Crypt::Mode::CBC->new ('AES', 0);
my $b_ciphertext = $cbc->encrypt ($b_plaintext, $derived_key, $b_iv);
my $ciphertext = unpack ("H*", $b_ciphertext);

Loading…
Cancel
Save