signing

package
Version: v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package signing provides implements the signing scheme used in MAM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(digests Trits, spongeFunc ...SpongeFunction) (Trits, error)

Address generates the address trits from the given digests. Optionally takes the SpongeFunction to use. Default is Kerl.

func Digest

func Digest(bundleHash []int8, signatureFragment Trits, startOffset int, spongeFunc ...SpongeFunction) (Trits, error)

Digest computes the digest derived from the signature fragment and bundle hash. Optionally takes the SpongeFunction to use. Default is Kerl.

func Digests

func Digests(key Trits, spongeFunc ...SpongeFunction) (Trits, error)

Digests hashes each segment of each key fragment 26 times and returns them. Optionally takes the SpongeFunction to use. Default is Kerl.

func GetSecurityLevel

func GetSecurityLevel(hashTrits Trits) (secLvl SecurityLevel, err error)

func Key

func Key(subseed Trits, securityLevel SecurityLevel, spongeFunc ...SpongeFunction) (Trits, error)

Key computes a new private key from the given subseed using the given security level. Optionally takes the SpongeFunction to use. Default is Kerl.

func SignatureFragment

func SignatureFragment(bundleHash Trits, keyFragment Trits, startOffset int, spongeFunc ...SpongeFunction) (Trits, error)

SignatureFragment returns signed fragments using the given bundle hash and key fragment. Optionally takes the SpongeFunction to use. Default is Kerl.

func Subseed

func Subseed(seed Trytes, index uint64, spongeFunc ...SpongeFunction) (Trits, error)

Subseed takes a seed and an index and returns the given subseed. Optionally takes the SpongeFunction to use. Default is Kerl.

func ValidateSignatures

func ValidateSignatures(expectedAddress Hash, fragments Trytes, bundleHash Hash, spongeFunc ...SpongeFunction) (bool, error)

ValidateSignatures validates the given signature fragments by checking whether the digests computed from the bundle hash and fragments equal the passed address. Optionally takes the SpongeFunction to use. Default is Kerl.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL