Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidMAC - the mac was invalid ErrInvalidMAC = errors.New("binding MAC didn't match derived MAC") // ErrInvalidBatchProof - the batch proof was invalid ErrInvalidBatchProof = errors.New("new batch proof for signed tokens is invalid") )
Functions ¶
func ApproveTokens ¶
func ApproveTokens(blindedTokens []*crypto.BlindedToken, key *crypto.SigningKey) ([]*crypto.SignedToken, *crypto.BatchDLEQProof, error)
ApproveTokens applies the issuer's secret key to each token in the request. It returns an array of marshaled approved values along with a batch DLEQ proof.
func VerifyTokenRedemption ¶
func VerifyTokenRedemption(preimage *crypto.TokenPreimage, signature *crypto.VerificationSignature, payload string, keys []*crypto.SigningKey) error
VerifyTokenRedemption checks a redemption request against the observed request data and MAC according a set of keys. keys keeps a set of private keys that are ever used to sign the token so we can rotate private key easily Returns nil on success and an error on failure.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.