Edit: Update - I am researching how to implement AES with authentication in an efficient way for this project. If you have the time I'd appreciate your skill in finding the best implementation for this FOSS project.
Could you folks review and comment on the encryption code I just posted on Codeplex? The intent is to use this as a foundation for encrypting Azure Table properties and prevent any unauthorized MSFT employee from casually browsing or editing my data. It's a working sample that should use any public private key pair on your local system. Just make sure you set permissions on your private key correctly.
For Azure Table, I want to encrypt each and every property below (including rowkey and partitionkey) using a symmetric key.
public class ContactDataModel :TableServiceEntity
{
public ContactDataModel(string partitionKey, string rowKey)
: base(partitionKey, rowKey)
{
}
public ContactDataModel(): this(Guid.NewGuid().ToString(), String.Empty)
{
}
public string Name { get; set; }
public string Address { get; set; }
// Used to rotate keys, while allowing old data to still be read
public int EncryptionVersion {get;set;}
}
I intend to store the encrypted version of the symmetric key, and the nonencrypted IV on Azure Table storage. The overall design assumes that an encrypted symmetric key renders all other encrypted table data useless, even if the IV is available.
The symmetric key is encrypted with a RSA key that is securely delivered to my Azure Role instance.
Known issues:
I do know that I'm missing a seed in my symmetric encryption. How would I implement this from a Crypto perspective?