encryption

C# Can't generate initialization vector IV

Hi, I get the following error when I try to create a IV initialization vector for TripleDES encryptor. Please see the code example: TripleDESCryptoServiceProvider tripDES = new TripleDESCryptoServiceProvider(); byte[] key = Encoding.ASCII.GetBytes("SomeKey132123ABC"); byte[] v4 = key; byte[] connectionString = Encoding.ASCII.GetBytes...

Http with Encryption from Client to Server and Server to Client

Here is a scenario: Desktop application Installed from the web Needs to call a WCF webservice Transferred data needs to be encrypted from Client to Server and Server to Client Is there a well understood solution for this that is: Secure Easy to manage and deploy I guess what this comes down to firstly is whether https encryption ...

Exception in AES decryption algorithm in java

Hi, I got an exception in the following code for AES algorithm in java. Code decryptes an encrypted string and returns the original string. Plz help me to fix this. Code: public class AES { public byte[] encrypted; public byte[] original; public String originalString; public static String asHex (byte buf[]) { StringBuffe...

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

How many bytes are IV and Keys for AES?

I'm using AESCryptoServiceProvider in C#/.Net Framework and I'm wondering how large, in bytes, the IV and Keys are. I'm pretty sure that this class follows the specifications of AES so if anyone has any ideas, I'd be happy to hear it :) ...

Is SignedObject safe to deliver to client applications

SignedObject (Serializable object, PrivateKey signingKey, Signature signingEngine) Is it safe to serialize and deliver this object to a client application? Is there a way that they might get hold of the PrivateKey through reflection? I want to use this object to hold a digital signature as well as the data that was signed. ...

Database encryption

I have a database that contains user details including sensitive data. They're not as sensitive as financial, but they are sensitive nonetheless. The passwords to the accounts are hashed and salted but the rest can only be encrypted not hashed to allow editing. How far would you go encrypting the fields? Would you go as far as encrypti...

MySQL encryption library similar to SQLCipher

I'm working on encrypting some database fields. By encrypting of course I lose some search functionality. I found this library called SQLCipher which handles the encryption at the database level, but it's for SQLite. Is there something similar for MySQL? ...

Flash & C# encryption

Hello all, I am creating a TCP connect with Flash to a C# daemon. Now I have come to the part of encryption... I know that Flash is decompilable and so not safe to store private keys on. I need 2 way encryption because of the messages that have to be send back to the Flash client. I have been thinking and googling, but cannot find a...

Problem in retrieving a decrypted data

Hello everyone, I am working on encryption-decryption program. Program gets an input from the user and encrypts it. Then it stores the encrypted data in ms access database table. Later, the data is retrieved from the table , decrypted and given back to the user. I am storing the data as text in the ms access. The encryption algorithm r...

Java encryption alternitive to hardcoded key

I am new to encryption. I have looked at the javax.crypto documentation and got encryption of a file to work using this code ... File saveFile = new File("Settings.set"); saveFile.delete(); FileOutputStream fout = new FileOutputStream(saveFile); //Encrypt the settings //Generate a key byte key[]...

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

How to encrypt a serialized XML and store in registry

I'm trying to encrypt a serialized XML document and store it in the registry. I was wondering on how to accomplish that? I am able to store a non-serialized XML document in the registry by converting the XMLdoc to a byte array, but I'm not sure on how to do it for a serialized XML. My XML serialization example: using System.Xml.Seria...

Should I write my own licensing program or are there any good, ready made solutions?

I am going to be developing a desktop application in C++ that I'd like to protect by requiring a license file. My initial idea was to have 2 executables. One would the actual program that I ran some sort of symmetric encryption on and the second executable would decrypt and run the program using a license file on the user's computer. Ho...

How to implement c=m^e mod n for enormous numbers?

Hi, I'm trying to figure out how to implement RSA crypto from scratch (just for the intellectual exercise), and i'm stuck on this point: For encryption, c = me mod n Now, e is normally 65537. m and n are 1024-bit integers (eg 128-byte arrays). This is obviously too big for standard methods. How would you implement this? I've been rea...

How to encrypt connection string in SubSonic 3.0

I use SubSonic v.3 for my data access and I want to know how can I encryption my connection string in App.config used by SubSonic. ...

Is database encryption less safe than application encryption?

I receive data, and use aes or blowfish to encrypt it before saving it to the database, so the encryption is done at the application level. If someone steals the database, the data will be relatively safe unless they stole the application also (where the key is stored/accessed). I'm now looking into database encryption with libraries l...

CP-ABE and ABE API

Is there any Java or .Net implementation (API) available for Ciphertext-Policy Attribute-Based Encryption or for Attribute-Based Encryption ...

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

MCRYPT_DEV_RANDOM always the same

I'm using MCRYPT_DEV_RANDOM and MCRYPT_DEV_URANDOM as part of blowfish encryption, but I'm noticing it outputs the same random digit every time. It differs from machine to machine, but it's the same in each machine. Is this normal? Does it affect the strength of the initialization vector (IV) I generate with it? ...