tweakable

package
v0.0.0-...-84468b9 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Simple = "simple"
	Robust = "robust"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sha256Tweak

type Sha256Tweak struct {
	Variant             string
	MessageDigestLength int
	N                   int
}

func (*Sha256Tweak) F

func (h *Sha256Tweak) F(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte

Tweakable hash function F

func (*Sha256Tweak) H

func (h *Sha256Tweak) H(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte

Tweakable hash function H

func (*Sha256Tweak) Hmsg

func (h *Sha256Tweak) Hmsg(R []byte, PKseed []byte, PKroot []byte, M []byte) []byte

Keyed hash function Hmsg

func (*Sha256Tweak) PRF

func (h *Sha256Tweak) PRF(SEED []byte, adrs *address.ADRS) []byte

Pseudorandom function PRF

func (*Sha256Tweak) PRFmsg

func (h *Sha256Tweak) PRFmsg(SKprf []byte, OptRand []byte, M []byte) []byte

Pseudorandom function PRFmsg

func (*Sha256Tweak) T_l

func (h *Sha256Tweak) T_l(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte

Tweakable hash function T_l

type Shake256Tweak

type Shake256Tweak struct {
	Variant             string
	MessageDigestLength int
	N                   int
}

func (*Shake256Tweak) F

func (h *Shake256Tweak) F(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte

Tweakable hash function F

func (*Shake256Tweak) H

func (h *Shake256Tweak) H(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte

Tweakable hash function H

func (*Shake256Tweak) Hmsg

func (h *Shake256Tweak) Hmsg(R []byte, PKseed []byte, PKroot []byte, M []byte) []byte

Keyed hash function Hmsg

func (*Shake256Tweak) PRF

func (h *Shake256Tweak) PRF(SEED []byte, adrs *address.ADRS) []byte

Pseudorandom function PRF

func (*Shake256Tweak) PRFmsg

func (h *Shake256Tweak) PRFmsg(SKprf []byte, OptRand []byte, M []byte) []byte

Pseudorandom function PRFmsg

func (*Shake256Tweak) T_l

func (h *Shake256Tweak) T_l(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte

Tweakable hash function T_l

type TweakableHashFunction

type TweakableHashFunction interface {
	Hmsg(R []byte, PKseed []byte, PKroot, M []byte) []byte
	PRF(SEED []byte, adrs *address.ADRS) []byte
	PRFmsg(SKprf []byte, OptRand []byte, M []byte) []byte
	F(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte
	H(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte
	T_l(PKseed []byte, adrs *address.ADRS, tmp []byte) []byte
}

Jump to

Keyboard shortcuts

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