3

I want to develop a simple encryption application for android. Which algorithm should I use to encrypt all data types such as images, office documents, multimedia, etc and why its a good one?

Does AES covers all types of data ?

2 Answers 2

2

AES can encrypt any data that can be represented as a sequence of bytes, so it can encrypt all types of data.

AES has been through a great deal of testing, and nobody has broken it yet. Pretty much every encryption library will include AES, including both Bouncy Castle and Spongy Castle for Android. AES is the standard and is your first choice, unless you have specific reasons for not using it.

Use it in either CBC mode with PKCS7 padding or CTR mode. Yes, if you don't know you will need to learn a bit about block cypher modes and cryptographic padding.

For authentication, if you require it, either use HMAC-SHA256 or GCM mode, which includes authentication.

Sign up to request clarification or add additional context in comments.

1 Comment

thank you so much for your complete answer,it was really helpful.actually im new in android that's why im little bit confuse by the whole process,would you show me some sample of the code too.
1

Yes, I believe you can encrypt everything you want with AES. Just treat all data types as a stream of bytes. No problem here.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.