aes-encrypt

Decrypt AES128-encrypted data

Hello, I am trying to decrypt the data from last couple of days. I decrypt the data but the result is not same as original. Please, can anyone suggest how I can do this. I am trying to decrypt the following data: Encrypted Data : "Mmb9tEkmW82oFPJb3vNhHA==" Encrypt Key : "91860F52E5C3A09BA3B827F28070E08D" Original data: "Marco" Pleas...

Encrypting a value using MySQL's AES_ECRYPT function, then passing it in a URL string, using PHP

Hi There, I need to encrypt a string using MySQL's AES_ENCRYPT function, then attach that encrypted string to the end of a URL, such that it can then be decrypted and used by a PHP script on the other end. Basically, I am encrypting the string (using MySQL's AES_ENCRYPT), I am then using PHP's rawurlencode() function to make it "URL sa...

Which encryption mode ECB, CBC, CFB

My php script and my c# application will pass a hash string to each other that is 32 chars long, what is the best mode for this? I thought ECB but am unsure as it says if using more then 1 block dont use. How do I know how big the block is? They will occasionally pass a large text file, which would be the best mode for encrypting this.....

how to generate initial vector for counter mode of encryption

i am implementing CTR mode of encryption using AES. i want know how to generate initial vectors(counter blocks) for this mode. ...

AES decryption Algorithm

Hello there, I'm going to make a long story short. It's been a while that I want to implement my own AES encryption/decryption program. The encryption program went well and encrypting without any error or strange output (Since I have compared my program's output with a working commercial one and result was the same). Wikipedia was (is)...

Java AES encryption with C/C++ AES decryption question

I am doing a simple AES encryption in Java: Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, getAES128SecretKey()); byte[] encrypted = cipher.doFinal(input); The output is converted to hex and stored in a database. A later process (one written in C/C++) comes along and reads the hex, converts it to bytes an...

Problem with MySQL's AES_DECRYPT.

I'm looking for a way to encrypt data on its way into a MySQL database, and decrypt it on the way out. Additionally, I would like to be able to perform normal SQL queries on those fields, such as searching and comparison, which prevents me from using a pure PHP solution. This leads me to AES_ENCRYPT() and AES_DECRYPT(), which can be dup...

PHP + AES Security Glitch

Hello, I have been implementing AES onto my website for security and I have ran into a glitch/problem to which I am un-able to find an answer and I find it quite bizzare. I BELIEVE I know where it resides but I don't know how/where to do the fix. Currently I have PHP 5 and the latest MySQL running on my local server. Here is a small...

PHP & MySQL security: one-way encryption Vs two-way encryption

Hi, I have read about using MySQL AES_ENCRYPT/AES_DECRYPT (two-way encryption) is less secure than using PHP - hash() (one-way encryption). http://bytes.com/topic/php/answers/831748-how-use-aes_encrypt-aes_decrypt Is it true that it is more secure that 'Rather than send the User his password, simply send him a link that he can click o...

Adding AES encryption to VC++ application

Hi, I created a GUI application in VC++ and now I wanted to do a AES128 encryption to the data, I am writting to it. Can anyone please let me know how can I do that in VC++. ...

How can I create a WinZip compatible AES-256 encrypted zip file from PHP on Linux?

I have to create a WinZip compatible zip file from a PHP application on a linux box, and it must use AES 256 encryption. I have found a few solutions for PHP on Windows, but they don't help me! A PHP package would be great, but if I need to, I can always have my PHP code run exec() or something to run a linux command line utility. Any s...

Searching MySQL with AES Encryption

Hello, I am just curious if someone can get me pointed in the right direction with searching MySQL with AES encryption. There are a couple of things that need to be considered. If I take the keyword and encrypt it before searching, i'm comparing encryption to encryption and even if one letter is cap and another letter isn't cap insid...