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 ¶
- func NewIssuerPublicKey(pk types.IssuerPublicKey) *issuerPublicKey
- func NewIssuerSecretKey(sk types.IssuerSecretKey, exportable bool) *issuerSecretKey
- func NewNymPublicKey(pk *math.G1, translator idemix.Translator) *nymPublicKey
- func NewRevocationPublicKey(pubKey *ecdsa.PublicKey) *revocationPublicKey
- func NewRevocationSecretKey(sk *ecdsa.PrivateKey, exportable bool) *revocationSecretKey
- type BlindCredentialRequestSigner
- type BlindCredentialRequestVerifier
- type CredentialRequestSigner
- type CredentialRequestVerifier
- type CredentialSigner
- type CredentialVerifier
- type CriSigner
- type CriVerifier
- type IssuerKeyGen
- type IssuerKeyImporter
- type IssuerPublicKeyImporter
- type NymKeyDerivation
- type NymKeyImporter
- type NymPublicKeyImporter
- type NymSecretKey
- type NymSigner
- type NymVerifier
- type RevocationKeyGen
- type RevocationKeyImporter
- type RevocationPublicKeyImporter
- type Signer
- type UserKeyGen
- type UserKeyImporter
- type UserSecretKey
- type Verifier
- func (v *Verifier) AuditNymEid(k types.Key, signature, digest []byte, opts types.SignerOpts) (bool, error)
- func (v *Verifier) AuditNymRh(k types.Key, signature, digest []byte, opts types.SignerOpts) (bool, error)
- func (v *Verifier) Verify(k types.Key, signature, digest []byte, opts types.SignerOpts) (bool, error)
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 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
}
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) SKI ¶
func (k *NymSecretKey) SKI() []byte
func (*NymSecretKey) Symmetric ¶
func (*NymSecretKey) Symmetric() bool
type NymSigner ¶
type NymSigner struct {
NymSignatureScheme types.NymSignatureScheme
SmartcardNymSignatureScheme types.SmartcardNymSignatureScheme
}
type NymVerifier ¶
type NymVerifier struct {
NymSignatureScheme types.NymSignatureScheme
SmartcardNymSignatureScheme types.SmartcardNymSignatureScheme
}
func (*NymVerifier) Verify ¶
func (v *NymVerifier) Verify(k types.Key, signature, digest []byte, opts types.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
}
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) SKI ¶
func (k *UserSecretKey) SKI() []byte
func (*UserSecretKey) Symmetric ¶
func (*UserSecretKey) Symmetric() bool
type Verifier ¶
type Verifier struct {
SignatureScheme types.SignatureScheme
}