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
1 answer

mcrypt blowfish php slightly different results when compared to java and .net

Here is some example code with altered key values and payload: $key = '/4rTInjwg/H/nA=='; $key = base64_decode($key); $data = 'val=100|val=200|val=300|val=400|val=500|val=600|val=700|val=800|val=900|'; $data.=…
justdev
  • 51
  • 4
4
votes
1 answer

Un-encrypting / re-encrypting a ColdFusion encrypted string in PHP

I'm in the unenviable position where I have to maintain functionality with an existing ColdFusion application. As part of it's login process the Coldfusion app stores a cookie with an encrypted string. encrypt(strToEncrypt, theKey, "AES",…
WeeJames
  • 540
  • 4
  • 11
4
votes
1 answer

AES 256 with PKCS7 padding encoded data have half ECB and half CBC block

Im trying to decode data in php returned from server: I know data AES 256 decoded and have PKCS7 padding but cant figure out which block mode it use here is my php function: public function decode($data) { //AES decode $iv =…
Harry
  • 63
  • 4
4
votes
1 answer

Node.js `crypto.final` make the encrypted result is different to PHP `mcrypt_encrypt`

At first, Node.js crypto. // Both of key and IV are hex-string, but I hide them in Stackoverflow. var secretKey = new Buffer('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'hex'), // 48 chars iv = new Buffer('bbbbbbbbbbbbbbbb',…
Husky
  • 542
  • 5
  • 22
4
votes
2 answers

How can I encrypt HTML5 web storage?

Is mcrypt or cryptojs better? Can anyone give me an example how I can encrypt web storage with HML5? HTML:

Silakan Masukkan Data

Nama =
user3391755
  • 61
  • 1
  • 3
4
votes
0 answers

Extension shows in phpinfo(), but extension_loaded() fails

I'm trying to get mcrypt php extension to work. Getting the following error when installing tinyissue: Installation Please install all required extensions mcrypt extension not found. The extension shows fine in phpinfo(), but the…
goji
  • 6,911
  • 3
  • 42
  • 59
4
votes
2 answers

PHPMyAdmin is complaining that 'mcrypt' isn't available -- am I bothered?

I've set up PHPMyAdmin on a Mac, and it's complaining that it can't load the 'mcrypt' function(s). Apparently the stock install of PHP on Macs doesn't have it. Can anyone tell me what the implications are? Neither the PHPMyAdmin documentation or the…
AmbroseChapel
  • 11,957
  • 7
  • 46
  • 68
4
votes
1 answer

Problems with installing mcrypt support for php54 using Homebrew on Mountain Lion

I am trying to install mcrypt support in php 5.4.11 on Mountain Lion using Homebrew and I am getting problems I cannot resolve. I had already manually installed PHP 5.4.11 on my Mac. mcrypt had been previously installed using Homebrew. When I would…
Ali Samii
  • 1,672
  • 4
  • 28
  • 49
4
votes
1 answer

Mcrypt PHP - Module Initialization Failed

How to install the mcrypt modules on PHP? I need to install the mcrypt extension on WAMPServer so that I can use IDEA encryption on passwords. I can't use any other type of encryption, because the large database I am interacting with already uses…
Scott Hallauer
  • 389
  • 2
  • 8
  • 16
4
votes
3 answers

mcrypt_encrypt fails to initialise

I am trying to encrypt some data in PHP using the Rijndael cipher in CBC mode with a 256bit key but for some reason I get the following error message: mcrypt_encrypt() Module initialization failed My code: $hashKey = hash('sha256',$key); $iv…
mixkat
  • 3,883
  • 10
  • 40
  • 58
3
votes
2 answers

Link between two servers via curl and mcrypt

I've got two servers on two locations. Server 1 subtracts client-information (like addresses, email and telephone numbers) of server 2 via a php CURL session with a custom user agent which server 2 checks. Server 2 serves a JSON string. I want to…
stUrb
  • 6,612
  • 8
  • 43
  • 71
3
votes
2 answers

php mcrypt_decrypt() issue

I'm passing information from one page another with following php code.. Index.php page:
3
votes
2 answers

Why kohana 3 Encrypt class encode() method returns different string each time?

I'm doing a encode() from the Encrypt class and each time it returns a different string for the same input string. My application/config/encrypt.php: return array( 'default' => array( /** * The following options must be set: …
Alejandro García Iglesias
  • 16,222
  • 11
  • 51
  • 64
3
votes
3 answers

Is PHP's mcrypt extension FIPS 197 compliant?

I'm using the following encryption code which works like a charm, but I have to validate that it's FIPS 197 compliant otherwise Legal will kill me. mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $plaintext, MCRYPT_MODE_ECB, …
justacoder
  • 2,684
  • 6
  • 47
  • 78
3
votes
3 answers

creating encrypted passwords in openfire MySQL via PHP

Openfire stores encrypted passwords in a database using blowfish encryption. http://svn.igniterealtime.org/svn/repos/openfire/trunk/src/java/org/jivesoftware/util/Blowfish.java is the java implementation for how encrypt / decrypt functions work in…
sdolgy
  • 6,963
  • 3
  • 41
  • 61