Share
Embed
Secure data in Android
Internal Workshop carried out at Team Technologies. Main goal was to develop sample application based on google fingerprint API.
Yakiv Mospan
August 21, 2017
Transcript
47 slides
-
Secure data in Android Remember to hard reset when you
leave your device Yakiv Mospan Author, Android Developer @ Team Technologies Svyatoslav Hromyak Android Developer @ Team Technologies -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Financial data Credentials Sensitive data Plain Text Algorithm Asymmetric Symmetric RSA EC AES DES -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Financial data Credentials Sensitive data Algorithm Asymmetric Symmetric Plain Text RSA EC AES DES -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Financial data Credentials Algorithm Asymmetric Symmetric Plain Text Sensitive data RSA EC AES DES Personal life information, physical or mental health details, criminal or civil offences, private photos, private user documents, etc. -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Credentials Algorithm Asymmetric Symmetric Plain Text Sensitive data Financial data RSA EC AES DES Accounts, transactions, reports, credit card information, etc. -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Algorithm Asymmetric Symmetric Plain Text Sensitive data Financial data Credentials RSA EC AES DES Usernames, passwords, touch pincodes, fingerprint data, and all other stuff that can provide access to data above. -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Asymmetric Symmetric Plain Text Algorithm RSA EC AES DES Financial data Credentials Sensitive data -
Financial data Credentials Sensitive data How it works Symmetric Plain
Text Algorithm Key sh7aertsca.. Сipher text Asymmetric Secret key Private key Public key RSA EC AES DES The oldest and best-known technique. The encryption key and the decryption key are the same. -
How it works Asymmetric Symmetric Financial data Credentials Sensitive data
Plain Text Algorithm Key Secret key Private key Public key sh7aertsca.. Сipher text RSA EC AES DES A modern branch of cryptography. also known as public-key cryptography in which the algorithms employ a pair of keys (a public key and a private key) and use a different component of the pair for different steps of the algorithm. -
How it works Asymmetric Symmetric AES Financial data Credentials Sensitive
data Plain Text Algorithm Key Secret key Private key Public key sh7aertsca.. Сipher text RSA EC DES -
How it works Symmetric AES DES Financial data Credentials Sensitive
data Plain Text Algorithm Key Secret key Private key Public key sh7aertsca.. Сipher text Asymmetric RSA EC -
How it works Asymmetric Symmetric RSA AES DES Financial data
Credentials Sensitive data Plain Text Algorithm Key Secret key Private key Public key sh7aertsca.. Сipher text EC -
How it works Asymmetric Symmetric RSA EC AES DES Financial
data Credentials Sensitive data Plain Text Algorithm Key Secret key Private key Public key sh7aertsca.. Сipher text -
How it works Key Financial data Credentials Sensitive data Plain
Text Algorithm sh7aertsca.. Сipher text Secret key Private key Public key Asymmetric Symmetric RSA EC AES DES -
How it works Asymmetric Secret key Financial data Credentials Sensitive
data Plain Text Key sh7aertsca.. Сipher text Private key Public key RSA EC AES DES A single secret key which is used in conventional symmetric encryption to encrypt and decrypt a message. Algorithm Symmetric -
How it works Private key Public key Sensitive data Plain
Text Key sh7aertsca.. Сipher text Algorithm Financial data Credentials Symmetric RSA EC AES DES Asymmetric Secret key Asymmetric Key Pair. -
Algorithm How it works Private key Financial data Credentials Sensitive
data Plain Text Symmetric Key sh7aertsca.. Сipher text RSA EC AES DES A single secret key which is used in conventional symmetric encryption which is used to encrypt and decrypt a message. Asymmetric Secret key Public key -
Algorithm How it works Private key Financial data Credentials Sensitive
data Plain Text Symmetric Key sh7aertsca.. Сipher text RSA EC AES DES The public component of a pair of cryptographic keys used for encryption in asymmetric cryptography. Asymmetric Secret key Public key -
Сipher text How it works Key Financial data Credentials Sensitive
data Plain Text Algorithm Asymmetric Symmetric RSA EC AES DES sh7aertsca.. Secret key Private key Public key -
Key How it works Secret key Private key Public key
sh7aertsca.. Сipher text Financial data Credentials Sensitive data Plain Text Algorithm Asymmetric Symmetric RSA EC AES DES Cipher Output -
Financial data Credentials Sensitive data Algorithm Key How it works
Asymmetric Symmetric Secret key Private key Public key sh7aertsca.. Plain Text Сipher text RSA EC AES DES -
Android builds on the Java Cryptography Architecture (JCA), that provides
API for digital signatures, certificates, encryption, keys generation and management. -
KeyPair Generator Architecture Certificate Provider Key Store Keys Secure Random
Cipher Key Generator -
KeyPair Generator Architecture Certificate Key Store Keys Secure Random Cipher
Key Generator Provider Provides the public API for generating symmetric cryptographic keys. -
KeyPair Generator Architecture Certificate Key Store Keys Secure Random Cipher
Key Generator Provider An engine class which is capable of generating a private key and its related public key utilizing the algorithm it was initialized with. -
KeyPair Generator Architecture Certificate Key Store Keys Secure Random Cipher
Key Generator Provider Generates cryptographically secure pseudo-random numbers. -
Architecture Certificate Key Store Keys Cipher Provider KeyPair Generator Secure
Random Key Generator Keys created with Generators. -
Architecture Certificate Key Store Keys Cipher Provider KeyPair Generator Secure
Random Key Generator Database with a well secured mechanism of data protection, that is used to save, get and remove keys. -
Architecture Certificate Key Store Keys Cipher Provider KeyPair Generator Secure
Random Key Generator Certificate used to validate and save asymmetric keys. -
KeyPair Generator Architecture Certificate Provider Key Store Keys Secure Random
Key Generator Cipher Provides access to implementations of cryptographic ciphers for encryption and decryption. -
KeyPair Generator Architecture Certificate Key Store Keys Secure Random Cipher
Key Generator Provider Defines a set of extensible implementations - independent API’s. -
KeyPair Generator Architecture Certificate Provider Key Store Keys Secure Random
Cipher Key Generator -
AndroidKeyStore JCA Provider implementation Android 18 + Key material never
enters the application process Key material may be bound to the secure hardware Asymmetric keys available from 18 + Symmetric keys available from 23 + -
Goals Build application based on Android Fingerprint Sample Use JCA
to show how to use encryption in Android Use encryption to save protected passwords Use fingerprint get access to protected keys Use confirm credentials to protect application overall -
Using newest environment Android Studio 3.0 Android 18+ Kotlin AndroidKeyStore
API Fingerprint API Confirm Credentials API Safety Net API -
Task list Ensure that device is secured with password Ensure
that fingerprint was added Support devices without fingerprint Provide possibility to enter user password Create user password hash and save it Use fingerprint api to protect password Add possibility to encrypt and decrypt user passwords with fingerprint api Add possibility to save encrypted passwords Add possibility to save encrypted passwords Add possibility to retrieve saved passwords Add “Test Encryption” screen Add possibility to generate different key types Add possibility to encrypt/decrypt data with generated keys -
Environment setup Go to http://github.com Search for Team Technologies organization
Search for security-workshop-sample project Follow the instructions from Readme