Documentation ¶
Overview ¶
Package bbssig implements the BBS, short group signatures scheme as detailed in http://crypto.stanford.edu/~dabo/papers/groupsigs.pdf.
Group signatures are a variation on traditional public-key signatures in that there are many different private-keys that can create valid signatures. Holders of these private keys are called members, and a signature from any member is indistinguishable from any other, from the point of view of the public key.
However, there is also a group private key, which differs from the member private keys. The group private key can create new member private keys, and can open signatures and discover which member created the signature.
This implementation of group signatures also supports revocation of member private keys. The group private key can produce a public 'revocation' of a member private key. A revocation can be combined with the group, and with each member private key to produce an updated group and updated private keys. Signatures under the old keys are invalid under the new but, critically, the revoked private key cannot be updated due to a divisor becoming zero.
This form of revocation is complicated, but avoids deanonymising all previous signatures from the revoked member.
Index ¶
- Constants
- type Group
- type MemberKey
- type PrivateKey
- func (priv *PrivateKey) GenerateRevocation(mem *MemberKey) *Revocation
- func (priv *PrivateKey) Marshal() []byte
- func (priv *PrivateKey) NewMember(r io.Reader) (*MemberKey, error)
- func (priv *PrivateKey) Open(sig []byte) ([]byte, bool)
- func (priv *PrivateKey) Unmarshal(g *Group, b []byte) (*PrivateKey, bool)
- type Revocation
Constants ¶
const SignatureSize = 12 * 32
SignatureSize is the size, in bytes, of the signatures produced by this package. (3072 bits.)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group represents a public key in the group signature scheme. Signatures by the group members can be verified given the Group.
func (*Group) Unmarshal ¶
Unmarshal sets g to the result of unmarshaling b and returns both g and a bool that is true on success. Since Group contains some precomputed values that aren't included in the serialisation, Unmarshal does significant computation.
func (*Group) Update ¶
func (g *Group) Update(r *Revocation)
Update alters g to create a new Group that includes all previous members, save a specifically revoked member.
type MemberKey ¶
type MemberKey struct { *Group // contains filtered or unexported fields }
MemberKey represents a member private key. It is capable of signing messages such that nobody, save the holder of the group private key, can determine which member of the group made the signature.
func (*MemberKey) Tag ¶
Tag returns an opaque byte slice that identifies the member private key for the purposes of comparing against the result of Open.
func (*MemberKey) Unmarshal ¶
Unmarshal sets mem to the result of unmarshaling b and returns both mem and a bool that is true on success.
func (*MemberKey) Update ¶
func (mem *MemberKey) Update(r *Revocation) bool
Update alters mem to create a member private key for an updated Group. (Note that the Group of mem must also be updated.) This functions returns false if mem is the member private key that has been revoked.
type PrivateKey ¶
type PrivateKey struct { *Group // contains filtered or unexported fields }
PrivateKey represents a group private key. The holder of the private key can create new group members and can reveal which member created a given signature.
func GenerateGroup ¶
func GenerateGroup(r io.Reader) (*PrivateKey, error)
GenerateGroup generates a new group and group private key.
func (*PrivateKey) GenerateRevocation ¶
func (priv *PrivateKey) GenerateRevocation(mem *MemberKey) *Revocation
GenerateRevocation creates a Revocation that revokes the given member private key.
func (*PrivateKey) Marshal ¶
func (priv *PrivateKey) Marshal() []byte
Marshal serializes priv to a slice of bytes, suitable for Unmarshal.
func (*PrivateKey) NewMember ¶
func (priv *PrivateKey) NewMember(r io.Reader) (*MemberKey, error)
NewMember creates a new member private key for the group.
func (*PrivateKey) Open ¶
func (priv *PrivateKey) Open(sig []byte) ([]byte, bool)
Open reveals which member private key made the given signature. The return value will match the result of calling Tag on the member private key in question.
func (*PrivateKey) Unmarshal ¶
func (priv *PrivateKey) Unmarshal(g *Group, b []byte) (*PrivateKey, bool)
Unmarshal sets priv to the result of unmarshaling b and returns both priv and a bool that is true on success.
type Revocation ¶
type Revocation struct {
// contains filtered or unexported fields
}
Revocation represents a revocation of a member private key. A Revocation can be applied to update a member private key and also to a group to create a new group that does not include the revoked member.
func (*Revocation) Marshal ¶
func (r *Revocation) Marshal() []byte
Marshal serializes r to a slice of bytes, suitable for Unmarshal.
func (*Revocation) Unmarshal ¶
func (r *Revocation) Unmarshal(b []byte) (*Revocation, bool)