This repo is a collection of code samples that supplement the official documentation, explaining how to correctly implement common cryptographic operations on Android.
Note
This is still WIP. The collection of code samples will be continuously updated with other cryptographic algorithms and more advanced use cases.
- What key size should I use for AES?
- What key size should I use for RSA?
- What is AAD in AES-GCM and what is it used for?
- What padding should be used for AES-CBC?
- Why should I use Base64 for encoding?
- What are the reasons to consider utilizing biometrics paired with a CryptoObject?
- Why should I avoid using 'pure' cryptographic hash functions for password hashing?
- What is the main difference between Keystore and Keychain?
- What is the purpose of salt in Key Derivation?
- Is HMAC-SHA1 still considered secure?
- AES-CBC
- AES-ECB
- AES-GCM
- Android Keystore
- Authenticated Encryption
- Biometric Security Measure Methodology
- Block Cipher Mode Of Operation
- Crypto Storage Cheat Sheet
- Cryptographic Hash Function
- Digital Signature
- HMAC
- Initialization Vector
- Key derivation
- Message Digest
- Message Authentication Code
- Padding
- Public-Key Cryptography
- PBKDF2
- PRNG
- RSA
- Salt
- Semantic Security
- Symmetric Cryptography