Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypt data between C#, ANDROID and IPHONE

I'm developing a application to Windows(C#), Iphone, Android and Iphone which will connect to a SOAP WebService, that store information on a Database.

I'm looking for a way to encrypt/decrypt the information between those platforms. Is there any cross platforms library?

like image 838
Michel Avatar asked Sep 26 '11 12:09

Michel


People also ask

Is between end to end encrypted?

End-to-end encryption (E2EE) is a method of secure communication that prevents third parties from accessing data while it's transferred from one end system or device to another. In E2EE, the data is encrypted on the sender's system or device, and only the intended recipient can decrypt it.

What are the three 3 different encryption methods?

The various encryption types. The three major encryption types are DES, AES, and RSA.

What is encrypt in C?

The encrypt() function uses an array of 16 48-bit keys produced by the setkey() function to encode bytes specified by the block argument according to the Data Encryption Standard (DES) encryption algorithm or to decode argument bytes according to the DES decryption algorithm.

What is the best way to encrypt data?

Common Data Encryption Methods The two most widely used methods for data encryption are public key, also known as asymmetric encryption and private key, or symmetric encryption. Both rely on key pairs, but they differ in the way the sending and receiving parties share the keys and handle the encrypt/decrypt process.


1 Answers

As @Sascha says, AES is available on pretty much every platform. What you have to do is to make sure that everything else is the same on both platforms:

  1. The same mode; use either CBC or CTR mode.
  2. The same IV; set it explicitly, don't use the default because it will often be different on different systems.
  3. The same key; obvious, but they need to be the same at the byte level because text can be encoded differently on different systems. Explicitly state the encoding you are using.
  4. The same padding; for AES use PKCS7, again don't rely on the default which may be different on different systems.

Whatever you chose do set things explicitly and don't rely on defaults. Defaults can differ between systems and any difference will cause decryption to fail.

like image 89
rossum Avatar answered Sep 18 '22 00:09

rossum