android - Authenticating mobile device -


i'm developing client-server application, client applications run on mobile devices (android, ios) , communicate server via http protocol. mobile applications available free @ market , multiple users using same application instance on same device.

i need authenticate each request server , i need authenticate device, not user , practically in possession of device.

i've worked arround solution:

after installing application:

let's presume done on secure network:

  1. an administrator (not regular user) runs application on given device , uses app's authentication form once (filling login , password).
  2. server authenticates administrator , sends secret device key , "public" device id specific device.
  3. server stores device key , device id.
  4. device stores device key in secure storage , device id wherever.

now device has own "credentials".

with each client request:

  1. client requests request key. request contains device id.
  2. server genenerates request key, stores along device id , sends client.
  3. client sends request data device id , hash of (the data + request key + device key) , signs request.
  4. server checks hash. server invalidates request key.

my questions:

  1. presuming secure storage exists: how secure approach be?

  2. is there secure storage nobody (but application) can read in ios , android? provide links study (especially android). depend on rooting device?


some notes:

i believe request key, client needs prove knowledge of secret device key (without request key hacker send again intercepted data). since device key sent on secure network, can not intercepted , since stored in secure storage can not stolen device.

however expect there no 100% secure storage (minimally on android) , if device rooted secret device key can stolen. storing encrypted makes harder hacker - need decompile client application , find how decrypt it.


edit: little change in suggested approach (there security gap), added notes , other minor details.

http://developer.android.com/reference/android/accounts/accountmanager.html think know this. keytool , self signed certificates? didn't much.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -