aes

Objective-c AES encryption doesn't look like java AES encryption

Hi all Well im trying to encrypt an string in objective c extending NSData with this method: @implementation NSData (AES128) (NSData *)AES128Encrypt { char keyPtr[kCCKeySizeAES128] = {'\xe1','\xaa','\x9c','\x61','\x46','\x74','\x44','\x56','\xf0','\xe5','\x47','\x46','\x86','\xdc','\x95','\x77'}; NSUInteger dataLength = [self leng...

Code igniter MySQL AES with active records?

Hey, How would i use code igniters active records to insert/update/select data from a database using mysql's built in aes encrypt/decrypt functions? I know i could just use the normal sql query, but i'd like to use active records ideally. Thanks ...

Can ZXing be used in Android with encrypted QR-codes?

The current method uses AES encrypted files. The goal is to exchange small amounts of private data using AES encrypted QR-codes. ...

InvalidKeyException Illegal key size

I have a test which runs great on my development MacBook Pro, but fails to run in continuous integration TeamCity server. The error is following: java.security.InvalidKeyException: Illegal key size at javax.crypto.Cipher.a(DashoA13*..) at javax.crypto.Cipher.init(DashoA13*..) at javax.crypto.Cipher.init(DashoA13*..) Both ...

Solved: Why is desktop AES file IO incompatible with Android AES file IO?

I have ported an application from Android to desktop that uses AES to encrypt some private data. Both applications are able to encrypt and decrypt the data for their own use but unable to decrypt the other applications data. The AES keys, IVs, and algorithms are identical. The main difference between the two applications is that the andr...

What cipher for encrypting UDP packets?

I have an application that does time-sensitive communications over UDP (like video streaming or a game). Packets may be lost, and do not need to be re-transmitted. What cipher should I use to encrypt the datagrams? I'm leaning towards blowfish in ECB mode. I know ECB mode has problems, but I need to support missing packets, so the enc...

Delphi AES library (Rijndael) tested with KAT Vectors

Hi, for these 2 libraries, Delphi Encryption Compendium v 5.2 TurboPower Lockbox v 2.07 I tested their Rijndael DCB/CBC algorithm with "AES Known Answer Test (KAT) Vectors" obtained at NIST website (http://csrc.nist.gov/groups/STM/cavp/index.html) But, both of these libraries failed the tests. Not sure if it was my testing that has...

Java AES Decrypting problem

I have been tasked with decrypting a file in Java that has been encrypted using the following criteria: AES encryption algorithm with 128-bit key, ECB mode and PKCS7 padding. The encrypted file format is: - first byte is hex 0x31 – specifying encryption method used (1 for AES) - followed by the encrypted bytes of the input file I...

AES test on iphone

my encryption is working but i cant decrypt kindly suggest what i am doing wrong here NSString *passphrase = @"hello"; NSStringEncoding myEncoding = NSASCIIStringEncoding; NSString *alphaStringPlain = @"cell"; NSData *alphaDataPlain = [alphaStringPlain dataUsingEncoding:myEncoding]; NSData *alphaDataCypher = [alphaData...

Decrypt Java AES 128Bit encrypted string which has been encrypted using key only (no IV) in VB.NET

I am attempting to find some code to use in VB.NET to decrypt a string that has been encrypted using the Java crypto libary. All of the code I have found so far uses an Initialisation Vector and Key to decrypt but the string has been encrypted using the Key only. (Using an Initialisation Vector is apperently an optional step in Java)....

AESManaged Encryption/Decryption - Padding is invalid and cannot be removed.

I am coding an encryption/decryption aes utility with specific requirements: -AES/CBC/PKCS7 -256-Bit Key provided as base64 string -IV provided as base64 string So I am trying to encryp/decrypt this string "1234567890123456" using the same key and IV. Encryption runs fine but when trying to decrypt the encrypted string I get the "Paddin...

Coldfusion 9 Encryption Key from Java Byte Array

I am working on a project where we are passing encrypted data between C#, Java and ColdFusion applications. To generate the key and iv for 256 bit AES encryption. I have the following array which I need to convert in ColdFusion 9 to useable key The Java Code for the Key new byte[]{ (byte)172, (byte)181, (byte)241, (byte)2...

Is there a difference between CBC and CFB modes in AES?

Quoting myforwik's answer, CBC, OFB and CFB are identical, however OFB/CFB is better because you only need encryption and not decryption, which can save code space. I want a pure implementation of AES CFB in PHP. I specifically do NOT want mcrypt. I therefore turned to PHPSecLib. However, as per the documentation, the library only supp...

AES Encript and Decript problem with Apache Base64

Hi, I have following programme for encrypts a data. import java.security.Key; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Base64; public class Test { private static final String ALGORITHM = "AES"; private static final byte[] keyValue = "ADBSJHJS12547896".getBytes...

Need help in AES encrption on iphone

Hi, This is karthik, I would like to implement aes encryption method on my iphone application . Already I have done it with some problem . I had encrypted the string successfully and I can send it to java server to decrypt it. But they cannot decrypt it to original string . As the same , They encrypt some data and have send it to me. M...

Decryption of AES in Java

French : slt, comment je peut faire le dechiffrement en utilisant AES c'est mon code : in English : Hi, how can I do the decryption using AES? This is my code: public class NewClass1{ private Key key; private void generateKey() throws NoSuchAlgorithmException{ KeyGenerator generator; generator = KeyGenerator.ge...

PHP, MySQL, and AES Encryption / Decryption for User Data

I am new to AES encryption but trying to build a solution which: Accepts consumer data Encrypts that data using AES and a "public" key Store that data in a MySQL database Have the ability to pull and decrypt the data ONLY with a private key (stored on my personal machine, not the server itself). I realize this may be overkill but wan...

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

How should I store a AES Encryption Key?

I run a DV 3.5 server on MediaTemple with Linux CentOS 5, php and mysql DB and am trying to encrypt phone records with AES. I came across what seems to be good script as PHPAES but I am not sure of the following: Where do I actually store the AES Encryption key used to encrypt and decrypt the phone number? How do I call on the AES ...

Incorrect key size in PHP mcrypt when porting CryptoPP AES encryption to PHP's mcrypt

Earlier I managed to port some C++ CryptoPP Rijndael_128 CBC code to MCrypt PHP, but now I'm having problems with CFB mode. The C++ and PHP results do not match (well the first byte matches but this could be coincidence, everything else doesn't). With some diagnostics, it looks like PHP's mcrypt is not setting the key length correctly? ...