otphyp

package module
v0.0.0-...-bd7fff9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

otp-hyp

otp-hyp is a purpose built implementation of One-Time-Passwords for HYP (Hide Your Ports). It supports generating secret keys, as well as time-based 64 bits of spread spectrum output using the secret key.

References
  • RFC 4226 - HOTP: An HMAC-Based One-Time Password Algorithm
  • RFC 6238 - TOTP: Time-Based One-Time Password Alogorithm

Documentation

Overview

Package otphyp is a loose implementation of hotp standard RFC4226 it is not a full hotp implementation and only contains specific features required for hyp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePorts

func GeneratePorts(sharedSecret string, t time.Time) (ports [4]uint16, err error)

A loose implementation of hotp meant for our specific purposes of generating four random port numbers Accepts a base32 encoded shared secret and a time

func GenerateSecret

func GenerateSecret() (sharedSecret string, err error)

GenerateSecret creates a new 20 byte base32 encoded secret for use with GeneratePorts The recommended flow is: 1. Generate the secret 2. Save the secret to a file 3. Distribute the secret to a client

Types

This section is empty.

Jump to

Keyboard shortcuts

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