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

mcrypt warnings

I keep getting these warnings: Warning: mcrypt_generic_init(): mcrypt_generic_init(): 1 is not a valid MCrypt resource in C:\Users\dever\Desktop\web code\HeloWorld\HeloWorld\Crypt.php on line 123, column 9. Warning: mdecrypt_generic():…
owen gerig
  • 6,165
  • 6
  • 52
  • 91
0
votes
2 answers

php decryption failing from URL

I am using php decrypion to check that: an email address replying to a request is the same email address which was sent the request. This is the code but at the bottom it simpy fails. The url is simply:…
StudioTime
  • 22,603
  • 38
  • 120
  • 207
0
votes
4 answers

Make a long string of encrypted substrings in c

I'm trying to create a long string that is produced out of encrypted substrings. For the encryption I'm using AES128 and libmcrypt. The code is working, but I get a shorter output then I should and a beeping sound. I guess it's because I'm using…
user1656466
  • 145
  • 1
  • 9
0
votes
1 answer

PHP: decrypting AES in Counter mode with mcrypt

I have a string encrypted with AES in Counter mode, it wasn't done with PHP and I can't make mcrypt to decode it :( there's a class that works as expected: http://www.movable-type.co.uk/scripts/aes.html (see bottom of the page), but it's slow so I…
Daniel
  • 4,272
  • 8
  • 35
  • 48
0
votes
2 answers

Using mcrypt_create_iv on PHP IIS

I'm trying to set up password salting on our website, and found the PBKDF2 functions at https://defuse.ca/php-pbkdf2.htm When I try it, I get: Fatal error: mcrypt_create_iv(): Could not gather sufficient random data in include\PBKDF2.php on…
AndyD273
  • 7,177
  • 12
  • 54
  • 92
0
votes
1 answer

How to use CBC and HMac? Mcrypt PHP

How do you use CBC and HMAC? I couldn't find enough information on the internet. How do you get the IV? How would you know what it is when you need to decrypt later? (Wouldn't putting it in the database defeat the purpose?) What is HMAC, and is it…
Anon
  • 45
  • 1
  • 6
0
votes
0 answers

Crosscompiling libmcrypt as a static lib for MSVC

I'm trying to use libMcrypt as a static lib for windows. My code is already using the dll port for it found here. There does not exists a 'vcproj/solution' for the project so I did not know how to go about to compile it directly using visual…
mots_g
  • 637
  • 8
  • 27
0
votes
1 answer

Encrypting my password using mcrypt_create_iv() and crypt()

After half a day of reading about the correct way to encode passwords, I am overwhelm and I've chosen to do it this way. However I'm not sure whether this is the best way to do it. Thanks in advance. $password= "abc123"; $salt = mcrypt_create_iv(32,…
Jian Short
  • 135
  • 1
  • 2
  • 13
0
votes
2 answers

Good php alternative to bcrypt encryption when it's not available?

I just learned that my host provider doesn't offer bcrypt on shared hosting. They suggested that i use mcrypt but I'm not so sure how secure it is. What is the best alternative to bcrypt?
0
votes
4 answers

public key cryptography implementation

I have been using the PHP mcrypt module for encrypting sensitive data at my company. This has been working well. However, I have been requested to create a new master password which should be able to decrypt any data. The problem is that this master…
KJ Saxena
  • 21,452
  • 24
  • 81
  • 109
0
votes
1 answer

Why is PHP Mcrypt returning post message garbage?

Using the same (basic) code from here but switching to MCRYPT_RIJNDAEL_128, I'm now getting the correct data out of php mcrypt_decrypt, except in certain circumstances, it's padding out the end of my message a newline with seemingly random binary…
Jeff
  • 5,746
  • 4
  • 33
  • 40
0
votes
1 answer

Encrypting with crypto. Encrypt fails, decrypt works perfectly

MCrypt: import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; public class…
Rawr
  • 2,206
  • 3
  • 25
  • 53
0
votes
1 answer

Image encryption for storage in PHP

I've got a situation and am uncertain how to approach it most effectively. A clients existing system which is built to alter, stamp, sign, etc. PDFs -which also converts the PDFs pages to images (pngs) for display/review, is needing to be 'secured'…
jbrain
  • 561
  • 3
  • 7
  • 18
0
votes
1 answer

en/decryption using php and Objective-C

I'm trying to use function that decrypt for me ciphertext after encrypted using Objective-C I know that the problem is in padding. so I found this function form this…
user1584540
  • 21
  • 1
  • 1
  • 5
0
votes
2 answers

Using MCrypt to Decrypt a Ciphertext (3DES CBC Mode)

I have a ciphertext, encrypted in 3DES CBC mode, and I'm having some trouble decrypting it. I have the following information (not actual values):
White Elephant
  • 1,361
  • 2
  • 13
  • 28