Solved

file encryption/decryption solution

Posted on 2008-10-12
3
821 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 250 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

One of the biggest threats facing all high-value targets are APT's.  These threats include sophisticated tactics that "often starts with mapping human organization and collecting intelligence on employees, who are nowadays a weaker link than network…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

825 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