totp

package
v0.0.0-...-ba55b63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenTOTP

func GenTOTP(key string, epoch []byte) ([]byte, error)

GenTOTP (sk, C_T) -> \tau On input the secret key sk and a time counter C_T, it computes the TOTP result \tau at counter C_T

func Int64ToBytes

func Int64ToBytes(value int64) []byte

func KeyGenTOTP

func KeyGenTOTP() string

KeyGenTOTP TOTPGen() -> sk On input a security parameter 1^lambda, it generates a secret key $sk$.

func VerifyTOTP

func VerifyTOTP(key string, code []byte, epoch []byte) bool

VerifyTOTP (sk, \tau, C_T) -> {0, 1} On input the secret key sk, the time counter C_T and TOTP result \tau, it outputs true if and only if \tau = TOTPGen(sk, C_T).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL