Documentation ¶
Overview ¶
Package signing provides functions for creating and validating essential cryptographic components in IOTA, such as subseeds, keys, digests and signatures.
Index ¶
- func Address(digests Trits, spongeFunc ...SpongeFunction) (Trits, error)
- func Digest(normalizedBundleHashFragment []int8, signatureFragment Trits, ...) (Trits, error)
- func Digests(key Trits, spongeFunc ...SpongeFunction) (Trits, error)
- func NormalizedBundleHash(bundleHash Hash) []int8
- func SignatureAddress(fragments []Trytes, hashToSign Hash, spongeFunc ...SpongeFunction) (Hash, error)
- func SignatureFragment(normalizedBundleHashFragment Trits, keyFragment Trits, ...) (Trits, error)
- func Subseed(seed Trytes, index uint64, spongeFunc ...SpongeFunction) (Trits, error)
- func ValidateSignatures(expectedAddress Hash, fragments []Trytes, bundleHash Hash, ...) (bool, error)
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(normalizedBundleHashFragment []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 ¶
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. |