genericblinding

package
v0.0.0-...-cc363e2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2015 License: BSD-3-Clause Imports: 2 Imported by: 3

Documentation

Overview

Package genericblinding provides interface definitions for blind signature schemes

Index

Constants

View Source
const (
	// TypeBlindingParamClient data identification
	TypeBlindingParamClient = iota + 1
	// TypeClearMessage data identification
	TypeClearMessage
	// TypeBlindingFactors data identification
	TypeBlindingFactors
	// TypeBlindMessage data identification
	TypeBlindMessage
	// TypeBlindSignature data identification
	TypeBlindSignature
	// TypeClearSignature data identification
	TypeClearSignature
	// TypeBlindingParamServer data identification
	TypeBlindingParamServer
)

Variables

View Source
var (
	// ErrBadScheme is returned if unmarshalling the data for the wrong scheme
	ErrBadScheme = errors.New("blinding: Data does not match scheme")
	// ErrBadType is returned if unmarshalling the data for the wrong scheme
	ErrBadType = errors.New("blinding: Data does not match type")
	// ErrBadSigner is returned if unmarshalling data for a foreign signer
	ErrBadSigner = errors.New("blinding: Foreign signer")
)

Functions

func MatchMessage

func MatchMessage(bd BlindingData, testScheme string, testDataType DataType, testPoint *eccutil.Point) (bool, error)

MatchMessage tests parameters of a BlindingData

Types

type BlindMessage

type BlindMessage BlindingData

BlindMessage is a blind message to be signed

type BlindSignature

type BlindSignature BlindingData

BlindSignature is a blinded signature

type BlindingClient

type BlindingClient interface {
	// Blind a ClearMessage with server-supplied BlindingParamClient
	Blind(BlindingParamClient, ClearMessage) (BlindingFactors, BlindMessage, error)
	// Unblind a BlindSignature of ClearMessage using BlindingFactors
	Unblind(BlindingFactors, ClearMessage, BlindSignature) (ClearSignature, ClearMessage, error)
	// Verify that ClearSignature is a signature of ClearMessage
	Verify(ClearSignature, ClearMessage) (bool, error)
}

BlindingClient implements a blind signature client

type BlindingData

type BlindingData interface {
	// Marshall returns ASN.1 DER encoded data
	Marshal() ([]byte, error)
	// Unmarshall loads data that was produced by Marshall
	Unmarshal([]byte) (BlindingData, error)
	// UniqueID returns a (globally) unique, 32byte ID for this data structure that can be used for duplicate/reuse testing
	UniqueID() []byte
	// Return .
	SchemeData() (string, DataType, *eccutil.Point)
}

BlindingData encapsulates data needed for blinding operations

type BlindingFactors

type BlindingFactors BlindingData

BlindingFactors are blinding factors generated by a BlindingClient

type BlindingParamClient

type BlindingParamClient BlindingData

BlindingParamClient is an encoded set of blinding parameters

type BlindingParamServer

type BlindingParamServer BlindingData

BlindingParamServer is an encoded set of blinding parameters

type BlindingServer

type BlindingServer interface {
	// Generate one-time BlindingParam
	GetParams() (BlindingParamClient, BlindingParamServer, error)
	// Sign a BlindMessage usign BlindingParam
	Sign(BlindingParamServer, BlindMessage) (BlindSignature, error)
}

BlindingServer implements a BlindingServer

type ClearMessage

type ClearMessage BlindingData

ClearMessage is a cleartext message before blinding

type ClearSignature

type ClearSignature BlindingData

ClearSignature is an unblinded Signature

type DataType

type DataType int

DataType is the type of data encoded in a BlindingData

Jump to

Keyboard shortcuts

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