Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

OpenSSL decryption as alternative #24

Open
AnanasPfirsichSaft opened this issue Apr 1, 2019 · 0 comments
Open

OpenSSL decryption as alternative #24

AnanasPfirsichSaft opened this issue Apr 1, 2019 · 0 comments

Comments

@AnanasPfirsichSaft
Copy link

I have included a second method for decrypting the ciphertext in my ykksm copy. Because mcrypt is abandoned and has not been updated for years. openssl can do it as well.

ykksm-utils.php -> function aes128ecb_decrypt

if ( extension_loaded('openssl') && function_exists('openssl_decrypt') && in_array('aes-128-ecb',openssl_get_cipher_methods()) ){
$result = openssl_decrypt(yubi_hex2bin($in),'aes-128-ecb',yubi_hex2bin($key),OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING);
if ( $result !== false )
$result = bin2hex($result);
else
$result = '';
}
else{
// mcrypt block
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant