aes

Implementing PHP AES Function in .NET (C#)

Hello Guys, I have given a task in which I need to encrypt an user's ID using AES encryption, what they want is I need to pass in a parameter in a website just like this. URL : http://www.site.com/event/sample.jce Parameter : ?param= encrypted text aside from that there was an attched php sample that they want me to follow to encrypt...

How do I use AES 256-bit encryption when integrating with SalesForce?

My question relates to aes 256 bit encryption in browser post. I want to integrate an intranet application with salesforce and want the data transfer between them should be aes 256 bit encrypted so that the client gets utmost security. Can anyone give me ideas as to how it can be implemented? the integration b/w them will also be through...

What's wrong with this PHP4 class to do AES encryption?

When I decrypt something encrypted with this function, the decrypted version doesn't equal the original. class AES256encryption { var $secret = ''; var $cipher_key = ''; function AES256encryption($secret='') { if (empty($secret)) { global $secret; if (empty($secret)) { ...

"Padding is invalid and cannot be removed" -Whats wrong with this code?

Every time I run this and encrypt, the output is variable, and when I attempt to decrypt I get "Padding is invalid and cannot be removed." Been fighting with this for a day or two now and I am at a loss. private static string strIV = "abcdefghijklmnmo"; //The initialization vector. private static string strKey = "abcdefghijklmnm...

Help needed with AES between Java and Objective-C (iPhone)....

I am encrypting a string in objective-c and also encrypting the same string in Java using AES and am seeing some strange issues. The first part of the result matches up to a certain point but then it is different, hence when i go to decode the result from Java onto the iPhone it cant decrypt it. I am using a source string of "Now then a...

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

AES 128 Encryption for iPhone HTTP Stream

Hello, I know almost nothing about cryptography, but I would like to figure out how to encrypt an HTTP live stream and decrypt it on an iphone. The apple docs for HTTP encryption read as follows: //////////////////////////// Media files containing stream segments may be individually encrypted. When encryption is employed, references ...

IPhone https authorization using client certificates

I am interested in playing HTTP live streaming data from my app. The stream (which I create) is encrypted, and a URL pointing to the AES key is included in the stream index file. MPMoviePlayer hits this URL for the AES key, when it sees that encryption is enabled. I would like this URL to be served by https, and for MMMoviePlayer to use...

Password Verification with PBKDF2 in Java

Hi everybody, im doing password based file encryption in Java. Im using AES as the underlying encryption algorithm and PBKDF2WithHmacSHA1 to derive a key from a salt and password combination using the following code(which i got from another generous poster on this site). SecretKeyFactory f = SecretKeyFactory.getInstance("PBKDF2WithHmac...

How to Check If File is Encrypted using AES (Rijndael)

Hi, I am using 'RijndaelManaged' and 'CryptoStream' classes in C# to encrypt files. Before encrypting the files, i want to check whether the file is already encrypted or not. I tried using File.GetAttributes() method to check for Encryption but it is not working. I need some tips on ways i can check whether the file is already Encryp...

AES Encrypting a password field in django using a snippet from djangosnippets

I am attempting to use this snippet: http://www.djangosnippets.org/snippets/1095/ on a model I am building- I am defining things as: first = models.TextField() last = models.TextField() email = models.EmailField(default=None) screen = models.TextField() password = models.EncryptedCharField() icon = models.ImageField(upload_to='avatars...

javax.crypto AES encryption - Do I only need to call doFinal?

I want to do AES CBC encryption in Java. I'm using javax.crypto. After I have the Cipher initialized, do I only need to call doFinal on the clear bytes to properly encrypt it? Or do I need to do something with update? Documentation says update: Continues a multiple-part encryption or decryption operation and doFinal Encry...

AES Two Way Encryption with Salting

I am using the following class written by Mark Brittingham for two way AES encryption in my application. How would I go about modifying it to add a salt string? using System; using System.Data; using System.Security.Cryptography; using System.IO; public class SimpleAES { // Change these keys private byte[] Key = { 123, 217, 19...

How do encrypt a long or int using the Bouncy Castle crypto routines for BlackBerry?

How do encrypt/decrypt a long or int using the Bouncy Castle crypto routines for BlackBerry? I know how to encrypt/decrypt a String. I can encrypt a long but can't get a long to decrypt properly. Some of this is poorly done, but I'm just trying stuff out at the moment. I've included my entire crypto engine here: import org.bouncycas...

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

two AES implementations generated different encryption results

I have an application that uses an opensource "libgcrypt" to encrypt/decrypt a data block (32 bytes). Now I am going to use Microsoft CryptAPI to replace it. My problem is that the libgcrypt and cryptApi approaches generate different ciphertext contents as I use the same AES-256 algoritjm in CFB mode, same key, and same IV, although the...

AES java encoding, ruby decoding

Hi all, I'm trying to AES encode data in java, send it over the network and decode it in ruby. Works fine with basic strings, but once the string's length is 16 bytes or more, I have garbage at the encode of the decoded ruby string. I guess it has to do with padding (not sure though since it affects even strings with the exact size of ...

AES encryption with PyCrypto and decryption with mcrypt

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

Mcrypt for rijndael-128 : how do I set the Initialization Vector?

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

Interoperability between two AES algorithms

Hello, I'm new to cryptography and I'm building some test applications to try and understand the basics of it. I'm not trying to build the algorithms from scratch but I'm trying to make two different AES-256 implementation talk to each other. I've got a database that was populated with this Javascript implementation stored in Base64. N...