1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-20 21:48:19 +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 \ Convert::EBCDIC \
Crypt::Argon2 \ Crypt::Argon2 \
Crypt::AuthEnc::GCM \ Crypt::AuthEnc::GCM \
Crypt::Blowfish \
Crypt::Camellia \ Crypt::Camellia \
Crypt::CBC \ Crypt::CBC \
Crypt::Cipher::Serpent \ Crypt::Cipher::Serpent \
@ -46,7 +47,6 @@ cpanm Authen::Passphrase::LANManager \
Crypt::Digest::Whirlpool \ Crypt::Digest::Whirlpool \
Crypt::ECB \ Crypt::ECB \
Crypt::Eksblowfish::Bcrypt \ Crypt::Eksblowfish::Bcrypt \
Crypt::GCrypt \
Crypt::Mode::CBC \ Crypt::Mode::CBC \
Crypt::Mode::ECB \ Crypt::Mode::ECB \
Crypt::MySQL \ Crypt::MySQL \
@ -61,6 +61,7 @@ cpanm Authen::Passphrase::LANManager \
Crypt::Skip32 \ Crypt::Skip32 \
Crypt::Twofish \ Crypt::Twofish \
Crypt::UnixCrypt_XS \ Crypt::UnixCrypt_XS \
CryptX \
Data::Types \ Data::Types \
Digest::CMAC \ Digest::CMAC \
Digest::CRC \ Digest::CRC \

View File

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