This document proposes a two-factor authentication system using mobile devices. It uses a combination of one-time passwords (OTP) as the first factor and encrypted user credentials stored on a mobile device as the second factor. An OTP algorithm is developed that uses aspects like the IMEI, IMSI, username, PIN, hour and minute to generate unique passwords. The system can operate in a standalone mode where OTPs are generated locally on devices, or an SMS-based mode where OTPs are requested from the server. Security and usability evaluations show the system protects against attacks while being usable.