views:

65

answers:

2

i want to implement following scenario Client Application will have function which will 1)get a image as parameter 2)convert it into byte of array 3)encrypt it call a web service and pass this byte of array to that service

Service Will have a function which will 1)recieve byte of array as parameter 2)decrypt it it 3)generate image from that byte of array.

1)what i should use to encrypt data and how is there any sample application or article which can help me. 2)symmetric or asymmetric encryption 3)any issue which i will face

+4  A: 

Depending on whether you have a key exchange problem, you could use either symmetric (faster) or asymmetric (don't need a secure channel to exchange keys) encryption. In either case, you should be using a well-tested crypto library and not trying to roll your own from crypto primitives.

More importantly, you need to ask yourself why you're doing this encryption yourself instead of letting HTTPS handle it. If all you need is a secure channel, you're extremely unlikely to be able to do a better job than HTTPS.

Hank Gay
+1 For the mention of HTTPS
tschaible
Forgot about asym.
Will
A: 

It if the sole purpose of the encryption is to pass the object over the wire - than use a standard encryption provided by WCF (or whatever communication foundation you use). You don't need to deal with it yourself.

in WCF you'll have to install certificate so if there is unlimited number of clients it wouldn't be good practice.

if you want to implement your own encryption - there are plenty of APIs for that - but your real problem will be key management (which is actually the same problem as before...)

For choosing Symmetric or a-Symmetric - again - it will be derived from your key management options

Dani