1

I'm making a IOS and a Android App with the option to send a Mail to my company for contact or whatever, now i was looking for a way to make that email encrypted, is this possible or will i found a dead end?

I've searched google, blogs, stackoverflow etc, the only thing what i found where different Apps that send email encrypted but that is not the way i'm looking for i think, the mail is sending from my App, not from another App..

Many thanks!

RajaReddy PolamReddy
  • 22,428
  • 19
  • 115
  • 166
Marvin
  • 35
  • 2
  • 6
  • 1
    Encrypt (just as anything would be encrypted). Put in email. Send. - Which part is the issue? I would recommend [asymmetric (public-key) encryption](http://en.wikipedia.org/wiki/Public-key_cryptography) so people can't steal the key in the application and use it for decryption (this won't prevent spoofing, but it will prevent sniffing). –  Nov 22 '12 at 07:57
  • http://stackoverflow.com/questions/3127267/asymmetric-crypto-on-android , http://stackoverflow.com/questions/6069369/rsa-encryption-difference-between-java-and-android –  Nov 22 '12 at 08:03

2 Answers2

1

You can encrypt the data using an external library. Then you can put the data in an email and send it.

Here's a good encryption technique using AES 128 cypher:

http://www.androidsnippets.com/encryptdecrypt-strings

Update:

Referring the comment from pst, I agree that asymmetric key encryption is better in this case.

For asymmetric key encryption, you can use RSA like so:

Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");

It has different modes and schemes you can use it with. So you might want to read up on these:

http://www.di-mgt.com.au/rsa_alg.html#pkcs1schemes http://scienceblogs.com/goodmath/2009/01/08/cryptographic-padding-in-rsa/

Also see the Cipher class in andorid: http://developer.android.com/reference/javax/crypto/Cipher.html

Anup Cowkur
  • 20,443
  • 6
  • 51
  • 84
  • AES is likely a poor choice here because it is symmetric. If someone gets access to the key in the application they can decrypt the email data. –  Nov 22 '12 at 08:00
0

you cannot via API say that mail should apply some encryption automagically. you have to do this and then put that into the mail

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135