Documentation ¶
Index ¶
- Constants
- func NewRecordFactory() serde.Factory
- func RegisterRecordFormats(format serde.Format, engine serde.FormatEngine)
- type AccessKeyFac
- type Calypso
- func (c *Calypso) GetPublicKey() (kyber.Point, error)
- func (c *Calypso) Read(id []byte, idents ...access.Identity) ([]byte, error)
- func (c *Calypso) Setup(ca crypto.CollectiveAuthority, threshold int) (pubKey kyber.Point, err error)
- func (c *Calypso) UpdateAccess(id []byte, ident access.Identity, newAc access.Service) error
- func (c *Calypso) Write(em EncryptedMessage, ac access.Service) ([]byte, error)
- type EncryptedMessage
- type PrivateStorage
- type Record
Constants ¶
const ( // ArcRuleUpdate defines the rule to update the arc. This rule must be set // at the write creation to allow the arc to be latter updated. ArcRuleUpdate = "calypso_update" // ArcRuleRead defines the arc rule to read a value ArcRuleRead = "calypso_read" )
Variables ¶
This section is empty.
Functions ¶
func NewRecordFactory ¶
NewRecordFactory returns a new instance of the record factory.
func RegisterRecordFormats ¶
func RegisterRecordFormats(format serde.Format, engine serde.FormatEngine)
RegisterRecordFormats registers the engine for the provided format.
Types ¶
type AccessKeyFac ¶
type AccessKeyFac struct{}
AccessKeyFac is the key to the access control factory.
type Calypso ¶
type Calypso struct {
// contains filtered or unexported fields
}
Calypso is a wrapper around DKG that provides a private storage
implements calypso.PrivateStorage
func (*Calypso) GetPublicKey ¶
GetPublicKey implements calypso.PrivateStorage
func (*Calypso) Setup ¶
func (c *Calypso) Setup(ca crypto.CollectiveAuthority, threshold int) (pubKey kyber.Point, err error)
Setup implements calypso.PrivateStorage
func (*Calypso) UpdateAccess ¶
UpdateAccess implements calypso.PrivateStorage. It sets a new arc for a given ID, provided the current arc allows the given ident to do so.
type EncryptedMessage ¶
type EncryptedMessage interface { GetK() kyber.Point GetC() kyber.Point }
EncryptedMessage wraps the K, C arguments needed to decrypt a message. K is the ephemeral DH public key and C the blinded secret. The combination of (K, C) should always be uniq, as it is used to compute the storage key.
type PrivateStorage ¶
type PrivateStorage interface { // Setup must be called only ONCE by one of the node to setup the secret // sharing Setup(ca crypto.CollectiveAuthority, threshold int) (pubKey kyber.Point, err error) // GetPublicKey returns the collective public key. Returns an error if the // setup has not been done. GetPublicKey() (kyber.Point, error) Write(message EncryptedMessage, ac access.Service) (ID []byte, err error) Read(ID []byte, idents ...access.Identity) (msg []byte, err error) UpdateAccess(ID []byte, ident access.Identity, ac access.Service) error }
PrivateStorage defines the primitives to run a Calypso-like app. It is mainly a wrapper arround DKG that provides a storage and authorization layer.
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record defines what is stored in the db, which is the secrect and its corresponding access control