sigtool/sign/hdr.proto

34 lines
868 B
Protocol Buffer
Raw Permalink Normal View History

syntax="proto3";
//import "gogoproto/gogo.proto"
package sign;
//option (gogoproto.marshaler_all) = true;
//option (gogoproto.sizer_all) = true;
//option (gogoproto.unmarshaler_all) = true;
//option (gogoproto.goproto_getters_all) = false;
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.
*/
message header {
uint32 chunk_size = 1;
bytes salt = 2;
repeated wrapped_key keys = 3;
}
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.
*/
message wrapped_key {
bytes pk_hash = 1; // hash of Ed25519 PK
bytes pk = 2; // curve25519 PK
bytes nonce = 3; // AEAD nonce
bytes key = 4; // AEAD encrypted key
}