idemix

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 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

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 New

func New(keyStore bccsp.KeyStore) (*csp, error)

func NewIssuerPublicKey

func NewIssuerPublicKey(pk IssuerPublicKey) *issuerPublicKey

func NewIssuerSecretKey

func NewIssuerSecretKey(sk IssuerSecretKey, exportable bool) *issuerSecretKey

func NewNymPublicKey

func NewNymPublicKey(pk Ecp) *nymPublicKey

func NewNymSecretKey

func NewNymSecretKey(sk Big, pk Ecp, exportable bool) (*nymSecretKey, error)

func NewRevocationPublicKey

func NewRevocationPublicKey(pubKey *ecdsa.PublicKey) *revocationPublicKey

func NewRevocationSecretKey

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

func NewUserSecretKey

func NewUserSecretKey(sk Big, exportable bool) *userSecretKey

Types

type Big

type Big interface {
	Bytes() ([]byte, error)
}

type CredRequest

type CredRequest interface {
	Sign(sk Big, ipk IssuerPublicKey) ([]byte, error)

	Verify(credRequest []byte, ipk IssuerPublicKey) error
}

type Credential

type Credential interface {
	Sign(key IssuerSecretKey, credentialRequest []byte, attributes []bccsp.IdemixAttribute) ([]byte, error)

	Verify(sk Big, ipk IssuerPublicKey, credential []byte, attributes []bccsp.IdemixAttribute) error
}

type CredentialRequestSigner

type CredentialRequestSigner struct {
	CredRequest CredRequest
}

func (*CredentialRequestSigner) Sign

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

type CredentialRequestVerifier

type CredentialRequestVerifier struct {
	CredRequest CredRequest
}

func (*CredentialRequestVerifier) Verify

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

type CredentialSigner

type CredentialSigner struct {
	Credential 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 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 Revocation
}

func (*CriSigner) Sign

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

type CriVerifier

type CriVerifier struct {
	Revocation Revocation
}

func (*CriVerifier) Verify

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

type Ecp

type Ecp interface {
	Bytes() ([]byte, error)
}

type Issuer

type Issuer interface {
	NewKey(AttributeNames []string) (IssuerSecretKey, error)
}

type IssuerKeyGen

type IssuerKeyGen struct {
	Exportable bool

	Issuer Issuer
}

func (*IssuerKeyGen) KeyGen

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

type IssuerPublicKey

type IssuerPublicKey interface {
	Bytes() ([]byte, error)
}

type IssuerSecretKey

type IssuerSecretKey interface {
	Bytes() ([]byte, error)

	Public() IssuerPublicKey
}

type NymKeyDerivation

type NymKeyDerivation struct {
	Exportable bool

	User User
}

func (*NymKeyDerivation) KeyDeriv

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

type NymSignatureScheme

type NymSignatureScheme interface {
	Sign(sk Big, Nym Ecp, RNym Big, ipk IssuerPublicKey, digest []byte) ([]byte, error)

	Verify(pk IssuerPublicKey, Nym Ecp, signature, digest []byte) error
}

type NymSigner

type NymSigner struct {
	NymSignatureScheme NymSignatureScheme
}

func (*NymSigner) Sign

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

type NymVerifier

type NymVerifier struct {
	NymSignatureScheme NymSignatureScheme
}

func (*NymVerifier) Verify

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

type Revocation

type Revocation interface {
	NewKey() (*ecdsa.PrivateKey, error)

	Sign(key *ecdsa.PrivateKey, unrevokedHandles [][]byte, epoch int, alg bccsp.RevocationAlgorithm) ([]byte, error)

	Verify(pk *ecdsa.PublicKey, cri []byte, epoch int, alg bccsp.RevocationAlgorithm) error
}

type RevocationKeyGen

type RevocationKeyGen struct {
	Exportable bool

	Revocation Revocation
}

func (*RevocationKeyGen) KeyGen

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

type SignatureScheme

type SignatureScheme interface {
	Sign(cred []byte, sk Big, Nym Ecp, RNym Big, ipk IssuerPublicKey, attributes []bccsp.IdemixAttribute,
		msg []byte, rhIndex int, cri []byte) ([]byte, error)

	Verify(ipk IssuerPublicKey, signature, msg []byte, attributes []bccsp.IdemixAttribute, rhIndex int, revocationPublicKey *ecdsa.PublicKey, epoch int) error
}

type Signer

type Signer struct {
	SignatureScheme SignatureScheme
}

func (*Signer) Sign

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

type User

type User interface {
	NewKey() (Big, error)

	MakeNym(sk Big, key IssuerPublicKey) (Ecp, Big, error)
}

type UserKeyGen

type UserKeyGen struct {
	Exportable bool

	User User
}

func (*UserKeyGen) KeyGen

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

type Verifier

type Verifier struct {
	SignatureScheme SignatureScheme
}

func (*Verifier) Verify

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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