1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-19 04:58:16 +00:00

get rid of Crypt::GCrypt

This commit is contained in:
Gabriele Gristina 2025-07-12 20:00:43 +02:00
parent e8686b3e3e
commit 1cc8ed779e
No known key found for this signature in database
GPG Key ID: 9F68B59298F311F0
2 changed files with 8 additions and 27 deletions

View File

@ -36,6 +36,7 @@ cpanm Authen::Passphrase::LANManager \
Convert::EBCDIC \
Crypt::Argon2 \
Crypt::AuthEnc::GCM \
Crypt::Blowfish \
Crypt::Camellia \
Crypt::CBC \
Crypt::Cipher::Serpent \
@ -46,7 +47,6 @@ cpanm Authen::Passphrase::LANManager \
Crypt::Digest::Whirlpool \
Crypt::ECB \
Crypt::Eksblowfish::Bcrypt \
Crypt::GCrypt \
Crypt::Mode::CBC \
Crypt::Mode::ECB \
Crypt::MySQL \
@ -61,6 +61,7 @@ cpanm Authen::Passphrase::LANManager \
Crypt::Skip32 \
Crypt::Twofish \
Crypt::UnixCrypt_XS \
CryptX \
Data::Types \
Digest::CMAC \
Digest::CRC \

View File

@ -8,7 +8,8 @@
use strict;
use warnings;
use Crypt::GCrypt;
use Crypt::Blowfish;
use Crypt::Mode::CFB;
use Crypt::PBKDF2;
use Digest::SHA qw (sha1 sha1_hex);
@ -36,20 +37,9 @@ sub module_generate_hash
my $pass_hash = sha1 ($word);
my $key = $kdf->PBKDF2 ($b_salt, $pass_hash);
my $cfb = Crypt::GCrypt->new
(
type => 'cipher',
algorithm => 'blowfish',
mode => 'cfb'
);
my $cfb = Crypt::Mode::CFB->new('Blowfish');
$cfb->start ('encrypting');
$cfb->setkey ($key);
$cfb->setiv ($b_iv);
my $b_cipher = $cfb->encrypt ($b_plain);
$cfb->finish ();
my $b_cipher = $cfb->encrypt($b_plain, $key, $b_iv);
my $cipher = unpack ('H*', $b_cipher);
my $checksum = sha1_hex ($b_plain);
@ -113,19 +103,9 @@ sub module_verify_hash
my $pass_hash = sha1 ($word);
my $key = $kdf->PBKDF2 ($b_salt, $pass_hash);
my $cfb = Crypt::GCrypt->new (
type => 'cipher',
algorithm => 'blowfish',
mode => 'cfb'
);
my $cfb = Crypt::Mode::CFB->new('Blowfish');
$cfb->start ('decrypting');
$cfb->setkey ($key);
$cfb->setiv ($b_iv);
my $b_plain = $cfb->decrypt ($b_cipher);
$cfb->finish ();
my $b_plain = $cfb->decrypt($b_cipher, $key, $b_iv);
my $plain = unpack ('H*', $b_plain);