Documentation ¶
Index ¶
- type BBSSignFunc
- type Crypto
- func (c *Crypto) ComputeMAC(data []byte, kh interface{}) ([]byte, error)
- func (c *Crypto) Decrypt(cipher, aad, nonce []byte, kh interface{}) ([]byte, error)
- func (c *Crypto) DeriveProof(messages [][]byte, bbsSignature, nonce []byte, revealedIndexes []int, ...) ([]byte, error)
- func (c *Crypto) Encrypt(msg, aad []byte, kh interface{}) ([]byte, []byte, error)
- func (c *Crypto) Sign(msg []byte, kh interface{}) ([]byte, error)
- func (c *Crypto) SignMulti(messages [][]byte, kh interface{}) ([]byte, error)
- func (c *Crypto) UnwrapKey(recWK *cryptoapi.RecipientWrappedKey, kh interface{}, ...) ([]byte, error)
- func (c *Crypto) Verify(signature, msg []byte, kh interface{}) error
- func (c *Crypto) VerifyMAC(mac, data []byte, kh interface{}) error
- func (c *Crypto) VerifyMulti(messages [][]byte, signature []byte, kh interface{}) error
- func (c *Crypto) VerifyProof(revealedMessages [][]byte, proof, nonce []byte, signerPubKH interface{}) error
- func (c *Crypto) WrapKey(cek, apu, apv []byte, recPubKey *cryptoapi.PublicKey, ...) (*cryptoapi.RecipientWrappedKey, error)
- type DeriveProofFunc
- type SignFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BBSSignFunc ¶ added in v0.1.6
BBSSignFunc mocks Crypto's BBSSign() function, it's useful for executing custom BBS+ signing with the help of Signing private Key.
type Crypto ¶
type Crypto struct { EncryptValue []byte EncryptNonceValue []byte EncryptErr error DecryptValue []byte DecryptErr error SignValue []byte SignKey []byte SignFn SignFunc SignErr error VerifyErr error ComputeMACValue []byte ComputeMACErr error VerifyMACErr error WrapValue *cryptoapi.RecipientWrappedKey WrapError error UnwrapValue []byte UnwrapError error BBSSignValue []byte BBSSignKey []byte BBSSignFn BBSSignFunc BBSSignErr error BBSVerifyErr error VerifyProofErr error DeriveProofValue []byte DeriveProofKey []byte DeriveProofFn DeriveProofFunc DeriveProofError error }
Crypto mock.
func (*Crypto) ComputeMAC ¶ added in v0.1.3
ComputeMAC returns a mocked value and a mocked error.
func (*Crypto) DeriveProof ¶ added in v0.1.6
func (c *Crypto) DeriveProof(messages [][]byte, bbsSignature, nonce []byte, revealedIndexes []int, signerPubKH interface{}) ([]byte, error)
DeriveProof returns a mocked BBS+ signature proof value and a mocked error. returns:
signature proof in []byte error in case of errors
func (*Crypto) SignMulti ¶ added in v0.1.6
SignMulti returns a mocked BBS+ signature value and a mocked error.
func (*Crypto) UnwrapKey ¶ added in v0.1.5
func (c *Crypto) UnwrapKey(recWK *cryptoapi.RecipientWrappedKey, kh interface{}, wrapKeyOpts ...cryptoapi.WrapKeyOpts) ([]byte, error)
UnwrapKey returns a mocked value.
func (*Crypto) VerifyMulti ¶ added in v0.1.6
VerifyMulti returns a mocked BBS+ verify result. returns:
error in case of errors or nil if signature verification was successful
func (*Crypto) VerifyProof ¶ added in v0.1.6
func (c *Crypto) VerifyProof(revealedMessages [][]byte, proof, nonce []byte, signerPubKH interface{}) error
VerifyProof returns a mocked BBS+ verify signature proof result. returns:
error in case of errors or nil if signature proof verification was successful
type DeriveProofFunc ¶ added in v0.1.6
DeriveProofFunc mocks Crypto's DeriveProofFunc() function, it's useful for executing custom BBS+ signing with the help of Signing public Key.