// Event represents the content of an update.
// Note: In practice, this is encrypted with the Read Key.
type Event interface {
ipld.Node
// Header provides a means to store a timestamp
// and a key needed for decryption.
Header() EventHeader
// Body contains the content of an update.
// In practice, this is encrypted with the Header key
// or the recipient’s public key.
Body() ipld.Node
// Decrypt is a helper function that decrypts Body
// with a key in Header.
Decrypt() (ipld.Node, error)
}
// EventHeader contains Event metadata.
type EventHeader interface {
ipld.Node
// Time is the wall-clock time at which the Event
// was created.
Time() int
// Key is an optional single-use symmetric key
// used to encrypt Body.
Key() []byte
}
The definition says it encrypts the content-key, but the Event interface seems to indicate is the whole byte serialization of the Event (not only the EventHeader?)
https://github.com/textileio/papers/blob/6f6995cc2fb603b751d07ff10cffc6e13243d60a/draft.tex#L510
And also looking at teh Appendix:
The definition says it encrypts the content-key, but the
Event
interface seems to indicate is the whole byte serialization of the Event (not only theEventHeader
?)