signing

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package signing provides functions for creating and validating essential cryptographic components in IOTA, such as subseeds, keys, digests and signatures.

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(normalizedHashFragment []int8, signatureFragment Trits, spongeFunc ...SpongeFunction) (Trits, error)

Digest computes the digest derived from the signature fragment and normalized 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 NormalizedBundleHash

func NormalizedBundleHash(bundleHash Hash) []int8

NormalizedBundleHash normalizes the given bundle hash, with resulting digits summing to zero.

func SignatureAddress

func SignatureAddress(fragments []Trytes, hashToSign Hash, spongeFunc ...SpongeFunction) (Hash, error)

SignatureAddress computes the address corresponding to the given signature fragments. Optionally takes the SpongeFunction to use. Default is Kerl.

func SignatureFragment

func SignatureFragment(normalizedBundleHashFragment Trits, keyFragment Trits, 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.

Directories

Path Synopsis
Package key provides functions to derive private keys from the provided entropy, e.g.
Package key provides functions to derive private keys from the provided entropy, e.g.
Package sponge provides an interface for the sponge functions in IOTA.
Package sponge provides an interface for the sponge functions in IOTA.

Jump to

Keyboard shortcuts

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