* use protobuf for encryption-header * use fixed size file-header (42 bytes) before the encryption-header * add encryption/decryption contexts * teach MakePrivateKey() to fixup its internal public key bits
23 lines
517 B
Protocol Buffer
23 lines
517 B
Protocol Buffer
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;
|
|
|
|
message header {
|
|
uint32 chunk_size = 1;
|
|
bytes salt = 2;
|
|
repeated wrapped_key keys = 3;
|
|
}
|
|
|
|
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
|
|
}
|