alg

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package alg provides base types for addition chain and addition sequence search algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainAlgorithm

type ChainAlgorithm interface {
	// FindChain generates an addition chain ending at target.
	FindChain(target *big.Int) (addchain.Chain, error)

	// String returns a name for the algorithm.
	String() string
}

ChainAlgorithm is a method of generating an addition chain for a target integer.

func AsChainAlgorithm

func AsChainAlgorithm(s SequenceAlgorithm) ChainAlgorithm

AsChainAlgorithm adapts a sequence algorithm to a chain algorithm. The resulting algorithm calls the sequence algorithm with a singleton list containing the target.

type SequenceAlgorithm

type SequenceAlgorithm interface {
	// FindSequence generates an addition chain containing every element of targets.
	FindSequence(targets []*big.Int) (addchain.Chain, error)

	// String returns a name for the algorithm.
	String() string
}

SequenceAlgorithm is a method of generating an addition sequence for a set of target values.

Directories

Path Synopsis
Package algtest provides algorithm test suites.
Package algtest provides algorithm test suites.
Package binary implements generic binary addition chain algorithms.
Package binary implements generic binary addition chain algorithms.
Package contfrac implements addition sequence algorithms based on continued-fraction expansions.
Package contfrac implements addition sequence algorithms based on continued-fraction expansions.
Package dict implements dictionary and run-length addition chain algorithms.
Package dict implements dictionary and run-length addition chain algorithms.
Package ensemble provides a collection of addition chain algorithms intended for target integers of cryptographic interest.
Package ensemble provides a collection of addition chain algorithms intended for target integers of cryptographic interest.
Package exec implements addition chain algorithm execution.
Package exec implements addition chain algorithm execution.
Package heuristic implements heuristic-based addition sequence algorithms with the Bos-Coster Makesequence structure.
Package heuristic implements heuristic-based addition sequence algorithms with the Bos-Coster Makesequence structure.
Package opt implements generic optimizations that remove redundancy from addition chains.
Package opt implements generic optimizations that remove redundancy from addition chains.

Jump to

Keyboard shortcuts

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