?
Solved

file encryption/decryption solution

Posted on 2008-10-12
3
Medium Priority
?
850 Views
Last Modified: 2008-10-27
Do you have any suggestion on encrypting data/configuration files ~1-5mb size (I need to encrypt the files at the server and the c++ client app running on users laptop downloads them via http) and key mangement? I might be able to get way with one set of keys for all clients. suitability of symmetric vs asymmetric, how to mange keys, specific implementations you could recomend. please share if you have any experience.
0
Comment
Question by:ponnen
  • 2
3 Comments
 
LVL 33

Expert Comment

by:Dave Howe
ID: 22705558
Well, files that size you are looking at symmetric - these days there is little reason NOT to use AES in CBC mode, except when the terminal client is very restrictive (certain mobile phones)

However, you are probably best to use a hybrid approach - this is the usual configuration for transporting files, where you in fact send the recipient two things; the first is the file and the second is the key -  which is randomly generated per file, then itself encrypted to the recipient's public key.

That said - you might find it easier and cleaner to just use https and transport the file entirely via that method; that way, the transport level libraries handle the crypto for you, and you need only worry about confirming your server key is correct and leave the rest to automation.
0
 

Author Comment

by:ponnen
ID: 22709336
Thanks Dave.
I need to keep them encrypted on the client as well so I am not looking at TLS (performance of transfer is the issue). Could you suggest API/tools to generate AES and could you elaborate on "CBS mode". Could I use openssl to generate AES key and use them with standard java crypto API ?. Are there c++/C# API's to do decryption given the key on the client side? Could anybody could point to an example... (s it too much to ask for :)

thanks.
0
 
LVL 33

Accepted Solution

by:
Dave Howe earned 750 total points
ID: 22709833
Usually, with java or C# it is recommended you use the much superior Bouncy Castle java libraries - they are compatible with openssl.

http://www.bouncycastle.org/

there are extensive examples given with the libraries.

CBC mode is one of the standard supported modes for AES - in effect, each block becomes dependent not only on the key but the box preceding it, which hides patterns that might be visible at the block level.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation gives a good overview, but tbh its easier to just read it as "EBC leaks data, CBC doesn't so use CBC"

0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes Administrators rights are not enough. These cases call for the SYSTEM account. The process in this article outlines the steps required to execute commands using the SYSTEM account.
Phishing emails are a popular malware delivery vehicle for attack.  While there are many ways for an attacker to increase the chances of success for their phishing emails, one of the most effective methods involves spoofing the message to appear to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question