textileio / papers

Textile Whitepapers
12 stars 3 forks source link

Read key encryption #22

Closed jsign closed 4 years ago

jsign commented 5 years ago

https://github.com/textileio/papers/blob/6f6995cc2fb603b751d07ff10cffc6e13243d60a/draft.tex#L510

And also looking at teh Appendix:

// 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?)

carsonfarmer commented 5 years ago

cc @sanderpick

carsonfarmer commented 4 years ago

I think this has now been addressed in text. Please reopen if this is not the case.