suite

package
v0.0.0-...-64dd8ac Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidProof is returned by Verifier.VerifyProof when the given proof is
	// invalid.
	ErrInvalidProof = errors.New("data integrity proof invalid")
	// ErrProofTransformation is returned by Signer.CreateProof and
	// Verifier.VerifyProof when proof transformation fails.
	ErrProofTransformation = errors.New("error in data integrity proof transformation")
)

Functions

This section is empty.

Types

type RequiresCreated

type RequiresCreated interface {
	RequiresCreated() bool
}

RequiresCreated specifies that a data integrity suite implementation, must provide a method that tells the caller whether this suite requires the proof.Created field to exist.

type Signer

type Signer interface {
	// CreateProof performs data integrity proof creation steps: transform, hash,
	// and proof generation, using this implementation's cryptographic suite.
	CreateProof(doc []byte, opts *models.ProofOptions) (*models.Proof, error)
	RequiresCreated
}

Signer is an implementation of a data integrity cryptographic suite that provides the transform, hash, and proof generation steps of the data integrity Add Proof algorithm.

type SignerInitializer

type SignerInitializer interface {
	Signer() (Signer, error)
	Type
}

SignerInitializer initializes a Signer, using initialization options that were passed into the SignerInitializer's creation.

type Suite

type Suite interface {
	Signer
	Verifier
}

Suite implements a data integrity cryptographic suite for both proof creation and proof verification.

type Type

type Type interface {
	Type() string
}

Type provides a method that returns the cryptographic suite type of the corresponding suite. Each suite has a type constant that's defined in its associated specification.

type Verifier

type Verifier interface {
	// VerifyProof performs data integrity proof verification steps: transform,
	// hash, and proof verification, using this implementation's cryptographic
	// suite.
	VerifyProof(doc []byte, proof *models.Proof, opts *models.ProofOptions) error
	RequiresCreated
}

Verifier is an implementation of a data integrity cryptographic suite that provides the transform, hash, and proof verification steps of the data integrity Verify Proof algorithm.

type VerifierInitializer

type VerifierInitializer interface {
	Verifier() (Verifier, error)
	Type
}

VerifierInitializer initializes a Verifier, using initialization options that were passed into the VerifierInitializer's creation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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