AeroGear Security OTP - draft 0.0.1
This is a initial proposal on having a two factor authentication layer on mobile applications.
- RFC 6238 - TOTP specification
- RFC 4226 - HOTP specification
- RFC 2898 - Password-Based Cryptography Specification
Scenarios - v0.0.1
Random Generation: secrets are generated randomly at provisioning stage and must be stored immediately and kept secure during their life cycle. - RFC 4226
After installing the application, the user will be able to create your own account. Before the HTTP request is sent to the server, mobile application applies a key derivation function which generates the secret shared key (SHA-1, SHA-256 or SHA-512) based on RFC 2898:
Secret shared key: user data + time + interval
- user data: login, password
- time: current time (UTC)
- interval: represents the time in seconds, since the elapsed time.
The secret key will be stored on device for the calculation of a one-time password value. When the first request comes to the server it runs the same algorithm to generate the secret, store it and validate the OTP.
After a user has entered the login and password, mobile application will retrieve the secret from storage for the OTP calculation and send it back to the server. The server will retrieve the secret locally and validate the OTP.
Scenarios - v0.0.2
Deterministic Generation: secrets are derived from a master seed, both at provisioning and verification stages and generated on-the-fly whenever it is required. - RFC 4226
Shared Secret key expiration
Note: I'd like to have it on the specific projects roadmap.
AeroGear Security (server)
- Integration with PicketBox
- Add OTP validation to our endpoints
- Improve our persistence model to store the secret key
- Start the implementation of OTP storage
- Generate dynamic secrets
- OTP generation
- Register users against our current endpoints
- Bug fixes and improvements based on feedback
- Integration with the current libraries
- PoC with our current TODO app
- Start PhoneGap plugin
- Rebase against the master
- Project documentation
- PhoneGap plugin improvements
- API review and improvements
- Examples and documentation review
These libraries are optional and the development will be done in parallel in a separated branch.
- Who will be on it?
abstractj the slacker and of course anyone who wants to help with code review, test and documentation.