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
4
votes
3 answers

Encrypt / Decrypt Methods

I know that there are more than a dozen questions about this. But I want to know if it would be better to encrypt passwords for a login system with hash methods like sha1, sha512 etc or would it be better to use Mcrypt ciphers for this ? I know that…
Roland
  • 9,321
  • 17
  • 79
  • 135
4
votes
3 answers

Decrypting mcrypt encoded text with node.js

I have text encoded with Blowfish using PHP's mcrypt: $td = mcrypt_module_open ('blowfish', '', 'cfb', ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init ($td, "somekey", $iv); $crypttext = mcrypt_generic…
aviaron
  • 640
  • 6
  • 11
4
votes
2 answers

.Net and PHP Rijndael encryption not matching

At first i thought it was the padding since mcrypt uses zero padding but i changed the php to use PKCS7 and get the same exact results Can anyone help? I think it has something to do with the padding in the php Test output from .Net: Key:…
user940427
  • 43
  • 1
  • 3
4
votes
1 answer

How can JAVA decrypt data which was base64 encoded and RIJNDAEL_256 encryped by PHP?

I need to migrate data from a PHP to a JAVA application. The data has been encrypted using this PHP function: function encrypt($text, $encryptionKey) { return utf8_encode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $encryptionKey, $text,…
Holly
  • 1,305
  • 2
  • 15
  • 30
4
votes
1 answer

php mcrypt CBC mode encryption/decryption problem

I have a problem with CBC mode when I try to encrypt/decrypt some text using php's mcrypt extension. I've created a class to perform this operations, it works fine with other modes but CBC. The problem is as follow: I use the clear text Even in…
misterjinx
  • 2,606
  • 3
  • 27
  • 29
4
votes
2 answers

How can you override the 24 character mcrypt salt limit?

I would like to use a salt that has more than 24 characters with mcrypt. mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)); However if I make…
Andrew Jenkins
  • 1,590
  • 13
  • 16
4
votes
0 answers

The Encrypt library requires the Mcrypt extension after initializing library

I am using php version 7 and using codeigniter framework so as per requirement I am encoding the string using : $this->encrypt->encode('some_text'); I have called library using…
Anonymous
  • 1,074
  • 3
  • 13
  • 37
4
votes
1 answer

Equivalent Encryption for MCRYPT - To preserve client side code

I'm using the following code to perform encryption using mcrypt
techno
  • 6,100
  • 16
  • 86
  • 192
4
votes
1 answer

PHP Converting mcrypt to openssl

I know 3DES and MD5 are insecure. I will work on replacing them once I have it working again, I have a mobile app that is using 3DES with an MD5 of a key as a SECRET KEY to talk to a PHP Application. Now this code worked perfectly on PHP 5.3 (this…
Barkermn01
  • 6,781
  • 33
  • 83
4
votes
2 answers

Migrating mcrypt with Blowfish and ECB to OpenSSL

I can't for the life of me figure out how to migrate my legacy mcrypt code to OpenSSL. I got it working for Blowfish with CBC and for Rijndael with CBC, but Blowfish with ECB is eluding me. And yes, I read Moving from mcrypt with Blowfish & ECB to…
Björn Tantau
  • 1,564
  • 14
  • 13
4
votes
0 answers

Install mcrypt extension for php with Homebrew in Mac High Sierra

I've been trying to install mcrypt extension for php 5.6 with the next commands: brew install php56-mcrypt with no results, I'm getting this error: No available formula with the name "php56-mcrypt" taken from questions like these: Installing…
Jose Rojas
  • 3,490
  • 3
  • 26
  • 40
4
votes
2 answers

How to install mcrypt php 7.2.3 extension in xampp for windows?

My PHP Version 7.2.3 and xampp pack do not have the mcrypt extension. It is not mentioned in the phpinfo() neither in the php.ini file in order to enable it. I have downloaded mcrypt from this link: https://sourceforge.net/projects/mcrypt/ but I…
Lamine Mohammedi
  • 61
  • 1
  • 1
  • 4
4
votes
3 answers

How to decrypt after Mcrypt deprecation?

I have updated my php version to 7.1. I had functions where i encrypt data using mcrypt. Now this function is deprecated. How can i decrypt the data anyway withoud going back to older versions of php. This is the code i used: public function…
Puya Sarmidani
  • 1,226
  • 9
  • 26
4
votes
4 answers

Facing mcrypt error issue on upgrading to Mac OSX Sierra

After upgrading to Mac OSX Sierra from El Capitan as soon as I run php it denies to run any php project which was previously installed on my system. That after exploring this issues on internet I came with these options... After running the below…
Saumya Rastogi
  • 13,159
  • 5
  • 42
  • 45
4
votes
2 answers

where should i add the extension=mcrypt.so in php.ini?

I am a newbie to php, and during an installation of a server I have to add the extension extension=mcrypt.so in php.ini file where I stuck with the following issues 1) I donno where exactly the above mentioned line should be added in the php.ini…
Shekhar Reddy
  • 153
  • 1
  • 3
  • 12