aes-encrypt

How do I keep a mySQL database secure?

I'm going to be implementing a PHP/mySQL setup to store credit card information. It seems like AES_ENCRYPT/AES_DECRYPT is the way to go, but I'm still confused on one point: how do I keep the encryption key secure? Hardwiring it into my PHP scripts (which will live on the same server as the db) seems like a major security hole. What's th...

What (pure) Python library to use for AES 256 encryption?

I am looking for a (preferably pure) python library to do AES 256 encryption and decryption. This library should support the CBC cipher mode and use PKCS7 padding according to the answer to an earlier question of mine. The library should at least work on Mac OS X (10.4) and Windows XP. Ideally just by dropping it into the source direct...

decrypting pdf protected by aes-256bit using the right password

Is there any way to decrypting a pdf protected by an aes-256 bit key? I have the correct password and I need a command-line tool (or library - perhaps in python :P ) for decrypting the file and then doing some operation over it. The best thing could be if the file could be saved decrypted, then I elaborate it and then I can remove it.....

Encrypt in Java and Decrypt in C# with Rijndael

Using the Rijndael algorithm is it possible to encrypt a config file (or section(s) in a config file) and then decrypt that file in Java? Assumptions can be made such as: Pass in IV (not Autogenerated idea :: GenerateIV(); ) Pass in Key BlockSize is 128 (standard) Assuming this can be done, my next question on this would be: Can th...

How to implement AES-512 algorithm?

Is there javascript avaialable which implements AES-512 algorythm(i.e Encyption,Decryption)? I found most of the javascripts implmented AES-128,AES-192,AES-256. ...

how to generate s-box in aes in java.

Is there any formula to generate it. Or shud I go with Multiplicative Inverse (Extended Euler Algorithm) and add a constant ??...I Strongly believe that ther will be a much easier way to generate S-box...Please let me know???? ...

.Net AES Encryption - Universally Accepted Pad Setting

I have a .Net web service that processes AES encrypted data. The consumers of my service agree on a key/IV pair with me and that way we can pass data securely. I have a consumer using PHP that is using mcrypt to encrypt. mcrypt is padding with NULLs. I was not setting a pad (NONE) and therefore not able to decrypt the strings. I cha...

AES, MySql and Headaches

Hello everyone. I am working on a checkout page for an ecommerce site. In said site, people input their credit card information and it is saved to the order in an AES encrypted format. This worked fine when all they supported was VISA. Now that they support MasterCard and Discover (16 digit numbers), it no longer works. The insert q...

Can I add 2 encrypted strings together and decrypt them?

I have 2 methods to generate 2 different data and need to save them in one encrypted file. Can I achieve this by adding encrypted stringA + encrypted stringB, then decrypt them later? Or I have to encrpt stringA -> save as file -> read the file & decrypt to stringA -> stringA + stringB -> encrypt ? NB, I am using Rijndael(AES) and s...

Where should one store the cipher key when using AES encryption with PHP?

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...

SlowAES cannot decrypt properly without original size...

Hello, First time poster here. Awesome community here. After endless hours of searching, I'm unable to figure out the answer to this problem I"m facing. First and foremost, I'm no guru when it comes to encryption/decryption, cryptology, etc. I only want to go so far in this realm without getting lost. The primary framework I code on i...

encrypt- decrypt with AES using C/C++

Hi! How can I encrypt decrypt a file with a 256 key AES in c or c++? Which library do you suggest? Thank you! ...

AESlibrary only two lines

Does anyone know a c++ library that uses advanced encryption standard encryption that can achieve encryption and decryption (using counter mode) in just two lines of codes. No need of padding or buffering the plaintexts the library will take care of all this. I have had a look at crypto++, openssl and libtomcrypt but in these it seems I ...

How to encrypt/decrypt multiple strings in AES encryption??

hello again everyone, i would like to know if i could encrypt two or more strings in AES encryption. let say, i want to encrypt username, password and nonce_value, can i use the following code? try{ String codeWord = username, password, nonceInString; String encryptedData = aseEncryptDecrypt.encrypt(codeWord); String decryptedData =...

how to display the decrypted and splited Strings in order?

Hi everyone, i need some help and guidance in displaying the splitted Strings in order. let say, i have username, password, nonceInString. i had successfully encrypted and decrypted those. then i split the decrypted data. it was done, too. i want to display the decrypted data in order. something like this. userneme: sebastian...

how to convert byte array to key format??

hi everyone, i would like to know how to convert byte array into key. i am doing an AES encryption/decryption. instead of generating a key, i would like to use my generated byte array. byte[] clientCK = Milenage.f3(sharedSecret16, RANDbytes, opc); let say i have a byte array called clientCK, stated above. i want to use it in AES...

AesManaged and RijndaelManaged

Im currently developing a Silverlight application that connects to an old webservice. Our old webservice uses an encryption tool which silverlight does not support. Finally, we decided to used AesManaged for encryption, however, our webservice does not support AesManaged. Is their a way to decrypt an AesManaged to RijndaelManaged? If y...

Converting AES encryption token code in C# to php

Hello, I have the following .Net code which takes two inputs. 1) A 128 bit base 64 encoded key and 2) the userid. It outputs the AES encrypted token. I need the php equivalent of the same code, but dont know which corresponding php classes are to be used for RNGCryptoServiceProvider,RijndaelManaged,ICryptoTransform,MemoryStream and Cryp...

How to encrypt/decrypt CSV file using 128-bit AES in php

Can any one please let me know the way, how can i encrypt/decrypt a file instead of string. ...

How do make my encryption algorithm encrypt more than 128 bits?

OK, now I have coded for an implementation of AES-128 :) It is working fine. It takes in 128 bits, encrypts and returns 128 bits So how do i enhance my function so that it can handle more than 128 bits? How do i make the encryption algorithm handle larger strings? Can the same algorithm be used to encrypt files? :) The function def...