paasikivenpieru Posted September 16, 2008 Share Posted September 16, 2008 I got encrypted files, which are using algorithm 3DES-CBC. So, what i need to do, is to just open those files into the plain text. Im trying to decrypt a data with PHP mcrypt_decrypt function. In the encrypted data, "tag_pin_example.enc", vector IV is set to zeroes.(I dont know what does that actually mean) I haven't work much with php and crypting, thats why I don't know to way how to 3DES-CBC works and what is the vector IV, but I still need to decrypt this file tag_pin_example.enc and make a decrypt generator for files likes that. Here is my "brilliant" piece of code: <?php //include 'todec.php'; $inputFile = file("c:\\works\\debug\\kryptaus\\stralfors_pin\\tag_pin_example.enc"); $key = "e1206e7240901c1a8111d077877a81ed"; //$size = mcrypt_get_iv_size(MCRYPT_CAST_256, MCRYPT_MODE_CFB); //i was jus trying to set vector IV //$iv = mcrypt_create_iv($size, 0); $decryptedData = mcrypt_decrypt(MCRYPT_3DES, $key, $inputFile,MCRYPT_MODE_CBC); ?> The command prompt says: The size of key is too large for this algothrithm(It should be right size....i dont know). And gives a warning: Attempt to Use an empty IV, which is NOT recommend in c:\pla pla pla.. I would be very pleased if someone knew what shall I do with this decrypting problem. The way how I open the file doesnt play any role,but I should just have to get them opened. Link to comment https://forums.phpfreaks.com/topic/124471-hard-question-about-decrypting/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.