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 ¶
var ( // ErrInvalidCommitment occurs when the commitment doesn't match the profile. ErrInvalidCommitment = errors.New("invalid commitment") )
Functions ¶
func GenCommitmentKey ¶
GenCommitmentKey generates a commitment key for use in Commit. This key must be kept secret in order to prevent an adversary from learning what data has been committed to by a commitment. To unseal and verify a commitment, provide this key, along with the data under commitment to the client.
In Key Transparency, the user generates this key, creates a commitment, and signs it. The user uploads the signed commitment along with this key and the associated data to the server in order for the server to reveal the associated data to senders. This commitment scheme keeps the associated data from leeking to anyone that has not explicitly requested it from the server.
Types ¶
This section is empty.