handlers

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Overview

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIssuerPublicKey

func NewIssuerPublicKey(pk types.IssuerPublicKey) *issuerPublicKey

func NewIssuerSecretKey

func NewIssuerSecretKey(sk types.IssuerSecretKey, exportable bool) *issuerSecretKey

func NewNymPublicKey

func NewNymPublicKey(pk *math.G1, translator idemix.Translator) *nymPublicKey

func NewRevocationPublicKey

func NewRevocationPublicKey(pubKey *ecdsa.PublicKey) *revocationPublicKey

func NewRevocationSecretKey

func NewRevocationSecretKey(sk *ecdsa.PrivateKey, exportable bool) *revocationSecretKey

Types

type BlindCredentialRequestSigner

type BlindCredentialRequestSigner struct {
	CredRequest types.BlindCredRequest
}

func (*BlindCredentialRequestSigner) Sign

func (c *BlindCredentialRequestSigner) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) ([]byte, error)

type BlindCredentialRequestVerifier

type BlindCredentialRequestVerifier struct {
	CredRequest types.BlindCredRequest
}

func (*BlindCredentialRequestVerifier) Verify

func (c *BlindCredentialRequestVerifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

type CredentialRequestSigner

type CredentialRequestSigner struct {
	// CredRequest implements the underlying cryptographic algorithms
	CredRequest types.CredRequest
}

CredentialRequestSigner produces credential requests

func (*CredentialRequestSigner) Sign

func (c *CredentialRequestSigner) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) ([]byte, error)

type CredentialRequestVerifier

type CredentialRequestVerifier struct {
	// CredRequest implements the underlying cryptographic algorithms
	CredRequest types.CredRequest
}

CredentialRequestVerifier verifies credential requests

func (*CredentialRequestVerifier) Verify

func (c *CredentialRequestVerifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

type CredentialSigner

type CredentialSigner struct {
	Credential types.Credential
}

func (*CredentialSigner) Sign

func (s *CredentialSigner) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) (signature []byte, err error)

type CredentialVerifier

type CredentialVerifier struct {
	Credential types.Credential
}

func (*CredentialVerifier) Verify

func (v *CredentialVerifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (valid bool, err error)

type CriSigner

type CriSigner struct {
	Revocation types.Revocation
}

func (*CriSigner) Sign

func (s *CriSigner) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) ([]byte, error)

type CriVerifier

type CriVerifier struct {
	Revocation types.Revocation
}

func (*CriVerifier) Verify

func (v *CriVerifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

type IssuerKeyGen

type IssuerKeyGen struct {
	// exportable is a flag to allow an issuer secret key to be marked as exportable.
	// If a secret key is marked as exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// Issuer implements the underlying cryptographic algorithms
	Issuer types.Issuer
}

IssuerKeyGen generates issuer secret keys.

func (*IssuerKeyGen) KeyGen

func (g *IssuerKeyGen) KeyGen(opts bccsp.KeyGenOpts) (k bccsp.Key, err error)

type IssuerKeyImporter

type IssuerKeyImporter struct {
	// exportable is a flag to allow an issuer secret key to be marked as exportable.
	// If a secret key is marked as exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// Issuer implements the underlying cryptographic algorithms
	Issuer types.Issuer
}

IssuerKeyImporter imports issuer public keys

func (*IssuerKeyImporter) KeyImport

func (i *IssuerKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type IssuerPublicKeyImporter

type IssuerPublicKeyImporter struct {
	// Issuer implements the underlying cryptographic algorithms
	Issuer types.Issuer
}

IssuerPublicKeyImporter imports issuer public keys

func (*IssuerPublicKeyImporter) KeyImport

func (i *IssuerPublicKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type NymKeyDerivation

type NymKeyDerivation struct {
	// Exportable is a flag to allow an issuer secret key to be marked as Exportable.
	// If a secret key is marked as Exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// User implements the underlying cryptographic algorithms
	User types.User

	Translator idemix.Translator
}

NymKeyDerivation derives nyms

func (*NymKeyDerivation) KeyDeriv

func (kd *NymKeyDerivation) KeyDeriv(k bccsp.Key, opts bccsp.KeyDerivOpts) (dk bccsp.Key, err error)

type NymKeyImporter

type NymKeyImporter struct {
	Exportable bool
	// User implements the underlying cryptographic algorithms
	User types.User

	Translator idemix.Translator
}

NymKeyImporter imports nym public keys

func (*NymKeyImporter) KeyImport

func (i *NymKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type NymPublicKeyImporter

type NymPublicKeyImporter struct {
	// User implements the underlying cryptographic algorithms
	User types.User

	Translator idemix.Translator
}

NymPublicKeyImporter imports nym public keys

func (*NymPublicKeyImporter) KeyImport

func (i *NymPublicKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type NymSecretKey

type NymSecretKey struct {
	// SKI of this key
	Ski []byte
	// Sk is the idemix reference to the nym secret
	Sk *math.Zr
	// Pk is the idemix reference to the nym public part
	Pk *math.G1
	// Exportable if true, sk can be exported via the Bytes function
	Exportable bool

	Translator idemix.Translator
}

NymSecretKey contains the nym secret key

func NewNymSecretKey

func NewNymSecretKey(sk *math.Zr, pk *math.G1, translator idemix.Translator, exportable bool) (*NymSecretKey, error)

func (*NymSecretKey) Bytes

func (k *NymSecretKey) Bytes() ([]byte, error)

func (*NymSecretKey) Private

func (*NymSecretKey) Private() bool

func (*NymSecretKey) PublicKey

func (k *NymSecretKey) PublicKey() (bccsp.Key, error)

func (*NymSecretKey) SKI

func (k *NymSecretKey) SKI() []byte

func (*NymSecretKey) Symmetric

func (*NymSecretKey) Symmetric() bool

type NymSigner

type NymSigner struct {
	NymSignatureScheme types.NymSignatureScheme
}

func (*NymSigner) Sign

func (s *NymSigner) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) ([]byte, error)

type NymVerifier

type NymVerifier struct {
	NymSignatureScheme types.NymSignatureScheme
}

func (*NymVerifier) Verify

func (v *NymVerifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

type RevocationKeyGen

type RevocationKeyGen struct {
	// exportable is a flag to allow an revocation secret key to be marked as exportable.
	// If a secret key is marked as exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// Revocation implements the underlying cryptographic algorithms
	Revocation types.Revocation
}

RevocationKeyGen generates revocation secret keys.

func (*RevocationKeyGen) KeyGen

func (g *RevocationKeyGen) KeyGen(opts bccsp.KeyGenOpts) (bccsp.Key, error)

type RevocationKeyImporter

type RevocationKeyImporter struct {
	// exportable is a flag to allow an revocation secret key to be marked as exportable.
	// If a secret key is marked as exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// Revocation implements the underlying cryptographic algorithms
	Revocation types.Revocation
}

RevocationKeyImporter imports revocation key

func (*RevocationKeyImporter) KeyImport

func (i *RevocationKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type RevocationPublicKeyImporter

type RevocationPublicKeyImporter struct {
}

RevocationPublicKeyImporter imports revocation public key

func (*RevocationPublicKeyImporter) KeyImport

func (i *RevocationPublicKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type Signer

type Signer struct {
	SignatureScheme types.SignatureScheme
}

func (*Signer) Sign

func (s *Signer) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) ([]byte, error)

type UserKeyGen

type UserKeyGen struct {
	// Exportable is a flag to allow an issuer secret key to be marked as Exportable.
	// If a secret key is marked as Exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// User implements the underlying cryptographic algorithms
	User types.User
}

func (*UserKeyGen) KeyGen

func (g *UserKeyGen) KeyGen(opts bccsp.KeyGenOpts) (bccsp.Key, error)

type UserKeyImporter

type UserKeyImporter struct {
	// Exportable is a flag to allow a secret key to be marked as Exportable.
	// If a secret key is marked as Exportable, its Bytes method will return the key's byte representation.
	Exportable bool
	// User implements the underlying cryptographic algorithms
	User types.User
}

UserKeyImporter import user keys

func (*UserKeyImporter) KeyImport

func (i *UserKeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)

type UserSecretKey

type UserSecretKey struct {
	// Sk is the idemix reference to the User key
	Sk *math.Zr
	// Exportable if true, sk can be exported via the Bytes function
	Exportable bool
}

UserSecretKey contains the User secret key

func NewUserSecretKey

func NewUserSecretKey(sk *math.Zr, exportable bool) *UserSecretKey

func (*UserSecretKey) Bytes

func (k *UserSecretKey) Bytes() ([]byte, error)

func (*UserSecretKey) Private

func (*UserSecretKey) Private() bool

func (*UserSecretKey) PublicKey

func (k *UserSecretKey) PublicKey() (bccsp.Key, error)

func (*UserSecretKey) SKI

func (k *UserSecretKey) SKI() []byte

func (*UserSecretKey) Symmetric

func (*UserSecretKey) Symmetric() bool

type Verifier

type Verifier struct {
	SignatureScheme types.SignatureScheme
}

func (*Verifier) AuditNymEid

func (v *Verifier) AuditNymEid(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

func (*Verifier) AuditNymRh

func (v *Verifier) AuditNymRh(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

func (*Verifier) Verify

func (v *Verifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

Jump to

Keyboard shortcuts

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