bridge

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: 10 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 NewRandOrPanic

func NewRandOrPanic() *amcl.RAND

Types

type Big

type Big struct {
	E *FP256BN.BIG
}

func (*Big) Bytes

func (b *Big) Bytes() ([]byte, error)

type CredRequest

type CredRequest struct {
	NewRand func() *amcl.RAND
}

func (*CredRequest) Sign

func (cr *CredRequest) Sign(sk handlers.Big, ipk handlers.IssuerPublicKey, nonce []byte) (res []byte, err error)

func (*CredRequest) Verify

func (*CredRequest) Verify(credentialRequest []byte, ipk handlers.IssuerPublicKey, nonce []byte) (err error)

type Credential

type Credential struct {
	NewRand func() *amcl.RAND
}

func (*Credential) Sign

func (c *Credential) Sign(key handlers.IssuerSecretKey, credentialRequest []byte, attributes []bccsp.IdemixAttribute) (res []byte, err error)

func (*Credential) Verify

func (*Credential) Verify(sk handlers.Big, ipk handlers.IssuerPublicKey, credential []byte, attributes []bccsp.IdemixAttribute) (err error)

type Ecp

type Ecp struct {
	E *FP256BN.ECP
}

func (*Ecp) Bytes

func (o *Ecp) Bytes() ([]byte, error)

type Issuer

type Issuer struct {
	NewRand func() *amcl.RAND
}

func (*Issuer) NewKey

func (i *Issuer) NewKey(attributeNames []string) (res handlers.IssuerSecretKey, err error)

func (*Issuer) NewPublicKeyFromBytes

func (*Issuer) NewPublicKeyFromBytes(raw []byte, attributes []string) (res handlers.IssuerPublicKey, err error)

type IssuerPublicKey

type IssuerPublicKey struct {
	PK *cryptolib.IssuerPublicKey
}

func (*IssuerPublicKey) Bytes

func (o *IssuerPublicKey) Bytes() ([]byte, error)

func (*IssuerPublicKey) Hash

func (o *IssuerPublicKey) Hash() []byte

type IssuerSecretKey

type IssuerSecretKey struct {
	SK *cryptolib.IssuerKey
}

func (*IssuerSecretKey) Bytes

func (o *IssuerSecretKey) Bytes() ([]byte, error)

func (*IssuerSecretKey) Public

type NymSignatureScheme

type NymSignatureScheme struct {
	NewRand func() *amcl.RAND
}

func (*NymSignatureScheme) Sign

func (n *NymSignatureScheme) Sign(sk handlers.Big, Nym handlers.Ecp, RNym handlers.Big, ipk handlers.IssuerPublicKey, digest []byte) (res []byte, err error)

func (*NymSignatureScheme) Verify

func (*NymSignatureScheme) Verify(ipk handlers.IssuerPublicKey, Nym handlers.Ecp, signature, digest []byte) (err error)

type Revocation

type Revocation struct {
}

func (*Revocation) NewKey

func (*Revocation) NewKey() (*ecdsa.PrivateKey, error)

func (*Revocation) Sign

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

func (*Revocation) Verify

func (*Revocation) Verify(pk *ecdsa.PublicKey, criRaw []byte, epoch int, alg bccsp.RevocationAlgorithm) (err error)

type SignatureScheme

type SignatureScheme struct {
	NewRand func() *amcl.RAND
}

func (*SignatureScheme) Sign

func (s *SignatureScheme) Sign(cred []byte, sk handlers.Big, Nym handlers.Ecp, RNym handlers.Big, ipk handlers.IssuerPublicKey, attributes []bccsp.IdemixAttribute,
	msg []byte, rhIndex int, criRaw []byte) (res []byte, err error)

func (*SignatureScheme) Verify

func (*SignatureScheme) Verify(ipk handlers.IssuerPublicKey, signature, digest []byte, attributes []bccsp.IdemixAttribute, rhIndex int, revocationPublicKey *ecdsa.PublicKey, epoch int) (err error)

type User

type User struct {
	NewRand func() *amcl.RAND
}

func (*User) MakeNym

func (u *User) MakeNym(sk handlers.Big, ipk handlers.IssuerPublicKey) (r1 handlers.Ecp, r2 handlers.Big, err error)

func (*User) NewKey

func (u *User) NewKey() (res handlers.Big, err error)

func (*User) NewKeyFromBytes

func (*User) NewKeyFromBytes(raw []byte) (res handlers.Big, err error)

func (*User) NewPublicNymFromBytes

func (*User) NewPublicNymFromBytes(raw []byte) (r handlers.Ecp, err error)

Jump to

Keyboard shortcuts

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