2019-10-17 14:29:01 -07:00
|
|
|
syntax="proto3";
|
|
|
|
|
|
|
|
|
2023-11-23 21:06:30 -08:00
|
|
|
option go_package = "internal/pb";
|
2019-10-17 14:29:01 -07:00
|
|
|
|
|
|
|
|
2020-02-15 11:15:38 -08:00
|
|
|
/*
|
|
|
|
* Every encrypted file starts with a header describing the
|
|
|
|
* Block Size, Salt, Recipient keys etc. Header represents a
|
|
|
|
* decoded version of this information. It is encoded in
|
|
|
|
* protobuf format before writing to disk.
|
|
|
|
*/
|
2019-10-17 14:29:01 -07:00
|
|
|
message header {
|
2022-11-13 11:53:00 -08:00
|
|
|
uint32 chunk_size = 1; // encryption block size
|
|
|
|
bytes salt = 2; // master salt (nonces are derived from this)
|
|
|
|
bytes pk = 3; // ephemeral curve PK
|
|
|
|
bytes sender = 4; // sender signed artifacts
|
|
|
|
repeated wrapped_key keys = 5; // list of wrapped receiver blocks
|
2019-10-17 14:29:01 -07:00
|
|
|
}
|
|
|
|
|
2020-02-15 11:15:38 -08:00
|
|
|
/*
|
|
|
|
* A file encryption key is wrapped by a recipient specific public
|
|
|
|
* key. WrappedKey describes such a wrapped key.
|
|
|
|
*/
|
2019-10-17 14:29:01 -07:00
|
|
|
message wrapped_key {
|
2022-11-13 11:53:00 -08:00
|
|
|
bytes d_key = 1; // encrypted data key
|
|
|
|
bytes nonce = 2; // nonce used for encryption
|
2019-10-17 14:29:01 -07:00
|
|
|
}
|
2022-11-13 11:53:00 -08:00
|
|
|
|