Using Google Authenticator with an Arduino

Lego One Time Password

Google Authenticator is an app that generates one time passwords (OTPs). These passwords are often used as a second factor of authentication, along with your normal password. OTPs work by having a shared secret and a synchronized clock on two devices. When you generate the password, a hash based on the secret and timestamp is created. This proves that you have access to the secret, and can only be used once.

To secure his Lego mini-figures, [Luca] built an authentication system using Google Authenticator and Arduino. A web app is used to generate a secret that can be configured into the Arduino using an array, and into Google Authenticator using a QR code. The Arduino is using a library that implements Time-based One Time Password authentication (TOTP).

There are some challenges, including keeping a good clock source on the Arduino, but this look like an interesting way to do authentication. After the break, watch a quick video overview of the project (for English captions, hit the CC button).

4 thoughts on “Using Google Authenticator with an Arduino

  1. I’ve been wanting to do a setup like this for my garage door, but haven’t been able to find a cheap outdoor keypad. Would be trivial to add/revoke access, program in when people are allowed access, etc.

    1. Good outdoor keypads are a bit pricey, I’ve had to spec them out before and we ended up paying about $60 for a weather resistant one.

      There’s a bit more work to do for access control. Each person would have to have a unique secret, and the device would need to manage all of those. Definitely doable though!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s