This question is a continuation of my last one, regarding How to make Ruby AES-256-CBC and PHP MCRYPT_RIJNDAEL_128 play well together. I've got that working now, but I'm still struggling to go the other direction. The PHP generated cryptogram appears to have all the information that was provided, but I cannot get the Ruby code to decry...
I am working on a form spam protection class which essentially replaces form field names with an encrypted value using mcrypt. The problem with this is that mcrypt encryption is not limited to only alphanumeric characters which would invalidate form fields. Given the code below, can you think of any reason why I'd be having problems de...
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 PHP documentation seems to tell me what kind of problem, if any, this will cause me.
Th...
Using PHP I'm trying to convert the cipher text generated by mcrypt into binary but when I try and convert it back to the cipher text it doesnt get converted back properly so it cant be decrypted. I'm assuming my encodings are getting messed up somewhere but I dont know where to start to figure it out. Here is a link to the site http://d...
I was here yesterday and got some really great answers. I took what I got and put together, what I think will be a fairly secure algorithm. I'm having a problem using blowfish with a for loop that generates the salt.
I'm using base64 characters and a for loop to get a random string. I want to take this generated string and insert it int...
I am implementing AES-256 bit encrpytion in my web app:
http://www.utoxin.name/2009/07/automatic-db-field-encryption-in-cakephp/
One of the steps says to store the cipher used and key in a boostrap file. But what is stopping someone from scanning the file system with PS or something and decrypting the data?
What is the best way to se...
Trying to write a couple of functions that will encrypt or decrypt a file and am using the class found here to try and accomplish this:
http://www.itnewb.com/v/PHP-Encryption-Decryption-Using-the-MCrypt-Library-libmcrypt
The encryption function below seems to work, in that it appears to encrypt the file and place it in the intended d...
I'm pretty new at this. Tried to make sense of the manual page for mcrypt at PHP.net when I thought a good tutorial would do a better job. So I searched yet without anything substantial.
I also tried one of the examples of using mcrypt to perform the encryption and decryption with 2 functions, but it gives a warning of "Size of key is t...
For some sensitive data I decided to store it AES-encrypted on disc. I've implemented the encryption using PyCrypto.
Furthermore, the data is important, and the stored encrypted data will be my only copy of it (backups aside), so I looked for some means of retrieving the data without using PyCrypto to have a fallback given the possibili...
I would like to encrypt a file using AES (rijndael 128) with the mcrypt command line tool.
I would like to set the initialization vector to a specific value. How can I do this?
I am pretty new to encryption, btw.
Thanks!
...
I have an encrypted string that was encrypted with Perl Crypt::CBC (Rijndael,cbc). The original plaintext was encrypted with encrypt_hex() method of Crypt::CBC.
$encrypted_string = '52616e646f6d49567b2c89810ceddbe8d182c23ba5f6562a418e318b803a370ea25a6a8cbfe82bc6362f790821dce8441a790a7d25d3d9ea29f86e6685d0796d';
I have the 32 character...
Hi,
I have a few issues with the following php functions (part of a bigger class).
//encode
public function acc_pw_enc($text, $key) {
$text_num = str_split($text, 8);
$text_num = 8 - strlen($text_num[count($text_num)-1]);
for ($i=0; $i < $text_num; $i++) {
$text = $text . chr($text_num);
}
$cipher ...
What is the basic setup on the subject?
Let say I have a QByteArray, and I need to encrypt it with simple password. And the application has to be portable to Linux, Windows and Mac.
Do I have to include mcrypt.h and mcrypt.c in the QT project?
And then decrypt it in another piece of code
Just a very simple setup
...
Hi
I'm writing an error handler script which encrypts the error data (file, line, error, message etc) and passes the serialized array as a POST variable (using curl) to a script which then logs the error in a central db.
I've tested my encrypt/decrypt functions in a single file and the data is encrypted and decrypted fine:
define('KEY...
Does anyone know the difference between mcrypt_generic and mcrypt_encrypt when it comes to encryption in PHP?
...
So guys, there's plenty of different ciphers available - but which one is the safest to use nowadays?
List: http://www.php.net/manual/en/mcrypt.ciphers.php
...
Has anyone tried using libmcrypt and visual c++? I was trying to use Crypto++ but it seems not fully compatible - and I need to decrypt data encrypted in PHP using linux libmcrypt.
I found only cygwin version of libmcrypt but no .lib files or header.
I'm using RIJNDAEL_128 - maybe there is easier way to decrypt it in Visual C++?
Thank...
I'm trying to decrypt a string using PHP which was encrypted using a Chilkat library.
VB Encryption:
Dim password As String
password = "foobar"
crypt.CryptAlgorithm = "aes"
crypt.CipherMode = "cbc"
crypt.KeyLength = 128
' Generate a binary secret key from a password string
' of any length. For 128-bit encryption, GenEncodedSecretK...
I am inexperienced with symmetric encryption. I am encrypting a pdf file in php using the following code:
$source_filepath = RB::get('docroot') . RB::get('baseUrl') . '/submissions/' . $this->_filename;
$encrypted_filepath = $source_filepath . '.nc';
$pdf_data = file_get_contents($source_filepath);
$encrypted_data = mcrypt_encrypt(MCRY...
class Crypt_Data {
protected $_mcrypt=null;
protected $_iv=null;
protected $_key=null;
public function __construct() {
$this->_mcrypt = mcrypt_module_open('rijndael_256', '', 'cbc', '');
$key_size = mcrypt_enc_get_key_size($this->_mcrypt);
for($i=0;$i<$key_size;$i++) $test_key .= "0";...