All Projects → remjey → luaotp

remjey / luaotp

Licence: MIT License
A simple implementation of OATH-HOTP and OATH-TOTP written for Lua

Programming Languages

lua
6591 projects

Labels

Projects that are alternatives of or similar to luaotp

elixir-fire-brigade-workshop
Workshop "Join the Elixir Fire Brigade - Level-up Your Elixir Debugging Skills" (ElixirConf US 2017)
Stars: ✭ 14 (-46.15%)
Mutual labels:  otp
throttle
Erlang/OTP application to rate limit resource access
Stars: ✭ 40 (+53.85%)
Mutual labels:  otp
react-native-sms-user-consent
React Native wrapper for Android's SMS User Consent API, ready to use in React Native apps with minimum effort.
Stars: ✭ 45 (+73.08%)
Mutual labels:  otp
nitrokey-storage-firmware
Firmware for the Nitrokey Storage device
Stars: ✭ 53 (+103.85%)
Mutual labels:  otp
ticker-phoenix
Elixir Phoenix Stock Quotes API (IEX Trading)
Stars: ✭ 15 (-42.31%)
Mutual labels:  otp
macos-receiver
A MacOS TabBar (StatusBar) application that securely receives one-time passwords (OTPs) that you tapped in Raivo for iOS.
Stars: ✭ 44 (+69.23%)
Mutual labels:  otp
supervisorring
otp/supervisor-like interface to supervise distributed processes
Stars: ✭ 15 (-42.31%)
Mutual labels:  otp
OneTime
iOS, watchOS, & macOS One-Time Password client
Stars: ✭ 14 (-46.15%)
Mutual labels:  otp
rustotpony
🐴 RusTOTPony — CLI manager of one-time password generators aka Google Authenticator
Stars: ✭ 18 (-30.77%)
Mutual labels:  otp
PassCodeText
A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customizability.
Stars: ✭ 105 (+303.85%)
Mutual labels:  otp
php-totp
HOTP and TOTP token generation
Stars: ✭ 33 (+26.92%)
Mutual labels:  otp
ArubaOTP-seed-extractor
Extract TOTP seed instead of using ArubaOTP app
Stars: ✭ 23 (-11.54%)
Mutual labels:  otp
Xshell-OTP
Xshell Semi-Automatic complete One-time Password login
Stars: ✭ 29 (+11.54%)
Mutual labels:  otp
yubico-rs
Yubikey client API library, Challenge-Response & Configuration
Stars: ✭ 39 (+50%)
Mutual labels:  otp
otp-tutorial
Introductory tutorial (approx. 3 hours) covering the setup and querying of an OpenTripPlanner instance
Stars: ✭ 85 (+226.92%)
Mutual labels:  otp
rabbit
Build Elixir applications with RabbitMQ
Stars: ✭ 36 (+38.46%)
Mutual labels:  otp
mimo-ce
MIMO Community Edition
Stars: ✭ 20 (-23.08%)
Mutual labels:  otp
woocommerce-otpbank-payment-gateway
WooCommerce Payment Gateway for OTP Bank (Hungary)
Stars: ✭ 20 (-23.08%)
Mutual labels:  otp
Firebase-Phone-Auth-Demo
Demo Project to show how to use Phone Authentication in Flutter with Firebase backend
Stars: ✭ 75 (+188.46%)
Mutual labels:  otp
passwordless
Passwordless authentication server, supports OTP, WebAuthn, plan to implement TOTP and mobile biometric authentication
Stars: ✭ 34 (+30.77%)
Mutual labels:  otp

luaotp

A simple implementation of OATH-HOTP and OATH-TOTP. It is distributed under the terms of the MIT licence.

Description

This is a simple OATH-HOTP and OATH-TOTP implementation in pure lua that makes use of LuaCrypto for its hashing needs. It can be used as a generation and verification library and is compatible with the RFCs 4226 and 6238. It only supports the SHA-1 hashing algorithm (as specified in the RFCs).

It is possible to export and import the keys in a short ASCII format for easy storing in databases or text files.

It is also possible to export a key to a standard URL format that will work with otpauth:// aware clients and can be simply converted to a QR code to be scanned by mobile clients.

Example

HOTP sample code that creates a shared secret and iterates over asking and testing codes from the user until it encounters a blank line.

The counter is incremented with each successful verification, so one code can't be used twice.

local otp = require"otp"

local hotp = otp.new_hotp()

print"Use this URL to configure your OATH-HOTP client:"
print(hotp:get_url("luaotp sample", "user"))

while true do
  print"Type in a code:"
  local code = io.stdin:read"*l"
  if not code or code == "" then break end

  if hotp:verify(code) then
    print"This code is valid!"
  else
    print"This code is invalid."
  end
end

Documentation

The documentation can be found in the doc folder.


Jérémy Farnaud

If you like this project, you can either Flattr or donate on Liberapay.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].