aes

Using Crypto by placing folder in python path? - Python

Hi folks, I'm using Django in order to serve a web service. I have only access to FTP and code refresh at the moment. No access to command-line or executing any kind of executable. I am using a Windows Server 2005 machine. Would I be able to use Crypto just by placing the folder within my Django project? Are there any good alternativ...

Portable version of pyCrypto? - Python

Hi folks, does a portable version of pyCrypto exist? would one be easy to create? Help would be awesome! ...

SHA256 key generator in iphone

Hi friends, I want to generate a key using SHA256 with N number of iterations. They input should be my "password" + "random number" I have seen the Crypto sample provided by apple but it seems it doesn't provide my requirement(or might be possible I didnt get it properly). I have gone through below link as well but is doesnt have met...

AES CTR 256 Encryption Mode of operation on OpenSSL

Im new to OpenSSL, Can anybody give me a hint in how to initialize AES CTR mode from a C file. I know this is the method´s signature but I am having problems with the parameters, there´s not many documentation neither a clear example how to make a simple encryption. I would appreciate if somebody could exemplify a call to this method. Th...

PyCrypto problem using AES+CTR

Hi, I'm writing a piece of code to encrypt a text using symmetric encryption. But it's not coming back with the right result... from Crypto.Cipher import AES import os crypto = AES.new(os.urandom(32), AES.MODE_CTR, counter = lambda : os.urandom(16)) encrypted = crypto.encrypt("aaaaaaaaaaaaaaaa") print crypto.decrypt(encrypted) Here,...

Encrypt with openssl and decrypt on iPhone with AES 128, ecb mode

Update : found the solution. I will update this question soon with the actual working code and command. A client is encrypting a file server-side with C++, and I need to decrypt it in an iPhone application. My client can crypt and decrypt on his side, and so do I on the iPhone, but we can't decrypt the file encrypted by each other. I...

Exception in AES decryption algorithm in java

Hi, This is the code for encrypting and decrypting a string in java using AES algorithm. Its throwing illegalblocksize exception while decrypting. I know it is occuring because length of input string to the decryption method isn't matching with the padding. I don't have an idea of how to solve this. I am a new bie to the encryption decr...

AES CTR Test Vectors

I am implementing a small demo application which encrypts using AES CTR with OpenSSL is it possible to test the algorithm using different modes of operation test vectors for example testing the ECB vector in my application and check the result or is it restricted to ctr test vectors??? If it is restricted to test it with ctr can anybody ...

BlackBerry Encryption using AES and Nopadding

Hi, I am new to Blackberry development. I have the following encrypt / decrypt routines and need to port it to my blackberry project. Can you please get me started? Regards import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; import java.util.zip.CRC32; import java.util.zip.Checksum; import java.util.zip.Inflater; im...

How to decrypt AES/CBC with known IV

I have an impossible task of decrypting AES/CBC encrypted data packets sent from a client. I've done tons of research leading me to believe that the encryption is insecure if the IV is static. For this task specifically, the IV is always statically set to 0. Is there any way this can be done? ...

How can I decrypt a string using AES algorithm in c#?

Hi, I have an encrypted string from one of our customers. This string was encrypted using the AES method in Java. The only thing I have is the key: "xxxxxxxxxxxxxxxxxxxxxxxx" (24 chars) and the encrypted text: "56e84e9f6344826bcfa439cda09e5e96" (32 chars). (This really is the only data I have) I can't seem to find a method to decryp...

PHP AES decryption

Hi All, I'm really struggling to decrypt a given cipher text in PHP and I'm hoping that one of you will be able to spot where I'm going wrong with this one. So this is the string I'm trying to decode Wq+J2IlE7Cug1gJNiwy1beIcFggGhn+gZHkTCQ4J/DR3OY45OMs4RXN850xbfAmy I know its encrypted with AES/CBC/PKCS5Padding with an IV of 2ZqVSH...

AES key finding from encrypted and plaintext data

If I have a plaintext message M along with its encrypted equivalent E, and I know that it has been encrypted with a 256-bit AES key, is there a way to work out the key? Are there ways to do it, if M is long enough? ...

Does anyone have a code example of AES encryption in python on Google App Engine?

Hi, I have a query string I need to encrypt using AES in CBC mode with zero padding, before finally encoding it to base64 and I need to run this on Google App Engine in Python. I've had a look around and can't be sure what works in GAE and what doesn't, I'm also finding it hard to get example code of some of those I believe should work...

Help with Rijndael/AES encryption to file

I got this example from msdn and what wondering why it wont decrypt all the text file if I comment out the Rijndael EncryptTextToFile() function. Some good examples would be welcome as I am unsure how to set to 256bit and CBC mode. Thanks using System; using System.Security.Cryptography; using System.Text; using System.IO; class Rijn...

Size of data after AES encryption

I would like to know the size of data after AES encryption so that I can avoid buffering my post-AES data(on disk or memory) mainly for knowing the size. I use 128 bit AES and javax.crypto.Cipher and javax.crypto.CipherInputStream for encryption. A few tests performed with various input sizes show that, the post encryption size calcula...

What's the equivalent of C#'s GetBytes() in Python?

Hi, I have byte[] request = UTF8Encoding.UTF8.GetBytes(requestParams); in a C# AES encryption only class that I'm converting to Python. Can anyone tell me the Python 2.5 equivalent(I'm using this on google app engine? Example inputs: request_params: &r=p&playerid=6263017 (or a combination of query strings) dev_key: GK1FzK12iPYKE9...

Problem using AES and base64_encode the result

Hi, I am trying to encrypt a string then covert it into a base64_encode string to be passed to a website so that it can decrypt it. My functions below dont seem to be working correctly and it won't decrypt the base64_encode string back to the original string. Anyone see the problem? Thanks public static string EncryptToString(stri...

Problem with AES and Cryptopp

Hello, In my app need to encrypt file usign AES. I found some example with Cryptopp. Encryption working good: #include "iostream" #include "cstring" #include "cryptopp/cryptlib.h" #include "cryptopp/filters.h" #include "cryptopp/files.h" #include "cryptopp/sha.h" #include "cryptopp/modes.h" #include "cryptopp/aes.h" #include "cryptopp/...

.NET AES/Rijndael — inconsistent decryption when reusing decryptor

I've created a class for encrypting and decrypting using AES. public class AesEncryptionProvider { #region Fields // Encryption key private static readonly byte[] s_key = new byte[32] { // Omitted... }; // Initialization vector private static readonly byte[] s_iv = new byte[16] { // Omitted... ...