pb

package
v0.0.0-...-e71ae9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2015 License: MIT Imports: 1 Imported by: 0

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 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()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

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()

func (*Packet) Reset

func (m *Packet) Reset()

func (*Packet) String

func (m *Packet) String() string

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()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) String

func (m *PublicKey) String() string

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()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL