Generating 2FA One-Time Passwords in JS Using Web Crypto API

Written by khovansky | Published 2019/08/15
Tech Story Tags: 2fa | otp | javascript | web-crypto-api | webdev | latest-tech-stories | freeotp-tool | qr-xupport

TLDR There are two types of OTP-based 2FA: HOTP and TOTP. HMAC-based OTP is a way of proving that a message came from the expected sender and not someone else. HOTP is calculated based on 2 values: secret key shared between client and server, counter or moving factor. Counter is an 8-byte value that is synchronized between the server and client. It will be constantly updated as you generate passwords. In HOTP, client counter is incremented each time a new password is generated and server counter is updated.via the TL;DR App

no story

Published by HackerNoon on 2019/08/15