I have an embedded board with a very limited processing and memory resource. I would like to control the board using an android app.

The users are categorized into 3 groups:

  1. owner of the board.

  2. admins of the board.

  3. normal user.

The owner has total control on the board and can define the admins. Admins can invite the users and give some permissions to normal users to work with the board. Everything has a time meaning that the given permission has a start date and end date, beyond the period the permissions won't work!

Said the problem, I am looking for a wise while low overhead authorization and authentication techniques.

Some major questions:

  1. The keys/tokens should be generated inside the mobile app or by the board? for some reason I prefer to generate the tokens inside the mobile app... whats pros, cons of this approach?

  2. For time: it should be included in the token (e.g., JWT) or it should be saved in the board?

  3. Do we need a kind of database for users and their role in the board or not? due to limited resource I would like to only store the tokens rather than user information like ID, token, etc. Is it possible or not?

  4. For encryption of the line, each pair of (board, admin/user/owner), we need to have a different public/private key or not?

  5. For generation of token in mobile app, we need a key. This key should be common among admins or not?

  6. If the key (for token generation), is common among admins, in case owner wants to remove on the admin, what happens? How can I get the key back from the admin?

  7. In order to prevent the replay, how can I implement challenge and response technique?

  • How limited are the resources: how much RAM is there? How much read-write persistent storage? Is asymmetric cryptography possible in acceptable time? What threats do you want to protect against? (In particular, are physical attacks a concern? If so you'll need to say a lot more about what physical protection the board has.) Do you have a trusted server somewhere that the board is connected to permantently, or at least to validate admin commands? How do you expect to recover from the theft of the owner's phone? – Gilles 'SO- stop being evil' Nov 2 '15 at 19:00
  • You've jumped forward into implementation already but you need to step back a bit and define your threat model first. – Gilles 'SO- stop being evil' Nov 2 '15 at 19:01
  • Ineed, I could not change the BOM. It was given to me ;) Regarding the hardware it is a Cortex M3 withe the following spec: 48-MHz Clock Speed 128KB of In-System Programmable Flash, 8KB of SRAM for Cache, 20KB of Ultralow-Leakage SRAM, 128-bit AES co-processor. I have a server which is going to be used only as a message broker. We are not allowed to save the users or anything on the server. Physical attack is out of our scope. In case of theft, the owner should be able to use another phone (with a master key probably) to remove the previous phone from the trusted list. – user2867237 Nov 2 '15 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.