Documentation ¶
Overview ¶
Package commitments implements a cryptographic commitment.
Commitment scheme is as follows: T = HMAC(fixedKey, "Key Transparency Commitment" || 16 byte nonce || message) message is defined as: len(userID) || userID || data
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidCommitment occurs when the commitment doesn't match the profile. ErrInvalidCommitment = errors.New("invalid commitment") )
Functions ¶
Types ¶
type Committer ¶
type Committer interface { // Write saves a cryptographic commitment and associated data. Write(ctx context.Context, commitment []byte, committed *tpb.Committed) error // Read looks up a cryptograpic commitment and returns associated data. Read(ctx context.Context, commitment []byte) (*tpb.Committed, error) }
Committer saves cryptographic commitments.
Click to show internal directories.
Click to hide internal directories.