Questions tagged [mcrypt]

MCrypt, and the accompanying libmcrypt, are intended to be replacements for the old Unix crypt, except that they are under the GPL and support an ever-wider range of algorithms and modes. MCrypt has not been updated since 2007

MCrypt implements numerous cryptographic algorithms, mostly block ciphers and stream ciphers, some of which falls under export restrictions in the United States. Algorithms include , , arcfour, enigma, ghost, LOKI97, RC2, serpent, threeway, twofish, wake, XTEA

Caution

Please note that the MCrypt library has not been updated since 2007. The PHP project has moved to deprecate and ultimately remove MCrypt from the PHP core and other projects will likely follow suit. It is highly recommended you switch to OpenSSL or another maintained encryption project.

922 questions
2
votes
0 answers

Issue porting Decryption from Windows CryptoAPI to linux libmcrypt

I am trying to port my program from Windows to Linux. The windows program uses Window CryptoAPI and linux is using libmcrypt. Here is the Windows code: #include #include #include #include #include…
2
votes
1 answer

How can I install a pecl extension like mcrypt in DDEV's web container?

In PHP 7.2 and higher the mcrypt extension is no longer available, but my project depends on it. I know that the project shouldn't be using something as ancient as mcrypt, but I don't have any say in this. I know that mcrypt was removed from PHP7.2+…
rfay
  • 9,963
  • 1
  • 47
  • 89
2
votes
3 answers

PHP 7.2 openssl_encrypt and mcrypt_encrypt generate different values

I am migrating all the functions of my project that encrypt data and work with mcrypt to openssl. Making tests I find that, encrypting the same data with the same keys I get different results. When decrypting I get the correct result with boths…
JSGarcia
  • 556
  • 7
  • 18
2
votes
0 answers

how to use libmcrypt to decrypt twofish CBC in C?

Imagine I did the following: $ echo a | mcrypt > b.nc and typed test123 as the Password/KeyPhrase. I'm assuming mcrypt will use twofish and CBC by default. I want to use libmcrypt and write a C program to decode the contents of b.nc. I modified the…
Bernardo Rodrigues
  • 378
  • 1
  • 4
  • 17
2
votes
2 answers

How to enable php-Mcrypt extension in Laravel Homestead

I am trying to get an old Laravel 4.1.x app up and running again so that it can be modernized. This requires an environment with PHP 5.6 and the Mcrypt extension. I have installed Homestead 9.0.3 (the latest stable version). Within the VM, I have…
jsm
  • 111
  • 1
  • 14
2
votes
1 answer

Unable to load php_mcrypt.dll while installing composer

While installing the composer im getting the following error... Anyone can help me to fix it. The PHP exe file you specified did not run correctly: C:\xampp\php\php.exe The php.ini used by your command-line PHP is: C:\xampp\php\php.ini A setting in…
Rukmangathan
  • 31
  • 1
  • 1
  • 2
2
votes
1 answer

PHP mcrypt to openssl BF-CBC: how to get the same encrypted value

Need to replace existing encrypt and decrypt functions that use mcrypt blowfish cbc mode with it's openssl equivalent. It needed to be able to handle the older values so the methods need to stay compatible. Have the decrypt working, and the encrypt…
Nico
  • 559
  • 4
  • 22
2
votes
1 answer

What is the most secure mcrpyt_encrypt algorithm?

I am trying to come up with a secure algorithm to encrypt and decrypt specific strings in my project I am working on. I am using the mcrypt_encrypt with the MCRYPT_RIJNDAEL_256 block cipher variation. I have tested many and found this one to seem…
ApexLegend
  • 29
  • 1
2
votes
1 answer

What is the best way to encrypt data without using the resource of mysql server ? Is mcrypt with CFB mode the best way with php?

I have a huge database with non encrypted fields. These data are sensitive and the managers took a decision to encrypt them as soon as we can. And all new data should be automatically encrypted to the same way. First Method: If I use aes_encrypt to…
am909090
  • 83
  • 1
  • 7
2
votes
2 answers

Mcrypt PHP extension required on Mac OS X Mojave

I just update my to Mac OS X Mojave. My local site now stop loading. I kept getting Mcrypt PHP extension required. I tried brew update brew upgrade brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install php54-mcrypt php…
code-8
  • 54,650
  • 106
  • 352
  • 604
2
votes
1 answer

Decrypt rijndael-128 String with PHP openssl

To replace mcrypt with openssl I have the following task: The actual code for encryption and decryption is something like $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size,…
Bueck0815
  • 193
  • 8
2
votes
1 answer

Magento on PHP 7.2 wamp server

i am configuring an existing magento project on local system with WAMP server php version 7.2, while installing magento i get error "PHP extension "mcrypt" must be loaded." Problem is mycrypt is no longer supported in php 7.2, can anyone suggest how…
Vikky
  • 752
  • 3
  • 15
  • 35
2
votes
1 answer

What is, if any, prefered mcrypt cipher for encrypting/decrypting php objects or arrays

I'll keep this short and simple. As part of PHP's mcrypt library there are 40 or so possible ciphers, see here. Not knowing much about encryption myself, I'm working under the assumption regardless of the cipher used, the data when decrypted is…
xzyfer
  • 13,937
  • 5
  • 35
  • 46
2
votes
1 answer

substitute mcrypt with openssl_encrypt

I'm trying to update a function to work with php 7.1 which deprecated mcrypt. the original function is: function encryptNET3DES($key, $vector, $text) { $td = mcrypt_module_open(MCRYPT_3DES, '', MCRYPT_MODE_CBC, ''); $key_add = 24 -…
Aschab
  • 1,378
  • 2
  • 14
  • 31
2
votes
1 answer

Decrypt AES-256-CFB in PHP with openssl instead mcrypt

The function below correctly decrypt the data in php5 function decrypt_mcrypt($key, $str) { $str = base64_decode($str); $iv = substr($str, 0, 16); $str = substr($str, 16); return mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $str,…
vaal
  • 153
  • 3
  • 8