Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
grump.proto
It has these top-level messages:
Header Packet Signature PublicKey PrivateKey EncryptedData HandshakeA HandshakeB
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptedData ¶
type EncryptedData struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Ciphertext []byte `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` }
Data encrypted with ChaCha290Poly1305.
func (*EncryptedData) ProtoMessage ¶
func (*EncryptedData) ProtoMessage()
func (*EncryptedData) Reset ¶
func (m *EncryptedData) Reset()
func (*EncryptedData) String ¶
func (m *EncryptedData) String() string
type HandshakeA ¶
type HandshakeA struct {
Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
}
The first half of a handshake.
func (*HandshakeA) ProtoMessage ¶
func (*HandshakeA) ProtoMessage()
func (*HandshakeA) Reset ¶
func (m *HandshakeA) Reset()
func (*HandshakeA) String ¶
func (m *HandshakeA) String() string
type HandshakeB ¶
type HandshakeB struct { Presecret []byte `protobuf:"bytes,1,opt,name=presecret,proto3" json:"presecret,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
The second half of a handshake.
func (*HandshakeB) ProtoMessage ¶
func (*HandshakeB) ProtoMessage()
func (*HandshakeB) Reset ¶
func (m *HandshakeB) Reset()
func (*HandshakeB) String ¶
func (m *HandshakeB) String() string
type Header ¶
type Header struct { // For each intended recipient of the message, a copy of the message key is // added here, encrypted with the HKDF-SHA-512 output of the X25519 shared // secret produced with the author's private key and the recipient's public // key. // // The recipients of a message are not identified via metadata. To decrypt a // session key, the recipients must iterate through the keys and try // decrypting each of them. Unused, random keys may be added to this set to // confound additional metadata analysis. Keys []*EncryptedData `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` }
The header is the first structure in a Grump message, and contains a set of encrypted copies of the message key.
func (*Header) GetKeys ¶
func (m *Header) GetKeys() []*EncryptedData
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
type Packet ¶
type Packet struct { Data *EncryptedData `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` Last bool `protobuf:"varint,2,opt,name=last" json:"last,omitempty"` }
The body of the message consists of data packets, which are portions of the original message, encrypted with the message key, and using the SHA-512 hash of all the bytes in the message which precede it as the authenticated data.
func (*Packet) GetData ¶
func (m *Packet) GetData() *EncryptedData
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
type PrivateKey ¶
type PrivateKey struct { N uint64 `protobuf:"varint,1,opt" json:"N,omitempty"` R uint64 `protobuf:"varint,2,opt,name=r" json:"r,omitempty"` P uint64 `protobuf:"varint,3,opt,name=p" json:"p,omitempty"` Salt []byte `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"` Key *EncryptedData `protobuf:"bytes,5,opt,name=key" json:"key,omitempty"` }
Private keys are stored encrypted with a key derived via scrypt from a passphrase.
func (*PrivateKey) GetKey ¶
func (m *PrivateKey) GetKey() *EncryptedData
func (*PrivateKey) ProtoMessage ¶
func (*PrivateKey) ProtoMessage()
func (*PrivateKey) Reset ¶
func (m *PrivateKey) Reset()
func (*PrivateKey) String ¶
func (m *PrivateKey) String() string
type PublicKey ¶
type PublicKey struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
Public keys are stored in the clear.
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
type Signature ¶
type Signature struct {
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
}
The final part of a message is the Ed25519 signature of the SHA-512 hash of all bytes in the message which precede the signature's frame.
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()